From 69929c8fb3e6f416dc02a3c385e8fb243641ca59 Mon Sep 17 00:00:00 2001 From: flampouris Date: Fri, 17 Apr 2020 18:44:52 -0500 Subject: [PATCH 1/2] 1. Add gitignore 2. Port to orion --- .gitignore | 3 + lanl_cice/bld/Macros.Linux.NEMS.orion | 84 +++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 .gitignore create mode 100644 lanl_cice/bld/Macros.Linux.NEMS.orion diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4a467e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +**/*.mod +**/*.o +**/*.a diff --git a/lanl_cice/bld/Macros.Linux.NEMS.orion b/lanl_cice/bld/Macros.Linux.NEMS.orion new file mode 100644 index 0000000..0592cfc --- /dev/null +++ b/lanl_cice/bld/Macros.Linux.NEMS.orion @@ -0,0 +1,84 @@ +#============================================================================== +# Makefile macros for "orion" a NOAA Linux Cluster +#============================================================================== +# For use with intel compiler with IntelMPI +#============================================================================== + +CPP := fpp +CPPDEFS := -DFORTRANUNDERSCORE -DNO_R16 -DHAVE_F2008_CONTIGUOUS -DLINUX -DCPRINTEL -DCICE_NEMS +CFLAGS := -c -O2 -fp-model precise -xHost + +FIXEDFLAGS := -132 +FREEFLAGS := -FR +#FFLAGS := -g -O0 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -xHost -I$(NETCDF)/include +FFLAGS := -O2 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -xHost -I$(NETCDF)/include +FFLAGS_NOOPT:= -O0 + +ifeq ($(COMMDIR), mpi) + FC := mpiifort +else + FC := ifort +endif + +MPICC:= mpiicc + +MPIFC:= mpiifort +LD:= $(MPIFC) + +NETCDF_PATH := $(NETCDF) + +PIO_CONFIG_OPTS:= --enable-filesystem-hints=gpfs + +PNETCDF_PATH := $(PNETCDF) + +INCLDIR := $(INCLDIR) + +LIB_NETCDF := $(NETCDF_PATH)/lib +LIB_PNETCDF := $(PNETCDF_PATH)/lib +LIB_MPI := $(IMPILIBDIR) + +SLIBS := -L$(LIB_NETCDF) -lnetcdf + +SCC:= icc + +SFC:= ifort + +# CPPDEFS := $(CPPDEFS) -Dfcd_coupled -Dcoupled + + CPPDEFS := $(CPPDEFS) -DNXGLOB=$(NXGLOB) -DNYGLOB=$(NYGLOB) \ + -DBLCKX=$(BLCKX) -DBLCKY=$(BLCKY) -DMXBLCKS=$(MXBLCKS) \ + -DNICELYR=$(NICELYR) -DNSNWLYR=$(NSNWLYR) -DNICECAT=$(NICECAT) \ + -DTRAGE=$(TRAGE) -DTRFY=$(TRFY) -DTRLVL=$(TRLVL) -DTRPND=$(TRPND) \ + -DTRBRI=$(TRBRI) -DNTRAERO=$(NTRAERO) -DNBGCLYR=$(NBGCLYR) \ + -DTRBGCS=$(TRBGCS) -DNUMIN=$(NUMIN) -DNUMAX=$(NUMAX) + +ifeq ($(compile_threaded), true) + LDFLAGS += -openmp + CFLAGS += -openmp + FFLAGS += -openmp +endif + +ifeq ($(DITTO), yes) + CPPDEFS := $(CPPDEFS) -DREPRODUCIBLE +endif + +ifeq ($(IO_TYPE), netcdf3) + CPPDEFS := $(CPPDEFS) -Dncdf + INCLDIR := $(INCLDIR) -I$(NETCDF)/include + SLIBS := $(SLIBS) -L$(NETCDF)/lib -lnetcdf +endif + +ifeq ($(IO_TYPE), netcdf4) + CPPDEFS := $(CPPDEFS) -Dncdf + INCLDIR := $(INCLDIR) -I$(NETCDF)/include + SLIBS := $(SLIBS) -L$(NETCDF)/lib -lnetcdf -lnetcdff +endif + +### if using parallel I/O, load all 3 libraries. PIO must be first! +ifeq ($(IO_TYPE), pio) + #PIO_PATH:=/glade/u/home/jedwards/pio1_6_5/pio + INCLDIR += -I$(PIO_PATH) + SLIBS := $(SLIBS) -L$(PIO_PATH) -lpio + + CPPDEFS := $(CPPDEFS) -Dncdf +endif From 18b2ba81749243a5ac295394ace7d96ee995526d Mon Sep 17 00:00:00 2001 From: flampouris Date: Mon, 20 Apr 2020 13:59:22 -0500 Subject: [PATCH 2/2] update DEBUG Flags --- lanl_cice/bld/Macros.Linux.NEMS.orion | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lanl_cice/bld/Macros.Linux.NEMS.orion b/lanl_cice/bld/Macros.Linux.NEMS.orion index 0592cfc..02b2334 100644 --- a/lanl_cice/bld/Macros.Linux.NEMS.orion +++ b/lanl_cice/bld/Macros.Linux.NEMS.orion @@ -10,8 +10,8 @@ CFLAGS := -c -O2 -fp-model precise -xHost FIXEDFLAGS := -132 FREEFLAGS := -FR -#FFLAGS := -g -O0 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -xHost -I$(NETCDF)/include -FFLAGS := -O2 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -xHost -I$(NETCDF)/include +FFLAGS_DEBUG := -g -O0 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -link_mpi=dbg -xHost -I$(NETCDF)/include +FFLAGS_OPT := -O2 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -xHost -I$(NETCDF)/include FFLAGS_NOOPT:= -O0 ifeq ($(COMMDIR), mpi) @@ -20,6 +20,12 @@ else FC := ifort endif +ifeq ($(DEBUG),Y) + FFLAGS += $(FFLAGS_DEBUG) +else + FFLAGS += $(FFLAGS_OPT) +endif + MPICC:= mpiicc MPIFC:= mpiifort