A copy of the batch script is sent to the compute node. Its path is not preserved. The reasons for moving around a copy of the file are:
1) There may not be a file (e.g. "sbatch --wrap "hostname" ...")
2) The script may be on a file system not accessible from the compute node (e.g. a local /tmp file)



Quoting Ulf Markwardt <[email protected]>:

Dear Slurm experts,

is it possible to access the complete path of the submission script?
We see that this does not work...

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
# go to dir where this file is in
cd `dirname $0`
# do this or that...

...because the script is moved to a different location.

Does that mean we have lost the path of the original script if it is NOT in the current work directory?

Thank you,
Ulf

--
___________________________________________________________________
Dr. Ulf Markwardt

Technische Universität Dresden
Center for Information Services and High Performance Computing (ZIH)
01062 Dresden, Germany

Phone: (+49) 351/463-33640      WWW:  http://www.tu-dresden.de/zih



Reply via email to