Workflow 9431, Stage 1
| Priority | 50 | 
| Processors | 1 | 
| Wall seconds | 80000 | 
| Image | /cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest | 
| RSS bytes | 6815744000 (6500 MiB) | 
| Max distance for inputs | 30.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_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/drivera/lar1010/JustinTest/fnal/09431/1 | np04hd_raw*root |   |   |   | 
Environment variables
| Name | Value | 
|---|
| DUNESW_TAR | /cvmfs/fifeuser1.opensciencegrid.org/sw/dune/3b3dd185ef0a7de63b6b2ca059042a10935a1cdb | 
| DUNESW_VERSION | v10_10_00d00 | 
| HDF5JOB | 1 | 
| NEVENTS | -1 | 
| pipyaml | 1 | 
| UTIL_TAR | /cvmfs/fifeuser3.opensciencegrid.org/sw/dune/da192e811f99beb9052ebf84feca1a26d8e9cf8b | 
| YAMLFILE | laser_campaign_2.yaml | 
File states
| Total files | Finding | Unallocated | Allocated | Outputting | Processed | Not found | Failed | 
|---|
|
| 536 | 0 | 0 | 157 | 0 | 379 | 0 | 0 | 
Job states
| Total | Submitted | Started | Processing | Outputting | Finished | Notused | Aborted | Stalled | Jobscript error | Outputting failed | None processed | 
|---|
| 4288 | 0 | 0 | 157 | 0 | 2139 | 1 | 71 | 1877 | 6 | 21 | 16 | 
 
 
RSEs used
| Name | Inputs | Outputs | 
|---|
| DUNE_IT_INFN_CNAF | 1030 | 0 | 
| DUNE_CA_SFU | 8 | 0 | 
| None | 0 | 379 | 
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
| Site | Allocated | Outputting | 
|---|
| NL_SURFsara | 103 | 3 | 
| UK_Manchester | 94 | 0 | 
| UK_RAL-Tier1 | 73 | 0 | 
| UK_QMUL | 67 | 0 | 
| NL_NIKHEF | 42 | 1 | 
| IT_CNAF | 24 | 1 | 
| ES_PIC | 17 | 0 | 
| UK_Sheffield | 15 | 2 | 
| FR_CCIN2P3 | 12 | 0 | 
| UK_Durham | 10 | 0 | 
| UK_Lancaster | 9 | 0 | 
| UK_Brunel | 7 | 0 | 
| UK_Bristol | 3 | 0 | 
| CZ_FZU | 3 | 0 | 
| UK_RAL-PPD | 2 | 1 | 
| CERN | 1 | 0 | 
Jobscript
#!/bin/bash
#
#These must be defined
if [ -z $UTIL_TAR ]; then
  echo "Fatal must provide UTIL_TAR env var"
  exit 1
fi
export PYTHONPATH=$UTIL_TAR:$PYTHONPATH
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup metacat
export METACAT_SERVER_URL=https://metacat.fnal.gov:9443/dune_meta_prod/app
export METACAT_AUTH_SERVER_URL=https://metacat.fnal.gov:8143/auth/dune
if [ -z ${JUSTIN_PROCESSORS} ]; then
  JUSTIN_PROCESSORS=1
fi
echo "Justin processors: ${JUSTIN_PROCESSORS}"
export TF_NUM_THREADS=${JUSTIN_PROCESSORS}   
export OPENBLAS_NUM_THREADS=${JUSTIN_PROCESSORS} 
export JULIA_NUM_THREADS=${JUSTIN_PROCESSORS} 
export MKL_NUM_THREADS=${JUSTIN_PROCESSORS} 
export NUMEXPR_NUM_THREADS=${JUSTIN_PROCESSORS} 
export OMP_NUM_THREADS=${JUSTIN_PROCESSORS}  
echo "Justin specific env vars"
env | grep JUSTIN
now=$(date -u +"%Y%m%dT%H%M%SZ")
jobid=`echo "${JUSTIN_JOBSUB_ID:-1}" | cut -f1 -d'@' | sed -e "s/\./_/"`
stageid=${JUSTIN_STAGE_ID:-1}
a=1
 if [ -n "$DUNESW_TAR" ]; then
   stat ${DUNESW_TAR}
   if [ $? -ne 0 ]; then
     echo "Failed to stat $DUNESW_TAR. Exiting safely"
     exit 0
   fi
 
   export PRODUCTS=$DUNESW_TAR:$PRODUCTS 
   echo "Set dunesw to $DUNESW_TAR"
 fi
 if [ -n "$WIRECELL_TAR" ]; then
   stat ${WIRECELL_TAR}
   if [ $? -ne 0 ]; then
     echo "Failed to stat $WIRECELL_TAR. Exiting safely"
     exit 0
   fi
 
   export PRODUCTS=$WIRECELL_TAR:$PRODUCTS 
   echo "Set wirecell to $WIRECELL_TAR"
 fi
 #Setup recent lar software suite
 DUNESW_VERSION=${DUNESW_VERSION:-v10_02_02d00}
 setup dunesw \
    "${DUNESW_VERSION}" \
    -q "${DUNE_QUALIFIER:-e26:prof}"
 
 setup_exit=$?
 if [ $? -ne 0 ]; then
   echo "Failed to setup dunesw $DUNESW_VERSION $DUNE_QUALIFIER"
   exit $setup_exit
 fi
 
 echo "DUNESW loc:"
 ups active | grep dunesw
 echo "WIRECELL loc:"
 ups active | grep wirecell
 
 if [ -n "$extra_fcl_path" ]; then
   export FHICL_FILE_PATH=${extra_fcl_path}:${FHICL_FILE_PATH}
   echo "Added ${extra_fcl_path} to fhicl file path"
   echo "${FHICL_FILE_PATH}"
 fi
 
 echo "printing env"
 env
 echo "DUNE specific env vars"
 env | grep DUNE
# User can specify to pip install pyyaml
if [ -n "$pipyaml" ]; then
  echo "Installing yaml"
  pip install --user pyyaml
  echo "Done"
# elif [ -n "${YAML_TAR}" ]; then
#   echo "Using venv at ${YAML_TAR}"
#   source ${YAML_TAR}/yaml_venv/bin/activate
fi
 echo "Will use justin-get-file"
 DID_PFN_RSE=`$JUSTIN_PATH/justin-get-file`
 if [ "${DID_PFN_RSE}" == "" ] ; then
   echo "Could not get file"
   exit 0
 fi
 pfn=`echo ${DID_PFN_RSE} | cut -f2 -d' '`
 did=`echo ${DID_PFN_RSE} | cut -f1 -d' '`
 
 input_filename=`echo $did | cut -f2 -d':'`
 echo "input file: $input_filename"
 echo "jobsub_id: ${JUSTIN_JOBSUB_ID:-1}"
 
 #Get run/subrun from parent if using input -- else from justin job ID/process"
 if [ -z "$SetRun" ]; then
   echo "Getting run subrun from $did"
   run_subrun=`python -m beam_job_utils get_run_subrun -i $did`
   get_run_ret=$?
   if [ $get_run_ret -ne 0 ]; then
     echo "error in get_run_subrun"
   fi
 
   echo $run_subrun
   run=`echo $run_subrun | cut -f1 -d' '`
   subrun=`echo $run_subrun | cut -f2 -d' '`
 else
   run=`echo $jobid | cut -f1 -d'_'`  ##TODO -- check order here
   subrun=`echo $jobid | cut -f2 -d'_'`
 fi
 nevents=${NEVENTS:--1} #Set from env override or -1 
 NSKIP=${NSKIP:-0} 
 echo "nevents: $nevents"
 
 overrides="core.data_tier=full-reconstructed \
  core.application.version=${DUNESW_VERSION} \
  core.application.name=reco \
  core.application.family=dunesw \
  core.application=dunesw.reco \
 "
#User specifies if they'd like to use an input file or not 
if [ -n "$MCJob" ]; then
  inputflag=""
else
  inputflag="-i $pfn --parent $did"
fi
echo "input flag: $inputflag"
if [[ $pfn == *.hdf5 ]]; then
  echo "Setting LD_PRELOAD"  
  export LD_PRELOAD=$XROOTD_LIB/libXrdPosixPreload.so
fi
# TODO -- metadata file configurable
python -m beam_job_utils run_job \
      --json ${UTIL_TAR}/${JSONFILE:-pdsp_beam_base_meta.json} \
      --overrides ${overrides} \
      --run $run \
      --subrun $subrun \
      --yaml ${UTIL_TAR}/${YAMLFILE:-pdsp_beam_gen.yaml} \
      --nevents $nevents \
      $(if [ ${NSKIP} -ne 0 ]; then echo "--event ${NSKIP}"; fi) \
      $inputflag
exitcode=$?
if [ $exitcode -ne 0 ]; then
  echo "Error running. Exiting with ${exitcode}"
  exit $exitcode
fi
echo "lsing"
ls -lhS
echo "disk usage"
du -sh .
echo "$pfn" > justin-processed-pfns.txt