justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 12080, Stage 2

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-w12080s2p1*_g4.root86400True

Environment variables

NameValue
JOB_FHICL_FILEstandard_g4_dune10kt_1x2x6.fcl

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
70000000699901

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
9044000090130229000
Files processed00100100200200300300400400500500600600700700800800900900100010001100110012001200130013001400140015001500Jan-18 17:00Jan-18 18:00Jan-18 19:00Jan-18 20:00Jan-18 21:00Jan-18 22:00Jan-18 23:00Jan-19 00:00Jan-19 01:00Jan-19 02:00Jan-19 03:00Jan-19 04:00Jan-19 05:00Files processedBin start timesNumber per binUK_OxfordUK_RAL-PPDUS_UChicagoES_PICCZ_FZUUS_FNAL-FermiG…US_FNAL-FermiGridCERNIT_CNAFUS_UCSDUK_QMULNL_NIKHEFFR_CCIN2P3UK_ImperialNL_SURFsaraUK_RAL-Tier1UK_SheffieldCA_SFUUK_LancasterUK_Edinburgh
Replicas per RSE2743474.82624080300104189.984113018282561140396.8024365125831322.66152858967337769316.06514045391054301.1380342346573646282.4734764881147248.0745363473187520283.2440669302294196.04785908534507339300.6686864531678161.67869852604036252319.6488380479411143.0446218327428225338.1188794342681132.05984271033526158354.3764342643938126.243825368293187365.203515441829124.0193754054599574372.4240065340281123.2107436062887637377.427417207444122.957907109631729379.5034845179155122.926225598439171379.9548620470673122.92501012893311Replicas per RSEDUNE_US_BNL_SDCC (3…DUNE_US_BNL_SDCC (39%)DUNE_IT_INFN_CNAF (…DUNE_IT_INFN_CNAF (16%)PRAGUE (10%)DUNE_US_FNAL_DISK_S…DUNE_US_FNAL_DISK_STAGE (9%)DUNE_UK_MANCHESTER_…DUNE_UK_MANCHESTER_CEPH (7%)RAL-PP (4%)NIKHEF (3%)DUNE_CERN_EOS (3%)DUNE_FR_CCIN2P3_DIS…DUNE_FR_CCIN2P3_DISK (2%)DUNE_CA_SFU (1%)DUNE_ES_PIC (1%)RAL_ECHO (0%)QMUL (0%)DUNE_UK_LANCASTER_C…DUNE_UK_LANCASTER_CEPH (0%)

RSEs used

NameInputsOutputs
DUNE_US_BNL_SDCC27542315
DUNE_IT_INFN_CNAF1140579
PRAGUE769752
DUNE_US_FNAL_DISK_STAGE646884
DUNE_UK_MANCHESTER_CEPH520575
RAL-PP339413
NIKHEF252569
DUNE_CERN_EOS225132
DUNE_FR_CCIN2P3_DISK158150
DUNE_CA_SFU101276
DUNE_ES_PIC7678
RAL_ECHO37110
QMUL9152
DUNE_UK_LANCASTER_CEPH114

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_SFU231
ES_PIC20
US_UChicago10

Jobscript

#!/bin/bash
#set -euo pipefail

echo "=== G4 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 (preferred, 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"

# Prefer the PFN from allocation; fall back to JUSTIN_INPUT_FILE if needed
INPUT_GEN="${pfn:-${JUSTIN_INPUT_FILE:-}}"
if [[ -z "${INPUT_GEN}" ]]; then
  echo "ERROR: no input file path available (pfn empty and JUSTIN_INPUT_FILE unset)"
  exit 3
fi

echo "GEN input file: ${INPUT_GEN}"

# 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 G4
# ----------------------------------------------------------------------
FCL=${JOB_FHICL_FILE}

# Output filename derived from input
BASE=$(basename "${INPUT_GEN}" .root)
OUTFILE="${BASE}_g4.root"

echo "Running lar G4:"
echo "  FCL:     ${FCL}"
echo "  Input:   ${INPUT_GEN}"
echo "  Output:  ${OUTFILE}"

lar -c "${FCL}" -s "${INPUT_GEN}" -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 "=== G4 job completed successfully ==="
justIN time: 2026-02-04 05:41:51 UTC       justIN version: 01.06.00