Skip to content

Commit

Permalink
Merge pull request #60 from rlcee/210717
Browse files Browse the repository at this point in the history
updates for Muse
  • Loading branch information
rlcee authored Jul 17, 2021
2 parents 203dd7e + 2eb212e commit 3008c5d
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 119 deletions.
48 changes: 29 additions & 19 deletions bin/valJobBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ echo_date() {
echo "[$(date)] $*"
}

echo_date "cd"
WORKDIR="$1"
echo_date "start build WORKDIR=$1 TBALL=$2"
echo_date "cd $1"
WORKDIR=$1
shift
if [ -z "$WORKDIR" ]; then
echo "ERROR - no work dir provided - exit"
Expand All @@ -33,39 +34,40 @@ fi
echo_date "general setups"
source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
source /cvmfs/mu2e.opensciencegrid.org/setupmu2e-art.sh
setup muse

T0=$(date +%s)
echo_date "clone offline"
#git clone -q http://cdcvs.fnal.gov/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
git clone -q https://github.com/mu2e/Offline
RC=$?
T1=$(date +%s)
DT_CLONE=$(($T1-$T0))
echo_date "clone return code $RC time $DT_CLONE s"
echo "REPORT TIME clone $DT_CLONE"
git clone -q https://github.com/mu2e/Production
RCP=$?
RC=$(($RC+$RCP))

if [ $RC -ne 0 ]; then
echo "REPORT STATUS FAIL build"
exit $RC
fi

echo_date "cd Offline"
cd Offline

echo_date "print commit"
git show -q
git rev-parse HEAD
git -C Offline show -q
git -C Offline rev-parse HEAD

echo_date "source setup"
source setup.sh
echo_date "muse setup"
muse setup -1
muse status

echo_date "start scons"
echo_date "start build"
T0=$(date +%s)
scons -j 20
muse build -j 20 --mu2eCompactPrint
RC=$?
T1=$(date +%s)
DT_BUILD=$(($T1-$T0))
echo_date "scons return code $RC time $DT_BUILD s"
echo_date "build return code $RC time $DT_BUILD s"
echo "REPORT TIME build $DT_BUILD"

if [ $RC -ne 0 ]; then
Expand All @@ -77,15 +79,18 @@ echo_date "starting tarball"
T0=$(date +%s)
cp /mu2e/app/home/mu2epro/cron/val/seeds.txt .
cp /mu2e/app/home/mu2epro/cron/val/recoInputFiles.txt .
cd ..

tar --exclude="*.cc" --exclude="*.os" --exclude="Offline/tmp/*" \
-czf code.tgz Offline
#tar --exclude="*.cc" --exclude="*.os" --exclude="$MUSE_BUILD_BASE/Offline/tmp/*" \
# -czf code.tgz Offline build *.txt
TEMPBALL=$( muse tarball recoInputFiles.txt seeds.txt | grep "Tarball:" | awk '{print $2}' )

RC=$?
T1=$(date +%s)
DT_TAR=$(($T1-$T0))
ls -l code.tgz

echo_date "ls -l $TEMPBALL"
echo_date ls -l $TEMPBALL
ls -l $TEMPBALL
echo_date "tar return code $RC time $DT_TAR s"
echo "REPORT TIME tar $DT_TAR"

Expand All @@ -95,7 +100,9 @@ if [ $RC -ne 0 ]; then
fi

[ -f $TBALL ] && mv $TBALL ${TBALL}_$(date +%s)
cp code.tgz $TBALL
echo_date "cp $TEMPBALL $TBALL"
echo_date cp $TEMPBALL $TBALL
cp $TEMPBALL $TBALL
RC=$?
ls -l $TBALL
echo_date "copy tarball $RC"
Expand All @@ -105,12 +112,15 @@ if [ $RC -ne 0 ]; then
exit $RC
fi

# keep from building up tarballs in muse temp area
rm -rf $(dirname $TEMPBALL)

#
# remove older tarballs
#
DD=$(dirname $TBALL)
N=$(ls -1 $DD/* | wc -l)
if [ $N -gt 5 ]; then
if [ $N -gt 10 ]; then
NRM=$(($N-5))
FILES=$( ls -1 $DD/* | head -$NRM )
for FF in $FILES
Expand Down
67 changes: 27 additions & 40 deletions bin/valJobCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,16 @@ RC=0
echo_date "general setups"
source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
source /cvmfs/mu2e.opensciencegrid.org/setupmu2e-art.sh
setup muse
setup codetools

echo_date "cd Offline"
cd Offline

echo_date "source setup"
source setup.sh

muse setup -1

echo_date "start root overlaps"
rootOverlaps.sh
RCT=${PIPESTATUS[0]}
echo_date "root overlaps return code $RCT"
LEGAL=$( grep CloseGeometry ../check | awk '{print $4 " " $5 " " $6 " " $7 " " $8}' )
ILLEGAL=$( grep illegal ../check | awk '{print $NF}' )
LEGAL=$( grep CloseGeometry check | awk '{print $4 " " $5 " " $6 " " $7 " " $8}' )
ILLEGAL=$( grep illegal check | awk '{print $NF}' )
if [[ $RCT -eq 0 && $ILLEGAL -eq 0 ]]; then
STATUS=OK
else
Expand All @@ -52,7 +47,7 @@ RC=$(($RC+$RCT))


echo_date "start transportOnly"
mu2e -n 5 -c Mu2eG4/fcl/transportOnly.fcl
mu2e -n 5 -c Offline/Mu2eG4/fcl/transportOnly.fcl
RCT=$?
echo_date "transportOnly return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -65,7 +60,7 @@ RC=$(($RC+$RCT))


echo_date "start g4study2"
mu2e -n 5 -c Mu2eG4/g4study/g4study.fcl
mu2e -n 5 -c Offline/Mu2eG4/g4study/g4study.fcl
RCT=$?
echo_date "g4study2 return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -78,7 +73,7 @@ RC=$(($RC+$RCT))


echo_date "start g4test_03MT"
mu2e -n 20 -c Mu2eG4/fcl/g4test_03MT.fcl
mu2e -n 20 -c Offline/Mu2eG4/fcl/g4test_03MT.fcl
RCT=$?
echo_date "g4test_03MT return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -93,7 +88,7 @@ RC=$(($RC+$RCT))
# 4/2021 MDC2020 production sequence

echo_date "start ceSteps"
mu2e -n 50 -c Validation/test/ceSteps.fcl
mu2e -n 50 -c Production/Validation/ceSteps.fcl
RCT=$?
echo_date "ceSteps return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -107,7 +102,7 @@ RC=$(($RC+$RCT))

echo_date "start ceDigi"
# takes ceSteps as input
mu2e -c Validation/test/ceDigi.fcl
mu2e -c Production/Validation/ceDigi.fcl
RCT=$?
echo_date "ceDigi return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -119,7 +114,7 @@ echo "REPORT STATUS $STATUS ceDigi"
RC=$(($RC+$RCT))

echo_date "start muDauSteps"
mu2e -n 6000 -c Validation/test/muDauSteps.fcl
mu2e -n 6000 -c Production/Validation/muDauSteps.fcl
RCT=$?
echo_date "muDauSteps return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -130,10 +125,9 @@ fi
echo "REPORT STATUS $STATUS muDauSteps"
RC=$(($RC+$RCT))

# disabled until it runs..
echo_date "start ceMix"
# takes ceSteps and muDauSteps as input
mu2e -c Validation/test/ceMix.fcl
mu2e -c Production/Validation/ceMix.fcl
RCT=$?
echo_date "ceMix return code $RCT"
if [ $RCT -eq 0 ]; then
Expand All @@ -144,35 +138,28 @@ fi
echo "REPORT STATUS $STATUS ceMix"
RC=$(($RC+$RCT))



# 11/2/20 paused cemixdigi due to no mising file with new code
# echo_date "start ceMixDigi"
# mu2e -n 10 -c Validation/fcl/ceMixDigi.fcl >& ceMixDigi.log
# RCT=$?
# cat ceMixDigi.log
# echo_date "ceMixDigi return code $RCT"
# if [ $RCT -eq 0 ]; then
# STATUS=OK
# else
# STATUS=FAILED
# fi
# echo "REPORT STATUS $STATUS ceMixDigi"
# MIXCPU=$( grep "TimeReport CPU" ceMixDigi.log | awk '{print int($4)}')
# MIXMEM=$( grep "VmPeak" ceMixDigi.log | awk '{print int($4)}')
# MIXSIZ=$( ls -l dig.owner.val-ceMixDigi.dsconf.seq.art | awk '{print $5}')
# echo "REPORT EXE ceMixDigi $MIXCPU $MIXMEM $MIXSIZ"
# RC=$(($RC+$RCT))
echo_date "start cosmicOffSpill"
# takes an explicit input file, in fcl
mu2e -n 20 -c Production/Validation/cosmicOffSpill.fcl
RCT=$?
echo_date "cosmicOffSpill return code $RCT"
if [ $RCT -eq 0 ]; then
STATUS=OK
else
STATUS=FAILED
fi
echo "REPORT STATUS $STATUS cosmicOffSpill"
RC=$(($RC+$RCT))


echo_date "start geant surfaceCheck"
mu2e -c Mu2eG4/fcl/surfaceCheck.fcl
mu2e -c Offline/Mu2eG4/fcl/surfaceCheck.fcl
RCT=$?
echo_date "geant surfaceCheck return code $RCT"
LEGAL=$( grep 'Checking overlaps for volume' ../check | grep -c OK )
ILLEGAL=$( grep 'Checking overlaps for volume' ../check | grep -v OK | wc -l )
LEGAL=$( grep 'Checking overlaps for volume' check | grep -c OK )
ILLEGAL=$( grep 'Checking overlaps for volume' check | grep -v OK | wc -l )
# print overlaps into the log
grep 'Checking overlaps for volume' ../check | grep -v OK
grep 'Checking overlaps for volume' check | grep -v OK
if [[ $RCT -eq 0 && $LEGAL -gt 0 && $ILLEGAL -eq 0 ]]; then
STATUS=OK
else
Expand Down
Loading

0 comments on commit 3008c5d

Please sign in to comment.