Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:41

0001 #!/bin/bash
0002 #
0003 # submit jobs to condor
0004 # 
0005 # $executable the program to execute (usually a shell script)
0006 # $arg is what is passed to the run.cmd script
0007 # $log is what the log file names are
0008 # $user is the email to send to
0009 #
0010 
0011 # make sure log directory exists
0012 TMPLOG=/tmp/${USER}/${PWD##*$USER/}/log
0013 echo mkdir -p ${TMPLOG}
0014 mkdir -p ${TMPLOG}
0015 mkdir -p log
0016 
0017 executable=runstarlight.cmd    # program to run
0018 logfname=${executable%.cmd}
0019 
0020 njobs=10   # num jobs to run
0021 
0022 # submit njobs
0023 for (( ijob=0; ijob<${njobs}; ijob++ ))
0024 #cat redoruns | while read ijob
0025 do
0026   echo "Submitting Run ${ijob}"
0027 
0028   log=${logfname}${ijob}    # log file names
0029   arg=${ijob}             # argument passed to executable
0030 
0031   echo "Queue" | condor_submit \
0032     -a "Executable=$PWD/${executable}" \
0033     -a "Arguments=${arg}" \
0034     -a "Log=${TMPLOG}/${log}.log" \
0035     -a "Output=$PWD/log/${log}.out" \
0036     -a "Error=$PWD/log/${log}.err" \
0037     -a "+Job_Type=\"cas\"" \
0038     -a "Initialdir=$PWD" \
0039     -a "GetEnv=True"
0040 
0041 done
0042 
0043 echo Condor submit logs are in $TMPLOG
0044