Skip to content
Merged
Changes from all 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
86 changes: 86 additions & 0 deletions lanl_cice/bld/Macros.Linux.NEMS.cheyenne
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#==============================================================================
# Makefile macros for "Cheyenne" a NCAR Linux Cluster
#==============================================================================
# For use with intel compiler with MPT
#==============================================================================

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 := mpif90 -f90=ifort
else
FC := ifort
endif

MPICC:= mpicc -cc=icc -DMPI2_SUPPORT

MPIFC:= mpif90 -f90=ifort
LD:= $(MPIFC)

NETCDF_PATH := $(NETCDF)

PIO_CONFIG_OPTS:= --enable-filesystem-hints=gpfs

PNETCDF_PATH := $(PNETCDF)

LAPACK_LIBDIR := /glade/apps/opt/lapack/3.4.2/intel/12.1.5/lib

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