Skip to content

Commit c47e3ae

Browse files
authored
document CPE in a container (#99)
1 parent 32a819d commit c47e3ae

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

docs/build-install/cpe.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,90 @@
88

99
!!! cwp
1010
The CPE is not provided on the climage and weather platform
11+
12+
## CPE in a container
13+
!!! info
14+
Currently it is mandatory to export the EDF path manually
15+
```
16+
export EDF_PATH=/capstor/scratch/cscs/anfink/shared/cpe/edf:$EDF_PATH
17+
```
18+
19+
To start a container with the cray programming environment, there are pre-defined EDF toml files. Currently they are stored in `/capstor/scratch/cscs/anfink/shared/cpe/edf`, but this will change in the future to a different location.
20+
Every toml file in this edf path is a programming environment that can be started
21+
```
22+
[daint][anfink@daint-ln001 ~]$ ls -lh /capstor/scratch/cscs/anfink/shared/cpe/edf
23+
total 8.0K
24+
-rw-r--r--+ 1 anfink csstaff 175 Apr 23 11:48 cpe-cray-24.07.toml
25+
-rw-r--r--+ 1 anfink csstaff 174 Apr 23 11:32 cpe-gnu-24.07.toml
26+
```
27+
Following the naming scheme from the output, you can spawn a container with
28+
```
29+
srun --environment=cpe-cray-24.07 --pty bash
30+
```
31+
Once the container starts up you can directly use the programming environment, because there will be modules loaded by default at startup.
32+
```
33+
[daint][anfink@daint-ln001 ~]$ srun -p debug --environment=cpe-gnu-24.07 --pty bash
34+
[daint][anfink@nid005417 /]$ module list
35+
36+
Currently Loaded Modules:
37+
1) craype-arm-grace 2) craype-network-ofi 3) xpmem/2.9.6 4) gcc-native/13.2 5) craype/2.7.32 6) PrgEnv-gnu/8.5.0 7) cray-mpich/8.1.30 8) cuda/12.6 9) craype-accel-nvidia90
38+
39+
40+
41+
[daint][anfink@nid005417 /]$ module avail
42+
43+
----------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/mpi/gnu/12.0/ofi/1.0/cray-mpich/8.0 -----------------------------------------------------------------------------------------------------------------------------------------------------
44+
cray-hdf5-parallel/1.14.3.1 cray-parallel-netcdf/1.12.3.13
45+
46+
----------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/comnet/gnu/12.0/ofi/1.0 -----------------------------------------------------------------------------------------------------------------------------------------------------------
47+
cray-mpich-abi/8.1.30 cray-mpich/8.1.30 (L)
48+
49+
---------------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/mix_compilers ----------------------------------------------------------------------------------------------------------------------------------------------------------------
50+
gcc-native-mixed/13.2
51+
52+
-------------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/compiler/gnu/12.0 --------------------------------------------------------------------------------------------------------------------------------------------------------------
53+
cray-hdf5/1.14.3.1 cray-libsci/24.07.0
54+
55+
-------------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/cpu/arm-grace/1.0 --------------------------------------------------------------------------------------------------------------------------------------------------------------
56+
cray-fftw/3.3.10.8
57+
58+
----------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/craype-targets/default ------------------------------------------------------------------------------------------------------------------------------------------------------------
59+
craype-accel-amd-gfx908 craype-accel-amd-gfx942 craype-accel-nvidia80 craype-hugepages128M craype-hugepages256M craype-hugepages32M craype-hugepages64M craype-network-ofi (L) craype-x86-milan-x craype-x86-spr-hbm
60+
craype-accel-amd-gfx90a craype-accel-host craype-accel-nvidia90 (L) craype-hugepages16M craype-hugepages2G craype-hugepages4M craype-hugepages8M craype-network-ucx craype-x86-milan craype-x86-spr
61+
craype-accel-amd-gfx940 craype-accel-nvidia70 craype-arm-grace (L) craype-hugepages1G craype-hugepages2M craype-hugepages512M craype-network-none craype-x86-genoa craype-x86-rome craype-x86-trento
62+
63+
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/pe/lmod/modulefiles/core ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
64+
PrgEnv-gnu/8.5.0 (L) cray-libsci_acc/24.07.0 cray-pmi/6.1.15.19 cray-python/3.11.7 craype/2.7.32 (L) gcc-native/13.2 (L)
65+
66+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cray/modulefiles ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
67+
xpmem/2.9.6 (L)
68+
69+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /opt/cscs/modulefiles ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
70+
cuda/12.6 (L)
71+
72+
Where:
73+
L: Module is loaded
74+
75+
If the avail list is too long consider trying:
76+
77+
"module --default avail" or "ml -d av" to just list the default modules.
78+
"module overview" or "ml ov" to display the number of modules for each name.
79+
80+
Use "module spider" to find all possible modules and extensions.
81+
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
82+
83+
84+
[daint][anfink@nid005417 /]$ CC --version
85+
g++-13 (SUSE Linux) 13.3.0
86+
Copyright (C) 2023 Free Software Foundation, Inc.
87+
This is free software; see the source for copying conditions. There is NO
88+
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
89+
90+
[daint][anfink@nid005417 /]$
91+
```
92+
93+
The recommended way of using CPE in a container is to start the container, and use `$SCRATCH` and `$STORE` to interact with persistent data. Please remember that any data that is written to a directory that is not mounted from the host system will be lost, after the container stops.
94+
95+
By default, the paths `/capstor`, `/iopsstor` are mounted to the same paths inside the container.
96+
97+
Additionally `/users` will be mounted at `/users.host`, so you can access data in your home folder, but with a slightly different path. This is on purpose, and you can override this behaviour by writing your own [EDF file][ref-ce-edf-reference], especially using the key `base_environment`, referencing the predefined CPE environment files and override what you would like to change.

0 commit comments

Comments
 (0)