Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port OznMon's non-operational components to wcoss2 #349

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions util/Ozone_Monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.12)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# I am top-level project.
if( NOT DEFINED ENV{CC} )
Expand Down Expand Up @@ -84,8 +84,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
find_package( W3NCO )

set(BUILD_NCDIAG ON)
set(NCDIAG_INCS "${PROJECT_BINARY_DIR}/src/ncdiag/include")
add_subdirectory(src/ncdiag)
set(NCDIAG_INCS "${PROJECT_BINARY_DIR}/src/ncdiag")
add_subdirectory(${PROJECT_SOURCE_DIR}/../../src/ncdiag ${PROJECT_BINARY_DIR}/src/ncdiag)
set(NCDIAG_LIBRARIES ncdiag )
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
endif()
Expand Down
29 changes: 20 additions & 9 deletions util/Ozone_Monitor/OznMon_install.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
#
# This script makes sets all necessary configuration definitions
# and calls the makeall.sh script to build all the necessary
# executables. This script works for hera, wcoss_c, and
# wcoss_d machines.
# executables. This script works for hera, wcoss_c, wcoss_d,
# and wcoss2 machines.
#
#-------------------------------------------------------------------

use IO::File;
use File::Copy qw(move);

my $machine = `/usr/bin/perl get_hostname.pl`;
my $machine = `./get_machine.sh`;
$machine =~ s/^\s+|\s+$//g; # strip any whitespace in $machine
my $my_machine="export MY_MACHINE=$machine";

if( $machine ne "wcoss_c" && $machine ne "hera" && $machine ne "wcoss_d" ) {
if( $machine ne "wcoss_c" && $machine ne "hera" && $machine ne "wcoss_d" && $machine ne "wcoss2" ) {
die( "ERROR --- Unrecognized machine hostname, $machine. Exiting now...\n" );
}
else {
Expand Down Expand Up @@ -62,6 +63,9 @@
elsif( $machine eq "wcoss_c" ){
$tankdir = "/gpfs/hps/emc/da/noscrub/$user_name/nbns";
}
elsif( $machine eq "wcoss2" ){
$tankdir = "/lfs/h2/emc/da/noscrub/$user_name/nbns";
}
else {
$tankdir = "/global/save/$user_name/nbns";
}
Expand Down Expand Up @@ -209,6 +213,10 @@
$my_ptmp="export OZN_PTMP=\${OZN_PTMP:-/gpfs/hps2/ptmp}";
$my_stmp="export OZN_STMP=\${OZN_STMP:-/gpfs/hps2/stmp}";
}
elsif( $machine eq "wcoss2" ) {
$my_ptmp="export OZN_PTMP=\${OZN_PTMP:-/lfs/h2/emc/ptmp}";
$my_stmp="export OZN_STMP=\${OZN_STMP:-/lfs/h2/emc/stmp}";
}
elsif( $machine eq "hera" ){
$ptmp = "/scratch2/NCEPDEV/stmp3";

Expand Down Expand Up @@ -325,18 +333,21 @@
print "\n";
print "Updating parm/OznMon_user_settings\n";

my $account = "export ACCOUNT=\${ACCOUNT:-fv3-cpu}";
if( $machine ne "theia" && $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:-GFS-DEV}";
if( $machine ne "wcoss_c" && $machine ne "wcoss_d" ) {
if( $machine ne "wcoss_c" && $machine ne "wcoss_d" && $machine ne "wcoss2" ) {
$project="export PROJECT=";
}

my $job_queue="export JOB_QUEUE=";
if( $machine eq "wcoss_c" ) {
if( $machine eq "wcoss_c" || $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 Down
49 changes: 20 additions & 29 deletions util/Ozone_Monitor/build_OznMon_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,23 @@ echo "top_level = ${top_level}"
export MY_OZNMON=${MY_OZNMON:-$top_level}
echo "MY_OZNMON = ${MY_OZNMON}"

#module purge

if [[ -d /dcom && -d /hwrf ]] ; then
. /usrx/local/Modules/3.2.10/init/sh
target=wcoss
. $MODULESHOME/init/sh
elif [[ -d /cm ]] ; then
# MODULESHOME=/opt/modules/3.2.10.3
. $MODULESHOME/init/sh
target=wcoss_c
elif [[ -d /ioddev_dell ]]; then
. $MODULESHOME/init/sh
target=wcoss_d
elif [[ -d /scratch1 ]] ; then
. /apps/lmod/lmod/init/sh
target=hera
elif [[ -d /work ]]; then
. $MODULESHOME/init/sh
target=orion
elif [[ -d /data/prod ]]; then
. $MODULESHOME/init/sh
target=s4
elif [[ -d /jetmon ]]; then
. /apps/lmod/lmod/init/sh
target=jet
target=`./get_machine.sh`
echo "target = $target"

if [[ $target = "wcoss_c" || $target = "wcoss_d" ||
$target = "orion" || $target = "wcoss2" ||
$target = "s4" ]] ; then
. $MODULESHOME/init/sh
elif [[ $target = "hera" ]] ; then
. /apps/lmod/lmod/init/sh
elif [[ $target = "jet" ]] ; then
. /apps/lmod/lmod/init/sh
else
echo "unknown target = $target"
exit 9
echo "unknown target = $target"
exit 9
fi


GSI_Pkg=${top_level}/../..
echo "GSI_Pkg = ${GSI_Pkg}"

Expand All @@ -71,7 +58,8 @@ fi

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

Expand All @@ -97,6 +85,10 @@ if [[ ${target} = "hera" || ${target} = "wcoss_c" \
module purge
module use -a $dir_modules
module load $dir_modules/modulefile.ProdGSI.$target
elif [ $target = wcoss2 ]; then
module purge
module use -a $dir_modules
module load modulefile.ProdGSI.$target.lua
fi


Expand All @@ -117,7 +109,6 @@ if [[ ${target} = "hera" || ${target} = "wcoss_c" \
#------------------------------
# source OznMon_config
#------------------------------
. ${top_level}/parm/OznMon.ver
. ${top_level}/parm/OznMon_config

#-------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo start OznMon_CP.sh
exit_value=0

nargs=$#
if [[ $nargs -le 0 || $nargs -gt 7 ]]; then
if [[ $nargs -le 0 || $nargs -gt 9 ]]; then
usage
exit 1
fi
Expand Down Expand Up @@ -193,6 +193,10 @@ if [[ ${nfile_src} -gt 0 ]]; then
elif [[ $MY_MACHINE = "hera" ]]; then
$SUB --account=${ACCOUNT} --time=10 -J ${jobname} -D . \
-o ${logfile} --ntasks=1 --mem=5g ${job}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${OZN_LOGdir}/CP.${PDY}.${CYC}.err \
-V -l select=1:mem=5000M -l walltime=20:00 -N ${jobname} ${job}
fi
else
echo "Unable to locate DATA_LOCATION: ${DATA_LOCATION}"
Expand Down
5 changes: 5 additions & 0 deletions util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ elif [[ $MY_MACHINE = "wcoss_c" ]]; then
-R "select[mem>100] rusage[mem=100]" \
-M 100 -W 0:05 -J ${job} -cwd ${PWD} $jobfile

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

$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${OZN_LOGdir}/DE.${PDY}.${cyc}.log \
-e ${OZN_LOGdir}/DE.${PDY}.${cyc}.err \
-V -l select=1:mem=5000M -l walltime=20:00 -N ${job} ${jobfile}
fi


Expand Down
12 changes: 2 additions & 10 deletions util/Ozone_Monitor/data_xtrct/ush/OznMon_MkBase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,6 @@ export GLB_AREA=${GLB_AREA:-1}
#-------------------------------------------------------------------
top_parm=${this_dir}/../../parm

oznmon_version=${oznmon_version:-${top_parm}/OznMon.ver}
if [[ -s ${oznmon_version} ]]; then
. ${oznmon_version}
else
echo "Unable to source ${oznmon_version} file"
exit 2
fi

oznmon_user_settings=${oznmon_user_settings:-${top_parm}/OznMon_user_settings}
if [[ -s ${oznmon_user_settings} ]]; then
. ${oznmon_user_settings}
Expand Down Expand Up @@ -205,7 +197,7 @@ for type in ${SATYPE}; do
test_dir=${OZN_STATS_TANKDIR}/${RUN}.${pdy}/${cyc}/oznmon/time

if [[ -d ${test_dir} ]]; then
test_file=${test_dir}/${type}.${cdate}.ieee_d
test_file=${test_dir}/${type}.ges.${cdate}.ieee_d

if [[ -s $test_file ]]; then
$NCP ${test_file} ./${type}.${cdate}.ieee_d
Expand All @@ -220,7 +212,7 @@ for type in ${SATYPE}; do


if [[ $have_ctl -eq 0 ]]; then
test_file=${test_dir}/${type}.ctl
test_file=${test_dir}/${type}.ges.ctl
if [[ -s ${test_file} ]]; then
$NCP ${test_file} ./${type}.ctl
have_ctl=1
Expand Down
41 changes: 0 additions & 41 deletions util/Ozone_Monitor/get_hostname.pl

This file was deleted.

38 changes: 38 additions & 0 deletions util/Ozone_Monitor/get_machine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#! /bin/bash

#------------------------------------------------------------------
# get_machine.sh
#
# Determine which platform we're running on. System name will
# be journaled to stdout so calling scripts can get it there.
# If system is not recognized an empty string will be returned
# so it's up to the calling scripts to correctly interpret that.
#------------------------------------------------------------------

target=""

if [[ -d /cm ]] ; then
. $MODULESHOME/init/sh
target=wcoss_c
elif [[ -d /ioddev_dell ]]; then
. $MODULESHOME/init/sh
target=wcoss_d
elif [[ -d /scratch1 ]] ; then
. /apps/lmod/lmod/init/sh
target=hera
elif [[ -d /data ]] ; then
. /usr/share/lmod/lmod/init/sh
target=s4
elif [[ -d /work ]]; then
. $MODULESHOME/init/sh
target=orion
elif [[ -d /jetmon ]] ; then
. /apps/lmod/lmod/init/sh
target=jet
elif [[ -d /lfs ]] ; then
. $MODULESHOME/init/sh
target=wcoss2
fi

echo $target
exit
20 changes: 12 additions & 8 deletions util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,24 @@ fi

transfer_script=${OZN_IG_SCRIPTS}/transfer.sh
job=${OZNMON_SUFFIX}_ozn_transfer
job_queue="dev_transfer"

if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then

job_queue="dev_transfer"
echo "PROJECT = $PROJECT"
echo "logf = $logf"
echo "errf = $errf"
echo "transfer_script = $transfer_script"

echo "PROJECT = $PROJECT"
echo "logf = $logf"
echo "errf = $errf"
echo "transfer_script = $transfer_script"
if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then

$SUB -P $PROJECT -q $job_queue -o ${logf} -e ${errf} -M 50 -W 0:20 \
-R affinity[core] -J ${job} -cwd ${OZN_IG_SCRIPTS} \
${transfer_script}


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

$SUB -q $job_queue -A $ACCOUNT -o ${logf} -e ${errf} \
-V -l select=1:mem=1000M -l walltime=20:00 \
-N ${job} ${transfer_script}
fi

exit
5 changes: 4 additions & 1 deletion util/Ozone_Monitor/image_gen/ush/mk_horiz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ for dsrc in ${data_source}; do
-o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} \
${WORKDIR}/${cmdfile}


elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logf} -e ${errf} \
-V -l select=1:mem=5000M -l walltime=20:00 \
-N ${job} ${WORKDIR}/${cmdfile}
fi

done
Expand Down
5 changes: 5 additions & 0 deletions util/Ozone_Monitor/image_gen/ush/mk_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ for ptype in ${process_type}; do
-o ${logf} -e ${errf} -W 0:05 -J ${job} \
-cwd ${WORKDIR} ${WORKDIR}/${cmdfile}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logf} -e ${errf} \
-V -l select=1:mem=5000M -l walltime=5:00 \
-N ${job} ${WORKDIR}/${cmdfile}

fi

done
Expand Down
6 changes: 6 additions & 0 deletions util/Ozone_Monitor/image_gen/ush/mk_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ for dsrc in ${data_source}; do
$SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \
-o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile}

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

$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logf} -e ${errf} \
-V -l select=1:mem=5000M -l walltime=20:00 \
-N ${job} ${WORKDIR}/${cmdfile}

fi


Expand Down
2 changes: 1 addition & 1 deletion util/Ozone_Monitor/image_gen/ush/transfer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo "RSYNCH = $RSYNC"

if [[ ${OZN_IMGN_TANKDIR} != "/" ]]; then # sanity check

if [[ $MY_MACHINE = "wcoss_c" || $MY_MACHINE = "wcoss_d" ]]; then
if [[ $MY_MACHINE = "wcoss_c" || $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss2" ]]; then

WEB_DIR=${WEB_DIR}/${OZNMON_SUFFIX}/${RUN}
ssh ${WEB_USER}@${WEB_SVR}.ncep.noaa.gov "mkdir -p ${WEB_DIR}"
Expand Down
Loading