Skip to content

Commit

Permalink
Add uname -n output to SLURM jobs - ref #1588
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Feb 5, 2025
1 parent a5afca6 commit 8fd4ba1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions fractal_server/app/runner/executors/slurm/ssh/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 4 additions & 2 deletions fractal_server/app/runner/executors/slurm/sudo/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 8fd4ba1

Please sign in to comment.