Skip to content
Snippets Groups Projects
Commit 6dc9e110 authored by Spyros Argyropoulos's avatar Spyros Argyropoulos Committed by Christian Gutschow
Browse files

Updating minimum number of events in run_athena and testing only 1 DSID [skip modfiles]

parent c1c56b69
No related branches found
No related tags found
No related merge requests found
Pipeline #1315175 passed
......@@ -38,7 +38,7 @@ for dir in "${dirs[@]}" ; do
echo "OK: log.generate_ci found"
fi
echo "Running: python scripts/logParser.py -i $dir/log.generate_ci -c ..."
echo "Running: python scripts/logParser.py -i $dir/log.generate_ci -c -t ..."
# Check output
python scripts/logParser.py -i $dir/log.generate_ci -c -t | tee log.generate_ci_out
......
......@@ -17,9 +17,16 @@ fi
ORIGDIR=$PWD
# Maximum number of Gen_tf jobs to run
maxJobs=1 # Maximum number of Gen_tf jobs to run; for now use only 1 job - eventually to be replaced with ${#dirs[@]}
jobsProcessed=0 # Keep track of how many times Gen_tf was run
# Loop over directories with new jO
for dir in "${dirs[@]}" ; do
# Check if we have already processed the maximum number of jobs
if [ "$jobsProcessed" -ge "$maxJobs" ] ; then break ; fi
echo "INFO: Will run athena for $dir"
DSID=$(basename $dir)
......@@ -41,12 +48,12 @@ for dir in "${dirs[@]}" ; do
# Check if the job is expected to last more than 12 hours
cpu=$(grep CPU $DSID/log.generate.short | awk '{print $4}')
if (( $(echo "$cpu > 12.0" | bc -l) )) ; then
echo "ERROR: Job is expected to last more than 12h - time estimate: $cpu hours"
if (( $(echo "$cpu > 1.0" | bc -l) )) ; then
echo "ERROR: Job is expected to last more than 1h - time estimate: $cpu hours"
echo "It is not possible to run this job in the CI. Contact the MC software coordinators"
exit 1
else
echo "OK: Job expected to last less than 12h - time estimate: $cpu hours"
echo "OK: Job expected to last less than 1h - time estimate: $cpu hours"
fi
echo -e "\033[0m" # switch back terminal colour to black
......@@ -59,8 +66,8 @@ for dir in "${dirs[@]}" ; do
nEventsPerJob=$(grep 'evgenConfig.nEventsPerJob' $DSID/*.py | tail -1 | awk '{print $NF}')
# If nEventsPerJob has not been specified in jO take default, ie 10k
if [ -z $nEventsPerJob ] ; then nEventsPerJob=10000 ; fi
# Number of events to run = max(1,0.01*nEventsPerJob)
nEvents=$(bc <<< "if (1-0.01*$nEventsPerJob >0) 1 else 0.01*$nEventsPerJob/1")
# Number of events to run = max(10,0.01*nEventsPerJob)
nEvents=$(bc <<< "if (10-0.01*$nEventsPerJob >0) 10 else 0.01*$nEventsPerJob/1")
# Setup athena release
source /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/user/atlasLocalSetup.sh
......@@ -117,6 +124,9 @@ for dir in "${dirs[@]}" ; do
--maxEvents=$nEvents
set +e # to avoid exiting from the script if any other setup command fails in the loop
# Update the number of jobs processed
let jobsProcessed=$jobsProcessed+1
# Rename log.generate output from transform to log.generate_ci
# which is uploaded as an artifact
if [ -f log.generate ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment