justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 7089, Stage 1

Priority50
Processors1
Wall seconds80000
Image/cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest
RSS bytes4194304000 (4000 MiB)
Max distance for inputs30.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, CA_Victoria, CERN, CH_UNIBE-LHEP, ES_CIEMAT, ES_PIC, FR_CCIN2P3, IN_TIFR, IT_CNAF, NL_SURFsara, UK_Bristol, UK_Brunel, UK_Durham, UK_Edinburgh, UK_Lancaster, UK_Manchester, UK_Oxford, UK_QMUL, UK_RAL-PPD, UK_RAL-Tier1, UK_Sheffield, US_Caltech, US_Colorado, US_FNAL-FermiGrid, US_FNAL-T1, US_Michigan, US_MIT, US_Nebraska, US_NotreDame, 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/ichong/07089/1graph_output*

Environment variables

NameValue
CODE_TAR_DIR_LOCAL/cvmfs/fifeuser4.opensciencegrid.org/sw/dune/c976ce192292f2f9835b2b96cb18eba74fad6274
DUNE_QUALIFIERe26:prof
DUNE_VERSIONv10_04_06d00
FCL_FILE/cvmfs/fifeuser3.opensciencegrid.org/sw/dune/ee784f87aeadf707c5b7c649363584b56e19e8c6/atm-training-extract.fcl
FCL_SECONDARY/cvmfs/fifeuser3.opensciencegrid.org/sw/dune/47c256ce8bbe924516790667ff895b1f82b9ef4b/eid.fcl
NUM_EVENTS20
XML_MASTER/cvmfs/fifeuser3.opensciencegrid.org/sw/dune/ee784f87aeadf707c5b7c649363584b56e19e8c6/PandoraSettings_Master_Training_CSV.xml
XML_NEUTRINO/cvmfs/fifeuser3.opensciencegrid.org/sw/dune/ee784f87aeadf707c5b7c649363584b56e19e8c6/PandoraSettings_Neutrino_Training_CSV.xml

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
5000004901

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
94000084031600
Files processed001010202030304040May-21 16:00May-21 17:00May-21 18:00May-21 19:00Files processedBin start timesNumber per binUK_RAL-PPDCERNFR_CCIN2P3ES_PICUK_DurhamUK_ManchesterUK_Oxford
Replicas per RSE50477.0466596654936193.133927913612150341.4201819808837331.9779957011362510277.0354019475429211.9459403307249710298.11476786631596167.79653514797986328.0642611989104142.398858985354373348.4010879344642133.553005240203732360.365756283086130.54669423520182370.1395511520329129.16269009309411377.53149699957675128.7289380079364Replicas per RSEFNAL_DCACHE (37%)PRAGUE (37%)NIKHEF (7%)SURFSARA (7%)QMUL (4%)DUNE_ES_PIC (2%)RAL_ECHO (1%)RAL-PP (1%)DUNE_FR_CCIN2P3_DISK (0%)

RSEs used

NameInputsOutputs
PRAGUE320
NIKHEF90
SURFSARA80
QMUL30
DUNE_ES_PIC20
RAL_ECHO20
RAL-PP20
DUNE_FR_CCIN2P3_DISK10
None0343

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

File reset events, by site

SiteAllocatedOutputting
UK_Durham10
FR_CCIN2P310
CERN10
UK_RAL-Tier110

Jobscript

#!/bin/bash
:<<'EOF'
This jobscript generates CaloHitList-based graph data 
from input reco2 ROOT files using your custom LArSoft setup.

Required environment variables:
  - FCL_FILE
  - CODE_TAR_DIR_LOCAL
  - DUNE_VERSION
  - DUNE_QUALIFIER
  - XML_MASTER
  - XML_NEUTRINO
  - NUM_EVENTS (optional)
EOF

# === Setup FCL and version info ===
FCL_FILE=${FCL_FILE:-atm-training-extract.fcl}
DUNE_VERSION=${DUNE_VERSION:-v10_04_06d00}
DUNE_QUALIFIER=${DUNE_QUALIFIER:-e26:prof}

# === Number of events option ===
if [ -n "$NUM_EVENTS" ]; then
  events_option="-n $NUM_EVENTS"
fi

# === Get a file from justIN ===
did_pfn_rse=$($JUSTIN_PATH/justin-get-file)
if [ -z "$did_pfn_rse" ]; then
  echo "No file assigned. Exiting jobscript."
  exit 0
fi

# === Track input DID for MetaCat ===
echo "$did_pfn_rse" | cut -f1 -d' ' >> all-input-dids.txt

# === Parse PFN from DID ===
pfn=$(echo "$did_pfn_rse" | cut -d' ' -f2)
echo "Input PFN = $pfn"

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

# === Mirror CODE_TAR_DIR_LOCAL ===
INPUT_TAR_DIR_LOCAL="$CODE_TAR_DIR_LOCAL"
echo "INPUT_TAR_DIR_LOCAL = $INPUT_TAR_DIR_LOCAL"

# === Setup custom code ===
if [ -n "$CODE_TAR_DIR_LOCAL" ]; then
  echo "Using local products from $CODE_TAR_DIR_LOCAL"
  source "$CODE_TAR_DIR_LOCAL/larsoft_graph_V1_2025/localProducts_larsoft_v10_04_06_e26_prof/setup-grid"
  mrbslp
fi

# === Generate common timestamp and random suffix for output renaming ===
timestamp=$(date -u +"%Y-%m-%dT_%H%M%SZ")
rand_suffix=$((1 + RANDOM % 10))

# === Output file naming ===
fname=$(basename "$pfn" .root)
outFile="${fname}_graph_${timestamp}.root"
logFile="${fname}_graph_${timestamp}.log"

# === Set FW search path ===
XML_DIR_MASTER=$(dirname "$XML_MASTER")
XML_DIR_NEUTRINO=$(dirname "$XML_NEUTRINO")
export FW_SEARCH_PATH="$XML_DIR_MASTER:$XML_DIR_NEUTRINO:$FW_SEARCH_PATH"

# === Run lar (primary) ===
export LD_PRELOAD=${XROOTD_LIB}/libXrdPosixPreload.so
echo "Running LArSoft with FCL: $FCL_FILE"
lar -c "$FCL_FILE" $events_option -o "$outFile" "$pfn" > "$logFile" 2>&1
larExit=$?

# === Run lar (secondary) if needed ===
if [ -n "$FCL_SECONDARY" ]; then
  secondary_out="secondary_${outFile}"
  secondary_log="secondary_${logFile}"
  echo "Running LArSoft with secondary FCL: $FCL_SECONDARY"
  lar -c "$FCL_SECONDARY" $events_option "$pfn" > "$secondary_log" 2>&1
fi

if [ -f "$secondary_log" ]; then
  echo '=== Start last 100 lines of secondary lar log file ==='
  tail -100 "$secondary_log"
  echo '=== End last 100 lines of secondary lar log file ==='
fi





# === Rename .data and .root files with timestamp and suffix ===
if [ $larExit -eq 0 ]; then
  for f in *.data; do
    if [ -f "$f" ]; then
      newname="graph_output_${timestamp}_${rand_suffix}_$f"
      mv -f "$f" "$newname"
      echo "Renamed $f -> $newname"
    fi
  done

  for f in *eid.root; do
    if [ -f "$f" ]; then
      newname="graph_output_${timestamp}_${rand_suffix}_$f"
      mv -f "$f" "$newname"
      echo "Renamed $f -> $newname"
    fi
  done
fi

# === Show lar log tail ===
echo '=== Start last 100 lines of lar log file ==='
tail -100 "$logFile"
echo '=== End last 100 lines of lar log file ==='

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

# === Package logs ===
tar zcf "${JUSTIN_JOBSUB_ID//[@]/_}.logs.tgz" *.log

# === Display output summary ===
echo "=== Generated output files ==="
ls -1 *.* 2>/dev/null | grep -v 'all-input-dids.txt' || echo "No output files found."


exit $jobscriptExit
justIN time: 2025-05-23 01:12:23 UTC       justIN version: 01.03.01