Skip to content

Commit af2f3e3

Browse files
committed
FST: Proper SHM cleanup in reconstruction script
1 parent 3137229 commit af2f3e3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

prodtests/full-system-test/run-workflow-on-inputlist.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ LOG_PREFIX="log_$(date +%Y%m%d-%H%M%S)_"
2525
[[ -z $OVERRIDE_SESSION ]] && export OVERRIDE_SESSION=default_$$_$RANDOM
2626
[[ -z $INRAWCHANNAME ]] && export INRAWCHANNAME=tf-builder-$$-$RANDOM
2727

28-
rm -f ${LOG_PREFIX}*.log /dev/shm/*fmq*
29-
if [[ `ls /dev/shm/*fmq* 2> /dev/null | wc -l` != "0" ]]; then
30-
echo "ERROR: Existing SHM files"
28+
if [[ "0$IGNORE_EXISTING_SHMFILES" != "01" && `ls /dev/shm/*fmq* 2> /dev/null | wc -l` != "0" ]]; then
29+
echo "ERROR: Existing SHM files (you can set IGNORE_EXISTING_SHMFILES=1 to ignore and allow multiple parallel reconstruction sessions)"
3130
exit 1
3231
fi
3332

@@ -55,7 +54,7 @@ echo "Processing $2 in $1 mode"
5554

5655
if [[ $1 == "DD" ]]; then
5756
export EXTINPUT=1
58-
export DD_STARTUP_DELAY=10
57+
export DD_STARTUP_DELAY=5
5958
start_process $MYDIR/datadistribution.sh
6059
elif [[ $1 == "CTF" ]]; then
6160
export CTFINPUT=1
@@ -90,6 +89,8 @@ if [[ "0$4" != "00" ]]; then
9089
kill $PID_LOG
9190
fi
9291

92+
fairmq-shmmonitor --session $OVERRIDE_SESSION --cleanup
93+
9394
if [[ $RETVAL == 0 ]]; then
9495
echo "Done processing $2 in $1 mode"
9596
else

0 commit comments

Comments
 (0)