ug4
|
Special instructions for the different parallel computers are on separate pages:
Instructions for password-less login to the different clusters are on the page about SSH (including Exchanging SSH Keys, SSH Hopping, FUSE/SSHFS).
See also ugsubmit - Job Scheduling on Clusters.
All examples are for running ug in parallel with <NP>
processors and $UGARGS
as arguments, where <NP>
is a placeholder for the number of MPI processes and $UGARGS
is an Unix environment variable which for example is defined by (Bash syntax; just to shorten command lines):
UGARGS="-ex ../scripts/tests/modular_scalability_test.lua -dim 2 -grid ../data/grids/unit_square_01/unit_square_01_quads_8x8.ugx"
mpirun -np <NP> ugshell $UGARGS
to start your job on a cluster! The node you are logging into is only a login node, and you don't want to run your job on these.We have included a automatic configuration: It is called ugconfig, and is in ug4/scripts/shell/ugconfig. So for your .bashrc, we suggest
ugconfig then automatically detects you cluster and loads standard modules like cmake, LAPACK or compilers. With this, you can also use the next tool to help you set up: Instead of using cmake, you can use ugcmake-start, e.g.
This will again automatically detect your cluster, and call cmake with the appropriate toolchain file and flags (see also CMake, Toolchains, Compilers).
The aim of ugconfig and ugcmake-start is to make your life easier, so if they do not work, please tell, so we can fix that problem for you and others.
On some systems (especially when the software is built for a different system than the one which does the build) it is necessary to change some configuration settings done by CMake (like compilers or flags to use) by a so called "toolchain file" (cf. for example CMake Cross Compiling).
In this case run CMake like this
cmake -DCMAKE_TOOLCHAIN_FILE=<TOOLCHAINFILE> ..
Toolchain files are located in cmake/toolchain
.
ug4 is using external libraries and distributes some of its own codes into libraries (e.g. plugins). There are two ways of dealing with libraries:
Although its possible on most clusters to create shared libraries and run dynamically linked executables this is in general not recommended, since loading of shared libraries can delay the startup of such an application considerably, especially when using large partitions (8 racks or more). See for example Shared Libraries and Dynamic Executables on Juqueen.
Start CMake like this
If you're using a Toolchain File, use
You can specify other compilers than detected by CMake from the command line with
cmake -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=CC ..
Please see for compiler troubleshooting Known Internal Compiler Errors .
If you need to choose another compiler, please consider writing your own toolchain file, so others can benefit from your knowledge.
Unfortunately on some systems it turned out that especially the build tool CMake, absolutely necessary to configure ug4 (cf. Prerequisites and Recommended Tools, Installation of CMake (required)), was not available. In such cases you have to install the required software yourself (typically locally). For some installation instructions — including those for CMake — see Prerequisites and Recommendend Tools .
After installation of a MPI implementation (e.g. OpenMPI, for example via MacPorts: sudo port install openmpi
) you can use
mpirun -np <NP> ugshell $UGARGS
to run ug4.