Skip to content

Commit 0704de4

Browse files
chiarazampollidavidrohr
authored andcommitted
Fixing condition to setup env for EPNs
1 parent 276cf80 commit 0704de4

4 files changed

Lines changed: 56 additions & 24 deletions

File tree

DATA/production/common/getStat.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ nCTFsProcessed=$((nCTFsProcessed + 1))
1414

1515
if [[ $nCTFsFilesInspected != $((nCTFsFilesFailed + nCTFsFilesOK)) ]]; then
1616
echo "Something went wrong with parsing the log file: CTF files inspected ($nCTFsFilesInspected) is not the sum of those successfully processed ($nCTFsFilesOK) and those that failed ($nCTFsFilesFailed)"
17+
exit 8
1718
fi
1819
while read -r line; do
1920
currentPVs=`echo $line | sed 's/^.*Found \([0-9]*\) PVs.*/\1/'`

DATA/production/configurations/asyncReco/async_pass.sh

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ fi
353353
echo "SETTING_ROOT_OUTPUT = $SETTING_ROOT_OUTPUT"
354354

355355
# Enabling GPUs
356-
if [[ -n "$ALIEN_JDL_USEGPUS" && $ALIEN_JDL_USEGPUS != 0 ]]; then
356+
if [[ -n "$ALIEN_JDL_USEGPUS" && $ALIEN_JDL_USEGPUS != 0 ]] ; then
357357
echo "Enabling GPUS"
358358
export GPUTYPE="HIP"
359359
export GPUMEMSIZE=$((25 << 30))
@@ -456,6 +456,13 @@ if [[ $ALIEN_JDL_SPLITWF != "1" ]]; then
456456
fi
457457
mv latest.log latest_reco_1.log
458458
$STATSCRIPT latest_reco_1.log
459+
exitcode=$?
460+
echo "exit code is $exitcode"
461+
if [[ $exitcode -ne 0 ]]; then
462+
echo "exit code from processing is " $exitcode > validation_error.message
463+
echo "exit code from processing is " $exitcode
464+
exit $exitcode
465+
fi
459466
fi
460467
else
461468
# running the wf in split mode
@@ -486,7 +493,16 @@ else
486493
exit $exitcode
487494
fi
488495
mv latest.log latest_reco_1.log
496+
if [[ -f performanceMetrics.json ]]; then
497+
mv performanceMetrics.json performanceMetrics_1.json
498+
fi
489499
$STATSCRIPT latest_reco_1.log reco_1
500+
exitcode=$?
501+
if [[ $exitcode -ne 0 ]]; then
502+
echo "exit code from processing is " $exitcode > validation_error.message
503+
echo "exit code from processing is " $exitcode
504+
exit $exitcode
505+
fi
490506
fi
491507
fi
492508

@@ -515,7 +531,16 @@ else
515531
exit $exitcode
516532
fi
517533
mv latest.log latest_reco_2.log
534+
if [[ -f performanceMetrics.json ]]; then
535+
mv performanceMetrics.json performanceMetrics_2.json
536+
fi
518537
$STATSCRIPT latest_reco_2.log reco_2
538+
exitcode=$?
539+
if [[ $exitcode -ne 0 ]]; then
540+
echo "exit code from processing is " $exitcode > validation_error.message
541+
echo "exit code from processing is " $exitcode
542+
exit $exitcode
543+
fi
519544
# let's compare to previous step
520545
if [[ -f latest_reco_1.log ]]; then
521546
nCTFsFilesInspected_step1=`ls [0-9]*_[0-9]*_[0-9]*_[0-9]*_[0-9]*_reco_1.stat | sed 's/\(^[0-9]*\)_.*/\1/'`
@@ -569,23 +594,29 @@ else
569594
exit $exitcode
570595
fi
571596
mv latest.log latest_reco_3.log
597+
if [[ -f performanceMetrics.json ]]; then
598+
mv performanceMetrics.json performanceMetrics_3.json
599+
fi
572600
fi
573601
fi
574602
fi
575603

576604
# now extract all performance metrics
577605
IFS=$'\n'
578-
if [[ -f "performanceMetrics.json" ]]; then
579-
timeStart=`date +%s`
580-
for workflow in `grep ': {' performanceMetrics.json`; do
581-
strippedWorkflow=`echo $workflow | cut -d\" -f2`
582-
cat performanceMetrics.json | jq '.'\"${strippedWorkflow}\"'' > ${strippedWorkflow}_metrics.json
606+
timeStart=`date +%s`
607+
for perfMetricsFiles in performanceMetrics.json performanceMetrics_1.json performanceMetrics_2.json performanceMetrics_3.json ; do
608+
suffix=`echo $perfMetricsFiles | sed 's/performanceMetrics\(.*\).json/\1/'`
609+
if [[ -f "performanceMetrics.json" ]]; then
610+
for workflow in `grep ': {' $perfMetricsFiles`; do
611+
strippedWorkflow=`echo $workflow | cut -d\" -f2`
612+
cat $perfMetricsFiles | jq '.'\"${strippedWorkflow}\"'' > ${strippedWorkflow}_metrics${suffix}.json
583613
done
584-
timeEnd=`date +%s`
585-
timeUsed=$(( $timeUsed+$timeEnd-$timeStart ))
586-
delta=$(( $timeEnd-$timeStart ))
587-
echo "Time spent in splitting the metrics files = $delta s"
588-
fi
614+
fi
615+
done
616+
timeEnd=`date +%s`
617+
timeUsed=$(( $timeUsed+$timeEnd-$timeStart ))
618+
delta=$(( $timeEnd-$timeStart ))
619+
echo "Time spent in splitting the metrics files = $delta s"
589620

590621
if [[ $ALIEN_JDL_AODOFF != 1 ]]; then
591622
# flag to possibly enable Analysis QC

DATA/production/configurations/asyncReco/setenv_extra.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ fi
240240

241241
echo "BeamType = $BEAMTYPE"
242242

243-
if [[ $ALIEN_JDL_ENABLEMONITORING == "1" ]]; then
243+
if [[ $ALIEN_JDL_ENABLEMONITORING != "0" ]]; then
244244
# add the performance metrics
245245
export ENABLE_METRICS=1
246246
export ARGS_ALL_EXTRA="$ARGS_ALL_EXTRA --resources-monitoring 50 --resources-monitoring-dump-interval 50"

DATA/production/workflow-multiplicities.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ N_TPCTRK=$NGPUS
3939
if [[ ! -z ${OPTIMIZED_PARALLEL_ASYNC:-} ]]; then
4040
# Tuned multiplicities for async processing
4141
if [[ $OPTIMIZED_PARALLEL_ASYNC == "pp_8cpu" ]]; then
42-
[[ -z $TIMEFRAME_RATE_LIMIT ]] && TIMEFRAME_RATE_LIMIT=3
42+
[[ -z ${TIMEFRAME_RATE_LIMIT:-} ]] && TIMEFRAME_RATE_LIMIT=3
4343
NGPURECOTHREADS=5
4444
elif [[ $OPTIMIZED_PARALLEL_ASYNC == "pp_16cpu" ]]; then
45-
[[ -z $TIMEFRAME_RATE_LIMIT ]] && TIMEFRAME_RATE_LIMIT=8
46-
[[ -z $SHMSIZE ]] && SHMSIZE=22000000000
45+
[[ -z ${TIMEFRAME_RATE_LIMIT:-} ]] && TIMEFRAME_RATE_LIMIT=8
46+
[[ -z ${SHMSIZE:-} ]] && SHMSIZE=22000000000
4747
NGPURECOTHREADS=9
4848
NTRDTRKTHREADS=3
4949
ITSTRK_THREADS=3
5050
ITSTPC_THREADS=3
5151
elif [[ $OPTIMIZED_PARALLEL_ASYNC == "pp_64cpu" ]]; then
52-
[[ -z $TIMEFRAME_RATE_LIMIT ]] && TIMEFRAME_RATE_LIMIT=32
53-
[[ -z $SHMSIZE ]] && SHMSIZE=90000000000
52+
[[ -z ${TIMEFRAME_RATE_LIMIT:-} ]] && TIMEFRAME_RATE_LIMIT=32
53+
[[ -z ${SHMSIZE:-} ]] && SHMSIZE=90000000000
5454
NGPURECOTHREADS=12
5555
NTRDTRKTHREADS=3
5656
ITSTRK_THREADS=3
@@ -63,8 +63,8 @@ if [[ ! -z ${OPTIMIZED_PARALLEL_ASYNC:-} ]]; then
6363
N_TOFMATCH=2
6464
N_TPCENTDEC=3
6565
elif [[ $OPTIMIZED_PARALLEL_ASYNC == "pp_1gpu" ]]; then
66-
[[ -z $TIMEFRAME_RATE_LIMIT ]] && TIMEFRAME_RATE_LIMIT=8
67-
[[ -z $SHMSIZE ]] && SHMSIZE=20000000000
66+
[[ -z ${TIMEFRAME_RATE_LIMIT:-} ]] && TIMEFRAME_RATE_LIMIT=8
67+
[[ -z ${SHMSIZE:-} ]] && SHMSIZE=20000000000
6868
N_TOFMATCH=2
6969
N_MCHCL=3
7070
N_TPCENTDEC=2
@@ -76,8 +76,8 @@ if [[ ! -z ${OPTIMIZED_PARALLEL_ASYNC:-} ]]; then
7676
ITSTRK_THREADS=2
7777
ITSTPC_THREADS=2
7878
elif [[ $OPTIMIZED_PARALLEL_ASYNC == "pp_4gpu" ]]; then
79-
[[ -z $TIMEFRAME_RATE_LIMIT ]] && TIMEFRAME_RATE_LIMIT=45
80-
[[ -z $SHMSIZE ]] && SHMSIZE=100000000000
79+
[[ -z ${TIMEFRAME_RATE_LIMIT:-} ]] && TIMEFRAME_RATE_LIMIT=45
80+
[[ -z ${SHMSIZE:-} ]] && SHMSIZE=100000000000
8181
NGPURECOTHREADS=8
8282
NTRDTRKTHREADS=2
8383
ITSTRK_THREADS=2
@@ -98,9 +98,9 @@ if [[ ! -z ${OPTIMIZED_PARALLEL_ASYNC:-} ]]; then
9898
N_TPCITS=12
9999
N_ITSTRK=12
100100
elif [[ $OPTIMIZED_PARALLEL_ASYNC == "PbPb_4gpu" ]]; then
101-
[[ -z $TIMEFRAME_RATE_LIMIT ]] && TIMEFRAME_RATE_LIMIT=20
102-
[[ -z $SHMSIZE ]] && SHMSIZE=128000000000 # SHM_LIMIT 3/4
103-
[[ -z $TIMEFRAME_SHM_LIMIT ]] && TIMEFRAME_SHM_LIMIT=$(($SHMSIZE / 3))
101+
[[ -z ${TIMEFRAME_RATE_LIMIT:-} ]] && TIMEFRAME_RATE_LIMIT=20
102+
[[ -z ${SHMSIZE:-} ]] && SHMSIZE=128000000000 # SHM_LIMIT 3/4
103+
[[ -z ${TIMEFRAME_SHM_LIMIT:-} ]] && TIMEFRAME_SHM_LIMIT=$(($SHMSIZE / 3))
104104
NGPURECOTHREADS=8
105105
NTRDTRKTHREADS=4
106106
ITSTRK_THREADS=6

0 commit comments

Comments
 (0)