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

Macros fixes and diag_type fix #396

Merged
merged 6 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
18 changes: 14 additions & 4 deletions configuration/scripts/cice.run.setup.csh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ 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\`

echo " "
echo "CICE rundir is \${ICE_RUNDIR}"
echo "CICE log file is \${ICE_RUNLOG_FILE}"
Expand Down Expand Up @@ -73,10 +75,18 @@ echo " "
if !(-d \${ICE_LOGDIR}) mkdir -p \${ICE_LOGDIR}
cp -p \${ICE_RUNLOG_FILE} \${ICE_LOGDIR}

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
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
exit -1
endif
else
echo "\`date\` \${0}: \${ICE_CASENAME} run completed "
echo "CICE NOT run with diag_type='stdout', run status unknown"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "CICE NOT run with diag_type='stdout', run status unknown"
echo "CICE NOT run with diag_type='stdout', run status unknown - see \${ICE_LOGDIR}/\${ICE_RUNLOG_FILE}"

I think in that case it would be nice to also output the path to the log file for easy (<middle click path> + vi <middle click>) access

echo "\`date\` \${0}: \${ICE_CASENAME} run completed " >> \${ICE_CASEDIR}/README.case
echo "\`date\` \${0}: \${ICE_CASENAME} NOT run with diag_type='stdout', run status unknown" >> \${ICE_CASEDIR}/README.case
exit -1
endif

Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/machines/Macros.brooks_intel
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized these lines can simply be deleted as -Dncdf is set in cice.build !

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (${ICE_IOTYPE} == 'netcdf') then
set IODIR = io_netcdf
setenv ICE_CPPDEFS "${ICE_CPPDEFS} -Dncdf"
else if (${ICE_IOTYPE} == 'pio') then
set IODIR = io_pio
setenv ICE_CPPDEFS "${ICE_CPPDEFS} -Dncdf"
else
set IODIR = io_binary
endif

endif

ifeq ($(IO_TYPE), netcdf)
ifeq ($(ICE_IOTYPE), netcdf)
CPPDEFS := $(CPPDEFS) -Dncdf
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized this conditional can simply be deleted as -Dncdf is set in cice.build !

6 changes: 3 additions & 3 deletions configuration/scripts/machines/Macros.cesium_intel
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing, these lines can be deleted

endif

ifeq ($(IO_TYPE), netcdf)
ifeq ($(ICE_IOTYPE), netcdf)
CPPDEFS := $(CPPDEFS) -Dncdf
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing, these lines can be deleted

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
6 changes: 3 additions & 3 deletions configuration/scripts/machines/Macros.fram_intel
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing, these lines can be deleted

endif

ifeq ($(IO_TYPE), netcdf)
ifeq ($(ICE_IOTYPE), netcdf)
CPPDEFS := $(CPPDEFS) -Dncdf
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing, these lines can be deleted

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
6 changes: 3 additions & 3 deletions configuration/scripts/machines/Macros.millikan_intel
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing, these lines can be deleted

endif

ifeq ($(IO_TYPE), netcdf)
ifeq ($(ICE_IOTYPE), netcdf)
CPPDEFS := $(CPPDEFS) -Dncdf
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing, these lines can be deleted

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