From 428c6c871ef223d4ffbad7c14bffbe77aeb7b75e Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Fri, 23 Jun 2023 07:40:38 -0700 Subject: [PATCH] Documentation: add submission script on Perlmutter --- .../user_guide/installation_perlmutter.rst | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/doc/source/user_guide/installation_perlmutter.rst b/doc/source/user_guide/installation_perlmutter.rst index d756eeab..cb1d39ea 100644 --- a/doc/source/user_guide/installation_perlmutter.rst +++ b/doc/source/user_guide/installation_perlmutter.rst @@ -19,13 +19,42 @@ environment, in which to install `optimas`. python3 -m pip install optimas -Running -~~~~~~~ +Running an optimas job +~~~~~~~~~~~~~~~~~~~~~~ -Before using `optimas`, execute the following commands to activate -the virtual environment: +In order to run a new optimas job, create a new folder in the ``$SCRATCH`` +directory, and add the files needed to describe your optimization, i.e. typically: + +* a file ``run_optimization.py`` +* a template simulation input script +* a file ``analysis_script.py`` that postprocesses the simulation results + +(See a typical example `here `_.) + +Then, create a file ``submission_script`` with the following content: :: + #!/bin/bash -l + #SBATCH -t + #SBATCH -N + #SBATCH -A + #SBATCH -C gpu + #SBATCH -q regular + #SBATCH --exclusive + #SBATCH --gpu-bind=none + #SBATCH --gpus-per-node=4 + module load cray-python/3.9.13.1 source $HOME/sw/perlmutter/gpu/venvs/optimas/bin/activate + + python run_optimization.py + +where ````, ```` and ```` should be replaced +by the wall time, number of nodes and NERSC account number that you want to use. + +Then run: + +:: + + sbatch submission_script \ No newline at end of file