From 45ccda6261e2ad60c3dd842a412f04aca88f3e0a Mon Sep 17 00:00:00 2001 From: Andreas Herten <a.herten@fz-juelich.de> Date: Thu, 4 Apr 2019 15:35:08 +0200 Subject: [PATCH] Add info about environment scripts --- Accounts.md | 6 ++++++ Batch-Systems.md | 16 +++++++++++++--- Environment.md | 19 +++++++++++++++++++ README.md | 2 ++ 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 Environment.md diff --git a/Accounts.md b/Accounts.md index 514f666..3a7c979 100644 --- a/Accounts.md +++ b/Accounts.md @@ -32,6 +32,12 @@ One of the first steps after login should be to activate the environment for the jutil env activate -p training1908 -A training1908 ``` +To shortcut this, use + +```bash +source $PROJECT_training1908/common/environment/activate.sh +``` + ### Tips & Trouble Shooting * [SSH tutorial](https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys) diff --git a/Batch-Systems.md b/Batch-Systems.md index 77ac4e4..f72ea9d 100644 --- a/Batch-Systems.md +++ b/Batch-Systems.md @@ -13,8 +13,8 @@ For the Hackathon, reservations are available for each day; please use these res There are large reservations during the active working hours of the Hackathon (9:00 to 18:00) and smaller reservations during the night (18:00 to 9:00). Please see the note on the night reservations below! -| Date | Reservation Name | -|--------------------------------|------------------------------| +| Date | Reservation Name | +|--------------------------------|-------------------------------| | **Mon, 8 April** | `gpu-hack-2019-04-08` | | Mon, 8 April, → Tue, 9 April | `gpu-hack-nightly-2019-04-08` | | **Tue, 9 April** | `gpu-hack-2019-04-09` | @@ -29,6 +29,14 @@ There are large reservations during the active working hours of the Hackathon (9 Use the reservations with `--reservation NAME`. +The reservation of the day can be set automatically by calling + +```bash +source $PROJECT_training1908/common/environment/reservation.sh +``` + +It will put the name of the night-time reservation into environment variable `$GPU_HACK_RESERVATION_NIGHTLY`. The day-time reservation is available at `$GPU_HACK_RESERVATION`, but will be used by Slurm automatically as the responsible environment variables are set (like `$SLURM_RESERVATION`). + ### Interactive Jobs #### Allocating Resources @@ -50,11 +58,13 @@ Further useful options: **Note**: A new shell is launched after allocating resources. +If you sourced the *useful variables*, partition and time do not need to be given to the `salloc` call as some defaults have been exported to Slurm environment variables. + #### Launching Jobs * Print host name: `srun hostname` * Launch interactive shell: `srun --pty /bin/bash -i` -* Forward X11: `srun --pty --forward-x /bin/bash -i` +* Forward X11: `srun --pty --forward-x /bin/bash -i`; as a first step after starting an interactive compute shell, please fix your X11 environment by calling `source $PROJECT_training1908/common/environment/juwels-xforward-fix.sh` (or by invoking `x11fix` in case you sourced the *useful variables*) Further useful options: diff --git a/Environment.md b/Environment.md new file mode 100644 index 0000000..8065ee4 --- /dev/null +++ b/Environment.md @@ -0,0 +1,19 @@ +# JUWELS Hackathon System Environment + +There are scripts available to configure the environment for the GPU Hackathon. Use them like this (replacing `environment.sh` with the respective script) + +```bash +source $PROJECT_training1908/common/environment/environment.sh +``` + +Available files: + +* `environment.sh`: Source all of the following scripts +* `activate.sh`: Prepare the environment for accounting to `training1909` with `jutil` +* `reservation.sh`: Set the Slurm reservation for the current day by exporting responsible environment variables; it will also export the associated nightly reservation name to `$GPU_HACK_RESERVATION_NIGHTLY` to be used manually +* `useful_variables.sh`: Set some useful variables and shortcuts + - Set the Slurm environment variables to use the `gpus` partition, such that `--partition gpus` does not need to be appended for each `salloc` command + - Set the Slurm environment variables to use an allocation time of 4 h, such that `--time 4:00:00` does not need to be appended for each `salloc` command + - Set some `$GPU_HACK_` convenience function + - Teach the module system to use module files of `$PROJECT_training1908/common/applications`; see them with `module avail` + - Export an alias, `x11fix`, needed when working with GUI applications on JUWELS compute nodes diff --git a/README.md b/README.md index f841a60..3e3fa15 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ Available documents: * [Account Creation and Login](Accounts.md) * [JUWELS Introduction](JUWELS.md) * [JURON Introduction](JURON.md) +* [Setting up JUWELS Environment for GPU Hackathon](Environment.md) * [Overview of the Batch Systems](Batch-Systems.md) * [More Information and Useful Links](More.md) +* Folder: [Previous communications](./communication/) See the directory ./pdf/ for PDF version of the files, for example all.pdf. -- GitLab