[Ncep.list.nems.announce] nems r89249: Updates to NEMS to support FV3 work:

Samuel.Trahan at noaa.gov Samuel.Trahan at noaa.gov
Tue Mar 7 20:13:05 UTC 2017


1.
 NEMSAppBuilde...
Message-ID: <58bf1451.MAe9LxufWmyWA2A3%Samuel.Trahan at noaa.gov>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=_58bf1451.U59p2dGEq3vzwr69RSLPG6NsiL4lPbU+nzUU4/Yfv8nX0lyU"

This is a multi-part message in MIME format.

--=_58bf1451.U59p2dGEq3vzwr69RSLPG6NsiL4lPbU+nzUU4/Yfv8nX0lyU
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Friendly NEMS developers,

This is an automated email about a NEMS commit.

Project: nems
URL: https://svnemc.ncep.noaa.gov/projects/nems/trunk
Revision: 89249
Author:   samuel.trahan at noaa.gov
Date:     2017-03-07T19:58:48.447912Z
Message:
Updates to NEMS to support FV3 work:

1. NEMSAppBuilder can build the FV3

2. produtil external is updated to produtil v. 4.1

3. The NEMS/src/configure script is updated so that the
application-level custom compilation scripts can specify all four of
the NEMS/src/conf files by specifying a path.  That means the bulky
"if" statement inside the configure script no longer needs to be
updated when the application-level configure files change.

4. Add support for building and testing on WCOSS Cray

5. Workarounds for Luna module purging issues that users have
encountered over the last week or so (see
NEMS/src/conf/module-setup.*.inc)


See attached file for full differences.


First 4000 bytes of differences:
Index: checkout/tests/rtgen
===================================================================
--- checkout/tests/rtgen	(revision 87296)
+++ checkout/tests/rtgen	(revision 89249)
@@ -90,6 +90,9 @@
 last_lostdead=-999
 while [[ 1 == 1 ]] ; do
   log "check dependencies and submit jobs..."
+  # The "grep -v" is to ignore a warning about /gpfs/hps/ptmp being
+  # world-writable.  The user can do nothing to fix the problem,
+  # so there is no reason to warn about it.
   rocotorun -w workflow.xml -d workflow.db
   verbose "check status..."
   cycledone=$( sqlite3 workflow.db 'SELECT id FROM cycles WHERE done>0' | wc -l )
@@ -410,11 +413,11 @@
     logger.warning("%s: randomly chosen stmp"%(use_me,))
     return os.path.join(use_me,username())
 
-def decide_project_wcoss1():
+def decide_project_wcoss():
     """!Placeholder for future development; returns "GFS-T2O" """
     return 'GFS-T2O'
 
-def decide_tmp_wcoss1():
+def decide_tmp_wcoss(pex):
     """!Placeholder for future development; returns "/ptmpp/$USER"
     where $USER is the username """
     logger=logging.getLogger('rtgen')
@@ -423,12 +426,21 @@
     host=socket.gethostname()
     tg=host[0] # = t for tide or g for gyre
 
-    ptmps=[ [ '/ptmpd1', '-j', 'ptmp-d1', 'gpfs-'+tg+'d1'],
-            [ '/ptmpd2', '-j', 'ptmp-d2', 'gpfs-'+tg+'d2'],
-            [ '/ptmpp1', '-j', 'ptmp-p1', 'gpfs-'+tg+'p1'] ]
+    if pex==1:
+        ptmps=[ [ '/ptmpd1', '-j', 'ptmp-d1', 'gpfs-'+tg+'d1'],
+                [ '/ptmpd2', '-j', 'ptmp-d2', 'gpfs-'+tg+'d2'],
+                [ '/ptmpp1', '-j', 'ptmp-p1', 'gpfs-'+tg+'p1'] ]
+        max_area='/ptmpp1' # default on failure
+    elif pex==2:
+        ptmps=[ [ '/ptmpd3', '-j', 'ptmp-d3', 'gpfs-'+tg+'d3'],
+                [ '/ptmpp2', '-j', 'ptmp-p2', 'gpfs-'+tg+'p2'] ]
+        max_area='/ptmpp2' # default on failure
+    else: # assume cray (pex=0)
+        ptmps=[ [ '/gpfs/hps/ptmp', '-j', 'hps-ptmp', 'hps'],
+                [ '/gpfs/hps/stmp', '-j', 'hps-stmp', 'hps'] ]
+        max_area='/gpfs/hps/ptmp' # default on failure
     
     # Area with maximum space available and available space in TB:
-    max_area='/ptmpp1'   # default value on failure
     max_avail=0
 
     for ptmp in ptmps:
@@ -548,8 +560,9 @@
             out.write('module load emc-utils ; have_qoutq=YES\n')
         elif here.name in [ 'surge', 'luna' ]:
             out.write('module load xt-lsfhpc\n')
+            out.write('module use /usrx/local/emc_rocoto/modulefiles\n')
+            out.write('module load rocoto\n')
             out.write('module use /gpfs/hps/emc/hwrf/noscrub/soft/modulefiles\n')
-            out.write('module load rocoto\n')
             out.write('module load emc-utils ; have_qoutq=YES\n')
         elif here.name == 'theia':
             out.write('module load rocoto\n')
@@ -685,10 +698,16 @@
         baseline_fingerprint=os.path.join(
             testgen.get_string('plat%BASELINE'),
             'REGTEST-FINGERPRINT.md')
+
     repo_fingerprint=os.path.join(
         testgen.get_string('plat%PARMnems'),
         'REGTEST-FINGERPRINT.md')
 
+    if not os.path.exists(repo_fingerprint):
+        jlogger.warning('No fingerprint file.  Skipping fingerprint check.')
+        jlogger.warning('Expected: %s'%(repo_fingerprint,))
+        return
+
     with open(baseline_fingerprint,'r') as base_finger_file:
         base_finger_dat=base_finger_file.read()
 
@@ -746,9 +765,8 @@
     if project is None:
         if produtil.cluster.name() == 'theia':
             project=decide_project_theia()
-        elif produtil.cluster.name() in ['gyre','tide'] and \
-                produtil.cluster.where().wcoss_phase == 1:
-            project=decide_project_wcoss1()
+        elif produtil.cluster.name() in ['gyre','tide','luna','surge']:
+            project=decide_project_wcoss()
         else:
             fail('Unknown system.  Only Theia and WCOSS Phase 1 are supported.')
         jlogger.info('Auto-chosen project for job submission is %s'%(
@@ 


... see attachment for the rest ...

--=_58bf1451.U59p2dGEq3vzwr69RSLPG6NsiL4lPbU+nzUU4/Yfv8nX0lyU
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="89249.diff"

Index: checkout/tests/rtgen
===================================================================
--- checkout/tests/rtgen	(revision 87296)
+++ checkout/tests/rtgen	(revision 89249)
@@ -90,6 +90,9 @@
 last_lostdead=-999
 while [[ 1 == 1 ]] ; do
   log "check dependencies and submit jobs..."
+  # The "grep -v" is to ignore a warning about /gpfs/hps/ptmp being
+  # world-writable.  The user can do nothing to fix the problem,
+  # so there is no reason to warn about it.
   rocotorun -w workflow.xml -d workflow.db
   verbose "check status..."
   cycledone=$( sqlite3 workflow.db 'SELECT id FROM cycles WHERE done>0' | wc -l )
@@ -410,11 +413,11 @@
     logger.warning("%s: randomly chosen stmp"%(use_me,))
     return os.path.join(use_me,username())
 
-def decide_project_wcoss1():
+def decide_project_wcoss():
     """!Placeholder for future development; returns "GFS-T2O" """
     return 'GFS-T2O'
 
-def decide_tmp_wcoss1():
+def decide_tmp_wcoss(pex):
     """!Placeholder for future development; returns "/ptmpp/$USER"
     where $USER is the username """
     logger=logging.getLogger('rtgen')
@@ -423,12 +426,21 @@
     host=socket.gethostname()
     tg=host[0] # = t for tide or g for gyre
 
-    ptmps=[ [ '/ptmpd1', '-j', 'ptmp-d1', 'gpfs-'+tg+'d1'],
-            [ '/ptmpd2', '-j', 'ptmp-d2', 'gpfs-'+tg+'d2'],
-            [ '/ptmpp1', '-j', 'ptmp-p1', 'gpfs-'+tg+'p1'] ]
+    if pex==1:
+        ptmps=[ [ '/ptmpd1', '-j', 'ptmp-d1', 'gpfs-'+tg+'d1'],
+                [ '/ptmpd2', '-j', 'ptmp-d2', 'gpfs-'+tg+'d2'],
+                [ '/ptmpp1', '-j', 'ptmp-p1', 'gpfs-'+tg+'p1'] ]
+        max_area='/ptmpp1' # default on failure
+    elif pex==2:
+        ptmps=[ [ '/ptmpd3', '-j', 'ptmp-d3', 'gpfs-'+tg+'d3'],
+                [ '/ptmpp2', '-j', 'ptmp-p2', 'gpfs-'+tg+'p2'] ]
+        max_area='/ptmpp2' # default on failure
+    else: # assume cray (pex=0)
+        ptmps=[ [ '/gpfs/hps/ptmp', '-j', 'hps-ptmp', 'hps'],
+                [ '/gpfs/hps/stmp', '-j', 'hps-stmp', 'hps'] ]
+        max_area='/gpfs/hps/ptmp' # default on failure
     
     # Area with maximum space available and available space in TB:
-    max_area='/ptmpp1'   # default value on failure
     max_avail=0
 
     for ptmp in ptmps:
@@ -548,8 +560,9 @@
             out.write('module load emc-utils ; have_qoutq=YES\n')
         elif here.name in [ 'surge', 'luna' ]:
             out.write('module load xt-lsfhpc\n')
+            out.write('module use /usrx/local/emc_rocoto/modulefiles\n')
+            out.write('module load rocoto\n')
             out.write('module use /gpfs/hps/emc/hwrf/noscrub/soft/modulefiles\n')
-            out.write('module load rocoto\n')
             out.write('module load emc-utils ; have_qoutq=YES\n')
         elif here.name == 'theia':
             out.write('module load rocoto\n')
@@ -685,10 +698,16 @@
         baseline_fingerprint=os.path.join(
             testgen.get_string('plat%BASELINE'),
             'REGTEST-FINGERPRINT.md')
+
     repo_fingerprint=os.path.join(
         testgen.get_string('plat%PARMnems'),
         'REGTEST-FINGERPRINT.md')
 
+    if not os.path.exists(repo_fingerprint):
+        jlogger.warning('No fingerprint file.  Skipping fingerprint check.')
+        jlogger.warning('Expected: %s'%(repo_fingerprint,))
+        return
+
     with open(baseline_fingerprint,'r') as base_finger_file:
         base_finger_dat=base_finger_file.read()
 
@@ -746,9 +765,8 @@
     if project is None:
         if produtil.cluster.name() == 'theia':
             project=decide_project_theia()
-        elif produtil.cluster.name() in ['gyre','tide'] and \
-                produtil.cluster.where().wcoss_phase == 1:
-            project=decide_project_wcoss1()
+        elif produtil.cluster.name() in ['gyre','tide','luna','surge']:
+            project=decide_project_wcoss()
         else:
             fail('Unknown system.  Only Theia and WCOSS Phase 1 are supported.')
         jlogger.info('Auto-chosen project for job submission is %s'%(
@@ -760,9 +778,8 @@
     if temp is None:
         if produtil.cluster.name() == 'theia':
             scratch_dir=decide_tmp_theia()
-        elif produtil.cluster.name() in ['gyre','tide'] and \
-                produtil.cluster.where().wcoss_phase == 1:
-            scratch_dir=decide_tmp_wcoss1()
+        elif produtil.cluster.name() in ['gyre','tide','luna','surge']:
+            scratch_dir=decide_tmp_wcoss(produtil.cluster.where().wcoss_phase)
         else:
             fail('Unknown system.  Only Theia and WCOSS Phase 1 are supported.')
         jlogger.info('Auto-chosen ptmp is %s'%(repr(scratch_dir),))
Index: checkout/tests/rt.sh
===================================================================
--- checkout/tests/rt.sh	(revision 87296)
+++ checkout/tests/rt.sh	(revision 89249)
@@ -32,7 +32,11 @@
   exit 1
 }
 
-if [[ ! -s rtgen ]] ; then
+if [[ -d NEMS/tests ]] ; then
+    cd NEMS/tests
+elif [[ -s tests/rtgen ]] ; then
+    cd tests
+elif [[ ! -s rtgen ]] ; then
     die Run this script from the NEMS/tests directory.
 fi
 
Index: checkout/tests
===================================================================
--- checkout/tests	(revision 87296)
+++ checkout/tests	(revision 89249)

Property changes on: checkout/tests
___________________________________________________________________
Modified: svn:externals
## -1 +1 ##
-produtil -r86845 https://svnemc.ncep.noaa.gov/projects/nceplibs/produtil/branches/regtests
+produtil -r89248 https://svnemc.ncep.noaa.gov/projects/nceplibs/produtil/branches/regtests-run
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /nems/branches/appify-fv3/tests:r87981-89248
Index: checkout/src/configure
===================================================================
--- checkout/src/configure	(revision 87296)
+++ checkout/src/configure	(revision 89249)
@@ -1,19 +1,47 @@
 #!/bin/ksh
+set -x
+CONF_OPTION="$1"
+unset CONF_FILE
+CHOSEN_MODULE="${2:-}"
+EXTERNALS_NEMS="${3:-}"
+ESMF_VERSION_DEFINE="${4:-}"
 
-CHOSEN_MODULE="$2"
+if [[ -d NEMS/src/conf ]] ; then
+    cd NEMS/src
+elif [[ -d src/conf ]] ; then
+    cd src
+elif [[ -d ../conf ]] ; then
+    cd ..
+fi
 
-if [[ ! -d "conf" ]] ; then
-    echo "ERROR: This script must be run from the NEMS/src/conf directory." 1>&2
+if [[ ! -d conf ]] ; then
+    echo "ERROR: This script must be run from the NEMS/src directory." 1>&2
     exit 1
 fi
 
-if [[ -z "$CHOSEN_MODULE" ]] ; then 
-    echo "WARNING: modulefile was not supplied as the second argument" 1>&2
-    echo "If possible, specify a modulefile relative to ../../modulefiles" 1>&2
-    echo "I will guess the correct modulefile for you." 1>&2
+if [[ -z "$CONF_OPTION" ]] ; then
+    echo "ERROR: Run with at least one argument:"
+    echo "    ./configure BUILD_NAME"
+    echo "OR: ./configure /path/to/configure.nems [more args]"
+    echo " "
+    echo "Other options:"
+    echo "  \$2 = path to modules.nems"
+    echo "  \$3 = path to externals.nems"
+    echo "  \$4 = path to ESMFVersionDefine.h"
+    exit 1
 fi
 
-# copy_diff_files
+if [[ -z "$CHOSEN_MODULE" ]] ; then
+    echo "no \$2 - Will automatically pick a modulefile"
+fi
+if [[ -z "$ESMF_VERSION_DEFINE" ]] ; then
+    echo "no \$3 - Will automatically pick an ESMFVersionDefine.h"
+    ESMF_VERSION_DEFINE=ESMFVersionDefine_ESMF_NUOPC.h
+fi
+if [[ -z "$EXTERNALS_NEMS" ]] ; then
+    echo "no \$4 - Will automatically pick an externals.nems file"
+fi
+
 copy_diff_files(){
   if ( ! cmp "$1" "$2" > /dev/null 2>&1 ) ; then
     set -xue
@@ -44,110 +72,77 @@
 EOF
 }
 
-#
-# Standard
-#
+case "$CONF_OPTION" in
+    nmmb_intel_theia)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Theia.intel_nmmb}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-theia/ESMF_700_nmmb}"
+        ;;
+    nmmb_intel_wcoss)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Wcoss.intel_nmmb}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss/ESMF_700_nmmb}"
+        ;;
+    gsm_intel_theia)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Theia.intel_gsm}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-theia/ESMF_700_gsm}"
+        ;;
+    gsm_intel_wcoss)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Wcoss.intel_gsm}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.phase1/ESMF_700_gsm}"
+        ;;
+    gsm_intel_wcoss_c)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Wcoss_C.intel_gsm}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.cray/ESMF_700_gsm}"
+        ;;
+    coupled_intel_wcoss)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Wcoss.intel}"
+        EXTERNALS_NEMS="${EXTERNALS_NEMS:-conf/externals.nems.Wcoss}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.phase1/ESMF_NUOPC}"
+        ;;
+    coupled_intel_gaea)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Gaea.intel}"
+        EXTERNALS_NEMS="${EXTERNALS_NEMS:-conf/externals.nems.Gaea}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-gaea/ESMF_NUOPC}"
+        ;;
+    coupled_intel_theia)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Theia.intel}"
+        EXTERNALS_NEMS="${EXTERNALS_NEMS:-conf/externals.nems.Theia}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-gaea/ESMF_NUOPC}"
+        ;;
+    coupled_intel_yellowstone)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Yellowstone.intel}"
+        EXTERNALS_NEMS="${EXTERNALS_NEMS:-conf/externals.nems.Yellowstone}"
+        CHOSEN_MODULE="${CHOSEN_MODULE:-gaea/ESMF_NUOPC}"
+        ;;
+    coupled_linux_gnu)
+        CONF_FILE="${CONF_FILE:-../../conf/configure.nems.Linux.gnu conf/configure.nems}"
+        EXTERNALS_NEMS="${EXTERNALS_NEMS:-../../conf/externals.nems.Linux.gnu}"
+        ;;
+    *)
+        if [[ -f "../../conf/$CONF_OPTION" ]] ; then
+            CONF_FILE="../../conf/$CONF_OPTION"
+        elif [[ ! -f "$CONF_OPTION" ]] ; then
+            echo "$CONF_OPTION: unknown configuration"
+            exit 1
+        fi
+esac
 
-if [[ $1 = nmmb_intel_theia ]]; then
-     set -x
-     copy_diff_files ../../conf/configure.nems.Theia.intel_nmmb conf/configure.nems
-     touch conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-theia/ESMF_700_nmmb}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     set +x
-     echo "NEMS/NMMB build on Theia using Intel and ESMF v7.0.0"
-elif [[ $1 = nmmb_intel_wcoss ]]; then
-     set -x
-     copy_diff_files ../../conf/configure.nems.Wcoss.intel_nmmb conf/configure.nems
-     touch conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.phase1/ESMF_700_nmmb}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h              ESMFVersionDefine.h
-     set +x
-     echo "NEMS/NMMB build on Wcoss using Intel and ESMF v7.0.0"
-elif [[ $1 = gsm_intel_theia ]]; then
-     set -x
-     copy_diff_files ../../conf/configure.nems.Theia.intel_gsm conf/configure.nems
-     touch conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-theia/ESMF_700_gsm}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     set +x
-     echo "NEMS/GSM build on Theia using Intel and ESMF v7.0.0"
-elif [[ $1 = gsm_intel_wcoss ]]; then
-     set -x
-     copy_diff_files ../../conf/configure.nems.Wcoss.intel_gsm conf/configure.nems
-     touch conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.phase1/ESMF_700_gsm}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE"      conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h              ESMFVersionDefine.h
-     set +x
-     echo "NEMS/GSM build on Wcoss using Intel and ESMF v7.0.0"
+if [[ -z "$CHOSEN_MODULE" ]] ; then
+    cat<<EOF > modules.empty
+#%Module######################################################################
+# Empty module file for coupled_linux_gnu configuration.
+EOF
+    CHOSEN_MODULE='modules.empty'
+fi
 
-elif [[ $1 = gsm_intel_wcoss_c ]]; then
-     set -x
-     copy_diff_files ../../conf/configure.nems.Wcoss_C.intel_gsm conf/configure.nems
-     touch conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.cray/ESMF_700_gsm}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE"      conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h              ESMFVersionDefine.h
-     set +x
-     echo "NEMS/GSM build on Wcoss using Intel and ESMF v7.0.0"
-#
-# Coupled
-#
-elif [[ $1 = coupled_intel_wcoss ]]; then
-     copy_diff_files ../../conf/configure.nems.Wcoss.intel conf/configure.nems
-     copy_diff_files ../../conf/externals.nems.Wcoss conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-wcoss.phase1/ESMF_NUOPC}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     echo "Coupled NEMS build on Wcoss using Intel and ESMF v7.0.0"
-elif [[ $1 = coupled_intel_gaea ]]; then
-     copy_diff_files ../../conf/configure.nems.Gaea.intel conf/configure.nems
-     copy_diff_files ../../conf/externals.nems.Gaea conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-gaea/ESMF_NUOPC}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     echo "Coupled NEMS build on Gaea using Intel and ESMF v7.0.0"
-elif [[ $1 = coupled_intel_theia ]]; then
-     copy_diff_files ../../conf/configure.nems.Theia.intel conf/configure.nems
-     copy_diff_files ../../conf/externals.nems.Theia conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-theia/ESMF_NUOPC}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     echo "Coupled NEMS build on Theia using Intel and ESMF v7.0.0"
-elif [[ $1 = coupled_intel_yellowstone ]]; then
-     copy_diff_files ../../conf/configure.nems.Yellowstone.intel conf/configure.nems
-     copy_diff_files ../../conf/externals.nems.Yellowstone conf/externals.nems
-     CHOSEN_MODULE="${CHOSEN_MODULE:-yellowstone/ESMF_NUOPC}"
-     copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     echo "Coupled NEMS build on Yellowstone using Intel and ESMF v7.0.0"
-elif [[ $1 = coupled_linux_gnu ]]; then
-     copy_diff_files ../../conf/configure.nems.Linux.gnu conf/configure.nems
-     copy_diff_files ../../conf/externals.nems.Linux.gnu conf/externals.nems
-     copy_diff_files ESMFVersionDefine_ESMF_NUOPC.h ESMFVersionDefine.h
-     echo "Coupled NEMS build on Linux using GNU and ESMF v7.0.0"
+set -ue
 
-#
-# help message
-#
+copy_diff_files "$CONF_FILE" conf/configure.nems
+if [[ -z "$EXTERNALS_NEMS" ]] ; then
+    if [[ ! -e conf/externals.nems || -s conf/externals.nems ]] ; then
+        cat /dev/null > conf/externals.nems
+    fi
 else
-     echo;echo "     Run ./configure with one argument:"
-     echo;
-     echo " 'configure nmmb_intel_wcoss'  : NEMS/NMMB build on Wcoss using Intel and ESMF v7.0.0"
-     echo " 'configure nmmb_intel_theia'  : NEMS/NMMB build on Theia using Intel and ESMF v7.0.0"
-     echo " 'configure gsm_intel_wcoss'   : NEMS/GSM build on Wcoss using Intel and ESMF v7.0.0"
-     echo " 'configure gsm_intel_theia'   : NEMS/GSM build on Theia using Intel and ESMF v7.0.0"
-     echo " 'configure gsm_intel_wcoss_c' : NEMS/GSM build on Crays using Intel and ESMF v7.0.0"
-     echo;
-     echo " 'configure coupled_intel_wcoss'       : Coupled NEMS build on Wcoss using Intel and ESMF v7.0.0"
-     echo " 'configure coupled_intel_gaea'        : Coupled NEMS build on Gaea using Intel and ESMF v7.0.0"
-     echo " 'configure coupled_intel_theia'       : Coupled NEMS build on Theia using Intel and ESMF v7.0.0"
-     echo " 'configure coupled_intel_yellowstone' : Coupled NEMS build on Yellowstone using Intel and ESMF v7.0.0"
-     echo " 'configure coupled_linux_gnu'         : Coupled NEMS build on Linux using GNU and ESMF v7.0.0"
-     echo;
+    copy_diff_files "$EXTERNALS_NEMS" conf/externals.nems
 fi
-
+copy_diff_mod "../../modulefiles/$CHOSEN_MODULE" conf/modules.nems
+copy_diff_files "$ESMF_VERSION_DEFINE" ESMFVersionDefine.h 
Index: checkout/src/conf/module-setup.sh.inc
===================================================================
--- checkout/src/conf/module-setup.sh.inc	(revision 87296)
+++ checkout/src/conf/module-setup.sh.inc	(revision 89249)
@@ -4,8 +4,8 @@
 eval "$__ms_function_name() { /bin/true ; }"
 
 # Determine which shell we are using
-__ms_ksh_test=$( eval '__text="text" ; if [[ $__text =~ ^(t).* ]] ; then printf "%s" ${.sh.match[1]} ; fi' 2> /dev/null )
-__ms_bash_test=$( eval 'if ( set | grep '$__ms_function_name' | grep -v name > /dev/null 2>&1 ) ; then echo t ; fi ' 2> /dev/null )
+__ms_ksh_test=$( eval '__text="text" ; if [[ $__text =~ ^(t).* ]] ; then printf "%s" ${.sh.match[1]} ; fi' 2> /dev/null | cat )
+__ms_bash_test=$( eval 'if ( set | grep '$__ms_function_name' | grep -v name > /dev/null 2>&1 ) ; then echo t ; fi ' 2> /dev/null | cat )
 
 if [[ ! -z "$__ms_ksh_test" ]] ; then
     __ms_shell=ksh
@@ -33,9 +33,18 @@
     if ( ! eval module help > /dev/null 2>&1 ) ; then
 	source /opt/modules/default/init/$__ms_shell
     fi
-    module use /opt/cray/ari/modulefiles/
-    module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles/
     module purge
+    module purge
+    # Workaround until module issues are fixed:
+    unset _LMFILES_
+    unset LOADEDMODULES
+    module use /opt/modulefiles
+    module use /opt/cray/ari/modulefiles
+    module use /opt/cray/craype/default/alt-modulefiles
+    module use /opt/cray/alt-modulefiles
+    module use /gpfs/hps/nco/ops/nwprod/modulefiles
+    module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles
+    module use /usrx/local/prod/modulefiles
 elif [[ -d /dcom && -d /hwrf ]] ; then
     # We are on NOAA Tide or Gyre
     if ( ! eval module help > /dev/null 2>&1 ) ; then
@@ -67,4 +76,4 @@
 unset __ms_ksh_test
 unset __ms_bash_test
 unset $__ms_function_name
-unset __ms_function_name
\ No newline at end of file
+unset __ms_function_name
Index: checkout/src/conf/module-setup.csh.inc
===================================================================
--- checkout/src/conf/module-setup.csh.inc	(revision 87296)
+++ checkout/src/conf/module-setup.csh.inc	(revision 89249)
@@ -18,9 +18,17 @@
     if ( ! { module help >& /dev/null } ) then
 	source /opt/modules/default/init/$__ms_shell
     endif
-    module use /opt/cray/ari/modulefiles/
-    module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles/
     module purge
+    module purge
+    unset _LMFILES_
+    unset LOADEDMODULES
+    module use /opt/modulefiles
+    module use /opt/cray/ari/modulefiles
+    module use /opt/cray/craype/default/alt-modulefiles
+    module use /opt/cray/alt-modulefiles
+    module use /gpfs/hps/nco/ops/nwprod/modulefiles
+    module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles
+    module use /usrx/local/prod/modulefiles
 else if ( { test -d /dcom -a -d /hwrf } ) then
     # We are on NOAA Tide or Gyre
     if ( ! { module help >& /dev/null } ) then
Index: checkout/src/makefile
===================================================================
--- checkout/src/makefile	(revision 87296)
+++ checkout/src/makefile	(revision 89249)
@@ -1,5 +1,10 @@
 SHELL = /bin/sh
 
+# Flag variable so the configure.nems knows we're in NEMS.  This is
+# needed by the FV3 to allow the NEMS configure file to be the same
+# file as the FV3 configure file.
+export InNemsMakefile=YES
+
 # variables that need to move between makefiles on different levels of the build tree
 # via shell environment variables
 export TOP := $(shell pwd)
@@ -365,7 +370,7 @@
 ESMADIR=$(CHEM_LIB)
 #gjt: comment out the following line because it unconditionally uses CHEM_INC
 #gjt: THIS NEEDS TO BE FIXED!
--include $(CHEM_INC)/NCEP_base.mk
+#-include $(CHEM_INC)/NCEP_base.mk
 #
 # log info
 #
@@ -429,6 +434,7 @@
 
 nems: nems_libs $(OBJS) $(COBJS) $(MAIN)
 	echo libgocart is $(LIBGOCART)
+	echo extlibs is $(EXTLIBS)
 	$(FC) $(SMP) -o $(TARGET) $(MAIN) $(OBJS) $(COBJS) $(LIBS_NEMS) $(EXTLIBS) $(LIBGOCART)
 	@echo "$(TARGET) is created."
         
Index: checkout/src
===================================================================
--- checkout/src	(revision 87296)
+++ checkout/src	(revision 89249)

Property changes on: checkout/src
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /nems/branches/appify-fv3/src:r87981-89248
Index: checkout/NEMSAppBuilder
===================================================================
--- checkout/NEMSAppBuilder	(revision 87296)
+++ checkout/NEMSAppBuilder	(revision 89249)
@@ -52,10 +52,10 @@
 # Machine detection.
 
 if [[ -e /gpfs/hps && -e /usrx ]] ; then
-    MACHINE_ID=wcoss
     if [[ -d /usrx && -d /global && -e /etc/redhat-release && \
         -e /etc/prod ]] ; then
         # We are on WCOSS Phase 1 or 2.
+	MACHINE_ID=wcoss
         if ( ! cat /proc/cpuinfo |grep 'processor.*32' ) ; then
             # Fewer than 32 fake (hyperthreading) cpus, so Phase 1.
             FULL_MACHINE_ID=wcoss.phase1
@@ -66,7 +66,8 @@
         fi
     else
         # WCOSS Cray
-        FULL_MACHINE_ID=wcoss.cray
+	MACHINE_ID=wcoss_cray
+        FULL_MACHINE_ID=wcoss_cray
         PEX=c
     fi
 elif [[ -e /scratch4 && -e /scratch3 ]] ; then
@@ -779,13 +780,24 @@
   # in: COMP, COMP_SRCDIR, COMP_BINDIR
   if [[ $1"" == "clean" ]] ; then
     echo "Cleaning $COMP..."
-    echo "Only partially implemented!!!"
+    cd "$COMP_SRCDIR"
+    gmake cleanall
+    rm -rf nems_dir
+
+    # A few things that "cleanall" doesn't clean:
+    rm -rf FV3_INSTALL
+    rm -rf nems_dir
+    find $COMP_SRCDIR/fms/ -name '*.o' -o -name '*.mod'
+
     echo "...done cleaning $COMP."
   else
     echo "Building $COMP... 64 bits by default"
-    cd $COMP_SRCDIR/BUILD
-    ./COMP_ALL_avx $COMP_BINDIR
-#    make -f makefile.nuopc NEMSMOMDIR=$COMP_SRCDIR/exec/$MACHINE_ID INSTALLDIR=$COMP_BINDIR install
+    cd "$COMP_SRCDIR"
+    #./configure $( echo "$FULL_MACHINE_ID" | sed 's,\.,_,g' )
+    cp -fp $NEMSDIR/src/conf/configure.nems "$COMP_SRCDIR"/conf/configure.fv3
+    cp -fp $NEMSDIR/src/conf/modules.nems "$COMP_SRCDIR"/conf/modules.fv3
+    gmake clean
+    gmake ${COMPOS[@]:1} -j 8 nemsinstall
     if ([ ! -d $COMP_BINDIR ]); then
       echo "...failed building $COMP."
     else
Index: checkout
===================================================================
--- checkout	(revision 87296)
+++ checkout	(revision 89249)

Property changes on: checkout
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /nems/branches/appify-fv3:r87981-89248

--=_58bf1451.U59p2dGEq3vzwr69RSLPG6NsiL4lPbU+nzUU4/Yfv8nX0lyU--


More information about the Ncep.list.nems.announce mailing list