From d13c6a0fd341ed7b4f9faf15386a36f3a63e7be8 Mon Sep 17 00:00:00 2001 From: Martin Schroschk <martin.schroschk@tu-dresden.de> Date: Wed, 31 Aug 2022 14:06:03 +0200 Subject: [PATCH] Add comment to job file examples --- doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md | 2 ++ doc.zih.tu-dresden.de/docs/software/nanoscale_simulations.md | 1 + 2 files changed, 3 insertions(+) diff --git a/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md b/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md index e6739ae6d..f31e10923 100644 --- a/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md +++ b/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md @@ -251,6 +251,7 @@ calling the actual software to do your computation). # Check allocation test -z "${WORKSPACE_DIR}" && echo "Error: Cannot allocate workspace ${COMPUTE_DIR}" && exit 1 + # Change to workspace directory cd ${WORKSPACE_DIR} # Adjust the following line to invoke the program you want to run @@ -261,6 +262,7 @@ calling the actual software to do your computation). RETURN_CODE=$? COMPRESSION_SUCCESS="$(if test ${RETURN_CODE} -eq 0; then echo 'TRUE'; else echo 'FALSE'; fi)" + # Clean up workspace if [ "TRUE" = ${COMPRESSION_SUCCESS} ]; then test -d ${WORKSPACE_DIR} && rm -rf ${WORKSPACE_DIR}/* # Reduces grace period to 1 day! diff --git a/doc.zih.tu-dresden.de/docs/software/nanoscale_simulations.md b/doc.zih.tu-dresden.de/docs/software/nanoscale_simulations.md index c60714158..db2765935 100644 --- a/doc.zih.tu-dresden.de/docs/software/nanoscale_simulations.md +++ b/doc.zih.tu-dresden.de/docs/software/nanoscale_simulations.md @@ -154,6 +154,7 @@ However hereafter we have an example on how that might look like for Gaussian: RETURN_CODE=$? COMPRESSION_SUCCESS="$(if test ${RETURN_CODE} -eq 0; then echo 'TRUE'; else echo 'FALSE'; fi)" + # Clean up workspace if [ "TRUE" = ${COMPRESSION_SUCCESS} ]; then test -d ${GAUSS_SCRDIR} && rm -rf ${GAUSS_SCRDIR}/* # Reduces grace period to 1 day! -- GitLab