Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#255 from EdwardSafford-NOAA/master
Browse files Browse the repository at this point in the history
GSI GitHub Issue NOAA-EMC#228.  Port ConMon to wcoss2.
  • Loading branch information
MichaelLueken authored Nov 17, 2021
2 parents c8447e4 + 2ce7875 commit f442020
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 60 deletions.
38 changes: 33 additions & 5 deletions util/Conventional_Monitor/ConMon_install.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
my $machine = `/usr/bin/perl ./get_hostname.pl`;
my $my_machine="export MY_MACHINE=$machine";

if( $machine ne "hera" && $machine ne "wcoss" &&
$machine ne "wcoss_c" && $machine ne "wcoss_d" ) {
if( $machine ne "hera" && $machine ne "wcoss" && $machine ne "wcoss_c"
&& $machine ne "wcoss_d" && $machine ne "wcoss2" ) {
die( "ERROR --- Unrecognized machine hostname, $machine. Exiting now...\n" );
}
else {
Expand Down Expand Up @@ -76,6 +76,9 @@
elsif( $machine eq "wcoss_d" ) {
$tankdir = "/gpfs/dell2/emc/modeling/noscrub/$user_name/nbns";
}
elsif( $machine eq "wcoss2" ){
$tankdir = "/lfs/h2/emc/da/noscrub/$user_name/nbns";
}

print "Please specify TANKDIR location for storage of data and image files.\n";
print " Return to accept default location or enter new location now.\n";
Expand Down Expand Up @@ -177,6 +180,10 @@
$my_ptmp="export C_PTMP=\${C_PTMP:-/gpfs/dell2/ptmp}";
$my_stmp="export C_STMP=\${C_STMP:-/gpfs/dell2/stmp}";
}
elsif( $machine eq "wcoss2" ){
$my_ptmp="export MY_PTMP=\${MY_PTMP:-/lfs/h2/emc/ptmp}";
$my_stmp="export MY_STMP=\${MY_STMP:-/lfs/h2/emc/stmp}";
}

#---------------------------------------
#
Expand Down Expand Up @@ -235,11 +242,26 @@
print "\n";


my $account = "export ACCOUNT=\${ACCOUNT:-fv3-cpu}";
if( $machine ne "hera" ) {
$account = "export ACCOUNT=\${ACCOUNT:-}";
my $account = "export ACCOUNT=\${ACCOUNT:-}";
if( $machine eq "hera" ) {
$account = "export ACCOUNT=\${ACCOUNT:-fv3-cpu}";
} elsif( $machine eq "wcoss2" ){
$account = "export ACCOUNT=\${ACCOUNT:-GFS-DEV}";
}

my $project = "export PROJECT=\${PROJECT:-GDAS-T2O}";
if( $machine eq "wcoss2" ){
$project = "export PROJECT=\${PROJECT:-GDAS-DEV}";
} elsif( $machine ne "wcoss" && $machine ne "cray" && $machine ne "wcoss_d" ) {
$project="export PROJECT=";
}

my $job_queue="export JOB_QUEUE=";
if( $machine eq "cray" || $machine eq "wcoss2" ) {
$job_queue="export JOB_QUEUE=\${JOB_QUEUE:-dev}";
} elsif( $machine eq "wcoss" || $machine eq "wcoss_d" ){
$job_queue = "export JOB_QUEUE=\${JOB_QUEUE:-dev_shared}";
}

#------------------------------------------------------------
#
Expand All @@ -256,6 +278,12 @@
elsif( $_ =~ "ACCOUNT=" ) {
print $out "$account\n";
}
elsif( $_ =~ "PROJECT=" ) {
print $out "$project\n";
}
elsif( $_ =~ "JOB_QUEUE=" ) {
print $out "$job_queue\n";
}
elsif( $_ =~ "CONMON_TANKDIR=" ) {
print $out "$my_tankdir\n";
}
Expand Down
59 changes: 28 additions & 31 deletions util/Conventional_Monitor/build_ConMon_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ elif [[ -d /scratch1 ]] ; then
elif [[ -d /work ]]; then
. $MODULESHOME/init/sh
target=orion
elif [[ -d /lfs && -d /dfs ]]; then
. $MODULESHOME/init/bash
target=wcoss2
else
echo "unknown target = $target"
exit 9
Expand Down Expand Up @@ -66,33 +69,31 @@ fi
# Verify this is a supported machine
#---------------------------------------------------

if [[ ${target} = "hera" || ${target} = "wcoss_c" \
|| ${target} = "wcoss_d" || ${target} = "orion" ]]; then
echo Building nwprod executables on ${target}
echo


#-------------------------------------
# load modules
#-------------------------------------
if [ $target = wcoss_d ]; then
module purge
module use -a $dir_modules
module load modulefile.ProdGSI.$target
elif [ $target = wcoss -o $target = gaea ]; then
module purge
module load $dir_modules/modulefile.ProdGSI.$target
elif [ $target = hera -o $target = orion ]; then
module purge
module use $dir_modules
module load modulefile.ProdGSI.$target
elif [ $target = cheyenne ]; then
module purge
source $dir_modules/modulefile.ProdGSI.$target
elif [ $target = wcoss_c ]; then
module purge
module load $dir_modules/modulefile.ProdGSI.$target
fi
echo Building nwprod executables on ${target}
echo


#-------------------------------------
# load modules
#-------------------------------------
if [ $target = wcoss_d -o $target = wcoss2 ]; then
module purge
module use -a $dir_modules
module load modulefile.ProdGSI.$target
elif [ $target = wcoss -o $target = gaea ]; then
module purge
module load $dir_modules/modulefile.ProdGSI.$target
elif [ $target = hera -o $target = orion ]; then
module purge
module use $dir_modules
module load modulefile.ProdGSI.$target
elif [ $target = cheyenne ]; then
module purge
source $dir_modules/modulefile.ProdGSI.$target
elif [ $target = wcoss_c ]; then
module purge
module load $dir_modules/modulefile.ProdGSI.$target
fi


#-------------------------------------
Expand Down Expand Up @@ -129,10 +130,6 @@ if [[ ${target} = "hera" || ${target} = "wcoss_c" \
cp $file $C_IG_EXEC/.
done

else
echo ${machine} is not supported
fi


set +x

Expand Down
4 changes: 4 additions & 0 deletions util/Conventional_Monitor/data_extract/ush/ConMon_DE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ if [ -s $cnvstat -a -s $pgrbf00 -a -s $pgrbf06 ]; then
$SUB -A $ACCOUNT --ntasks=1 --time=00:30:00 \
-p service -J ${jobname} -o $C_LOGDIR/DE.${PDY}.${CYC}.log \
${HOMEgdas_conmon}/jobs/JGDAS_ATMOS_CONMON

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \
-l select=1:mem=5000M ${HOMEgdas_conmon}/jobs/JGDAS_ATMOS_CONMON
fi

else
Expand Down
4 changes: 3 additions & 1 deletion util/Conventional_Monitor/get_hostname.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
elsif( -d "/scratch1" ) {
$machine = "hera";
}

elsif( -d "/lfs/h2" ) {
$machine = "wcoss2";
}

print "$machine";

Expand Down
12 changes: 12 additions & 0 deletions util/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ set -ax
elif [[ $MY_MACHINE = "hera" ]]; then
${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \
-p service -J ${jobname} -o ${logfile} ${plot_hist}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \
-l select=1:mem=500M ${plot_hist}
fi


Expand All @@ -78,6 +82,10 @@ set -ax
elif [[ $MY_MACHINE = "hera" ]]; then
${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \
-p service -J ${jobname} -o ${logfile} ${plot_horz}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \
-l select=1:mem=500M ${plot_horz}
fi


Expand All @@ -99,6 +107,10 @@ set -ax
elif [[ $MY_MACHINE = "hera" ]]; then
${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \
-p service -J ${jobname} -o ${logfile} ${plot_horz_uv}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \
-l select=1:mem=500M ${plot_horz_uv}
fi


Expand Down
19 changes: 19 additions & 0 deletions util/Conventional_Monitor/image_gen/ush/mk_time_vert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ echo "--> mk_time_vert.sh"
elif [[ $MY_MACHINE == "hera" ]]; then
${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:15:00 \
-p service -J ${jobname} -o ${logfile} ${pltfile}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 -N ${jobname} \
-l select=1:mem=200M ${pltfile}
fi

#--------------------------------------------
Expand Down Expand Up @@ -72,7 +76,18 @@ echo "--> mk_time_vert.sh"
${SUB} -A ${ACCOUNT} --ntasks=1 --time=${walltime} \
-p service -J ${jobname} -o ${logfile} ${pltfile}

elif [[ $MY_MACHINE = "wcoss2" ]]; then

if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then
walltime="01:30:00"
else
walltime="50:00"
fi

$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=${walltime}\
-N ${jobname} -l select=1:mem=200M ${pltfile}
fi

done


Expand Down Expand Up @@ -102,6 +117,10 @@ echo "--> mk_time_vert.sh"

${SUB} -A ${ACCOUNT} --ntasks=1 --time=${walltime} \
-p service -J ${jobname} -o ${logfile} ${pltfile}

elif [[ $MY_MACHINE == "wcoss2" ]]; then
$SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 \
-N ${jobname} -l select=1:mem=500M ${pltfile}

fi
done
Expand Down
12 changes: 3 additions & 9 deletions util/Conventional_Monitor/image_gen/ush/plot_horz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@


rc=0
pdy=`echo $PDATE|cut -c1-8`
cyc=`echo $PDATE|cut -c9-10`
hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist

export xsize=x800
Expand Down Expand Up @@ -184,20 +182,16 @@

$GRADS -blc "run plothorz_${dtype}.gs"

mkdir -p ${C_IMGNDIR}/pngs/horz/${CYC}
outdir=${C_IMGNDIR}/pngs/horz
mkdir -p ${outdir}

img_files=`ls *.png`
for imgf in $img_files; do
newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"`
cp $imgf $newf
mv $newf ${C_IMGNDIR}/pngs/horz/.
mv $newf ${outdir}/.
done

# if [[ $CONMON_SUFFIX != "v16rt2" ]]; then
# mv -f *.png ${C_IMGNDIR}/pngs/horz/${CYC}/.
# fi


done ### dtype loop

done ### type loop
Expand Down
12 changes: 2 additions & 10 deletions util/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set -ax
echo "--> plot_horz_uv.sh"

rc=0
pdy=`echo $PDATE|cut -c1-8`
cyc=`echo $PDATE|cut -c9-10`
hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist
export savedir=${hh_tankdir}

Expand Down Expand Up @@ -175,21 +173,15 @@ set -ax
${GRADS} -blc "run plothorz_${dtype}.gs"


outdir=${C_IMGNDIR}/pngs/horz/${CYC}
outdir=${C_IMGNDIR}/pngs/horz
mkdir -p ${outdir}

img_files=`ls *.png`
for imgf in $img_files; do
newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"`
cp $imgf $newf
mv $newf ${C_IMGNDIR}/pngs/horz/.
cp $imgf ${C_IMGNDIR}/pngs/horz/${newf}
done

if [[ $CONMON_SUFFIX != "v16rt2" ]]; then
mv -f *.png ${outdir}/.
fi


done ### dtype loop
done ### type loop

Expand Down
Loading

0 comments on commit f442020

Please sign in to comment.