Skip to content

Commit bcc67e1

Browse files
authored
Docs: update instructions for Adastra supercomputer (CINES, France) (#4655)
* update instructions for Adastra supercomputer * remove empty line * fix bug * fix bug * fix bug
1 parent fa422b5 commit bcc67e1

File tree

4 files changed

+74
-61
lines changed

4 files changed

+74
-61
lines changed

Docs/source/install/hpc/adastra.rst

+19-11
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,26 @@ If you are new to this system, **please see the following resources**:
3131
Preparation
3232
-----------
3333

34+
The following instructions will install WarpX in the ``$SHAREDHOMEDIR`` directory,
35+
which is shared among all the members of a given project. Due to the inode
36+
quota enforced for this machine, a shared installation of WarpX is advised.
37+
3438
Use the following commands to download the WarpX source code:
3539

3640
.. code-block:: bash
3741
38-
git clone https://github.com/ECP-WarpX/WarpX.git $HOME/src/warpx
42+
# If you have multiple projects, activate the project that you want to use with:
43+
#
44+
# myproject -a YOUR_PROJECT_NAME
45+
#
46+
git clone https://github.com/ECP-WarpX/WarpX.git $SHAREDHOMEDIR/src/warpx
3947
40-
We use system software modules, add environment hints and further dependencies via the file ``$HOME/adastra_warpx.profile``.
48+
We use system software modules, add environment hints and further dependencies via the file ``$SHAREDHOMEDIR/adastra_warpx.profile``.
4149
Create it now:
4250

4351
.. code-block:: bash
4452
45-
cp $HOME/src/warpx/Tools/machines/adastra-cines/adastra_warpx.profile.example $HOME/adastra_warpx.profile
53+
cp $SHAREDHOMEDIR/src/warpx/Tools/machines/adastra-cines/adastra_warpx.profile.example $SHAREDHOMEDIR/adastra_warpx.profile
4654
4755
.. dropdown:: Script Details
4856
:color: light
@@ -53,23 +61,23 @@ Create it now:
5361
:language: bash
5462

5563
Edit the 2nd line of this script, which sets the ``export proj=""`` variable using a text editor
56-
such as ``nano``, ``emacs``, or ``vim`` (all available by default on
57-
Adastra login nodes).
64+
such as ``nano``, ``emacs``, or ``vim`` (all available by default on Adastra login nodes) and
65+
uncomment the 3rd line (which sets ``$proj`` as the active project).
5866

5967
.. important::
6068

6169
Now, and as the first step on future logins to Adastra, activate these environment settings:
6270

6371
.. code-block:: bash
6472
65-
source $HOME/adastra_warpx.profile
73+
source $SHAREDHOMEDIR/adastra_warpx.profile
6674
6775
Finally, since Adastra does not yet provide software modules for some of our dependencies, install them once:
6876

6977
.. code-block:: bash
7078
71-
bash $HOME/src/warpx/Tools/machines/adastra-cines/install_dependencies.sh
72-
source $HOME/sw/adastra/gpu/venvs/warpx-adastra/bin/activate
79+
bash $SHAREDHOMEDIR/src/warpx/Tools/machines/adastra-cines/install_dependencies.sh
80+
source $SHAREDHOMEDIR/sw/adastra/gpu/venvs/warpx-adastra/bin/activate
7381
7482
.. dropdown:: Script Details
7583
:color: light
@@ -89,13 +97,13 @@ Use the following :ref:`cmake commands <building-cmake>` to compile the applicat
8997

9098
.. code-block:: bash
9199
92-
cd $HOME/src/warpx
100+
cd $SHAREDHOMEDIR/src/warpx
93101
rm -rf build_adastra
94102
95103
cmake -S . -B build_adastra -DWarpX_COMPUTE=HIP -DWarpX_PSATD=ON -DWarpX_QED_TABLE_GEN=ON -DWarpX_DIMS="1;2;RZ;3"
96104
cmake --build build_adastra -j 16
97105
98-
The WarpX application executables are now in ``$HOME/src/warpx/build_adastra/bin/``.
106+
The WarpX application executables are now in ``$SHAREDHOMEDIR/src/warpx/build_adastra/bin/``.
99107
Additionally, the following commands will install WarpX as a Python module:
100108

101109
.. code-block:: bash
@@ -119,7 +127,7 @@ If you already installed WarpX in the past and want to update it, start by getti
119127

120128
.. code-block:: bash
121129
122-
cd $HOME/src/warpx
130+
cd $SHAREDHOMEDIR/src/warpx
123131
124132
# read the output of this command - does it look ok?
125133
git status

Tools/machines/adastra-cines/adastra_warpx.profile.example

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
# please set your project account
1+
# please set your project account and uncomment the following two lines
22
#export proj=your_project_id
3+
#myproject -a $proj
34

45
# required dependencies
6+
module purge
7+
module load cpe/23.12
58
module load craype-accel-amd-gfx90a craype-x86-trento
69
module load PrgEnv-cray
10+
module load CCE-GPU-3.0.0
711
module load amd-mixed/5.2.3
8-
module load CPE-23.02-cce-15.0.1-GPU-softs
912

1013
# optional: for PSATD in RZ geometry support
11-
export CMAKE_PREFIX_PATH=${HOME}/sw/adastra/gpu/blaspp-master:$CMAKE_PREFIX_PATH
12-
export CMAKE_PREFIX_PATH=${HOME}/sw/adastra/gpu/lapackpp-master:$CMAKE_PREFIX_PATH
13-
export LD_LIBRARY_PATH=${HOME}/sw/adastra/gpu/blaspp-master/lib64:$LD_LIBRARY_PATH
14-
export LD_LIBRARY_PATH=${HOME}/sw/adastra/gpu/lapackpp-master/lib64:$LD_LIBRARY_PATH
14+
export CMAKE_PREFIX_PATH=${SHAREDHOMEDIR}/sw/adastra/gpu/blaspp-master:$CMAKE_PREFIX_PATH
15+
export CMAKE_PREFIX_PATH=${SHAREDHOMEDIR}/sw/adastra/gpu/lapackpp-master:$CMAKE_PREFIX_PATH
16+
export LD_LIBRARY_PATH=${SHAREDHOMEDIR}/sw/adastra/gpu/blaspp-master/lib64:$LD_LIBRARY_PATH
17+
export LD_LIBRARY_PATH=${SHAREDHOMEDIR}/sw/adastra/gpu/lapackpp-master/lib64:$LD_LIBRARY_PATH
1518

1619
# optional: for QED lookup table generation support
17-
module load boost/1.81.0-mpi-python3
20+
module load boost/1.83.0-mpi-python3
1821

1922
# optional: for openPMD support
2023
module load cray-hdf5-parallel
21-
export CMAKE_PREFIX_PATH=${HOME}/sw/adastra/gpu/c-blosc-1.21.1:$CMAKE_PREFIX_PATH
22-
export CMAKE_PREFIX_PATH=${HOME}/sw/adastra/gpu/adios2-2.8.3:$CMAKE_PREFIX_PATH
24+
export CMAKE_PREFIX_PATH=${SHAREDHOMEDIR}/sw/adastra/gpu/c-blosc-1.21.1:$CMAKE_PREFIX_PATH
25+
export CMAKE_PREFIX_PATH=${SHAREDHOMEDIR}/sw/adastra/gpu/adios2-2.8.3:$CMAKE_PREFIX_PATH
2326

2427
export PATH=${HOME}/sw/adastra/gpu/adios2-2.8.3/bin:${PATH}
2528

2629
# optional: for Python bindings or libEnsemble
27-
module load cray-python/3.9.13.1
30+
module load cray-python/3.11.5
2831

2932
# fix system defaults: do not escape $ with a \ on tab completion
3033
shopt -s direxpand
@@ -49,7 +52,4 @@ export AMREX_AMD_ARCH=gfx90a
4952
# compiler environment hints
5053
export CC=$(which cc)
5154
export CXX=$(which CC)
52-
export FC=$(which ftn)
53-
export CFLAGS="-I${ROCM_PATH}/include"
54-
export CXXFLAGS="-I${ROCM_PATH}/include -Wno-pass-failed"
55-
export LDFLAGS="-L${ROCM_PATH}/lib -lamdhip64"
55+
export FC=$(which amdflang)

Tools/machines/adastra-cines/install_dependencies.sh

+30-30
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -z ${proj-} ]; then echo "WARNING: The 'proj' variable is not yet set in yo
2020

2121
# Remove old dependencies #####################################################
2222
#
23-
SW_DIR="${HOME}/sw/adastra/gpu"
23+
SW_DIR="${SHAREDHOMEDIR}/sw/adastra/gpu"
2424
rm -rf ${SW_DIR}
2525
mkdir -p ${SW_DIR}
2626

@@ -34,62 +34,62 @@ python3 -m pip uninstall -qqq -y mpi4py 2>/dev/null || true
3434
#
3535

3636
# BLAS++ (for PSATD+RZ)
37-
if [ -d $HOME/src/blaspp ]
37+
if [ -d $SHAREDHOMEDIR/src/blaspp ]
3838
then
39-
cd $HOME/src/blaspp
39+
cd $SHAREDHOMEDIR/src/blaspp
4040
git fetch --prune
4141
git checkout master
4242
git pull
4343
cd -
4444
else
45-
git clone https://github.com/icl-utk-edu/blaspp.git $HOME/src/blaspp
45+
git clone https://github.com/icl-utk-edu/blaspp.git $SHAREDHOMEDIR/src/blaspp
4646
fi
47-
rm -rf $HOME/src/blaspp-adastra-gpu-build
48-
CXX=$(which CC) cmake -S $HOME/src/blaspp -B $HOME/src/blaspp-adastra-gpu-build -Duse_openmp=OFF -Dgpu_backend=hip -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=${SW_DIR}/blaspp-master
49-
cmake --build $HOME/src/blaspp-adastra-gpu-build --target install --parallel 16
50-
rm -rf $HOME/src/blaspp-adastra-gpu-build
47+
rm -rf $SHAREDHOMEDIR/src/blaspp-adastra-gpu-build
48+
CXX=$(which CC) cmake -S $SHAREDHOMEDIR/src/blaspp -B $SHAREDHOMEDIR/src/blaspp-adastra-gpu-build -Duse_openmp=OFF -Dgpu_backend=hip -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=${SW_DIR}/blaspp-master
49+
cmake --build $SHAREDHOMEDIR/src/blaspp-adastra-gpu-build --target install --parallel 16
50+
rm -rf $SHAREDHOMEDIR/src/blaspp-adastra-gpu-build
5151

5252
# LAPACK++ (for PSATD+RZ)
53-
if [ -d $HOME/src/lapackpp ]
53+
if [ -d $SHAREDHOMEDIR/src/lapackpp ]
5454
then
55-
cd $HOME/src/lapackpp
55+
cd $SHAREDHOMEDIR/src/lapackpp
5656
git fetch --prune
5757
git checkout master
5858
git pull
5959
cd -
6060
else
61-
git clone https://github.com/icl-utk-edu/lapackpp.git $HOME/src/lapackpp
61+
git clone https://github.com/icl-utk-edu/lapackpp.git $SHAREDHOMEDIR/src/lapackpp
6262
fi
63-
rm -rf $HOME/src/lapackpp-adastra-gpu-build
64-
CXX=$(which CC) CXXFLAGS="-DLAPACK_FORTRAN_ADD_" cmake -S $HOME/src/lapackpp -B $HOME/src/lapackpp-adastra-gpu-build -DCMAKE_CXX_STANDARD=17 -Dbuild_tests=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_PREFIX=${SW_DIR}/lapackpp-master
65-
cmake --build $HOME/src/lapackpp-adastra-gpu-build --target install --parallel 16
66-
rm -rf $HOME/src/lapackpp-adastra-gpu-build
63+
rm -rf $SHAREDHOMEDIR/src/lapackpp-adastra-gpu-build
64+
CXX=$(which CC) CXXFLAGS="-DLAPACK_FORTRAN_ADD_" cmake -S $SHAREDHOMEDIR/src/lapackpp -B $SHAREDHOMEDIR/src/lapackpp-adastra-gpu-build -DCMAKE_CXX_STANDARD=17 -Dbuild_tests=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_PREFIX=${SW_DIR}/lapackpp-master
65+
cmake --build $SHAREDHOMEDIR/src/lapackpp-adastra-gpu-build --target install --parallel 16
66+
rm -rf $SHAREDHOMEDIR/src/lapackpp-adastra-gpu-build
6767

6868
# c-blosc (I/O compression, for OpenPMD)
69-
if [ -d $HOME/src/c-blosc ]
69+
if [ -d $SHAREDHOMEDIR/src/c-blosc ]
7070
then
7171
# git repository is already there
7272
:
7373
else
74-
git clone -b v1.21.1 https://github.com/Blosc/c-blosc.git $HOME/src/c-blosc
74+
git clone -b v1.21.1 https://github.com/Blosc/c-blosc.git $SHAREDHOMEDIR/src/c-blosc
7575
fi
76-
rm -rf $HOME/src/c-blosc-ad-build
77-
cmake -S $HOME/src/c-blosc -B $HOME/src/c-blosc-ad-build -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF -DDEACTIVATE_AVX2=OFF -DCMAKE_INSTALL_PREFIX=${HOME}/sw/adastra/gpu/c-blosc-1.21.1
78-
cmake --build $HOME/src/c-blosc-ad-build --target install --parallel 16
79-
rm -rf $HOME/src/c-blosc-ad-build
76+
rm -rf $SHAREDHOMEDIR/src/c-blosc-ad-build
77+
cmake -S $SHAREDHOMEDIR/src/c-blosc -B $SHAREDHOMEDIR/src/c-blosc-ad-build -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF -DDEACTIVATE_AVX2=OFF -DCMAKE_INSTALL_PREFIX=${SW_DIR}/c-blosc-1.21.1
78+
cmake --build $SHAREDHOMEDIR/src/c-blosc-ad-build --target install --parallel 16
79+
rm -rf $SHAREDHOMEDIR/src/c-blosc-ad-build
8080

8181
# ADIOS2 v. 2.8.3 (for OpenPMD)
82-
if [ -d $HOME/src/adios2 ]
82+
if [ -d $SHAREDHOMEDIR/src/adios2 ]
8383
then
8484
# git repository is already there
8585
:
8686
else
87-
git clone -b v2.8.3 https://github.com/ornladios/ADIOS2.git $HOME/src/adios2
87+
git clone -b v2.8.3 https://github.com/ornladios/ADIOS2.git $SHAREDHOMEDIR/src/adios2
8888
fi
89-
rm -rf $HOME/src/adios2-ad-build
90-
cmake -S $HOME/src/adios2 -B $HOME/src/adios2-ad-build -DADIOS2_USE_Blosc=ON -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_Python=OFF -DADIOS2_USE_ZeroMQ=OFF -DCMAKE_INSTALL_PREFIX=${HOME}/sw/adastra/gpu/adios2-2.8.3
91-
cmake --build $HOME/src/adios2-ad-build --target install -j 16
92-
rm -rf $HOME/src/adios2-ad-build
89+
rm -rf $SHAREDHOMEDIR/src/adios2-ad-build
90+
cmake -S $SHAREDHOMEDIR/src/adios2 -B $SHAREDHOMEDIR/src/adios2-ad-build -DADIOS2_USE_Blosc=ON -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_Python=OFF -DADIOS2_USE_ZeroMQ=OFF -DCMAKE_INSTALL_PREFIX=${SW_DIR}/adios2-2.8.3
91+
cmake --build $SHAREDHOMEDIR/src/adios2-ad-build --target install -j 16
92+
rm -rf $SHAREDHOMEDIR/src/adios2-ad-build
9393

9494

9595
# Python ######################################################################
@@ -114,9 +114,9 @@ python3 -m pip install --upgrade openpmd-api
114114
python3 -m pip install --upgrade matplotlib
115115
python3 -m pip install --upgrade yt
116116
# install or update WarpX dependencies such as picmistandard
117-
python3 -m pip install --upgrade -r $HOME/src/warpx/requirements.txt
117+
python3 -m pip install --upgrade -r $SHAREDHOMEDIR/src/warpx/requirements.txt
118118
# optional: for libEnsemble
119-
python3 -m pip install -r $HOME/src/warpx/Tools/LibEnsemble/requirements.txt
119+
python3 -m pip install -r $SHAREDHOMEDIR/src/warpx/Tools/LibEnsemble/requirements.txt
120120
# optional: for optimas (based on libEnsemble & ax->botorch->gpytorch->pytorch)
121121
#python3 -m pip install --upgrade torch --index-url https://download.pytorch.org/whl/rocm5.4.2
122-
#python3 -m pip install -r $HOME/src/warpx/Tools/optimas/requirements.txt
122+
#python3 -m pip install -r $SHAREDHOMEDIR/src/warpx/Tools/optimas/requirements.txt

Tools/machines/adastra-cines/submit.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
#!/bin/bash
2-
#SBATCH --job-name=warpx
32
#SBATCH --account=<account_to_charge>
3+
#SBATCH --job-name=warpx
44
#SBATCH --constraint=MI250
5-
#SBATCH --ntasks-per-node=8 --cpus-per-task=8 --gpus-per-node=8
6-
#SBATCH --threads-per-core=1 # --hint=nomultithread
5+
#SBATCH --nodes=2
76
#SBATCH --exclusive
87
#SBATCH --output=%x-%j.out
98
#SBATCH --time=00:10:00
10-
#SBATCH --nodes=2
119

1210
module purge
1311

14-
# Architecture
12+
# A CrayPE environment version
13+
module load cpe/23.12
14+
# An architecture
1515
module load craype-accel-amd-gfx90a craype-x86-trento
1616
# A compiler to target the architecture
1717
module load PrgEnv-cray
1818
# Some architecture related libraries and tools
19-
module load amd-mixed
19+
module load CCE-GPU-3.0.0
20+
module load amd-mixed/5.2.3
21+
22+
date
23+
module list
2024

2125
export MPICH_GPU_SUPPORT_ENABLED=1
2226

@@ -36,4 +40,5 @@ export OMP_NUM_THREADS=1
3640
export WARPX_NMPI_PER_NODE=8
3741
export TOTAL_NMPI=$(( ${SLURM_JOB_NUM_NODES} * ${WARPX_NMPI_PER_NODE} ))
3842
srun -N${SLURM_JOB_NUM_NODES} -n${TOTAL_NMPI} --ntasks-per-node=${WARPX_NMPI_PER_NODE} \
43+
--cpus-per-task=8 --threads-per-core=1 --gpu-bind=closest \
3944
./warpx inputs > output.txt

0 commit comments

Comments
 (0)