Skip to content
Snippets Groups Projects
Commit 2630bbef authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Fix heading of example

parent ccb7c370
No related branches found
No related tags found
2 merge requests!679Automated merge from preview to main,!659Check ws allocation
...@@ -213,13 +213,13 @@ There are three typical options for the use of workspaces: ...@@ -213,13 +213,13 @@ There are three typical options for the use of workspaces:
### Per-Job Storage ### Per-Job Storage
A batch job needs a directory for temporary data. This can be deleted afterwards. A batch job needs a directory for temporary data. This can be deleted afterwards.
To help you to write your own SBatch file, suited to your own needs, we came up with To help you to write your own (Slurm) job file, suited to your own needs, we came up with
the following example (which works [for the program g16](../software/nanoscale_simulations.md)). the following example (which works [for the program g16](../software/nanoscale_simulations.md)).
You will probably want to adjust it in a few places (e.g. what software you want to You will probably want to adjust it in a few places (e.g. what software you want to
[load](../software/modules.md), inserting the path to your input file and actually [load](../software/modules.md), inserting the path to your input file and actually
calling the actual software to do your computation). calling the actual software to do your computation).
!!! example "Using temporary Workspaces for I/O intensive tasks" !!! example "Using temporary workspaces for I/O intensive tasks"
#!/bin/bash #!/bin/bash
#SBATCH --partition=haswell #SBATCH --partition=haswell
...@@ -256,7 +256,7 @@ calling the actual software to do your computation). ...@@ -256,7 +256,7 @@ calling the actual software to do your computation).
bzip2 --compress --stdout -4 "${WORKSPACE_DIR}" > $HOME/gaussian_job-$SLURM_JOB_ID.bz2 bzip2 --compress --stdout -4 "${WORKSPACE_DIR}" > $HOME/gaussian_job-$SLURM_JOB_ID.bz2
RETURN_CODE=$? RETURN_CODE=$?
COMPRESSION_SUCCESS="$(if test $RETURN_CODE -eq 0; then echo 'TRUE'; else echo 'FALSE'; fi)" COMPRESSION_SUCCESS="$(if test $RETURN_CODE -eq 0; then echo 'TRUE'; else echo 'FALSE'; fi)"
if [ "TRUE" = $COMPRESSION_SUCCESS ]; then if [ "TRUE" = $COMPRESSION_SUCCESS ]; then
test -d $WORKSPACE_DIR && rm -rf $WORKSPACE_DIR/* test -d $WORKSPACE_DIR && rm -rf $WORKSPACE_DIR/*
# Reduces grace period to 1 day! # Reduces grace period to 1 day!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment