Imagine I have a lsf file as fllows:
#!/bin/sh
#BSUB -J X
#BSUB -o X.out
#BSUB -e X.err
...
Once it is run the output will appear in the current folder.
Now imagine I am in
~/code
I need the files to appear in
../cluster/
basically go one folder back and from there go to folder cluster.
How should I write do it within the lsf file?
You can put any relative or absolute path in #BSUB -[eo] <file>
. e.g. #BSUB -e ../cluster/X.err
. If using a relative path, its relative to the job CWD. By default the job CWD is the job submission directory, but can be changed by a bunch of different parameters. bjobs -l <jobid>
shows the actual CWD.
What happens is that while the job is running, the stdout and stderr goes to a file under LSF_TMPDIR (default is $HOME/.lsbatch). After the job finishes, the contents of those files is copied to the pathnames specified in -[eo]
. The copying is done on the execution host.