|
1 | 1 | [`LUMI`](https://www.lumi-supercomputer.eu/) cluster is located in Finland. It is equipped with 2978 nodes with 4 AMD MI250x GPUs and a single 64 cores AMD EPYC "Trento" CPU. The required modules to be loaded are: |
2 | 2 |
|
3 | | -**Compiling & running the code** |
| 3 | +**Installing the dependencies** |
| 4 | + |
| 5 | +!!! note "Using the `dependencies.py`" |
| 6 | + |
| 7 | + <span class="since-version">1.4.0</span> |
| 8 | + Simply pick the `lumi` option from the cluster-specific parameters from the `dependencies.py` file included with the root of the code, and then run `$HOME/.entity/install.sh` which will both compile and install the dependencies and create modulefiles. It's much faster and more reliable to do this from within a shell running on compute nodes. |
| 9 | + |
| 10 | +Building and installing the dependencies can be done using the following modules: |
4 | 11 |
|
5 | 12 | ```sh |
6 | 13 | module load PrgEnv-cray |
7 | 14 | module load cray-mpich |
8 | 15 | module load craype-accel-amd-gfx90a |
9 | 16 | module load rocm |
10 | | -module load cray-hdf5-parallel/1.12.2.11 |
11 | 17 | ``` |
12 | 18 |
|
13 | | -The configuration command is standard. The `Kokkos` library, along with `adios2`, will be installed from code dependencies directly at compilation. It is also important to provide the `c++` and `c` compilers manually with environemntal variables `CC` and `cc` (they are already predefined given that all the modules mentioned above were loaded). So far, gpu-aware mpi is not supported on `LUMI`. The configuration command is the following: |
| 19 | +Then for `Kokkos` (5.0.0+): |
| 20 | + |
| 21 | +```sh |
| 22 | +# configure with |
| 23 | +cmake -B build \ |
| 24 | + -D CMAKE_CXX_STANDARD=20 \ |
| 25 | + -D CMAKE_CXX_EXTENSIONS=OFF \ |
| 26 | + -D CMAKE_CXX_COMPILER=hipcc \ |
| 27 | + -D CMAKE_POSITION_INDEPENDENT_CODE=TRUE \ |
| 28 | + -D Kokkos_ARCH_AMD_GFX90A=ON -D Kokkos_ENABLE_HIP=ON -D AMDGPU_TARGETS=gfx90a \ |
| 29 | + -D CMAKE_INSTALL_PREFIX=$HOME/.entity/kokkos |
| 30 | +# compile and install with |
| 31 | +cmake --build build -j |
| 32 | +cmake --install build |
| 33 | +``` |
| 34 | + |
| 35 | +For `adios2`: |
| 36 | + |
14 | 37 | ```sh |
15 | | -cmake -B build -D pgen=turbulence -D mpi=ON -D Kokkos_ENABLE_HIP=ON -D Kokkos_ARCH_AMD_GFX90A=ON -D CMAKE_CXX_COMPILER=CC -D CMAKE_C_COMPILER=cc -D gpu_aware_mpi=OFF |
| 38 | +# configure with |
| 39 | +cmake -B build \ |
| 40 | + -D CMAKE_CXX_STANDARD=20 \ |
| 41 | + -D CMAKE_CXX_EXTENSIONS=OFF \ |
| 42 | + -D CMAKE_CXX_COMPILER=CC -D CMAKE_C_COMPILER=cc \ |
| 43 | + -D CMAKE_POSITION_INDEPENDENT_CODE=TRUE \ |
| 44 | + -D BUILD_SHARED_LIBS=ON \ |
| 45 | + -D ADIOS2_USE_Python=OFF \ |
| 46 | + -D ADIOS2_USE_Fortran=OFF \ |
| 47 | + -D ADIOS2_USE_ZeroMQ=OFF \ |
| 48 | + -D BUILD_TESTING=OFF \ |
| 49 | + -D ADIOS2_BUILD_EXAMPLES=OFF \ |
| 50 | + -D ADIOS2_USE_HDF5=OFF \ |
| 51 | + -D ADIOS2_USE_MPI=ON \ |
| 52 | + -D CMAKE_INSTALL_PREFIX=$HOME/.entity/adios2 |
| 53 | +# compile and install with |
| 54 | +cmake --build build -j |
| 55 | +cmake --install build |
| 56 | +``` |
| 57 | + |
| 58 | + |
| 59 | +**Compiling & running the code** |
| 60 | + |
| 61 | +So far, the gpu-aware MPI is not supported on `LUMI`. The configuration command for `Entity` is the following: |
| 62 | + |
| 63 | +```sh |
| 64 | +cmake -B build -D pgen=<PGEN> -D mpi=ON -D gpu_aware_mpi=OFF \ |
| 65 | + -D CMAKE_CXX_COMPILER=hipcc -D CMAKE_C_COMPILER=hipcc \ |
| 66 | + -D Kokkos_ROOT=$HOME/.entity/kokkos \ |
| 67 | + -D adios2_ROOT=$HOME/.entity/adios2 \ |
| 68 | + -D AMDGPU_TARGETS=gfx90a |
16 | 69 | ``` |
17 | 70 |
|
18 | | -The example submit script: |
| 71 | +If you also installed the `Kokkos` and `adios2` environment modules, you can skip the `Kokkos_ROOT` and `adios2_ROOT` flags. |
| 72 | + |
| 73 | +The example submit script for running the code: |
19 | 74 |
|
20 | 75 | ```slurm |
21 | 76 | #!/bin/bash -l |
22 | | -#SBATCH --job-name=examplejob # Job name |
23 | | -#SBATCH --output=test.out # Name of stdout output file |
24 | | -#SBATCH --error=test.err # Name of stderr error file |
25 | | -#SBATCH --partition=standard-g # partition name |
26 | | -#SBATCH --nodes=8 # Total number of nodes |
27 | | -#SBATCH --ntasks-per-node=8 # 8 MPI ranks per |
28 | | -#SBATCH --gpus-per-node=8 |
29 | | -##SBATCH --mem=0 |
30 | | -#SBATCH --time=48:00:00 # Run time (d-hh:mm:ss) |
| 77 | +#SBATCH --job-name=examplejob # Job name |
| 78 | +#SBATCH --output=test.out # Name of stdout output file |
| 79 | +#SBATCH --error=test.err # Name of stderr error file |
| 80 | +#SBATCH --partition=standard-g # partition name |
| 81 | +#SBATCH --nodes=8 # Total number of nodes |
| 82 | +#SBATCH --ntasks-per-node=8 # 8 MPI ranks per node |
| 83 | +#SBATCH --gpus-per-node=8 # 8 GPU ranks per node (2 rank per physical GPU) |
| 84 | +#SBATCH --time=48:00:00 # Run time (d-hh:mm:ss) |
31 | 85 | #SBATCH --account=project_<NUMBER> # Project for billing |
| 86 | +
|
32 | 87 | export MPICH_GPU_SUPPORT_ENABLED=1 |
33 | 88 | srun ./entity.xc -input <INPUT>.toml |
34 | 89 | ``` |
0 commit comments