<div dir="ltr">On 26 May 2018 at 12:19, 程迪 <span dir="ltr"><<a href="mailto:chengdi123000@gmail.com" target="_blank">chengdi123000@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, everyone</div><div><br></div><div>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?</div><div><br></div><div>I am using the path to copy related files. I need to populate a scratch folder to run my job.</div><br clear="all"><div><div class="m_8039145532375662836gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div style="line-height:21px"><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:x-small">Di Cheng</span><br></div></div><div><div style="line-height:21px"><font style="line-height:1.5" size="1" face="arial, helvetica, sans-serif" color="#000000">Engineer of Research and Development Center, v</font><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:x-small">isiting scholar at University of Connecticut</span></div><div style="line-height:21px"><font style="line-height:1.5" size="1" face="arial, helvetica, sans-serif" color="#000000">China Academy of Aerospace Aerodynamics</font></div><div style="line-height:21px"><font style="line-height:1.5" size="1" face="arial, helvetica, sans-serif" color="#000000">Phone @ China: +86-l58Ol5949ll</font></div><div style="line-height:21px"><font style="line-height:1.5" size="1" face="arial, helvetica, sans-serif" color="#000000">Phone @ US: +l-86O-6l7-l886</font></div><div style="line-height:21px"><p style="line-height:1.7;padding:0px;margin:0px;font-stretch:normal"><font style="line-height:1.5" size="1" face="arial, helvetica, sans-serif" color="#000000">Address: <a href="https://maps.google.com/?q=No.17,+YunGang+West+Road,+Fengtai+District,+Beijing,+China+Zip+Code%EF%BC%9A100074&entry=gmail&source=g">No.17, YunGang West Road, Fengtai District, Beijing, China</a></font></p><p style="line-height:1.7;padding:0px;margin:0px;font-stretch:normal"><font style="line-height:1.5" size="1" face="arial, helvetica, sans-serif" color="#000000"><a href="https://maps.google.com/?q=No.17,+YunGang+West+Road,+Fengtai+District,+Beijing,+China+Zip+Code%EF%BC%9A100074&entry=gmail&source=g"></a></font></p></div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div><br></div><div>I'm not 100% sure what you mean, but this might help:</div><div><br></div><div> - you can set Working Directory. If you don't, the path to the sbatch script is the Working Directory (I think that's right)<br></div><div> - if you scontrol show job <id> you can see the paths that are in place for the job</div><div> - the path in question needs to be available on all worker nodes that needs access</div><div><br></div><div> - in script, to get the scripts path:<br></div><div><br></div><div>#!/bin/bash</div><div>#SBATCH nodes=</div><div>#etc<br></div><div><br></div><div>MYDIR=$(dirname "$0")<br></div><div><br></div><div>L.<br></div><div><br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>------<br>"The antidote to apocalypticism is 
<b>apocalyptic civics</b>. 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. "<br><br><i>Greg Bloom</i> @greggish <a href="https://twitter.com/greggish/status/873177525903609857" target="_blank">https://twitter.com/greggish/status/873177525903609857</a><br></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><br></div></div></div></div></div></div>