justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 127, Stage 1

Priority50
Processors1
Wall seconds80000
Image/cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest
RSS bytes4194304000 (4000 MiB)
Max distance for inputs0.0
Enabled input RSEs CERN_PDUNE_EOS, DUNE_CA_SFU, DUNE_CERN_EOS, DUNE_ES_PIC, DUNE_FR_CCIN2P3_DISK, DUNE_IN_TIFR, DUNE_IT_INFN_CNAF, DUNE_UK_GLASGOW, DUNE_UK_LANCASTER_CEPH, DUNE_UK_MANCHESTER_CEPH, DUNE_US_BNL_SDCC, DUNE_US_FNAL_DISK_STAGE, FNAL_DCACHE, FNAL_DCACHE_STAGING, FNAL_DCACHE_TEST, MONTECARLO, NIKHEF, PRAGUE, QMUL, RAL-PP, RAL_ECHO, SURFSARA, T3_US_NERSC
Enabled output RSEs CERN_PDUNE_EOS, DUNE_CA_SFU, DUNE_CERN_EOS, DUNE_ES_PIC, DUNE_FR_CCIN2P3_DISK, DUNE_IN_TIFR, DUNE_IT_INFN_CNAF, DUNE_UK_GLASGOW, DUNE_UK_LANCASTER_CEPH, DUNE_UK_MANCHESTER_CEPH, DUNE_US_BNL_SDCC, DUNE_US_FNAL_DISK_STAGE, FNAL_DCACHE, FNAL_DCACHE_STAGING, FNAL_DCACHE_TEST, NIKHEF, PRAGUE, QMUL, RAL-PP, RAL_ECHO, SURFSARA, T3_US_NERSC
Enabled sites BR_CBPF, CA_SFU, CERN, CH_UNIBE-LHEP, CZ_FZU, ES_CIEMAT, ES_PIC, FR_CCIN2P3, IT_CNAF, NL_NIKHEF, NL_SURFsara, UK_Bristol, UK_Brunel, UK_Durham, UK_Edinburgh, UK_Glasgow, UK_Imperial, UK_Lancaster, UK_Liverpool, UK_Manchester, UK_Oxford, UK_QMUL, UK_RAL-PPD, UK_RAL-Tier1, UK_Sheffield, US_Colorado, US_FNAL-FermiGrid, US_FNAL-T1, US_Michigan, US_PuertoRico, US_SU-ITS, US_Swan, US_UChicago, US_UConn-HPC, US_UCSD, US_Wisconsin
Scopeusertests
Events for this stage

Output patterns

 DestinationPatternLifetimeFor next stageRSE expression
1https://fndcadoor.fnal.gov:2880/dune/scratch/users/gpaixao/beam_7GeV/fnal/00127/1*Stage2*.root
2https://fndcadoor.fnal.gov:2880/dune/scratch/users/gpaixao/beam_7GeV/fnal/00127/1*g4_Stage2_*.root

Environment variables

NameValue
INPUT_TAR_DIR_LOCAL/cvmfs/fifeuser2.opensciencegrid.org/sw/dune/f8b182cbad0b2687070d89050509db799fe2a2f7
INPUT_TFILE/pnfs/dune/persistent/dunepro/beam_data/simulation/G4beamlineVersion3.06/v34b_7GeV_G4beamlineVersion3.06/H4_v34b_7GeV_-27.7_10M_1.root
NUM_EVENTS1

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
00000000

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
000000000000

Stats of processed input files as CSV or JSON, and of uploaded output files as CSV or JSON (up to 10000 files included)

Jobscript

#!/bin/bash
:<<'EOF'

Use this jobscript to create files from the full sim/reco chain
and put the output in the usertests namespace (MetaCat) 
Use this script by doing

source fdvd.sh

(use source fdvd_test.sh first to test it locally - also a good idea to remove the folder created in /tmp afterwards).
This example uses a dunesw distribution (v09_91_04d01) but needs a custom fhicl file that is provided via a tar file.
I recommend sending the tar to cvmfs in advance, just to avoid any problem, with this command
INPUT_TAR_DIR_LOCAL=`justin-cvmfs-upload myfcls.tar`

The following optional environment variables can be set when creating the
workflow/stage: FCL_FILE, NUM_EVENTS, DUNE_VERSION, DUNE_QUALIFIER 

EOF


# fcl file and DUNE software version/qualifier to be used
FCL_FILE=${FCL_FILE:-$INPUT_TAR_DIR_LOCAL/prod_beam_cosmics_7GeV_protodunehd.fcl}
DUNE_VERSION=${DUNE_VERSION:-v10_07_00d00}
DUNE_QUALIFIER=${DUNE_QUALIFIER:-e26:prof}

export FHICL_FILE_PATH=${INPUT_TAR_DIR_LOCAL}:${FHICL_FILE_PATH}
export FW_SEARCH_PATH=${INPUT_TAR_DIR_LOCAL}:$FW_SEARCH_PATH

# number of events to process from the input file
if [ "$NUM_EVENTS" != "" ] ; then
 events_option="-n $NUM_EVENTS"
fi

# Get input file from --input-files (via justin)
did_pfn_rse=`$JUSTIN_PATH/justin-get-file`

if [ "$did_pfn_rse" = "" ] ; then
  echo "Nothing to process - exit jobscript"
  exit 0
fi

# Record input DID
echo "$did_pfn_rse" | cut -f1 -d' ' >> all-input-dids.txt

# Extract PFN
#pfn=`echo $did_pfn_rse | cut -f2 -d' '`
pfn = $INPUT_FILE
echo "Input PFN = $pfn"

# Setup DUNE environment
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup dunesw "$DUNE_VERSION" -q "$DUNE_QUALIFIER"

# Build filenames
now=$(date -u +"%Y-%m-%dT_%H%M%SZ")
Ffname=`echo $pfn | awk -F/ '{print $NF}'`
fname=`echo $Ffname | awk -F. '{print $1}'`
outFile=pdhd_g4_Stage2_${now}.root

# Run full chain
(
export LD_PRELOAD=${XROOTD_LIB}/libXrdPosixPreload.so
echo "$LD_PRELOAD"

lar -c $FCL_FILE $events_option -o pdhd_gen.root "$pfn" > ${fname}_pdhd_gen${now}.log 2>&1 \
&& lar -c $INPUT_TAR_DIR_LOCAL/runG4Stage1.fcl -s pdhd_gen.root -o pdhd_g4_Stage1.root > ${fname}_pdhd_g4_Stage1${now}.log 2>&1 \
&& lar -c $INPUT_TAR_DIR_LOCAL/runG4Stage2.fcl -s pdhd_g4_Stage1.root -o $outFile > ${fname}_pdhd_g4_Stage2_${now}.log 2>&1
)

echo '=== Start last 100 lines of lar log file ==='
tail -100 ${fname}_pdhd_g4_Stage2_${now}.log
echo '=== End last 100 lines of lar log file ==='

# Exit logic
larExit=$?
echo "lar exit code $larExit"

if [ $larExit -eq 0 ]; then
  echo "$pfn" > justin-processed-pfns.txt
  jobscriptExit=0
else
  jobscriptExit=1
fi

exit $jobscriptExit

justIN time: 2025-08-05 06:37:17 UTC       justIN version: 01.04.00