From d82f9d30f1bc3df15f810eb2b148b35a3e5c06e6 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Wed, 26 Jun 2024 18:49:29 +0000 Subject: [PATCH] Ref #32 Replace runWcoss.sh with a setup script that get's sourced by the cmdfile. --- scripts/exobsmon_plot.sh | 7 +++++-- ush/{runWcoss.sh => setup_wcoss2.sh} | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) rename ush/{runWcoss.sh => setup_wcoss2.sh} (85%) diff --git a/scripts/exobsmon_plot.sh b/scripts/exobsmon_plot.sh index 2ab17d4..41c5ae1 100755 --- a/scripts/exobsmon_plot.sh +++ b/scripts/exobsmon_plot.sh @@ -61,15 +61,18 @@ if compgen -G "${DATA}/OM_PLOT*.yaml" > /dev/null; then ;; wcoss2) + # prepend setup script to $cmdfile + echo -e ". ${USHobsmon}/setup_wcoss2.sh\n $(cat ${cmdfile})" > ${cmdfile} chmod 775 ${cmdfile} + mem=$((4*${ctr})) echo "submitting ${jobname} on wcoss2, ctr = $ctr, mem = $mem, cmdfile = ${cmdfile}" - cp ${USHobsmon}/runWcoss.sh . + ${SUB} -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} \ -v "PYTHONPATH=${PYTHONPATH}, PATH=${PATH}, HOMEobsmon=${HOMEobsmon}, MODEL=${MODEL}, \ CNTRLobsmon=${CNTRLobsmon}, PARMobsmon=${PARMobsmon}, DATA=${DATA}, \ LD_LIBRARY_PATH=${LD_LIBRARY_PATH}, cmdfile=${cmdfile}, ncpus=${ctr}" \ - -l place=vscatter,select=1:ncpus=${ctr}:mem=${mem}gb,walltime=1:30:00 -N ${jobname} ./runWcoss.sh + -l place=vscatter,select=1:ncpus=${ctr}:mem=${mem}gb,walltime=1:30:00 -N ${jobname} ${cmdfile} ;; esac fi diff --git a/ush/runWcoss.sh b/ush/setup_wcoss2.sh similarity index 85% rename from ush/runWcoss.sh rename to ush/setup_wcoss2.sh index f8243dd..6becb3e 100644 --- a/ush/runWcoss.sh +++ b/ush/setup_wcoss2.sh @@ -1,7 +1,5 @@ #!/bin/bash -st=`date` - module reset module load libfabric/1.11.0.0. @@ -18,8 +16,3 @@ export PYTHONPATH=${PYTHONPATH}:/lfs/h2/emc/da/noscrub/edward.safford/eva/opt/ if [ ! -z ${PBS_O_WORKDIR} ]; then cd ${PBS_O_WORKDIR}; fi -./${cmdfile} - -end=`date` -echo "start: ${st}" -echo "end: ${end}"