justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 12080, Stage 3

Workflow12080
Campaign479
Priority50
Processors1
Wall seconds28800
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, 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_BNL, US_Colorado, US_FNAL-FermiGrid, US_FNAL-T1, US_Michigan, 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
1Rucio usertests:fnal-w12080s3p1*_detsim.root86400True

Environment variables

NameValue
JOB_FHICL_FILEstandard_detsim_dune10kt_1x2x6.fcl

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
69990100699008

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
8950000086390362571800
Files processed002002004004006006008008001000100012001200140014001600160018001800200020002200220024002400Jan-18 18:00Jan-18 20:00Jan-18 22:00Jan-19 00:00Jan-19 02:00Jan-19 04:00Jan-19 06:00Jan-19 08:00Jan-19 10:00Jan-19 12:00Jan-19 14:00Jan-19 16:00Jan-19 18:00Files processedBin start timesNumber per binUK_OxfordFR_CCIN2P3US_UChicagoES_PICCZ_FZUCERNUK_QMULNL_NIKHEFUK_RAL-PPDUK_ImperialUS_FNAL-FermiG…US_FNAL-FermiGridIT_CNAFNL_SURFsaraCA_SFUUS_UCSDUK_EdinburghUK_SheffieldUK_RAL-Tier1UK_Lancaster
Replicas per RSE2315466.69136687650945172.51041739646774884442.1842431738853302.54714116203763752373.18841313848696323.8440726173104579317.9222572016333302.63080610015186575286.88551336677136261.51345819614795569280.22112221721756210.8704246544642413295.1466083968415169.50710640796302276315.6055918080865146.24269731207784152331.5412946973827135.36893563904897150343.89603951197256129.6286270363592132356.0353646989909125.8218198373371110366.7660350029879123.7994844774719478375.21649851112977123.0388197436145114379.36798250863893122.92698583173211Replicas per RSEDUNE_US_BNL_SDCC (3…DUNE_US_BNL_SDCC (33%)DUNE_US_FNAL_DISK_S…DUNE_US_FNAL_DISK_STAGE (12%)PRAGUE (10%)DUNE_IT_INFN_CNAF (…DUNE_IT_INFN_CNAF (8%)DUNE_UK_MANCHESTER_…DUNE_UK_MANCHESTER_CEPH (8%)NIKHEF (8%)RAL-PP (5%)DUNE_CA_SFU (3%)QMUL (2%)DUNE_FR_CCIN2P3_DIS…DUNE_FR_CCIN2P3_DISK (2%)DUNE_CERN_EOS (1%)RAL_ECHO (1%)DUNE_ES_PIC (1%)DUNE_UK_LANCASTER_C…DUNE_UK_LANCASTER_CEPH (0%)

RSEs used

NameInputsOutputs
DUNE_US_BNL_SDCC24111912
DUNE_US_FNAL_DISK_STAGE8851348
PRAGUE753768
DUNE_IT_INFN_CNAF581451
DUNE_UK_MANCHESTER_CEPH579553
NIKHEF571587
DUNE_CA_SFU452207
RAL-PP415396
QMUL152227
DUNE_FR_CCIN2P3_DISK150145
DUNE_CERN_EOS13271
RAL_ECHO112266
DUNE_ES_PIC9227
DUNE_UK_LANCASTER_CEPH1432

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
CA_SFU2228
US_UCSD150
ES_PIC140
US_UChicago110
US_FNAL-FermiGrid100
UK_RAL-Tier120
UK_RAL-PPD01

Jobscript

#!/bin/bash
#set -euo pipefail

echo "=== DETSIM job starting ==="
echo "Host: $(hostname)"
echo "PWD(cmd): $(/bin/pwd -P || pwd || true)"
echo "PWD(var): ${PWD:-unset}"
echo "JUSTIN_PATH=${JUSTIN_PATH:-unset}"
echo "JUSTIN_INPUT_FILE=${JUSTIN_INPUT_FILE:-unset}"

# ----------------------------------------------------------------------
# Allocate the input file via justIN (robust)
# ----------------------------------------------------------------------
if [[ -z "${JUSTIN_PATH:-}" ]]; then
  echo "ERROR: JUSTIN_PATH is not set (not running under justIN wrapper?)"
  exit 2
fi

alloc="$("$JUSTIN_PATH/justin-get-file")"
if [[ -z "$alloc" ]]; then
  echo "No more inputs allocated for this stage; exiting cleanly."
  exit 0
fi

did="$(echo "$alloc" | awk '{print $1}')"
pfn="$(echo "$alloc" | awk '{print $2}')"
rse="$(echo "$alloc" | awk '{print $3}')"
echo "Allocated input: did=$did pfn=$pfn rse=$rse"

INPUT_G4="${pfn:-}"
if [[ -z "${INPUT_G4}" ]]; then
  echo "ERROR: allocator returned empty PFN"
  exit 3
fi

echo "G4 input file: ${INPUT_G4}"

# Output value of expected input environment variables
echo "fhicl file: ${JOB_FHICL_FILE}"

# Work in the sandbox
cd $PWD

# ----------------------------------------------------------------------
# Grab the tarball that has our fhicl files we'll need
# ----------------------------------------------------------------------
FCL_TGZ_URL="https://raw.githubusercontent.com/SFBayLaser/dune-justin/main/bundles/fhicl_bundle.tgz"
curl -L -o fhicl_bundle.tgz "$FCL_TGZ_URL"
tar xzf fhicl_bundle.tgz

# ----------------------------------------------------------------------
# Environment setup
# ----------------------------------------------------------------------
echo "Sourcing DUNE setup..."
#set +u
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
#set -u

setup dunesw v10_16_00d00 -q e26:prof

ups active
lar --version

# ----------------------------------------------------------------------
# Point fhicl to our local files
# ----------------------------------------------------------------------
export FHICL_FILE_PATH="$PWD/fhicl:${FHICL_FILE_PATH:-.}"

# ----------------------------------------------------------------------
# Run DETSIM
# ----------------------------------------------------------------------
FCL=${JOB_FHICL_FILE}

# Output filename derived from input (your preferred convention)
INBASE="$(basename "${INPUT_G4}" .root)"
OUTFILE="${INBASE}_detsim.root"

echo "Running lar DETSIM:"
echo "  FCL:     ${FCL}"
echo "  Input:   ${INPUT_G4}"
echo "  Output:  ${OUTFILE}"

lar -c "${FCL}" -s "${INPUT_G4}" -o "${OUTFILE}" -n -1

# ----------------------------------------------------------------------
# Sanity checks
# ----------------------------------------------------------------------
test -f "${OUTFILE}" || { echo "ERROR: Output file ${OUTFILE} not produced!"; exit 1; }
ls -lh "${OUTFILE}"

# ----------------------------------------------------------------------
# Tell justIN we successfully processed the allocated input
# ----------------------------------------------------------------------
echo "$did" >> justin-processed-dids.txt
echo "Wrote processed DID: $did"

echo "=== DETSIM job completed successfully ==="
justIN time: 2026-02-04 04:26:02 UTC       justIN version: 01.06.00