[slurm-users] How to get the path to original sbatch script

Lachlan Musicman datakid at gmail.com
Sat May 26 03:04:57 MDT 2018


On 26 May 2018 at 12:19, 程迪 <chengdi123000 at gmail.com> wrote:

> Hi, everyone
>
> I just found the sbatch will copy the original sbatch script to a new
> place and I cannot get the path to original sbatch script. Is there any
> method to solve it?
>
> I am using the path to copy related files. I need to populate a scratch
> folder to run my job.
>
> Di Cheng
> Engineer of Research and Development Center, visiting scholar at
> University of Connecticut
> China Academy of Aerospace Aerodynamics
> Phone @ China: +86-l58Ol5949ll
> Phone @ US: +l-86O-6l7-l886
>
> Address: No.17, YunGang West Road, Fengtai District, Beijing, China
> <https://maps.google.com/?q=No.17,+YunGang+West+Road,+Fengtai+District,+Beijing,+China+Zip+Code%EF%BC%9A100074&entry=gmail&source=g>
>
>
> <https://maps.google.com/?q=No.17,+YunGang+West+Road,+Fengtai+District,+Beijing,+China+Zip+Code%EF%BC%9A100074&entry=gmail&source=g>
>


I'm not 100% sure what you mean, but this might help:

 - you can set Working Directory. If you don't, the path to the sbatch
script is the Working Directory (I think that's right)
 - if you scontrol show job <id> you can see the paths that are in place
for the job
 - the path in question needs to be available on all worker nodes that
needs access

 - in script, to get the scripts path:

#!/bin/bash
#SBATCH nodes=
#etc

MYDIR=$(dirname "$0")

L.


------
"The antidote to apocalypticism is *apocalyptic civics*. Apocalyptic civics
is the insistence that we cannot ignore the truth, nor should we panic
about it. It is a shared consciousness that our institutions have failed
and our ecosystem is collapsing, yet we are still here — and we are
creative agents who can shape our destinies. Apocalyptic civics is the
conviction that the only way out is through, and the only way through is
together. "

*Greg Bloom* @greggish
https://twitter.com/greggish/status/873177525903609857
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180526/5e1171e3/attachment-0001.html>


More information about the slurm-users mailing list