diff --git a/util/Ozone_Monitor/CMakeLists.txt b/util/Ozone_Monitor/CMakeLists.txt index 1b4acf7c40..35111689a9 100644 --- a/util/Ozone_Monitor/CMakeLists.txt +++ b/util/Ozone_Monitor/CMakeLists.txt @@ -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} ) @@ -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() diff --git a/util/Ozone_Monitor/OznMon_install.pl b/util/Ozone_Monitor/OznMon_install.pl index 0c7906d684..bf8248f802 100755 --- a/util/Ozone_Monitor/OznMon_install.pl +++ b/util/Ozone_Monitor/OznMon_install.pl @@ -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 { @@ -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"; } @@ -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"; @@ -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}"; diff --git a/util/Ozone_Monitor/build_OznMon_cmake.sh b/util/Ozone_Monitor/build_OznMon_cmake.sh index b5768f284f..681fed999f 100755 --- a/util/Ozone_Monitor/build_OznMon_cmake.sh +++ b/util/Ozone_Monitor/build_OznMon_cmake.sh @@ -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}" @@ -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 @@ -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 @@ -117,7 +109,6 @@ if [[ ${target} = "hera" || ${target} = "wcoss_c" \ #------------------------------ # source OznMon_config #------------------------------ - . ${top_level}/parm/OznMon.ver . ${top_level}/parm/OznMon_config #------------------------------------------------------- diff --git a/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh b/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh index a40867709b..dc88bd039c 100755 --- a/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh +++ b/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh @@ -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 @@ -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}" diff --git a/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh b/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh index abe0d3680c..e29078899b 100755 --- a/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh +++ b/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh @@ -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 diff --git a/util/Ozone_Monitor/data_xtrct/ush/OznMon_MkBase.sh b/util/Ozone_Monitor/data_xtrct/ush/OznMon_MkBase.sh index d8dd20ba2b..b22ae28955 100755 --- a/util/Ozone_Monitor/data_xtrct/ush/OznMon_MkBase.sh +++ b/util/Ozone_Monitor/data_xtrct/ush/OznMon_MkBase.sh @@ -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} @@ -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 @@ -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 diff --git a/util/Ozone_Monitor/get_hostname.pl b/util/Ozone_Monitor/get_hostname.pl deleted file mode 100755 index 145b3a91c5..0000000000 --- a/util/Ozone_Monitor/get_hostname.pl +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/perl - -#------------------------------------------------------------------- -# get_hostname.pl -# -# This script determines the hostname of the current machine. The -# possiblities are wcoss_c, wcoss_d, hera, or "" if the host is not -# one of those three. -#------------------------------------------------------------------- - - - my $machine = ""; - - # - # hera login nodes are hfe1-hfeN, and hostname command only returns the node name, - # while wcoss_c and wcoss_d return [hostname].ncep.noaa.gov. Keep only the - # actual hostname and see if it matches the node names for hera, wcoss_d, or wcoss_c. - # - my $host = ""; - $host = ` hostname `; - chomp( $host ); - - if( $host =~ /\./ ) { - my @hostnames = split( '\.', $host ); - $host = $hostnames[0]; - } - - if( $host =~ /hfe/ ) { - $machine = "hera"; - } - elsif( $host =~ /login/ ) { - $machine = "wcoss_c"; - } - elsif( $host =~ /v/ || $host =~ /m/ ){ # wcoss_d nodes are vXXaY and mXXaY - $machine = "wcoss_d"; - } - - print "$machine"; - - exit 0; - diff --git a/util/Ozone_Monitor/get_machine.sh b/util/Ozone_Monitor/get_machine.sh new file mode 100755 index 0000000000..7cbfadc612 --- /dev/null +++ b/util/Ozone_Monitor/get_machine.sh @@ -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 diff --git a/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh b/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh index 4a9bb5602c..2ba4b3bf3c 100755 --- a/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh +++ b/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh @@ -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 diff --git a/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh b/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh index e0cb39991b..a316cc56bb 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh @@ -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 diff --git a/util/Ozone_Monitor/image_gen/ush/mk_summary.sh b/util/Ozone_Monitor/image_gen/ush/mk_summary.sh index 80560d657c..191825f031 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_summary.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_summary.sh @@ -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 diff --git a/util/Ozone_Monitor/image_gen/ush/mk_time.sh b/util/Ozone_Monitor/image_gen/ush/mk_time.sh index cb200a174d..25a70667c2 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_time.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_time.sh @@ -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 diff --git a/util/Ozone_Monitor/image_gen/ush/transfer.sh b/util/Ozone_Monitor/image_gen/ush/transfer.sh index d34921879b..cbc6883954 100755 --- a/util/Ozone_Monitor/image_gen/ush/transfer.sh +++ b/util/Ozone_Monitor/image_gen/ush/transfer.sh @@ -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}" diff --git a/util/Ozone_Monitor/parm/OznMon_config b/util/Ozone_Monitor/parm/OznMon_config index bc00092c95..36f04db3b7 100644 --- a/util/Ozone_Monitor/parm/OznMon_config +++ b/util/Ozone_Monitor/parm/OznMon_config @@ -18,7 +18,7 @@ if [[ $OZNMON_CONFIG -ne 1 ]]; then export OZNMON_CONFIG=1 - export MY_MACHINE=wcoss_d + export MY_MACHINE=wcoss2 #------------------------------------------------------------------- # Note: The file header in the oznstat file has slightly changed. @@ -38,7 +38,7 @@ if [[ $OZNMON_CONFIG -ne 1 ]]; then # you checked out only the Ozone_Monitor portion of the branch then # MY_RADMON should point to that. # - export MY_OZNMON=${MY_OZNMON:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Ozone_Monitor} + export MY_OZNMON=${MY_OZNMON:-/lfs/h2/emc/da/noscrub/Edward.Safford/git/gsi/GSI/util/Ozone_Monitor} export OZN_SCRIPTS=${OZN_SCRIPTS:-${MY_OZNMON}/scripts} export OZN_DE_SCRIPTS=${OZN_DE_SCRIPTS:-${MY_OZNMON}/data_xtrct/ush} @@ -66,7 +66,7 @@ if [[ $OZNMON_CONFIG -ne 1 ]]; then # and the succedding scripts will construct and use subdirectories under # this location. # - export OZN_TANKDIR=${OZN_TANKDIR:-/u/Edward.Safford/nbns} + export OZN_TANKDIR=${OZN_TANKDIR:-/lfs/h2/emc/da/noscrub/Edward.Safford/nbns} if [[ $GLB_AREA -eq 1 ]]; then OZN_IMGN_TANKDIR=${OZN_TANKDIR}/imgn/${OZNMON_SUFFIX} @@ -93,9 +93,9 @@ if [[ $OZNMON_CONFIG -ne 1 ]]; then # # Log and work space definitions # - export OZN_PTMP=${OZN_PTMP:-/gpfs/dell2/ptmp} + export OZN_PTMP=${OZN_PTMP:-/lfs/h2/emc/ptmp} export PTMP_USER=${PTMP_USER:-${OZN_PTMP}/${LOGNAME}} - export OZN_STMP=${OZN_STMP:-/gpfs/dell2/stmp} + export OZN_STMP=${OZN_STMP:-/lfs/h2/emc/stmp} export STMP_USER=${STMP_USER:-${OZN_STMP}/${LOGNAME}} @@ -213,6 +213,24 @@ if [[ $OZNMON_CONFIG -ne 1 ]]; then export PARTITION_OZNMON=${PARTITION_OZNMON:-vjet} + elif [[ $MY_MACHINE = "wcoss2" ]]; then + module load prod_util/2.0.13 + module load util_shared/1.4.0 + + #------------------------ + # temporary workaround + # + module use /apps/test/modules + module load GrADS/2.2.1-cce-11.0.4 + export GRADS=`which grads` + export STNMAP=`which stnmap` + #------------------------ + + export SUB="qsub" + export COMPRESS=/usr/bin/gzip + export UNCOMPRESS="/usr/bin/gunzip -f" + export RSYNC=`which rsync` + fi else