@@ -18,7 +18,7 @@ outputDir=""
1818numThreads=8
1919singleTimeline=" "
2020declare -A modes
21- for key in list build skip-mya focus-timelines focus-qa run-slurm organize-only single series submit swifjob debug help ; do
21+ for key in list build skip-mya focus-timelines focus-qa run-slurm after-slurm single series submit swifjob debug help ; do
2222 modes[$key ]=false
2323done
2424
@@ -62,8 +62,9 @@ usage() {
6262 --focus-qa only run the QA code (assumes you have detector timelines already)
6363
6464 --run-slurm run timelines on SLURM instead of running multi-threaded locally
65- --organize-only only organize timelines assuming they have already been run with --run-slurm
66- if not used, all files from output directories will be removed
65+ --after-slurm organize timelines **after** running them with --run-slurm
66+ **Note**, if this option is not used after running on slurm,
67+ all files from output directories will be removed.
6768
6869 *** EXECUTION CONTROL OPTIONS: choose only one, or the default will generate a
6970 Slurm job description and print out the suggested \` sbatch\` command
@@ -204,12 +205,12 @@ detDirs=(
204205)
205206
206207# cleanup output directories IF you are not just organizing files after running on SLURM
207- if (${modes['focus-all']} || ${modes['focus-timelines']} ) && ! ${modes['organize-only ']} ; then
208+ if (${modes['focus-all']} || ${modes['focus-timelines']} ) && ! ${modes['after-slurm ']} ; then
208209 if [ -d $finalDirPreQA ]; then
209210 rm -rv $finalDirPreQA
210211 fi
211212fi
212- if [ -d $logDir ] && ! ${modes['organize-only ']} ; then
213+ if [ -d $logDir ] && ! ${modes['after-slurm ']} ; then
213214 for fail in $( find $logDir -name " *.fail" ) ; do
214215 rm $fail
215216 done
@@ -257,7 +258,7 @@ if ${modes['focus-all']} || ${modes['focus-timelines']}; then
257258 done
258259
259260 # produce timelines, multithreaded
260- if ! ${modes['run-slurm']} || ${modes['debug']} && ! ${modes['organize-only ']} ; then
261+ if ! ${modes['run-slurm']} || ${modes['debug']} && ! ${modes['after-slurm ']} ; then
261262 job_ids=()
262263 job_names=()
263264 for timelineObj in $timelineList ; do
@@ -282,7 +283,7 @@ if ${modes['focus-all']} || ${modes['focus-timelines']}; then
282283 fi # condition end: produce timelines, multi-threaded
283284
284285 # produce timelines, distributed on SLURM or test singly or sequentially locally
285- if ${modes['run-slurm']} && ! ${modes['organize-only ']} ; then
286+ if ${modes['run-slurm']} && ! ${modes['after-slurm ']} ; then
286287
287288 # initial checks and preparations
288289 echo $dataset | grep -q " /" && printError " dataset name must not contain '/' " && echo && exit 100
0 commit comments