It seems that I cannot use ./
in qsub
as in
qsub -q hpc-pool ./myScript.sh
where myScript.sh
contains several ./
.
After checking, ./
somewhat is translated to ~/
. Why is this the case?
batch jobsworking directory
It seems that I cannot use ./
in qsub
as in
qsub -q hpc-pool ./myScript.sh
where myScript.sh
contains several ./
.
After checking, ./
somewhat is translated to ~/
. Why is this the case?
Best Answer
Batch jobs submitted by
qsub
are executed in your home directory by default.Some versions of
qsub
support the-d
option to specify a different directory. To execute the script in the same directory where you ranqsub
, useIf the
-d
option is not available, you can access the directory where you ranqsub
in your script, in thePBS_O_WORKDIR
variable. So add this line near the beginning of your script: