Exercise 4a: The initialdir Parameter
In the case where the files (input and output) are stored in an other directory than where the submission takes place, the initialdir command can be used in the submit description file. It is important to understand that initial directory is related to the input and output files and not related to the executable. This means that if the executable is in this directory, it is necessary to specify the fully qualified name of the executable. If just the name of the executable is set, it will not be found.
In this exercise, the output files are transferred back to the folder ex04_folder and NOT to the submitting directory.
Create the submit descriptiong file exercise4a.sub by using the following:
executable = your_path/ex04_folder/welcome.sh
arguments = $(ClusterId)$(ProcId)
output = ex_04.$(ClusterId).$(ProcId).out
error = ex_04.$(ClusterId).$(ProcId).err
log = ex_04.$(ClusterId).log
initialdir = your_path/ex04_folder
queue
Note: If the output files are sent to other directories than ex04_folder, an error will be generated during submission. The error results from searching the name of the directories output, error, log inside the ex04_folder, which do not exist.
executable = your_path/ex04_folder/welcome.sh
arguments = $(ClusterId)$(ProcId)
output = output/ex_04.$(ClusterId).$(ProcId).out
error = error/ex_04.$(ClusterId).$(ProcId).err
log = log/ex_04.$(ClusterId).log
initialdir = your_path/ex04_folder
queue
The error message:
[fprotops@lxplus045 trainingExercises]$ condor_submit exercise4a.sub
Submitting job(s)
ERROR: Invalid log file: "/afs/cern.ch/user/f/fprotops/condorTest/trainingExercises/ex04_folder/log/21833.log" (No such file or directory)