justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 1949, Stage 1

Priority50
Processors1
Wall seconds80000
Image/cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest
RSS bytes4194304000 (4000 MiB)
Max distance for inputs3000.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_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/ichong/fnal/01949/1caf*.root

Environment variables

NameValue
DUNE_QUALIFIERe26:prof
DUNE_VERSIONv10_10_00d00
FCL_FILE/cvmfs/fifeuser2.opensciencegrid.org/sw/dune/152f797bfcf315d3c4c3684f118c8573b0c3662c/atm-norm-vtx-reco.fcl
FCL_SECONDARYcafmaker_atmos_dune10kt_1x2x6_runreco-nuenergy-nuangular_geov5.fcl
NUM_EVENTS200

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
100000004850515

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
469400001513044892026410
Files processed00100100200200300300400400Aug-28 06:00Aug-28 12:00Aug-28 18:00Aug-29 00:00Aug-29 06:00Aug-29 12:00Aug-29 18:00Aug-30 00:00Aug-30 06:00Aug-30 12:00Aug-30 18:00Aug-31 00:00Aug-31 06:00Aug-31 12:00Aug-31 18:00Sep-01 00:00Sep-01 06:00Sep-01 12:00Sep-01 18:00Sep-02 00:00Sep-02 06:00Files processedBin start timesNumber per binUK_GlasgowNL_SURFsaraUK_QMULUK_OxfordUK_LancasterNL_NIKHEFUK_RAL-PPDES_PICCZ_FZUCERNUK_BristolUS_PuertoRicoUK_DurhamUK_ManchesterUK_RAL-Tier1BR_CBPFUS_UChicagoUS_WisconsinUS_UCSD
Replicas per RSE1000479.229497354259198.763699756911251000325.21568006422376323.9264604506066117281.0774569205766197.91093696561765103294.3185622314706172.78904328539193103312.3916386961899153.2708263276932495333.84598344744705139.3538339071958594356.8842288725043131.2685485102968226372.23851974389436128.9864321897685517377.79907808903886128.72300373423522Replicas per RSEFNAL_DCACHE (39%)PRAGUE (39%)RAL_ECHO (4%)SURFSARA (4%)QMUL (4%)RAL-PP (3%)NIKHEF (3%)DUNE_FR_CCIN2P3_DISK (1%)DUNE_ES_PIC (0%)

RSEs used

NameInputsOutputs
PRAGUE20750
RAL-PP3300
RAL_ECHO3260
QMUL2820
SURFSARA2800
NIKHEF2530
DUNE_FR_CCIN2P3_DISK680
DUNE_ES_PIC500
None0952

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
CERN158666
UK_RAL-PPD69188
CZ_FZU65216
US_FNAL-FermiGrid43325
UK_Manchester32140
ES_PIC26153
NL_SURFsara2668
UK_QMUL1963
US_FNAL-T111101
UK_Oxford1076
UK_RAL-Tier1928
UK_Lancaster618
UK_Bristol46
US_UCSD448
UK_Durham235
UK_Glasgow129
US_PuertoRico11
US_Wisconsin14
NL_NIKHEF10
FR_CCIN2P310
BR_CBPF06
US_UChicago04

Jobscript

#!/bin/bash
:<<'EOF'
This jobscript runs ONLY the CAF-making step on an input file from JustIn.

Required environment variables:
  - FCL_SECONDARY         (FHiCL for CAF making)  [REQUIRED]
  - DUNE_VERSION         
  - DUNE_QUALIFIER        
  - CODE_TAR_DIR_LOCAL    (optional: path to localProducts/... for custom code)
  - NUM_EVENTS            (optional: limit events, e.g. -n 10)
EOF


# === Number of events option ===
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"
fname=$(basename "$pfn" .root)

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


# === 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}_truthvtx_${timestamp}.root"
logFile="truthvtx_${timestamp}_vtx.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" -s "$pfn" > "$logFile" 2>&1









# === Timestamp for outputs ===
timestamp=$(date -u +"%Y-%m-%dT_%H%M%SZ")

# === CAF output & log names ===
secondary_out="caf_${fname}_${timestamp}.root"
secondary_log="caf_${fname}_${timestamp}.log"

# === Run CAF step ===
export LD_PRELOAD=${XROOTD_LIB}/libXrdPosixPreload.so
echo "Running CAF step with FCL_SECONDARY: $FCL_SECONDARY"
echo "Output: $secondary_out"
lar -c "$FCL_SECONDARY" $events_option -o "$secondary_out" -s "$outFile" > "$secondary_log" 2>&1
# === Rename CAF output root file to include timestamp if needed ===
new_caf_out="caf_normalvtx_${timestamp}.root"
mv caf.root "$new_caf_out"
echo "Renamed caf.root -> $new_caf_out"
cafExit=$?

mv jobscript.log jobscript_$(date +%Y%m%d_%H%M%S).log


# === Show last 100 lines of CAF log ===
echo '=== Start last 100 lines of CAF log file ==='
tail -100 "$secondary_log" || true
echo '=== End last 100 lines of CAF log file ==='

# === Mark processed if success ===
if [ $cafExit -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-09-18 20:47:12 UTC       justIN version: 01.05.00