diff --git a/fractal_server/app/runner/executors/slurm/ssh/executor.py b/fractal_server/app/runner/executors/slurm/ssh/executor.py index 89ef4f4e2b..704e2feda3 100644 --- a/fractal_server/app/runner/executors/slurm/ssh/executor.py +++ b/fractal_server/app/runner/executors/slurm/ssh/executor.py @@ -1199,8 +1199,10 @@ def _prepare_sbatch_script( script_lines = slurm_config.sort_script_lines(script_lines) logger.debug(script_lines) - # Always print output of `pwd` - script_lines.append('echo "Working directory (pwd): `pwd`"\n') + # Always print output of `uname -n` and `pwd` + script_lines.append( + '"Hostname: `uname -n`; current directory: `pwd`"\n' + ) # Complete script preamble script_lines.append("\n") diff --git a/fractal_server/app/runner/executors/slurm/sudo/executor.py b/fractal_server/app/runner/executors/slurm/sudo/executor.py index 34faaa6535..535525f91d 100644 --- a/fractal_server/app/runner/executors/slurm/sudo/executor.py +++ b/fractal_server/app/runner/executors/slurm/sudo/executor.py @@ -1162,8 +1162,10 @@ def _prepare_sbatch_script( script_lines = slurm_config.sort_script_lines(script_lines) logger.debug(script_lines) - # Always print output of `pwd` - script_lines.append('echo "Working directory (pwd): `pwd`"\n') + # Always print output of `uname -n` and `pwd` + script_lines.append( + '"Hostname: `uname -n`; current directory: `pwd`"\n' + ) # Complete script preamble script_lines.append("\n")