Skip to content

Commit

Permalink
Macros fixes and diag_type fix (#396)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
apcraig authored Jan 17, 2020
1 parent b5134ad commit 5d6b26c
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 48 deletions.
2 changes: 1 addition & 1 deletion configuration/scripts/cice.launch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
31 changes: 26 additions & 5 deletions configuration/scripts/cice.run.setup.csh
Original file line number Diff line number Diff line change
Expand Up @@ -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\`"
Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions configuration/scripts/machines/Macros.brooks_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 2 additions & 7 deletions configuration/scripts/machines/Macros.cesium_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions configuration/scripts/machines/Macros.cheyenne_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 2 additions & 7 deletions configuration/scripts/machines/Macros.fram_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.hobart_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.hobart_nag
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.izumi_gnu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.izumi_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.izumi_nag
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.izumi_pgi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 2 additions & 7 deletions configuration/scripts/machines/Macros.millikan_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions configuration/scripts/machines/Macros.phase2_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/machines/Macros.phase3_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/machines/Macros.testmachine_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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", " "
Expand Down

0 comments on commit 5d6b26c

Please sign in to comment.