From 95e852185eccd4e8b03d03cd6491c04752d93fc5 Mon Sep 17 00:00:00 2001 From: "edward.safford" Date: Mon, 24 Jun 2024 17:24:14 +0000 Subject: [PATCH] Ref #32 Add some Hera items. --- parm/OM_config | 2 +- scripts/exobsmon_plot.sh | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/parm/OM_config b/parm/OM_config index 3ec0dba..7cdc7a0 100644 --- a/parm/OM_config +++ b/parm/OM_config @@ -7,7 +7,7 @@ export JOBSobsmon=${om_dir_root}/jobs # Export job submission vars per MACHINE_ID # source ${om_dir_root}/ush/detect_machine.sh -MACHINE_ID=`echo "${MACHINE_ID%%.*}"` +export MACHINE_ID=`echo "${MACHINE_ID%%.*}"` case ${MACHINE_ID} in diff --git a/scripts/exobsmon_plot.sh b/scripts/exobsmon_plot.sh index 0bfcc3c..36bf708 100755 --- a/scripts/exobsmon_plot.sh +++ b/scripts/exobsmon_plot.sh @@ -20,25 +20,27 @@ if [[ ! -e ${chan_yaml} ]]; then exit 2 fi -#----------------------------------------------------------- -# split $plot_yaml into sat/instr[/plot], minimization, obs +#--------------------------------------------------------------- +# split $plot_yaml into sat/instr[/plot], minimization, and obs +# in order to reduce the plot jobs to a more managable size # ${APRUN_PY} ${USHobsmon}/splitPlotYaml.py -i ${plot_yaml} -c ${chan_yaml} -#-------------------------------------------------------------- -# Submit OM_sat_plots job if split yields any sat_*.yaml files +#------------------------------------------------------- +# Submit OM_plots job if split yielded any *.yaml files # -if compgen -G "${DATA}/sat_*.yaml" > /dev/null; then +if compgen -G "${DATA}/*.yaml" > /dev/null; then - jobname="OM_plot_all" + jobname="OM_plots" export logfile="${OM_LOGS}/${MODEL}/OM_plot.log" if [[ -e ${logfile} ]]; then rm ${logfile}; fi - cmdfile="OM_sat_jobscript" + cmdfile="OM_jobscript" >$cmdfile ctr=0 for yaml in ${DATA}/*.yaml; do + echo "processing yaml: $ctr $yaml" case ${MACHINE_ID} in hera) echo "${ctr} ${APRUN_PY} ${USHobsmon}/plotObsMon.py -i ${yaml} -p ${PDATE}" >> $cmdfile @@ -51,11 +53,11 @@ if compgen -G "${DATA}/sat_*.yaml" > /dev/null; then done - if compgen -G "${DATA}/sat*.yaml" > /dev/null; then + if [[ ${ctr} > 0 ]]; then case ${MACHINE_ID} in hera) - ${SUB} --account ${ACCOUNT} --ntasks=1 --mem=80000M --time=0:50:00 \ - -J ${jobname} --partition service -o ${logfile} ${cmdfile} + ${SUB} --account ${ACCOUNT} -n ${ctr} -o ${logfile} -D . -J ${jobname} --time=1:00:00 \ + --mem=80000M --wrap "srun -l --multi-prog ${cmdfile}" ;; wcoss2)