-
Notifications
You must be signed in to change notification settings - Fork 13
/
build_instructions.txt
52 lines (41 loc) · 2.68 KB
/
build_instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
1. UWLCM has multiple dependencies. We have an Singularity image with all of them and I will describe build instructions that use the container. Alternatively, you could install dependencies manually.
Also, this instruction will probably not work for MPI runs (i.e. will only run on a single node).
MPI is supported, but the MPI implementation on your cluster needs to be compatible with the MPI implementation in Singularity image (MVAPICH2).
Ask your cluster administrator for help.
You can also choose not to use the Singularity image for MPI runs, but install all dependencies manually on the cluster. Commands for installing dependencies can be found at:
https://github.com/igfuw/UWLCM/blob/master/singularity/sng_ubuntu_20_04_cuda_11_4_mvapich2
When building for MPI runs, tell CMake to use the MPI compiler instead of gcc, e.g.:
-DCMAKE_CXX_COMPILER=mpic++
2. You need to have Singularity (not the Linux game!) or Apptainer (they forked from the original Singularity project). It is most probably already installed on your cluster.
2a. If using Apptainer, you need to add the sylabs cloud repository (see https://apptainer.org/docs/user/1.0/endpoint.html), e.g.:
$ apptainer remote add --no-login SylabsCloud cloud.sylabs.io
$ apptainer remote use SylabsCloud
3. Download a UWLCM image (with or without MPI) from:
https://cloud.sylabs.io/library/pdziekan/default/uwlcm
4. Download libmpdata++ library from github, e.g.:
$ git clone https://github.com/igfuw/libmpdataxx.git
5. Download libcloudph++ library from github, e.g.:
$ git clone https://github.com/igfuw/libcloudphxx.git
6. Download UWLCM from github, e.g.:
$ git clone https://github.com/igfuw/UWLCM.git
8. Install libmpdata++ using the Singularity image:
- create “build” directory: libmpdataxx/libmpdata++/build
- in the build direcory issue:
$ singularity exec --nv [IMAGE_NAME].sif sh -c
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=gcc
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} .. ; make install"
9. Build and install libcloudph++ using the Singularity image:
- create “build” directory: libcloudphxx/build
- in the build direcory issue:
$ singularity exec --nv [IMAGE_NAME].sif sh -c
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=gcc
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}
-DLIBCLOUDPHXX_FORCE_MULTI_CUDA=True .. ; make -j4 install"
10. Build and install UWLCM using the Singularity image:
- create “build” directory: UWLCM/build
- in the build direcory issue:
$ singularity exec --nv [IMAGE_NAME] sh -c
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=gcc
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}
-Dlibmpdata++_DIR=${INSTALL_DIR}/share/libmpdata++
-Dlibcloudph++_DIR=${INSTALL_DIR}/share/libcloudph++ .. ; make -j4 install"