justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 172, Stage 1

Priority50
Processors1
Wall seconds86400
Image/cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest
RSS bytes8388608000 (8000 MiB)
Max distance for inputs100.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/pmelas/fnal/00172/1reco_stage1.root

Environment variables

NameValue
INPUT_TAR_DIR_LOCAL/cvmfs/fifeuser2.opensciencegrid.org/sw/dune/041c32dabe1e3bd8205aa9f92ec5d3e6cdb12d02
NUM_EVENTS10

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
10000100

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
200002000000
Files processed000.10.10.20.20.30.30.40.40.50.50.60.60.70.70.80.80.90.911Jul-31 13:00Jul-31 14:00Jul-31 15:00Files processedBin start timesNumber per binCERN

RSEs used

NameInputsOutputs
MONTECARLO10
None01

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

DUNE_VERSION=${DUNE_VERSION:-v09_09_00}

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

# First get an unprocessed file from this stage
did_pfn_rse=`$JUSTIN_PATH/justin-get-file`

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

# Keep a record of all input DIDs, for pdjson2meta file -> DID mapping
echo "$did_pfn_rse" | cut -f1 -d' ' >>all-input-dids.txt

# pfn is also needed when creating justin-processed-pfns.txt
pfn=`echo $did_pfn_rse | cut -f2 -d' '`
echo "Input PFN = $pfn"
##############################################################

# Setup DUNE environment
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
export PRODUCTS="${INPUT_TAR_DIR_LOCAL}/:$PRODUCTS" #working
setup dunetpc v09_09_00 -q e19:prof
FCL_GEN=${FCL_GEN:-prodcosmics_pdsp.fcl}
FCL_G4STAGE1=${FCL_G4STAGE1:-protoDUNE_refactored_g4_stage1.fcl}
FCL_G4STAGE2=${FCL_G4STAGE2:-protoDUNE_refactored_g4_stage2.fcl}
FCL_DETSIM1=${FCL_DETSIM1:-protoDUNE_refactored_detsim_stage1.fcl}
FCL_DETSIM2=${FCL_DETSIM2:-protoDUNE_refactored_g4_stage2_sce_datadriven.fcl}
FCL_RECO1=${FCL_RECO1:-protoDUNE_refactored_reco_35ms_sce_datadriven_stage1.fcl}
FCL_RECO2=${FCL_RECO2:-protoDUNE_refactored_reco_35ms_sce_datadriven_stage2.fcl}
FCL_ANA=${FCL_ANA:-$INPUT_TAR_DIR_LOCAL/protoduneana/v09_09_00/job/runMyModule22.fcl}

# Properly setup custom code with INPUT_TAR_DIR_LOCAL

export OMP_NUM_THREADS=${JUSTIN_PROCESSORS} 

######################################################################### 
now=$(date -u +"%Y-%m-%dT_%H%M%SZ")
Ffname=`echo $pfn | awk -F/ '{print $NF}'`
fname=`echo $Ffname | awk -F. '{print $1}'`
campaign="justIN.w${JUSTIN_WORKFLOW_ID}s${JUSTIN_STAGE_ID}"

outFile_GEN=${fname}_gen_${now}.root
outFile_G4Stage1=${fname}_g4_stage1_${now}.root
outFile_G4Stage2=${fname}_g4_stage2_${now}.root
outFile_Detsim=${fname}_detsim_${now}.root
outFile_Detsim2=${fname}_detsim2_${now}.root
outFile_reco=${fname}_reco_${now}.root
outFile_reco2=${fname}_reco2_${now}.root
outFile_ana=${fname}_ana_${now}.root
outFile_ana_hist=${fname}_ana_hist_${now}.root


(
# Do the scary preload stuff in a subshell!
export LD_PRELOAD=${XROOTD_LIB}/libXrdPosixPreload.so
echo "$LD_PRELOAD"

lar $events_option -c protoDUNE_refactored_g4_stage1.fcl -S $INPUT_TAR_DIR_LOCAL/exp/dune/app/users/pmelas/v09_09_00/file_geno2.txt -o g4_stage1.root

#lar $events_option -c prodcosmics_pdsp.fcl -o gen.root
#lar $events_option -c protoDUNE_refactored_g4_stage1.fcl gen.root -o g4_stage1.root

lar $events_option -c protoDUNE_refactored_g4_stage2_sce_datadriven.fcl g4_stage1.root -o g4_stage2.root
lar $events_option -c $INPUT_TAR_DIR_LOCAL/exp/dune/app/users/pmelas/v09_09_00/protoDUNE_refactored_detsim_stage1_pm.fcl g4_stage2.root -o detsim_stage1.root
lar $events_option -c protoDUNE_refactored_detsim_stage2.fcl detsim_stage1.root -o detsim_stage2.root
lar $events_option -c $INPUT_TAR_DIR_LOCAL/exp/dune/app/users/pmelas/v09_09_00/protoDUNE_refactored_reco_35ms_sce_datadriven_stage1_pm.fcl detsim_stage2.root -o reco_stage1.root
#lar $events_option -c $INPUT_TAR_DIR_LOCAL/exp/dune/app/users/pmelas/v09_09_00/protoDUNE_refactored_reco_35ms_sce_datadriven_stage2_pm.fcl reco_stage1.root -o reco_stage2.root

#lar $events_option -c $INPUT_TAR_DIR_LOCAL/exp/dune/app/users/pmelas/v09_09_00/runMyModule22.fcl reco_stage2.root -o output1.root
)

# Subshell exits with exit code of last command
larExit=$?
echo "lar exit code $larExit"
echo "$pfn" > justin-processed-pfns.txt

ls -lRS

# Create compressed tar file with all log files 
tar zcf `echo "$JUSTIN_JOBSUB_ID.logs.tgz" | sed 's/@/_/g'` *.log
exit $jobscriptExit
#exit $larExit
justIN time: 2025-08-04 20:18:18 UTC       justIN version: 01.04.00