I have followed the guide on setting up bin_override scripts so that sbatch is executed over ssh. There is a disclaimer on the guide that stderr and stdout will go to the users home directory:
This wrapper when used with the OOD Job Composer will place any stdout or stderr files in $HOME instead of the usual location of $HOME/ondemand/data/sys/myjobs/projects/default/$JOBID.
Is there a way to get output to go to the usual location, where the usual location is the directory that gets created for each job? Additionally, is there a way to set the working directory to the usual location so that the sbatch script can use relative file paths to access files/data in the job directory?
If I was given the location of the job directory in the bin_override script, then I think adding the –chdir flag to the sbatch command would work. However, the bin_override script just seems to get the contents of the submission script piped to stdin as it’s input, so I don’t know how I would know what path to set with the –chdir flag. Is there additional information about the job that gets passed to the bin_override script that I am not aware of?
Another solution would be to change the working directory within the submission script, but that would be a manual process for each new job, since each new job needs a new path based on its id.
Is there a better solution to this problem?