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

Move makdep compilation to Makefile #257

Merged
merged 5 commits into from
May 9, 2019
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions configuration/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
#-------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion configuration/scripts/icepack.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 5 additions & 13 deletions configuration/scripts/machines/Macros.badger_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,9 +45,6 @@ else
SLIBS :=
endif

SCC:= icc

SFC:= ifort

ifeq ($(ICE_THREADED), true)
LDFLAGS += -qopenmp
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.cheyenne_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.conrad_cray
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.conrad_gnu
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.conrad_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.conrad_pgi
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.cori_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
22 changes: 6 additions & 16 deletions configuration/scripts/machines/Macros.gaffney_gnu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#==============================================================================
# Macros file for NAVYDSRC gaffney, intel compiler
# Macros file for NAVYDSRC gaffney, gnu compiler
#==============================================================================

CPP := ftn -E
Expand All @@ -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)
Expand All @@ -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
Expand Down
20 changes: 5 additions & 15 deletions configuration/scripts/machines/Macros.gaffney_intel
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
19 changes: 5 additions & 14 deletions configuration/scripts/machines/Macros.gaffney_pgi
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
Loading