justIN           Dashboard       Workflows       Jobs       AWT       Sites       Storages       Docs       Login

Workflow 2382, Stage 1

Priority50
Processors1
Wall seconds80000
RSS bytes4193255424 (3999 MiB)
Max distance for inputs30.0
Enabled input RSEs CERN_PDUNE_EOS, DUNE_CERN_EOS, DUNE_ES_PIC, DUNE_FR_CCIN2P3_DISK, DUNE_IN_TIFR, DUNE_IT_INFN_CNAF, DUNE_UK_LANCASTER_CEPH, DUNE_US_BNL_SDCC, DUNE_US_FNAL_DISK_STAGE, FNAL_DCACHE, FNAL_DCACHE_STAGING, FNAL_DCACHE_TEST, MANCHESTER, MONTECARLO, NIKHEF, PRAGUE, QMUL, RAL-PP, RAL_ECHO, SURFSARA, T3_US_NERSC
Enabled output RSEs CERN_PDUNE_EOS, DUNE_CERN_EOS, DUNE_ES_PIC, DUNE_FR_CCIN2P3_DISK, DUNE_IN_TIFR, DUNE_IT_INFN_CNAF, DUNE_UK_LANCASTER_CEPH, DUNE_US_BNL_SDCC, DUNE_US_FNAL_DISK_STAGE, FNAL_DCACHE, FNAL_DCACHE_STAGING, FNAL_DCACHE_TEST, MANCHESTER, NIKHEF, PRAGUE, QMUL, RAL-PP, RAL_ECHO, SURFSARA, T3_US_NERSC
Enabled sites CA_SFU, CA_Victoria, CERN, CH_UNIBE-LHEP, CZ_FZU, ES_CIEMAT, ES_PIC, FR_CCIN2P3, IN_TIFR, IT_CNAF, NL_NIKHEF, NL_SURFsara, UK_Bristol, UK_Brunel, UK_Durham, UK_Edinburgh, UK_Imperial, UK_Lancaster, UK_Liverpool, UK_Manchester, UK_Oxford, UK_QMUL, UK_RAL-Tier1, UK_Sheffield, US_BNL, US_Caltech, US_Colorado, US_FNAL-FermiGrid, US_FNAL-T1, US_Michigan, US_MIT, US_Nebraska, US_NotreDame, US_PuertoRico, US_SU-ITS, US_Swan, US_UChicago, US_UConn-HPC, US_UCSD, US_Wisconsin
Scopehd-protodune-det-reco
Events for this stage

Output patterns

 DestinationPatternLifetimeFor next stage
1Rucio hd-protodune-det-reco:pdhd_keepup_cal_062024_2382*keepup.root2592000False
2Rucio hd-protodune-det-reco:calcuttj_keepup_cal_cal_062024_ntuple_2382*hists.root2592000False

Environment variables

NameValue
DUNESW_DIR/cvmfs/fifeuser1.opensciencegrid.org/sw/dune/c97ffcd260da3dea8dd998aad31f6f70854a68df
LARRECO_DIR/cvmfs/fifeuser1.opensciencegrid.org/sw/dune/aa06030a4a5fd60378390331c4033b08c6680a0b
METADATA_DIR/cvmfs/fifeuser2.opensciencegrid.org/sw/dune/71f643ddd59465043e3cd3712a1e24b9cd0fa631

Condor Class Ads

NameValue
HAS_CVMFS_dune_osgstorage_orgtrue

File states

Total filesFindingUnallocatedAllocatedOutputtingProcessedNot foundFailed
11492000010081321379

Job states

TotalSubmittedStartedProcessingOutputtingFinishedNotusedAbortedStalledJobscript errorOutputting failedNone processed
261490000127539294799543954924
Files processed0010001000200020003000300040004000Jun-20 23:00Jun-21 14:00Jun-22 05:00Jun-22 20:00Jun-23 11:00Jun-24 02:00Jun-24 17:00Jun-25 08:00Jun-25 23:00Jun-26 14:00Jun-27 05:00Jun-27 20:00Jun-28 11:00Jun-29 02:00Jun-29 17:00Jun-30 08:00Jun-30 23:00Jul-01 14:00Jul-02 05:00Jul-02 20:00Jul-03 11:00Jul-04 02:00Files processedBin start timesNumber per binCERNFR_CCIN2P3UK_ImperialNL_NIKHEFUK_RAL-Tier1UK_QMULUK_ManchesterUK_BrunelIT_CNAFES_PICUK_SheffieldNL_SURFsaraUK_DurhamUK_LiverpoolUK_Lancaster
Replicas per RSE11460490.025244.511460269.975244.50000000000003Replicas per RSEDUNE_CERN_EOS (50%)FNAL_DCACHE (50%)

RSEs used

NameInputsOutputs
DUNE_CERN_EOS19816285
MANCHESTER06659
SURFSARA05050
NIKHEF02347
RAL-PP02239
QMUL01976
DUNE_FR_CCIN2P3_DISK0570
RAL_ECHO0483
DUNE_ES_PIC0482
DUNE_UK_LANCASTER_CEPH049

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
UK_Manchester22330
NL_SURFsara13790
UK_Sheffield11570
NL_NIKHEF3010
UK_Liverpool2985
CERN2950
IT_CNAF2200
UK_Brunel1320
UK_Imperial1101
UK_Lancaster1020
ES_PIC940
UK_RAL-Tier1660
FR_CCIN2P3400
UK_Durham320
UK_Edinburgh270
UK_QMUL60

Jobscript

#!/bin/bash
#

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 [ -n "${DUNESW_DIR}" ]; then
  stat ${DUNESW_DIR}
  if [ $? -ne 0 ]; then
    echo "failed to stat dunesw dir"
    exit 1
  fi

  export PRODUCTS=$DUNESW_DIR:$PRODUCTS
fi

if [ -n "${LARRECO_DIR}" ]; then
  stat ${LARRECO_DIR}
  if [ $? -ne 0 ]; then
    echo "failed to stat larreco dir"
    exit 1
  fi

  export PRODUCTS=$LARRECO_DIR:$PRODUCTS
fi


if [ -n "${DETFORMATS_DIR}" ]; then
  stat ${DETFORMATS_DIR}
  if [ $? -ne 0 ]; then
    echo "failed to stat dunedetdataformats dir"
    exit 1
  fi

  export PRODUCTS=$DETFORMATS_DIR:$PRODUCTS
fi

echo "PRODUCTS $PRODUCTS"

#Setup recent lar software suite
DUNE_VERSION=${DUNE_VERSION:-v09_90_02d00}
setup dunesw \
   "${DUNE_VERSION}" \
   -q "${DUNE_QUALIFIER:-e26:prof}"

if [ $? -ne 0 ]; then
  echo "Failed to setup dunesw $DUNE_VERSION $DUNE_QUALIFIER"
  exit 1
fi

if [ -n "${USE_INPUT_FCL}" ]; then
  
  if [ -z ${INPUT_DIR} ]; then
    echo "Error, INPUT_DIR is undefined but user requested USE_INPUT_FCL"
    exit 1
  fi

  stat ${INPUT_DIR}
  if [ $? -ne 0 ]; then
    echo "Failed to stat input dir. Exiting safely"
    exit 0
  fi

  FHICL_FILE_PATH=${INPUT_DIR}:${FHICL_FILE_PATH}
  echo "FCL PATH: $FHICL_FILE_PATH"
fi

if [ -n "${METADATA_DIR}" ]; then
  stat ${METADATA_DIR}
  if [ $? -ne 0 ]; then
    echo "failed to stat metadata dir"
  fi

  echo "metadata dir contents:"
  ls $METADATA_DIR
  PYTHONPATH=${METADATA_DIR}:$PYTHONPATH
fi

FCL1=${FCL1:-"standard_reco_stage1_protodunehd_keepup.fcl"}
echo "FCL1 dump:" ${FCL1}
fhicl-dump ${FCL1}

FCL2=${FCL2:-"standard_reco_stage2_calibration_protodunehd_keepup.fcl"}
echo "FCL2 dump:" ${FCL2}
fhicl-dump ${FCL2}


echo "DUNESW loc:"
ups active | grep dunesw

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 "printing env"
env

echo "Will use justin-get-file"
#
DID_PFN_RSE=`$JUSTIN_PATH/justin-get-file`
##Check that any file was returned
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' '`
echo "pfn: ${pfn}"
echo "did: ${did}"
now=$(date -u +"%Y%m%dT%H%M%SZ")

nevents=${NEVENTS:--1}

echo "Running reco stage1"
touch reco.log
starttime=`date +"%s"`.0
LD_PRELOAD=$XROOTD_LIB/libXrdPosixPreload.so lar \
    -c ${FCL1} \
    -n ${nevents} \
    ${pfn} #>reco.log 2>&1
larExit=$?
endtime=`date +"%s"`.0

if [ $larExit -ne 0 ]; then
  echo "Error in reco1"
  cat reco.log
  exit $larExit
fi

output_stage1_file=`ls *stage1.root`

starttime=`date +"%s"`.0
lar -c ${FCL2} \
    $output_stage1_file #>reco.log 2>&1
larExit=$?
endtime=`date +"%s"`.0

if [ $larExit -ne 0 ]; then
  echo "Error in reco2"
  cat reco.log
  exit $larExit
fi



output_reco_file=`ls *keepup.root`
output_mr_file=`ls *keepup_hists.root`

echo "Output files:"
echo "\tReco: ${output_reco_file}"
echo "\tHists: ${output_mr_file}"

echo "Forming reco metadata"
python -m meta_maker --start_time $starttime --end_time $endtime --file_format "artroot" \
                     --app_family "dunesw" --app_name "reco" --app_version ${DUNE_VERSION} \
                     --data_tier "full-reconstructed" --get_events -p "$did" \
                     --campaign "hd-protodune-reco-keepup-v0" \
                     --fcl $FCL2 \
                     --past_fcls $FCL1 --past_apps "reco1" \
                     -f "${JUSTIN_SCOPE}:$output_reco_file" -j "${output_reco_file}.json"
if [ $? -ne 0 ]; then
  echo "Error in reco metadata"
  exit 1
fi
echo "Ran successfully"
## TODO -- CHECK
cat ${output_reco_file}.json

echo "Forming hist metadata"
python -m meta_maker --start_time $starttime --end_time $endtime --file_format "root" \
                     --app_family "dunesw" --app_name "reco" --app_version ${DUNE_VERSION} \
                     --data_tier "root-tuple" -p "$did" \
                     --campaign "hd-protodune-reco-keepup-v0" \
                     --fcl $FCL2 \
                     --past_fcls $FCL1 --past_apps "reco1" \
                     -f "${JUSTIN_SCOPE}:$output_mr_file" -j "${output_mr_file}.json"
 #--parent_as_json \
if [ $? -ne 0 ]; then
  echo "Error in hist metadata"
  exit 1
fi
echo "formed"
cat ${output_mr_file}.json



echo "$pfn" > justin-processed-pfns.txt
justIN time: 2024-09-29 09:33:57 UTC       justIN version: 01.01.08