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
UK_RAL-Tier1
0
1
Jobscript
#!/bin/sh
#
# Example jobscript that runs lar for all the files
# referred to by the MQL expression given on the justin command line.
#
# Submit with something like this:
#
# ./justin simple-workflow \
# --max-distance 30 \
# --mql "rucio-dataset protodune-sp:np04_raw_run_number_5769" \
# --jobscript lar.jobscript
#
# Then monitor with dashboard or ./justin show-jobs --workflow-id ID
# where ID is the value printed by the first command
#
# the xroot lib for streaming non-root files is in testproducts,
# so add it to the start of the path
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
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}
# From jobsub
export CLUSTER=${CLUSTER:-1}
export PROCESS=${PROCESS:-1}
if [ -n "${extra_fcl_path}" ]; then
echo "Adding ${extra_fcl_path} to fhicl file path"
export FHICL_FILE_PATH=${extra_fcl_path}:${FHICL_FILE_PATH}
echo $FHICL_FILE_PATH
fi
setup dunesw ${DUNESW_VERSION:-v10_10_04d00} -q e26:prof
setup_exit=$?
if [ "$setup_exit" != 0 ]; then
echo "Error setting up dunesw ${DUNESW_VERSION}"
exit
fi
# Get an unprocessed file from this stage
did_pfn_rse=`$JUSTIN_PATH/justin-get-file`
if [ "${did_pfn_rse}" == "" ] ; then
echo "Could not get file"
exit 0
fi
did=`echo $did_pfn_rse | cut -f1 -d' '`
pfn=`echo $did_pfn_rse | cut -f2 -d' '`
rse=`echo $did_pfn_rse | cut -f3 -d' '`
name_only=$(echo $did | cut -f2 -d':')
echo "name" $name_only
echo "Found input file URL $pfn at $rse"
if [ -n "${test_path}" ]; then
pfn=${test_path}
echo "Set pfn to test path ${pfn}"
fi
#Get the stage and momentum
export stage=${stage:-"Gen"}
export momentum=${momentum:-1}
echo "Using gen fcl: ${gen_fcl}"
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}
output_preamble="pdhd_prod_data_"
nevents=${nevents:--1}
nskip=${nskip:-0}
LD_PRELOAD=$XROOTD_LIB/libXrdPosixPreload.so lar \
-c standard_reco_stage1_protodunehd_keepup.fcl \
-o temp.root \
-n ${nevents} \
--nskip ${nskip} \
${pfn}
larReturnCode=$?
echo "stage1 lar returns $larReturnCode"
if [ "$larReturnCode" != 0 ] ; then
exit $larReturnCode
fi
#IonScintPDExt
lar \
-c standard_reco_stage2_calibration_protodunehd_keepup.fcl \
-o ${output_preamble}_${jobid}_${stageid}_${now}.root \
temp.root
larReturnCode=$?
echo "stage2 lar returns $larReturnCode"
if [ "$larReturnCode" != 0 ] ; then
exit $larReturnCode
fi
#---------------------------------------------
####EDIT METADATA FOR THE FOLLOWING FILE
#${name_only}_${jobid}_${stageid}_${now}_detsim_reco1.root
# Record that we processed the input file ok (did we???)
echo "$pfn" > justin-processed-pfns.txt
# For debugging
for i in *.json
do
echo "==== Start $i ===="
cat $i
echo "==== End $i ===="
done
ls -ltR
exit 0
justIN time: 2026-02-08 04:13:53 UTC justIN version: 01.06.00