...
Depending on which machine you work and which compiler or environment you want to use the commands differ a little. Here are some options:
At UQAM
• If you want to use the Intel compiler set:
module load openmpi/2.1.5-intel-19.0-mkl
module load utils/misc # to get an up to date version of cmake
cmake -DCOMPILER=intel -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${MY_WORK_DIR} ../project
• If you want to use the GNU compiler (gcc/gfortran) set:
module
...
load
...
openmpi/3.1.5-gcc-8.3
...
cmake
...
-DCOMPILER=gnu
...
-DCMAKE_VERBOSE_MAKEFILE=ON
...
-DWORK_PREFIX=${MY_WORK_DIR}
...
../project
...
On Niagara
• using the native environment (recommended)
module
...
load
...
intel/2019u4
...
openmpi/4.0.1
...
fftw/3.3.8
...
cmake
...
cmake
...
-DCOMPILER=intel
...
-DCMAKE_VERBOSE_MAKEFILE=ON
...
-DWORK_PREFIX=${MY_WORK_DIR}
...
../project
...
• using the common Environmentenvironment
module
...
load
...
CCEnv
...
module
...
load
...
nixpkgs/16.09
...
module
...
load
...
intel/2019.3
...
module
...
load
...
openmpi
...
module
...
load
...
cmake/3.16.3
...
module
...
load
...
fftw-mpi
...
cmake
...
-DCOMPILER=intel
...
-DCMAKE_VERBOSE_MAKEFILE=ON
...
-DWORK_PREFIX=${MY_WORK_DIR}
...
../project
...
Create executable
make -j8 work # When using the key '-jn', the make command will run 'n' makes in parallel. So in this case 8.
Note: Sometimes, when running make in parallel it does not compile the routines in the right order (especially after massive updates of the source code). In that case run the command without the key '-j8'.
...
• At UQAM
If you want to use the Intel compiler set:
module load openmpi/2.1.5-intel-19.0-mkl
module load utils/misc # to get an up to date version of cmake
cmake -DCOMPILER=intel -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${MY_WORK_DIR} ../project
If you want to use the GNU compiler (gcc/gfortran) set:
module load openmpi/3.1.5-gcc-8.3
cmake -DCOMPILER=gnu -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${MY_WORK_DIR} ../project
• On Niagara using the native environment (recommended)
module load intel/2019u4 openmpi/4.0.1 fftw/3.3.8 cmake
cmake -DCOMPILER=intel -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${MY_WORK_DIR} ../project
• On Niagara using the common Environment
module load CCEnv
module load nixpkgs/16.09
module load intel/2019.3
module load openmpi
module load cmake/3.16.3
module load fftw-mpi
cmake -DCOMPILER=intel -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${MY_WORK_DIR} ../project
Create executable
...
Run the model
cd ${MY_WORK_DIR}
cd work-... # change into work directory, i.e. work-linux26-x86-64-intel-19.0.3.199
...