Skip to content

Commit 5108c6c

Browse files
committed
second draft of eessi doc
1 parent c3a03fd commit 5108c6c

File tree

1 file changed

+58
-29
lines changed

1 file changed

+58
-29
lines changed

docs/eessi.md

Lines changed: 58 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,86 @@
11
# EESSI Guide
22

3-
## How to load EESSI
4-
Loading an EESSI environment module:
5-
```[bash]
6-
source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
7-
```
8-
Activating EESSI environment:
9-
```[bash]
10-
source /cvmfs/software.eessi.io/versions/2023.06/init/bash
11-
```
3+
## How to Load EESSI
4+
EESSI can be initialised using either of the following methods:
5+
6+
1. Load the EESSI Environment Module.
7+
8+
The following command configures Lmod for your system and automatically loads the EESSI module:
9+
```[bash]
10+
source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
11+
```
12+
If Lmod is already installed, the following steps can be used to set up EESSI.
13+
Check if the `module` command is already defined on your system and what version it has.
14+
```[bash]
15+
command -v module && module --version
16+
```
17+
- If you're already using Lmod with a version >= 8.6, resetting `$MODULEPATH` is recommended.
18+
```[bash]
19+
module unuse $MODULEPATH
20+
module use /cvmfs/software.eessi.io/init/modules
21+
module load EESSI/2023.06
22+
```
23+
24+
- If you are using an older version of Lmod or another tool utilising `$MODULEPATH`, it is recommended to unset `$MODULEPATH` and then initialise a compatible version of Lmod. For example, the one shipped with EESSI.
25+
```[bash]
26+
unset MODULEPATH
27+
source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
28+
```
29+
30+
2. `source` the EESSI initialisation script for `bash`.
1231
13-
## GPU Support with EESI
14-
To enable GPU support you need a site-specific build that has `cuda` enabled. For guide to do this please refer to `docs/image-build`. This is
15-
because CUDA-drivers are host specific and EESSI can not ship NVIDIA drivers due to licensing + kernel specific constraints. This means that the
16-
host must provide the drivers in a known location (`host_injections`).
32+
The EESSI environment can be sourced (in a non-reversible way) by running:
33+
```[bash]
34+
source /cvmfs/software.eessi.io/versions/2023.06/init/bash
35+
```
36+
37+
Successful environment setup will show `{EESSI 2023.06}` at the start of your CLI.
38+
39+
## GPU Support with EESSI
40+
To enable GPU support, you need a site-specific build that has CUDA enabled. For a guide on how to do this, please refer to [docs/image-build.md](../image-build.md).
1741
1842
### Using GPUs
19-
All CUDA-enabled software in EESSI expects CUDA drivers in a specific `host_injections` subdirectory.<br>
43+
All CUDA-enabled software in EESSI expects CUDA drivers in a specific `host_injections` directory. This can be checked by running:
2044
```[bash]
2145
ls -l /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/software/CUDA/12.1.1/bin/nvcc
2246
```
23-
The output of this should show a symlink to the EESSI `host_injections` dir like so:
47+
The output should show a symlink to the EESSI `host_injections` directory.
2448
```[bash]
2549
lrwxrwxrwx 1 cvmfs cvmfs 109 May 6 2024 /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/software/CUDA/12.1.1/bin/nvcc
2650
-> /cvmfs/software.eessi.io/host_injections/2023.06/software/linux/x86_64/amd/zen3/software/CUDA/12.1.1/bin/nvcc
2751
```
28-
To expose the Nvidia GPU drivers.
52+
53+
#### To expose the NVIDIA GPU drivers:
54+
Use the `link_nvidia_host_libraries.sh` script, provided by EESSI, to symlink your GPU drivers into `host_injections`.
2955
```[bash]
3056
/cvmfs/software.eessi.io/versions/2023.06/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
3157
```
58+
Rerun this script when your NVIDIA GPU drivers are updated. It is also safe to rerun at any time as the script will detect if the driver versions have already been symlinked.
59+
60+
### Building with GPUs
3261

33-
### Buidling with GPUs
62+
Check `which nvcc` to confirm that the CUDA compiler is found.
3463

35-
Checking `nvcc --version` and `which nvcc` to see if `CUDA` compiler is found.<br>
36-
<br>
37-
If `nvcc` not found run:<br>
64+
If `nvcc` is not found, add the CUDA path to your environment. Replace `13.0` with your specific CUDA version:
3865
```[bash]
3966
export PATH=/usr/local/cuda-13.0/bin:$PATH
4067
```
41-
(with your specific cuda version)<br>
42-
`which nvcc` should now show path to compiler.<br>
43-
<br>
44-
Running `which gcc` will give path `.../2023.06/compat...`<br>
45-
Loading EESSI module (It is important to load a `gcc` that is compatible with the host's CUDA version.):<br>
68+
69+
`which nvcc` should now show the path to the CUDA compiler.
70+
71+
#### Loading EESSI module for the GCC compiler
72+
73+
Running `which gcc` should initially show a path `.../2023.06/compat...` which points to the compatibility compiler.
74+
It is important to load a `gcc` version that is compatible with the host's CUDA version:
4675
```[bash]
4776
module load GCC/12.3.0
4877
```
49-
Now running `which gcc` will give path `.../2023.06/software...`<br>
50-
<br>
51-
Now you can run `cmake` and `make` to compile `CUDA` using EESSI's `gcc`.<br>
78+
Running `which gcc` will now give a path `.../2023.06/software...` which is the full compiler provided by EESSI. This is what we want for CUDA builds.
79+
80+
Now you can run `cmake` and `make` to compile CUDA using EESSI's `gcc`.
5281

5382
#### Test setup: Compile deviceQuery from CUDA-Samples
54-
To test that your EESSI set up can compile `CUDA`, try compiling deviceQuery from CUDA-Samples with the following steps:<br>
83+
To test that your EESSI setup can compile CUDA, try compiling `deviceQuery` from CUDA-Samples with the following steps:
5584
```[bash]
5685
git clone https://github.com/NVIDIA/cuda-samples.git
5786
cd cuda-samples/Samples/1_Utilities/deviceQuery

0 commit comments

Comments
 (0)