Update Setting up the Monai tsunami experiment authored by Daniel Caviedes Voullieme's avatar Daniel Caviedes Voullieme
......@@ -45,12 +45,12 @@ The initial conditions for the experiment are those of a quiescent (i.e., zero v
This benchmark typically uses Manning's friction law, with a roughness value of 0.01. Set this up in the file. Finally, because of the small scale of the experiment, and because in a tsunami we are particularly interested on the advancement of the wave over dry land, we will use a dry depth tolerance of 0.0001 m.
### Do a first run
Let's try to launch the job. Recall that the command looks like this
### Setup and sbatch file and run it
We could try to run a job by running something like this:
```$SERGHEIPATH/bin/serghei ./input/ ./output/ NUMBER_OF_THREADS```
However, we now want to launch this job using the compute nodes. Although this can be done through the command line, it is better to use an `sbatch` script to configure the job in an HPC system.
However, this will not send the job to the compute nodes, but rather launch the job locally in the login node where we are working. We now want to launch this job using the compute nodes. Although this can be done through the command line, it is better to use an `sbatch` script to configure the job in an HPC system.
A minimal `sbatch` script for SERGHEI looks like this below.
......@@ -58,12 +58,12 @@ A minimal `sbatch` script for SERGHEI looks like this below.
#!/bin/bash -x
#SBATCH --job-name="SERGHEI"
#SBATCH --account=##acocunt_name##
#SBATCH --account=##account_name##
#SBATCH --time=00:05:00
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=64
#SBATCH --cpus-per-task=##how_many?##
#SBATCH --nodes=1
#SBATCH --partition=dc-cpu-devel
#SBATCH --partition=##partition_to_use##
##### until here, we have configured the HPC resoureces #####
##### now we configure some additional goodies #####
......@@ -87,4 +87,40 @@ srun $SERGHEIPATH/bin/serghei $casePath/input/ $casePath/$OUTDIR/ $OMP_NUM_THREA
```
The first block (with the `SBATCH` keyword) informs the system of the HPC resources we want to use. It requires an account name to which the compute time will be billed against, a maximum job time, how many tasks we want per node, how many nodes we want and how many cpus we wish to use per task. Finally, since the HPC system is divided into **partitions** of nodes, we must specify which one we will use.
For the problem we will run here, we will use the `dc-cpu-devel` partition, we will use all of the CPUs in a single node, and will only use one task, as all of our computational domain will be in the same node.
Configure the sbatch script with this information and save it in some reasonable place (e.g., where you have the Monai files). Remember to also update the `casePath` in the script to where the `input` folder lies.
Finally, we can run this script and launch the job.
```
sbatch my_sbatch_script
```
If things go well, you should get an output folder and inside it a `log.out` file.
You will also get a `slurm` job report showing everything that happened behind the scenes and not shown in the terminal while the job was launched in the compute nodes. Inspecting the contents of this file which also show if there was an error or a successful run. If you had errors, try troubleshooting through them.
### Visualising results
Let's check out the results. Although the output of this exercise is rather small, we will nonetheless visualise it in a lightweight way in the remote system.
We first start by forwarding graphics, often referred to as forwarding X from the remote server into our local machine, with the same SSH command with which you login, but including `-X`.
```
ssh -X -i ~/.ssh/id_ed25519 <yourid>@jureca.fz-juelich.de
```
Upon login, source the modules necessary for SERGHEI, and also load the [Panoply](https://www.giss.nasa.gov/tools/panoply/) module
```
module load Panoply/4.11.6
```
Navigate to where your results are, into the output folder, until you can find the `output.nc` file.
Let's open this with
```
panoply output.nc
```
This should prompt a window, looking roughly like this
![panoply_window](uploads/ab0141ab1e0ae0bfdf68bd44f00e9658/panoply_window.png)
Select one of the variable and click on "Create plot", and then set up the axis correctly so that we can see, for example, water depth (h) in space (x-y).