From 49e8788208bbc7262dcecd207e13e097d1bfb322 Mon Sep 17 00:00:00 2001
From: Martin Schroschk <martin.schroschk@tu-dresden.de>
Date: Wed, 21 Dec 2022 11:51:53 +0100
Subject: [PATCH] Update workspace sectioN: save result files to workspace not
 home

---
 .../docs/jobs_and_resources/slurm_generator.md       | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_generator.md b/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_generator.md
index ce90a731b..2de9a3778 100644
--- a/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_generator.md
+++ b/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_generator.md
@@ -826,6 +826,13 @@ along with sgen.  If not, see <http://www.gnu.org/licenses/>.
           outputText.innerText += '\ncd ${WSDIR}';
         }
 
+        if (document.getElementById('check-workspace').checked && document.getElementById('check-delete').checked) {
+          outputText.innerText += '\n\n# The workspace where results from multiple experiments will be saved for later analysis.';
+          outputText.innerText += '\n# Remark: Make sure RESULT_WSDIR exists!';
+          outputText.innerText += '\nRESULT_WSDIR="/path/to/workspace-experiments-results"'
+          outputText.innerText += '\ntest -z "${RESULT_WSDIR}" && echo "Error: Cannot find workspace ${RESULT_WSDIR}" && exit 1';
+        }
+
         if (document.getElementById('executable').value !== '') {
           outputText.innerText += '\n\n# Execute parallel application ';
           outputText.innerText += '\nsrun '
@@ -836,9 +843,10 @@ along with sgen.  If not, see <http://www.gnu.org/licenses/>.
         }
 
         if (document.getElementById('check-workspace').checked && document.getElementById('check-delete').checked) {
-          outputText.innerText += '\n\n# Save your results, e.g. in your home directory';
+          outputText.innerText += '\n\n# Save your results to the general workspace RESULT_WSDIR (s.a.).';
           outputText.innerText += '\n# Compress results with bzip2 (which includes CRC32 checksums)';
-          outputText.innerText += '\nbzip2 --compress --stdout -4 "${WSDIR}" > ${HOME}/${SLURM_JOB_ID}.bz2';
+          outputText.innerText += '\n# Remark: Assume all result and log files of interest are in the directory `results`.';
+          outputText.innerText += '\nbzip2 --compress --stdout -4 "${WSDIR}/results" > ${RESULT_WSDIR}/${SLURM_JOB_ID}.bz2';
           outputText.innerText += '\nRETURN_CODE=$?';
           outputText.innerText += '\nCOMPRESSION_SUCCESS="$(if test ${RETURN_CODE} -eq 0; then echo'
                                   +' \'TRUE\'; else echo \'FALSE\'; fi)"';
-- 
GitLab