Workflow 165, Stage 1
Priority | 50 |
Processors | 1 |
Wall seconds | 80000 |
Image | /cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest |
RSS bytes | 2097152000 (2000 MiB) |
Max distance for inputs | 100.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 |
Scope | usertests |
Events for this stage |
Output patterns
| Destination | Pattern | Lifetime | For next stage | RSE expression |
---|
1 | https://fndcadoor.fnal.gov:2880/dune/scratch/users/szh2/MC_pdhd_Michel/MY_production/fnal/00165/1 | cosmic_g4_*.root | | | |
File states
Total files | Finding | Unallocated | Allocated | Outputting | Processed | Not found | Failed |
---|
|
3 | 0 | 3 | 0 | 0 | 0 | 0 | 0 |
Job states
Total | Submitted | Started | Processing | Outputting | Finished | Notused | Aborted | Stalled | Jobscript error | Outputting failed | None processed |
---|
406 | 0 | 0 | 0 | 0 | 0 | 0 | 379 | 3 | 23 | 0 | 1 |
RSEs used
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/sh
# From jobsub
export CLUSTER=${CLUSTER:-1}
export PROCESS=${PROCESS:-1}
export FILETIMESTAMP=$(date -u +%Y%m%dT%H%M%SZ)
jobid=${PROCESS}
# Construct jobid from CLUSTER and PROCESS, fallback to PID if undefined
if [[ -n "$CLUSTER" && -n "$PROCESS" ]]; then
jobid="${CLUSTER}_${PROCESS}"
else
jobid="pid_$$"
fi
echo "Resolved job ID: $jobid"
echo "Running with CLUSTER=$CLUSTER, PROCESS=$PROCESS, TIMESTAMP=$FILETIMESTAMP"
# Setup environment
. /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup dunesw v10_08_02d00 -q e26:prof
#setup duneutil
echo "Environment set up"
# To setup ifdh cp, Shu, 20250728---
#htgettoken -i dune -a htvaultprod.fnal.gov
# Local directory info
echo "printing working directory of grid node"
pwd
ls -ltrha
# ------------
# GEN STAGE
# ------------
#SEED=$((1000 + $PROCESS))
#lar -c prod_cosmics_radiologicals_protodunehd.fcl -n 2 -o cosmic_gen_${jobid}.root --set-config "services.RandomNumberGenerator.seed: ${SEED}"
lar -c prod_cosmics_radiologicals_protodunehd.fcl -n 2 -o cosmic_gen_${jobid}.root
if [ $? -ne 0 ]; then
echo "GEN stage failed"
exit 10
fi
echo "Gen successfully made!"
echo "file://$(pwd)/cosmic_gen_${jobid}.root" > justin-processed-pfns.txt
ls -ltrha
# # ------------
# # G4 STAGE 1
# # ------------
# lar -c standard_g4_protodunehd_stage1.fcl -s cosmic_gen_${jobid}.root -o cosmic_g4_stage1_${jobid}.root
# if [ $? -ne 0 ]; then
# echo "G4 Stage 1 failed"
# exit 11
# fi
# echo "G4 Stage 1 completed. Removing input file from GEN stage..."
# #rm -f cosmic_gen_${jobid}.root
# # ------------
# # G4 STAGE 2
# # ------------
# lar -c standard_g4_protodunehd_stage2.fcl -s cosmic_g4_stage1_${jobid}.root -o cosmic_g4_stage2_${jobid}.root
# if [ $? -ne 0 ]; then
# echo "G4 Stage 2 failed"
# exit 12
# fi
# echo "G4 Stage 2 completed. Removing G4 Stage 1 output..."
# #rm -f cosmic_g4_stage1_${jobid}.root
# -----------------
# G4 STAGE 1 & 2
# -----------------
lar -c photonlibrary_g4_protodunehd.fcl -s cosmic_gen_${jobid}.root -o cosmic_g4_${jobid}.root
if [ $? -ne 0 ]; then
echo "G4 Stage failed"
exit 11
fi
echo "G4 Stage completed. Removing input file from GEN stage..."
#rm -f cosmic_gen_${jobid}.root
echo "Running with CLUSTER=$CLUSTER, PROCESS=$PROCESS, TIMESTAMP=$FILETIMESTAMP"
pwd
ls -ltrha
# -------------------------------
# Copy final output
# -------------------------------
#ifdh cp -D cosmic_g4_stage2_${jobid}.root /pnfs/dune/scratch/users/szh2/MC_pdhd_Michel/MY_production/
#if [ $? -ne 0 ]; then
# echo "Output copy failed!"
# exit 13
# fi
# echo "Final output copied. Removing G4 Stage 2 output..."
#rm -f cosmic_g4_stage2_${jobid}.root
# Mark input (if needed by justIN)
echo "All jobs complete (no input PFN to record)" > justin-processed-pfns.txt
exit 0