Commit a5b3ae17 authored by Holger Brandl's avatar Holger Brandl
Browse files

added logging of command, jobid, and queue args

parent e6a6e755
......@@ -255,10 +255,14 @@ mysub(){
## create hidden log file directory if not present
if [ ! -d .logs ]; then mkdir .logs; fi
## also log job command and queuing arguments for reference
echo ${jobCmd} > .logs/${jobName}.cmd
echo $@ > .logs/${jobName}.lsfargs
## use bsub if available, otherwise fall back to simple eval and ignore other arguments
if [ -n "$(command -v bsub)" ] && [ -z "$LOCAL_RUN" ]; then
# echo "submitting job ${jobName}"
bsub -J $jobName $@ "( $jobCmd ) 2>.logs/${jobName}.err.log 1>.logs/${jobName}.out.log"
bsub -J $jobName $@ "( $jobCmd ) 2>.logs/${jobName}.err.log 1>.logs/${jobName}.out.log" | joblist .logs/${jobName}.jobid
echo "using eval instead of bsub for ${jobName}"
eval $jobCmd 2>.logs/${jobName}.err.log 1>.logs/${jobName}.out.log
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment