Skip to content

Commit dc579f8

Browse files
authored
DQM automation (#192)
* Adapt directory paths to new local ones at CEA and new ones on DIRAC * Jobs running on GRIF with 16 GB RAM max * Updated path on DIRAC for DQM result parser on OpenStack * Updated DIRAC group (from cta_nectarcam to ctao_nectarcam) for proxy initialization * Fix path pattern on DIRAC * Don't set a requirement on minimal amount of RAM per job
1 parent f2c304c commit dc579f8

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/nectarchain/user_scripts/jlenain/cronjob_parse_dqm_fits_file.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ exec 1>"$LOGFILE" 2>&1
1212
conda activate nectar-dev
1313

1414
# Initialize DIRAC proxy from user certificate:
15-
if ! dirac-proxy-init -M -g cta_nectarcam --pwstdin < ~/.dirac.pwd; then
15+
if ! dirac-proxy-init -M -g ctao_nectarcam --pwstdin < ~/.dirac.pwd; then
1616
echo "DIRAC proxy initialization failed..."
1717
exit 1
1818
fi
1919

20-
remoteParentDir="/vo.cta.in2p3.fr/user/j/jlenain/nectarcam/dqm"
20+
remoteParentDir="/ctao/user/j/jlenain/nectarcam/dqm"
2121
nectarchainScriptDir="/opt/cta/nectarchain/src/nectarchain/user_scripts/jlenain"
2222

23-
python ${nectarchainScriptDir}/parse_dqm_fits_file.py -r $(dls ${remoteParentDir} | grep -ve "/vo.cta" | awk -F. '{print $1}' | awk -Fn '{print $2}' | tr '\n' ' ')
23+
python ${nectarchainScriptDir}/parse_dqm_fits_file.py -r $(dls ${remoteParentDir} | grep -ve "/ctao" | awk -F. '{print $1}' | awk -Fn '{print $2}' | tr '\n' ' ')

src/nectarchain/user_scripts/jlenain/dqm_job_submitter/cronjob_launchDQM.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ exec 1>"$LOGFILE" 2>&1
1313
source /opt/cta/mambaforge/etc/profile.d/conda.sh
1414
conda activate ctadirac
1515

16-
localParentDir="/data/nvme/ZFITS"
16+
localParentDir="/data/nvme/NectarCAMQM/ZFITS"
1717
remoteParentDir="/vo.cta.in2p3.fr/nectarcam"
18+
remoteParentDir="/ctao/nectarcam"
1819
nectarchainScriptDir="$HOME/local/src/python/cta-observatory/nectarchain/src/nectarchain/user_scripts/jlenain/dqm_job_submitter"
1920

2021
cd $nectarchainScriptDir || (echo "Failed to cd into ${nectarchainScriptDir}, exiting..."; exit 1)
@@ -30,7 +31,7 @@ for run in $(find ${localParentDir} -type f -name "NectarCAM*.fits.fz" | awk -F.
3031
echo " Run $run: number of local and remote files matching, will attempt to submit a DQM job"
3132
# Has this DQM run already been submitted ?
3233
if [ $(dstat | grep --count -e "NectarCAM DQM run ${run}") -eq 0 ]; then
33-
yyyymmdd=$(find ${localParentDir} -type f -name "NectarCAM.Run${run}.????.fits.fz" | head -n 1 | awk -F/ '{print $6}')
34+
yyyymmdd=$(find ${localParentDir} -type f -name "NectarCAM.Run${run}.????.fits.fz" | head -n 1 | awk -F/ '{print $7}')
3435
yyyy=${yyyymmdd:0:4}
3536
mm=${yyyymmdd:4:2}
3637
dd=${yyyymmdd:6:2}

src/nectarchain/user_scripts/jlenain/dqm_job_submitter/dqm_processor.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ WRAPPER="singularity_wrapper.sh"
4545
# We can instantiate a particular container version:
4646
# CONTAINER="oras://ghcr.io/cta-observatory/nectarchain@sha256:cf5a812bdb1113d027facceec30009759535a8579eb4caf38f56143e65cb35e7"
4747
# or just use the latest available:
48-
# CONTAINER="oras://ghcr.io/cta-observatory/nectarchain:latest"
48+
CONTAINER="oras://ghcr.io/cta-observatory/nectarchain:latest"
4949
# of from CVMFS:
5050
# CONTAINER="/cvmfs/sw.cta-observatory.org/software/containers/nectarchain-latest"
51-
CONTAINER="/cvmfs/sw.hess-experiment.eu/software/containers/nectarchain_w_2025_03"
51+
# CONTAINER="/cvmfs/sw.hess-experiment.eu/software/containers/nectarchain_w_2025_03"
5252
OUTDIR=NectarCAM_DQM_Run${runnb}
53-
DIRAC_OUTDIR=/vo.cta.in2p3.fr/user/j/jlenain/nectarcam/dqm
53+
DIRAC_OUTDIR=/ctao/user/j/jlenain/nectarcam/dqm
5454

5555
function exit_script() {
5656
return_code=$1

src/nectarchain/user_scripts/jlenain/dqm_job_submitter/submit_dqm_processor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
#
4-
# Time-stamp: "2023-05-30 13:09:04 jlenain"
53

64
import argparse
75
import logging
@@ -173,7 +171,8 @@
173171
# j.setExecutable(f'{executable_wrapper}', '<SOME POSSIBLE ARGUMENTS such as run number>')
174172
j.setExecutable(f"{executable_wrapper}", f"-r {run}")
175173
# Force job to be run from a given Computing Element:
176-
j.setDestination(["LCG.GRIF.fr", "ARC.CEA.fr"])
174+
# j.setDestination(["LCG.GRIF.fr", "ARC.CEA.fr"])
175+
j.setDestination(["LCG.GRIF.fr"])
177176
# j.setTag(["16GBMemory"])
178177
j.setName(f"NectarCAM DQM run {run}")
179178
j.setJobGroup("NectarCAM DQM")

0 commit comments

Comments
 (0)