I was searching around the web for an answer to this question however I couldn't find anything useful, so I've got the feeling what I'm looking for is not possible but maybe I missed something... So I'm just gonna try to ask here:
When submitting PBS job arrays, I want the WORKING DIRECTORY for each job to depend on the array ID. A small example to clarify. For a job array ranging from 1 to 100 (qsub -t 1-100 -v $array_size=100 .... called_script.sh
), each job has its own working directory bunch_1-100, bunch_2-100,..... bunch_100-100. Atm I just use the $PBS_ARRAY_ID
variable and a passed variable that contains the array size ($array_size
), to navigate to the appropriate folder.
Imo this solution is not really optimal, because I'm fixing the naming scheme inside the called_script.sh
script which is called by the submit script.
Hence if there would be some kind of placeholder for the job array id when submitting the job, i.e. qsub -t 1-100 -v $somevar=/some/directory/path/bunch-#PBS_ARRAY_ID_PLACEHOLDER-100 ... called_script.sh
. So each called_script.sh would have a different $somevar
variable automatically.
I think it should be possible in theory, however I got the feeling this is only theory :).
Thx in advance for any answers