Skip to content

Commit d2bb12f

Browse files
authored
Merge pull request #102 from optimas-org/juwels_installation
Add installation instructions for JUWELS Booster
2 parents 513feb5 + 5bcf723 commit d2bb12f

File tree

2 files changed

+110
-3
lines changed

2 files changed

+110
-3
lines changed
Lines changed: 109 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,109 @@
1-
Installation on Juwels (JSC)
2-
----------------------------
1+
Installation on JUWELS Booster (JSC)
2+
------------------------------------
3+
4+
Log into a JUWELS booster node either with ``ssh`` or by opening a terminal
5+
in the `JupyterLabs <https://jupyter-jsc.fz-juelich.de/>`_ (choose JUWELS as
6+
system and LoginNodeBooster as Partition).
7+
8+
9+
Create a ``profile.optimas`` file in your home directory with the following content
10+
11+
.. code::
12+
13+
module purge
14+
module load Stages/2023
15+
module load GCC
16+
module load ParaStationMPI
17+
module load CUDA
18+
module load SciPy-bundle
19+
module load mpi4py
20+
21+
you can do this from the command line by executing ``cat > ~/profile.optimas`` and
22+
pasting the lines above. To save the file, finalize by pressing ``Ctrl+D``.
23+
24+
Load the source file
25+
26+
.. code::
27+
28+
source ~/profile.optimas
29+
30+
31+
Create a new environment for optimas
32+
33+
.. code::
34+
35+
python -m venv $PROJECT/<username>/pyenvs/optimas_env
36+
37+
38+
Activate the environment
39+
40+
.. code::
41+
42+
source $PROJECT/<username>/pyenvs/optimas_env/bin/activate
43+
44+
45+
Install ``optimas``
46+
47+
.. code::
48+
49+
pip install optimas
50+
51+
52+
Installing FBPIC and Wake-T (optional)
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
A common use case for ``optimas`` is to optimize the output of a plasma acceleration
55+
simulation with FBPIC or Wake-T (or both). If you need any of these tools, you
56+
can follow the instructions below to install them in your ``optimas_env``
57+
environment.
58+
59+
Install FBPIC:
60+
61+
.. code::
62+
63+
pip install cupy-cuda117
64+
pip install fbpic
65+
66+
67+
Install Wake-T:
68+
69+
.. code::
70+
71+
pip install Wake-T
72+
73+
Install openPMD-viewer for data analysis
74+
75+
.. code::
76+
77+
pip install openPMD-viewer
78+
79+
80+
Running an optimas job
81+
~~~~~~~~~~~~~~~~~~~~~~
82+
The following script can be used to submit an ``optimas`` job to the JUWELS
83+
booster (i.e., the ``booster`` partition). For testing, use the
84+
``develbooster`` partition instead. This script assumes that you
85+
need one node with 4 GPUs and that your optimas script is called
86+
``run_optimization.py``.
87+
88+
Make sure to replace ``project_account``, ``user_email`` and ``username`` with
89+
your data.
90+
91+
.. code::
92+
93+
#!/bin/bash
94+
95+
#SBATCH --job-name optimas
96+
#SBATCH --nodes=1
97+
#SBATCH --partition=booster
98+
#SBATCH --account=<project_account>
99+
#SBATCH --time=12:00:00
100+
#SBATCH --output=stdout
101+
#SBATCH --error=stderr
102+
#SBATCH --mail-type=END
103+
#SBATCH --mail-user=<user_email>
104+
105+
# Activate environment
106+
source ~/profile.optimas
107+
source $PROJECT/<username>/pyenvs/optimas_env/bin/activate
108+
109+
python run_optimization.py

doc/source/user_guide/installation_maxwell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Create a ``profile.optimas`` file in your home directory with the following cont
2020
module load maxwell mamba
2121
. mamba-init
2222
23-
you can do this from the command line by executing ``cat > profile.optimas`` and
23+
you can do this from the command line by executing ``cat > ~/profile.optimas`` and
2424
pasting the lines above. To save the file, finalize by pressing ``Ctrl+D``.
2525

2626
Load the source file

0 commit comments

Comments
 (0)