From 5d6b26cd2ce820f0aa4907c0928934bb7dedc3ea Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Fri, 17 Jan 2020 13:52:59 -0800 Subject: [PATCH] Macros fixes and diag_type fix (#396) * Macros fixes and diag_type fix * update ICE_RUNLENGTH documentation * update cheyenne job launch, add omplace * update cheyenne, cleanup Macros, update run checking for diag_type * retrigger checks * retrigger checks --- configuration/scripts/cice.launch.csh | 2 +- configuration/scripts/cice.run.setup.csh | 31 ++++++++++++++++--- .../scripts/machines/Macros.brooks_intel | 7 +---- .../scripts/machines/Macros.cesium_intel | 9 ++---- .../scripts/machines/Macros.cheyenne_intel | 4 +-- .../scripts/machines/Macros.fram_intel | 9 ++---- .../scripts/machines/Macros.hobart_intel | 2 +- .../scripts/machines/Macros.hobart_nag | 2 +- .../scripts/machines/Macros.izumi_gnu | 2 +- .../scripts/machines/Macros.izumi_intel | 2 +- .../scripts/machines/Macros.izumi_nag | 2 +- .../scripts/machines/Macros.izumi_pgi | 2 +- .../scripts/machines/Macros.millikan_intel | 9 ++---- .../scripts/machines/Macros.phase2_intel | 4 +-- .../scripts/machines/Macros.phase3_intel | 4 +-- .../scripts/machines/Macros.testmachine_intel | 4 +-- doc/source/user_guide/ug_case_settings.rst | 3 +- 17 files changed, 50 insertions(+), 48 deletions(-) diff --git a/configuration/scripts/cice.launch.csh b/configuration/scripts/cice.launch.csh index 3c9725870..2a0292ca7 100755 --- a/configuration/scripts/cice.launch.csh +++ b/configuration/scripts/cice.launch.csh @@ -29,7 +29,7 @@ cat >> ${jobfile} << EOFR EOFR else cat >> ${jobfile} << EOFR -mpiexec_mpt -n ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE +mpiexec_mpt -np ${ntasks} omplace ./cice >&! \$ICE_RUNLOG_FILE EOFR endif diff --git a/configuration/scripts/cice.run.setup.csh b/configuration/scripts/cice.run.setup.csh index 501430770..5611ed618 100755 --- a/configuration/scripts/cice.run.setup.csh +++ b/configuration/scripts/cice.run.setup.csh @@ -46,7 +46,11 @@ cd \${ICE_RUNDIR} setenv OMP_NUM_THREADS ${nthrds} cp -f \${ICE_CASEDIR}/ice_in \${ICE_RUNDIR} +set diagtype = \`grep -i diag_type \${ICE_CASEDIR}/ice_in | grep -i stdout | wc -l\` +set diagfile = \`grep -i diag_file \${ICE_CASEDIR}/ice_in | sed -e "s/.* = '\(.*\)'/\1/"\` + echo " " +echo "CICE case directory is \${ICE_CASEDIR}" echo "CICE rundir is \${ICE_RUNDIR}" echo "CICE log file is \${ICE_RUNLOG_FILE}" echo "CICE run started : \`date\`" @@ -71,16 +75,33 @@ echo " " #-------------------------------------------- if !(-d \${ICE_LOGDIR}) mkdir -p \${ICE_LOGDIR} + +set checkfile = \${ICE_RUNLOG_FILE} cp -p \${ICE_RUNLOG_FILE} \${ICE_LOGDIR} +echo "CICE output file is \${ICE_LOGDIR}/\${ICE_RUNLOG_FILE}" +echo "\`date\` \${0}: CICE output file is \${ICE_LOGDIR}/\${ICE_RUNLOG_FILE}" >> \${ICE_CASEDIR}/README.case + +if ( \${diagtype} == 0) then + set checkfile = \${diagfile} + cp -p \${diagfile} \${ICE_LOGDIR} + echo "CICE output file is \${ICE_LOGDIR}/\${diagfile}" + echo "\`date\` \${0}: CICE output file is \${ICE_LOGDIR}/\${diagfile}" >> \${ICE_CASEDIR}/README.case +endif + +grep ' CICE COMPLETED SUCCESSFULLY' \${checkfile} +if ( \$status == 0 ) then + echo "CICE run completed successfully" + echo "\`date\` \${0}: CICE run completed successfully" >> \${ICE_CASEDIR}/README.case +else + echo "CICE run did NOT complete" + echo "\`date\` \${0}: CICE run did NOT complete" >> \${ICE_CASEDIR}/README.case + exit -1 +endif -grep ' CICE COMPLETED SUCCESSFULLY' \${ICE_RUNLOG_FILE} -if ( \$status != 0 ) then - echo "CICE run did not complete - see \${ICE_LOGDIR}/\${ICE_RUNLOG_FILE}" - echo "\`date\` \${0}: \${ICE_CASENAME} run did NOT complete \${ICE_RUNLOG_FILE}" >> \${ICE_CASEDIR}/README.case +if ( \${diagtype} == 0) then exit -1 endif -echo "\`date\` \${0}: \${ICE_CASENAME} run completed \${ICE_RUNLOG_FILE}" >> \${ICE_CASEDIR}/README.case echo "done \${0}" EOFE diff --git a/configuration/scripts/machines/Macros.brooks_intel b/configuration/scripts/machines/Macros.brooks_intel index 5bd725143..a6fecdbbb 100644 --- a/configuration/scripts/machines/Macros.brooks_intel +++ b/configuration/scripts/machines/Macros.brooks_intel @@ -65,14 +65,9 @@ ifeq ($(ICE_THREADED), true) endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof - - CPPDEFS := $(CPPDEFS) -Dncdf endif -ifeq ($(IO_TYPE), netcdf) - CPPDEFS := $(CPPDEFS) -Dncdf -endif diff --git a/configuration/scripts/machines/Macros.cesium_intel b/configuration/scripts/machines/Macros.cesium_intel index aca33b9fd..486ba10e4 100644 --- a/configuration/scripts/machines/Macros.cesium_intel +++ b/configuration/scripts/machines/Macros.cesium_intel @@ -52,21 +52,16 @@ LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -L$(LIB_PNETCDF) -lpnetcdf -lgptl SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp FFLAGS += -openmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof - - CPPDEFS := $(CPPDEFS) -Dncdf endif -ifeq ($(IO_TYPE), netcdf) - CPPDEFS := $(CPPDEFS) -Dncdf -endif diff --git a/configuration/scripts/machines/Macros.cheyenne_intel b/configuration/scripts/machines/Macros.cheyenne_intel index e2b80d023..86b9a1d4e 100644 --- a/configuration/scripts/machines/Macros.cheyenne_intel +++ b/configuration/scripts/machines/Macros.cheyenne_intel @@ -47,14 +47,14 @@ LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L$(LIB_PNETCDF) -lpnetcdf -lgptl SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp FFLAGS += -qopenmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof diff --git a/configuration/scripts/machines/Macros.fram_intel b/configuration/scripts/machines/Macros.fram_intel index 406f3b6c3..27681178e 100644 --- a/configuration/scripts/machines/Macros.fram_intel +++ b/configuration/scripts/machines/Macros.fram_intel @@ -52,21 +52,16 @@ LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -L$(LIB_PNETCDF) -lpnetcdf -lgptl SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp FFLAGS += -openmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof - - CPPDEFS := $(CPPDEFS) -Dncdf endif -ifeq ($(IO_TYPE), netcdf) - CPPDEFS := $(CPPDEFS) -Dncdf -endif diff --git a/configuration/scripts/machines/Macros.hobart_intel b/configuration/scripts/machines/Macros.hobart_intel index 7e4984a16..f5b3044b0 100644 --- a/configuration/scripts/machines/Macros.hobart_intel +++ b/configuration/scripts/machines/Macros.hobart_intel @@ -41,7 +41,7 @@ LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L/usr/lib64 -llapack -mkl=cluster ## if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:= INCLDIR += -I SLIBS := $(SLIB) -L$(PIO_PATH) -lpiofS diff --git a/configuration/scripts/machines/Macros.hobart_nag b/configuration/scripts/machines/Macros.hobart_nag index 02a4bbe65..2ed098893 100644 --- a/configuration/scripts/machines/Macros.hobart_nag +++ b/configuration/scripts/machines/Macros.hobart_nag @@ -41,7 +41,7 @@ LIB_MPI := $(IMPILIBDIR) SLIBS := -L/usr/local/nag-6.2/lib/NAG_Fortran -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L/usr/lib64 -llapack -lblas ## if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:= INCLDIR += -I SLIBS := $(SLIB) -L$(PIO_PATH) -lpiof diff --git a/configuration/scripts/machines/Macros.izumi_gnu b/configuration/scripts/machines/Macros.izumi_gnu index 0d48f1013..6526ac767 100644 --- a/configuration/scripts/machines/Macros.izumi_gnu +++ b/configuration/scripts/machines/Macros.izumi_gnu @@ -44,7 +44,7 @@ ifeq ($(ICE_THREADED), true) endif ## if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:= INCLDIR += -I SLIBS := $(SLIB) -L$(PIO_PATH) -lpiofS diff --git a/configuration/scripts/machines/Macros.izumi_intel b/configuration/scripts/machines/Macros.izumi_intel index 502f7b218..0aee3cdd5 100644 --- a/configuration/scripts/machines/Macros.izumi_intel +++ b/configuration/scripts/machines/Macros.izumi_intel @@ -44,7 +44,7 @@ ifeq ($(ICE_THREADED), true) endif ## if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:= INCLDIR += -I SLIBS := $(SLIB) -L$(PIO_PATH) -lpiofS diff --git a/configuration/scripts/machines/Macros.izumi_nag b/configuration/scripts/machines/Macros.izumi_nag index 8e42df4aa..3246635bc 100644 --- a/configuration/scripts/machines/Macros.izumi_nag +++ b/configuration/scripts/machines/Macros.izumi_nag @@ -46,7 +46,7 @@ else endif ## if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:= INCLDIR += -I SLIBS := $(SLIB) -L$(PIO_PATH) -lpiof diff --git a/configuration/scripts/machines/Macros.izumi_pgi b/configuration/scripts/machines/Macros.izumi_pgi index 8a8ca4b97..31eca6039 100644 --- a/configuration/scripts/machines/Macros.izumi_pgi +++ b/configuration/scripts/machines/Macros.izumi_pgi @@ -44,7 +44,7 @@ ifeq ($(ICE_THREADED), true) endif ## if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:= INCLDIR += -I SLIBS := $(SLIB) -L$(PIO_PATH) -lpiofS diff --git a/configuration/scripts/machines/Macros.millikan_intel b/configuration/scripts/machines/Macros.millikan_intel index 1d74158c9..7bdaac0e6 100644 --- a/configuration/scripts/machines/Macros.millikan_intel +++ b/configuration/scripts/machines/Macros.millikan_intel @@ -52,21 +52,16 @@ LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -L$(LIB_PNETCDF) -lpnetcdf -lgptl SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp FFLAGS += -openmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof - - CPPDEFS := $(CPPDEFS) -Dncdf endif -ifeq ($(IO_TYPE), netcdf) - CPPDEFS := $(CPPDEFS) -Dncdf -endif diff --git a/configuration/scripts/machines/Macros.phase2_intel b/configuration/scripts/machines/Macros.phase2_intel index 6bfea6b19..962aa84a6 100644 --- a/configuration/scripts/machines/Macros.phase2_intel +++ b/configuration/scripts/machines/Macros.phase2_intel @@ -43,14 +43,14 @@ LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp FFLAGS += -qopenmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -#ifeq ($(IO_TYPE), pio) +#ifeq ($(ICE_IOTYPE), pio) # PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib # INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include # SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof diff --git a/configuration/scripts/machines/Macros.phase3_intel b/configuration/scripts/machines/Macros.phase3_intel index c5a8b7a7e..076b2aab1 100644 --- a/configuration/scripts/machines/Macros.phase3_intel +++ b/configuration/scripts/machines/Macros.phase3_intel @@ -44,14 +44,14 @@ LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp FFLAGS += -qopenmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -#ifeq ($(IO_TYPE), pio) +#ifeq ($(ICE_IOTYPE), pio) # PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib # INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include # SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof diff --git a/configuration/scripts/machines/Macros.testmachine_intel b/configuration/scripts/machines/Macros.testmachine_intel index 0d9121667..20c1f3610 100644 --- a/configuration/scripts/machines/Macros.testmachine_intel +++ b/configuration/scripts/machines/Macros.testmachine_intel @@ -46,14 +46,14 @@ LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L$(LIB_PNETCDF) -lpnetcdf -lgptl -ifeq ($(compile_threaded), true) +ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp FFLAGS += -qopenmp endif ### if using parallel I/O, load all 3 libraries. PIO must be first! -ifeq ($(IO_TYPE), pio) +ifeq ($(ICE_IOTYPE), pio) PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 8cb43d11e..5240859b5 100755 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -58,7 +58,8 @@ to support the CICE model. "ICE_BFBCOMP", "string", "location of case for comparison, associated with cice.setup -td", "set by cice.setup" "ICE_SPVAL", "string", "special value for cice.settings strings", "set by cice.setup" "ICE_RUNLENGTH", "integer (see below)", "batch run length default", "set by cice.setup" - " ", "0", "15 minutes (default)", " " + " ", "-1", "15 minutes (default)", " " + " ", "0", "30 minutes", " " " ", "1", "59 minutes", " " " ", "2", "2 hours", " " " ", "other :math:`2 < N < 8`", "N hours", " "