diff --git a/.travis.yml b/.travis.yml index e07620932..827ea9bf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,20 +2,17 @@ language: cpp sudo: false -compiler: clang - addons: apt: sources: - ubuntu-toolchain-r-test - - llvm-toolchain-trusty-5.0 packages: - tcsh - pkg-config - netcdf-bin - libnetcdf-dev - gfortran - - clang-5.0 + - gcc - wget #- lftp diff --git a/configuration/scripts/Makefile b/configuration/scripts/Makefile index acbb2b4f8..47de4b402 100644 --- a/configuration/scripts/Makefile +++ b/configuration/scripts/Makefile @@ -105,6 +105,18 @@ db_flags: @echo "* .F.o := $(FC) -c $(FFLAGS) $(FIXEDFLAGS) $(INCS) $(INCLDIR)" @echo "* .F90.o := $(FC) -c $(FFLAGS) $(FREEFLAGS) $(INCS) $(INCLDIR)" +#------------------------------------------------------------------------------- +# build rule for makdep: MACFILE, cmd-line, or env vars must provide +# the needed macros +#------------------------------------------------------------------------------- + +ifndef $(CFLAGS_HOST) + CFLAGS_HOST := +endif + +$(DEPGEN): $(ICE_CASEDIR)/makdep.c + $(SCC) -o $@ $(CFLAGS_HOST) $< + #------------------------------------------------------------------------------- # build rules: MACFILE, cmd-line, or env vars must provide the needed macros #------------------------------------------------------------------------------- diff --git a/configuration/scripts/icepack.build b/configuration/scripts/icepack.build index 0e21185a9..cb92e941c 100755 --- a/configuration/scripts/icepack.build +++ b/configuration/scripts/icepack.build @@ -64,7 +64,8 @@ cat ${ICE_OBJDIR}/Filepath echo " " echo "building makdep" -cc -o makdep ${ICE_CASEDIR}/makdep.c || exit 2 +${ICE_MACHINE_MAKE} \ + -f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHCOMP} makdep || exit 2 echo "building icepack > ${ICE_OBJDIR}/${ICE_BLDLOG_FILE}" if ( ${ICE_TEST} != ${ICE_SPVAL} ) then diff --git a/configuration/scripts/machines/Macros.badger_intel b/configuration/scripts/machines/Macros.badger_intel index 3119351e2..ee16ded00 100644 --- a/configuration/scripts/machines/Macros.badger_intel +++ b/configuration/scripts/machines/Macros.badger_intel @@ -18,16 +18,11 @@ else FFLAGS += -O1 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 -else - FC := ifort -endif - -MPICC:= mpicc - -MPIFC:= mpif90 -LD:= $(MPIFC) +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # set in Macros file NETCDF_PATH := /usr/projects/climate/SHARED_CLIMATE/software/conejo/netcdf/3.6.3/intel-13.0.1 @@ -50,9 +45,6 @@ else SLIBS := endif -SCC:= icc - -SFC:= ifort ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp diff --git a/configuration/scripts/machines/Macros.cheyenne_intel b/configuration/scripts/machines/Macros.cheyenne_intel index 622950b9e..804028190 100755 --- a/configuration/scripts/machines/Macros.cheyenne_intel +++ b/configuration/scripts/machines/Macros.cheyenne_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 -else - FC := ifort -endif - -MPICC:= mpicc - -MPIFC:= mpif90 -LD:= $(MPIFC) +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L$(LIB_PNETCDF) -lpnetcdf -lgptl SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(compile_threaded), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp diff --git a/configuration/scripts/machines/Macros.conrad_cray b/configuration/scripts/machines/Macros.conrad_cray index 715f30ed5..cc7e5daa7 100644 --- a/configuration/scripts/machines/Macros.conrad_cray +++ b/configuration/scripts/machines/Macros.conrad_cray @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= cc - -SFC:= ftn - ifeq ($(ICE_THREADED), false) LDFLAGS += -hnoomp CFLAGS += -hnoomp diff --git a/configuration/scripts/machines/Macros.conrad_gnu b/configuration/scripts/machines/Macros.conrad_gnu index 8f61df5ac..2a62f7de5 100644 --- a/configuration/scripts/machines/Macros.conrad_gnu +++ b/configuration/scripts/machines/Macros.conrad_gnu @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -fopenmp CFLAGS += -fopenmp diff --git a/configuration/scripts/machines/Macros.conrad_intel b/configuration/scripts/machines/Macros.conrad_intel index a25b2a2c6..8829771ef 100644 --- a/configuration/scripts/machines/Macros.conrad_intel +++ b/configuration/scripts/machines/Macros.conrad_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp diff --git a/configuration/scripts/machines/Macros.conrad_pgi b/configuration/scripts/machines/Macros.conrad_pgi index 300823db1..24b958f55 100644 --- a/configuration/scripts/machines/Macros.conrad_pgi +++ b/configuration/scripts/machines/Macros.conrad_pgi @@ -17,16 +17,11 @@ else FFLAGS += -O -g endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= cc - -SFC:= ftn - ifeq ($(ICE_THREADED), true) LDFLAGS += -mp CFLAGS += -mp diff --git a/configuration/scripts/machines/Macros.cori_intel b/configuration/scripts/machines/Macros.cori_intel index f9ec911c8..e7bfb9c67 100644 --- a/configuration/scripts/machines/Macros.cori_intel +++ b/configuration/scripts/machines/Macros.cori_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp diff --git a/configuration/scripts/machines/Macros.gaffney_gnu b/configuration/scripts/machines/Macros.gaffney_gnu index 9bf1f9c7e..0047f951d 100644 --- a/configuration/scripts/machines/Macros.gaffney_gnu +++ b/configuration/scripts/machines/Macros.gaffney_gnu @@ -1,5 +1,5 @@ #============================================================================== -# Macros file for NAVYDSRC gaffney, intel compiler +# Macros file for NAVYDSRC gaffney, gnu compiler #============================================================================== CPP := ftn -E @@ -17,17 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 - LDFLAGS += -lmpi -else - FC := gfortran -endif - -MPICC:= mpicc -MPIFC:= mpif90 -#LD:= $(MPIFC) -LD:= gfortran +SCC := gcc +SFC := gfortran +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -45,10 +39,6 @@ INCLDIR += -I$(NETCDF_PATH)/include #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -fopenmp CFLAGS += -fopenmp diff --git a/configuration/scripts/machines/Macros.gaffney_intel b/configuration/scripts/machines/Macros.gaffney_intel index a47a02534..46f44fcdc 100644 --- a/configuration/scripts/machines/Macros.gaffney_intel +++ b/configuration/scripts/machines/Macros.gaffney_intel @@ -18,17 +18,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ifort - LDFLAGS += -lmpi -else - FC := ifort -endif - -MPICC:= icc - -MPIFC:= ifort -LD:= $(MPIFC) +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -46,10 +40,6 @@ LIB_NETCDF := $(NETCDF_PATH)/lib #LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp diff --git a/configuration/scripts/machines/Macros.gaffney_pgi b/configuration/scripts/machines/Macros.gaffney_pgi index 4dc22f319..f811fa9a9 100644 --- a/configuration/scripts/machines/Macros.gaffney_pgi +++ b/configuration/scripts/machines/Macros.gaffney_pgi @@ -17,16 +17,11 @@ else FFLAGS += -O -g endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 -else - FC := pgf90 -endif - -MPICC:= pgcc - -MPIFC:= pgf90 -LD:= $(MPIFC) +SCC := pgcc +SFC := pgf90 +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= pgcc - -SFC:= pgf90 - ifeq ($(ICE_THREADED), true) LDFLAGS += -mp CFLAGS += -mp diff --git a/configuration/scripts/machines/Macros.gordon_cray b/configuration/scripts/machines/Macros.gordon_cray index a5043f74d..3bea53751 100644 --- a/configuration/scripts/machines/Macros.gordon_cray +++ b/configuration/scripts/machines/Macros.gordon_cray @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= cc - -SFC:= ftn - ifeq ($(ICE_THREADED), false) LDFLAGS += -hnoomp CFLAGS += -hnoomp diff --git a/configuration/scripts/machines/Macros.gordon_gnu b/configuration/scripts/machines/Macros.gordon_gnu index 81ac94355..1fcf530da 100644 --- a/configuration/scripts/machines/Macros.gordon_gnu +++ b/configuration/scripts/machines/Macros.gordon_gnu @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -fopenmp CFLAGS += -fopenmp diff --git a/configuration/scripts/machines/Macros.gordon_intel b/configuration/scripts/machines/Macros.gordon_intel index 5499bd14a..5990f3bdf 100644 --- a/configuration/scripts/machines/Macros.gordon_intel +++ b/configuration/scripts/machines/Macros.gordon_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp diff --git a/configuration/scripts/machines/Macros.gordon_pgi b/configuration/scripts/machines/Macros.gordon_pgi index bb33626a2..220bd1812 100644 --- a/configuration/scripts/machines/Macros.gordon_pgi +++ b/configuration/scripts/machines/Macros.gordon_pgi @@ -17,16 +17,11 @@ else FFLAGS += -O -g endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= cc - -SFC:= ftn - ifeq ($(ICE_THREADED), true) LDFLAGS += -mp CFLAGS += -mp diff --git a/configuration/scripts/machines/Macros.hobart_intel b/configuration/scripts/machines/Macros.hobart_intel index 419fb3c03..5a538874e 100755 --- a/configuration/scripts/machines/Macros.hobart_intel +++ b/configuration/scripts/machines/Macros.hobart_intel @@ -18,11 +18,9 @@ else FFLAGS += -O2 -debug minimal endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 - LD := mpif90 -else - FC := ifort - LD := ifort -endif +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) diff --git a/configuration/scripts/machines/Macros.hobart_nag b/configuration/scripts/machines/Macros.hobart_nag index 30102ac2b..bc54c7655 100755 --- a/configuration/scripts/machines/Macros.hobart_nag +++ b/configuration/scripts/machines/Macros.hobart_nag @@ -1,5 +1,5 @@ #============================================================================== -# Makefile macros for NCAR cheyenne, intel compiler +# Makefile macros for NCAR cheyenne, nag compiler #============================================================================== CPP := /usr/bin/cpp @@ -19,13 +19,11 @@ else FFLAGS += -O2 -ieee=full endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 - LD := mpif90 -else - FC := nagfor - LD := nagfor -endif +SCC := nagcc +SFC := nagfor +CC := $(SCC) +FC := $(SFC) +LD := $(FC) SLIBS := -L$(COMPILER_PATH)/lib/NAG_Fortran diff --git a/configuration/scripts/machines/Macros.koehr_gnu b/configuration/scripts/machines/Macros.koehr_gnu index 9c9d8ef49..97950c249 100644 --- a/configuration/scripts/machines/Macros.koehr_gnu +++ b/configuration/scripts/machines/Macros.koehr_gnu @@ -17,17 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 - LDFLAGS += -lmpi -else - FC := gfortran -endif - -MPICC:= mpicc -MPIFC:= mpif90 -#LD:= $(MPIFC) -LD:= gfortran +SCC := gcc +SFC := gfortran +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -45,10 +39,6 @@ INCLDIR += -I$(NETCDF_PATH)/include #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -fopenmp CFLAGS += -fopenmp diff --git a/configuration/scripts/machines/Macros.koehr_intel b/configuration/scripts/machines/Macros.koehr_intel index 4839a82df..624056f4a 100644 --- a/configuration/scripts/machines/Macros.koehr_intel +++ b/configuration/scripts/machines/Macros.koehr_intel @@ -18,17 +18,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ifort - LDFLAGS += -lmpi -else - FC := ifort -endif - -MPICC:= icc - -MPIFC:= ifort -LD:= $(MPIFC) +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -46,10 +40,6 @@ LIB_NETCDF := $(NETCDF_PATH)/lib #LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp diff --git a/configuration/scripts/machines/Macros.koehr_pgi b/configuration/scripts/machines/Macros.koehr_pgi index a9b3efb3e..f3de98d52 100644 --- a/configuration/scripts/machines/Macros.koehr_pgi +++ b/configuration/scripts/machines/Macros.koehr_pgi @@ -17,16 +17,11 @@ else FFLAGS += -O -g endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 -else - FC := pgf90 -endif - -MPICC:= pgcc - -MPIFC:= pgf90 -LD:= $(MPIFC) +SCC := pgcc +SFC := pgf90 +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= pgcc - -SFC:= pgf90 - ifeq ($(ICE_THREADED), true) LDFLAGS += -mp CFLAGS += -mp diff --git a/configuration/scripts/machines/Macros.loft_gnu b/configuration/scripts/machines/Macros.loft_gnu index 6ef475c33..0fbf7e005 100644 --- a/configuration/scripts/machines/Macros.loft_gnu +++ b/configuration/scripts/machines/Macros.loft_gnu @@ -27,12 +27,11 @@ else FFLAGS += -O2 endif - FC := gfortran - -MPICC:= - -MPIFC:= -LD:= $(FC) +SCC := gcc +SFC := gfortran +CC := $(SCC) +FC := $(SFC) +LD := $(FC) ifeq ($(ICE_IOTYPE), netcdf) NETCDF_PATH := /usr/projects/climate/SHARED_CLIMATE/software/conejo/netcdf/3.6.3/intel-13.0.1 @@ -45,8 +44,6 @@ else endif LIB_MPI := -SCC:= -SFC:= ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp diff --git a/configuration/scripts/machines/Macros.onyx_cray b/configuration/scripts/machines/Macros.onyx_cray index f0dbad417..b7e011a1f 100644 --- a/configuration/scripts/machines/Macros.onyx_cray +++ b/configuration/scripts/machines/Macros.onyx_cray @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= cc - -SFC:= ftn - ifeq ($(ICE_THREADED), false) LDFLAGS += -hnoomp CFLAGS += -hnoomp diff --git a/configuration/scripts/machines/Macros.onyx_gnu b/configuration/scripts/machines/Macros.onyx_gnu index 3e092cd71..d22562760 100644 --- a/configuration/scripts/machines/Macros.onyx_gnu +++ b/configuration/scripts/machines/Macros.onyx_gnu @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -fopenmp CFLAGS += -fopenmp diff --git a/configuration/scripts/machines/Macros.onyx_intel b/configuration/scripts/machines/Macros.onyx_intel index e2853b280..788ba042e 100644 --- a/configuration/scripts/machines/Macros.onyx_intel +++ b/configuration/scripts/machines/Macros.onyx_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := ftn -else - FC := ftn -endif - -MPICC:= cc - -MPIFC:= ftn -LD:= $(MPIFC) +SCC := cc +SFC := ftn +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ INCLDIR := $(INCLDIR) #LIB_MPI := $(IMPILIBDIR) #SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp CFLAGS += -openmp diff --git a/configuration/scripts/machines/Macros.testmachine_intel b/configuration/scripts/machines/Macros.testmachine_intel index 4e65dbed2..f932b04eb 100755 --- a/configuration/scripts/machines/Macros.testmachine_intel +++ b/configuration/scripts/machines/Macros.testmachine_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 -else - FC := ifort -endif - -MPICC:= mpicc - -MPIFC:= mpif90 -LD:= $(MPIFC) +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) NETCDF_PATH := $(NETCDF) @@ -43,10 +38,6 @@ LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L$(LIB_PNETCDF) -lpnetcdf -lgptl -SCC:= icc - -SFC:= ifort - ifeq ($(compile_threaded), true) LDFLAGS += -openmp CFLAGS += -openmp diff --git a/configuration/scripts/machines/Macros.thunder_intel b/configuration/scripts/machines/Macros.thunder_intel index 465444275..914ad8f3a 100644 --- a/configuration/scripts/machines/Macros.thunder_intel +++ b/configuration/scripts/machines/Macros.thunder_intel @@ -17,16 +17,11 @@ else FFLAGS += -O2 endif -ifeq ($(ICE_COMMDIR), mpi) - FC := mpif90 -else - FC := ifort -endif - -MPICC:= mpicc - -MPIFC:= mpif90 -LD:= $(MPIFC) +SCC := icc +SFC := ifort +CC := $(SCC) +FC := $(SFC) +LD := $(FC) # defined by module #NETCDF_PATH := $(NETCDF) @@ -44,10 +39,6 @@ LIB_PNETCDF := $(PNETCDF_PATH)/lib LIB_MPI := $(IMPILIBDIR) SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -SCC:= icc - -SFC:= ifort - ifeq ($(ICE_THREADED), true) LDFLAGS += -qopenmp CFLAGS += -qopenmp diff --git a/configuration/scripts/machines/Macros.travisCI_gnu b/configuration/scripts/machines/Macros.travisCI_gnu index baecdf18e..1ef6b44a2 100644 --- a/configuration/scripts/machines/Macros.travisCI_gnu +++ b/configuration/scripts/machines/Macros.travisCI_gnu @@ -1,8 +1,8 @@ #============================================================================== -# Makefile macros for Travis-CI - gfortran and llvm (clang) compilers +# Makefile macros for Travis-CI - gnu compiler #============================================================================== -CPP := clang-cpp +CPP := /usr/bin/cpp CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} CFLAGS := -c -O2 -fp-model precise -xHost @@ -16,12 +16,11 @@ else FFLAGS += -O2 endif -FC := gfortran - -MPICC:= - -MPIFC:= -LD:= $(FC) +SCC := gcc +SFC := gfortran +CC := $(SCC) +FC := $(SFC) +LD := $(FC) NETCDF_PATH := $(NETCDF) @@ -36,8 +35,6 @@ else endif LIB_MPI := -SCC:= -SFC:= ifeq ($(ICE_THREADED), true) LDFLAGS += -openmp diff --git a/doc/source/user_guide/ug_running.rst b/doc/source/user_guide/ug_running.rst index f05ac2802..574ac58c6 100755 --- a/doc/source/user_guide/ug_running.rst +++ b/doc/source/user_guide/ug_running.rst @@ -16,6 +16,8 @@ The icepack scripts are written to allow quick setup of cases and tests. Once a generated, users can manually modify the namelist and other files to custom configure the case. Several settings are available via scripts as well. +.. _overview: + Overview ~~~~~~~~ @@ -236,7 +238,7 @@ There are other scripts that come with icepack. These include Porting ------- -To port, an **env.[machine]_[environment]** and **Macros.[machine]_[environment}** file have to be added to the +To port, an **env.[machine]_[environment]** and **Macros.[machine]_[environment]** file have to be added to the **configuration/scripts/machines/** directory and the **configuration/scripts/icepack.batch.csh** file needs to be modified. In general, the machine is specified in ``icepack.setup`` with ``--mach`` @@ -264,6 +266,16 @@ directory back to **configuration/scripts/machines/** and update the **configuration/scripts/icepack.batch.csh** file, retest, and then add and commit the updated machine files to the repository. +.. _cross_compiling: + +Cross-compiling +~~~~~~~~~~~~~~~~~~~~~~~~ +It can happen that the model must be built on a platform and run on another, for example when the run environment is only available in a batch queue. The program **makdep** (see :ref:`overview`), however, is both compiled and run as part of the build process. + +In order to support this, the Makefile uses a variable ``CFLAGS_HOST`` that can hold compiler flags specfic to the build machine for the compilation of makdep. If this feature is needed, add the variable ``CFLAGS_HOST`` to the **Macros.[machine]_[environment]** file. For example : :: + + CFLAGS_HOST = -xHost + .. _account: Machine Account Settings