diff --git a/.gitignore b/.gitignore index 72c31d845..5ca2eb6ad 100644 --- a/.gitignore +++ b/.gitignore @@ -166,3 +166,13 @@ R-utils/read.q.quick.r #Xiangtao Ignores ED/build/ed2_gfortran ED/build/ed2_ifort +#Include.mk ignores (and exceptions) +ED/build/make/include.mk.* +!ED/build/make/include.mk.docker.gnu +!ED/build/make/include.mk.docker.intel +!ED/build/make/include.mk.gnu +!ED/build/make/include.mk.intel +!ED/build/make/include.mk.macos +!ED/build/make/include.mk.pgi +!ED/build/make/include.mk.travisci + diff --git a/ED/build/make/Makefile b/ED/build/make/Makefile index 54ee8c773..1a4df532f 100644 --- a/ED/build/make/Makefile +++ b/ED/build/make/Makefile @@ -20,18 +20,95 @@ ifeq ($(F_LOWO_OPTS),) endif #------------------------------------------------------------------------------------------# -ifeq ($(OPT),"dbg") - INCLUDES = "" + + +#------------------------------------------------------------------------------------------# +# Make variables CMACH and FC_TYPE are correctly set. # +#------------------------------------------------------------------------------------------# +ifeq ($(CMACH),) + CMACH_ERROR=Y +else ifeq ($(CMACH),$(filter $(CMACH), LINUX MACOS)) + CMACH_ERROR=N +else + CMACH_ERROR=Y +endif +ifeq ($(FC_TYPE),) + FCTYPE_ERROR=Y +else ifeq ($(FC_TYPE),$(filter $(FC_TYPE), GNU INTEL PGI)) + FCTYPE_ERROR=N +else + FCTYPE_ERROR=Y +endif +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Gracefully fail if CMACH and FC_TYPE are not correctly set. This will allow users to # +# make sure they selected a supported version. # +#------------------------------------------------------------------------------------------# +FATAL_ERROR=N +ifeq ($(CMACH_ERROR),Y) + $(info ) + $(info ---~---) + $(info FATAL ERROR!) + $(info ---~---) + $(info Variable CMACH is either not defined or has an invalid value in your) + $(info include.mk.[PLATFORM]. Please set to one of the following values) + $(info ) + $(info CMACH=LINUX -- For Linux machines) + $(info CMACH=MACOS -- For MacOS machines) + $(info ) + $(info We currently do not support compilation in Windows. If you know how to set) + $(info up ED2 to run on Windows machines, please submit a pull request.) + $(info ---~---) + $(info ) + FATAL_ERROR=Y endif +ifeq ($(FCTYPE_ERROR),Y) + $(info ) + $(info ---~---) + $(info FATAL ERROR!) + $(info ---~---) + $(info Variable FC_TYPE is either not defined or has an invalid value in your) + $(info include.mk.[PLATFORM]. Please set to one of the following values) + $(info ) + $(info FC_TYPE=GNU -- To compile ED2 with gfortran/gcc) + $(info FC_TYPE=INTEL -- To compile ED2 with ifx/icx, or ifort/icc in older systems) + $(info FC_TYPE=PGI -- To compile ED2 with pgfortran/pgcc) + $(info ) + $(info New types may be added in the future. Feel free to contribute with other) + $(info compilers.) + $(info ---~---) + $(info ) + FATAL_ERROR=Y +endif +ifeq ($(FATAL_ERROR),Y) + $(error CMACH and/or FC_TYPE are not properly set in your include.mk.[PLATFORM] file.) +endif +#------------------------------------------------------------------------------------------# + + + +#----- Set parallel flag based on the settings. -------------------------------------------# +ifeq ($(F_COMP),$(filter $(F_COMP), mpif90 mpifortran)) + PAR_DEFS=-DRAMS_MPI +else ifdef $(PAR_LIBS) + PAR_DEFS=-DRAMS_MPI +else + PAR_DEFS= +endif +#------------------------------------------------------------------------------------------# + + #----- Compiler commands. -----------------------------------------------------------------# INCLUDES = $(PAR_INCS) -I$(ED_INCS) $(HDF5_INCS) $(MPI_INCS) $(LAPACK_INCS) F90_COMMAND = $(F_COMP) -c $(F_OPTS) $(INCLUDES) $(PAR_DEFS) F90_LOWO_COMMAND = $(F_COMP) -c $(F_LOWO_OPTS) $(INCLUDES) $(PAR_DEFS) -FPP_COMMAND = $(F_COMP) -c -DUSE_INTERF=$(USE_INTERF) -DUSENC=$(USENC) -D$(CMACH) \ - -D$(FC_TYPE) -DUSE_COLLECTIVE_MPIO=$(USE_COLLECTIVE_MPIO) \ +FPP_COMMAND = $(F_COMP) -c -D$(CMACH) -D$(FC_TYPE) \ + -DUSE_COLLECTIVE_MPIO=$(USE_COLLECTIVE_MPIO) \ -DUSE_MPIWTIME=$(USE_MPIWTIME) $(F_OPTS) $(INCLUDES) $(PAR_DEFS) -FPP_LOWO_COMMAND = $(F_COMP) -c -DUSE_INTERF=$(USE_INTERF) -DUSENC=$(USENC) -D$(CMACH) \ +FPP_LOWO_COMMAND = $(F_COMP) -c -D$(CMACH) -D$(FC_TYPE) \ -DUSE_COLLECTIVE_MPIO=$(USE_COLLECTIVE_MPIO) \ -DUSE_MPIWTIME=$(USE_MPIWTIME) $(F_LOWO_OPTS) $(INCLUDES) $(PAR_DEFS) CXX_COMMAND = $(C_COMP) -c $(C_OPTS) -D$(CMACH) $(HDF5_INCS) $(INCLUDES) $(PAR_DEFS) diff --git a/ED/build/make/include.mk.absoft b/ED/build/make/include.mk.absoft deleted file mode 100644 index 930537d4f..000000000 --- a/ED/build/make/include.mk.absoft +++ /dev/null @@ -1,388 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -# HDF 5 Libraries -#HDF5_INCS=-I/n/Moorcroft_Lab/Lab/apps/i91/lib -I/n/Moorcroft_Lab/Lab/apps/i91/include -#HDF5_LIBS=-L/n/Moorcroft_Lab/Lab/apps/i91/lib -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl \ -# -L/n/Moorcroft_Lab/Lab/mlongo/util/hdflib/hdf4_64/zlib/lib -lz - -#HDF5_INCS=-I/sw/hdf5-1.6.6-gfortran/lib -#HDF5C_INCS=-I/sw/hdf5-1.6.6-gfortran/include -#HDF5_LIBS=-lz /sw/hdf5-1.6.6-gfortran/lib/libhdf5_fortran.a \ -# /sw/hdf5-1.6.6-gfortran/lib/libhdf5.a \ -# /sw/hdf5-1.6.6-gfortran/lib/libhdf5_hl.a - -#HDF5_INCS=-I/usr/local/hdf5-1.8.0/include -#HDF5C_INCS=-I/usr/local/hdf5-1.8.0/include -#HDF5_LIBS=-lz /usr/local/hdf5-1.8.0/lib/libhdf5_fortran.a \ -# /usr/local/hdf5-1.8.0/lib/libhdf5.a \ -# /usr/local/hdf5-1.8.0/lib/libhdf5_hl.a - -HDF5_INCS=-I/sw/hdf5-1.8.0-pabs/include -HDF5C_INCS=-I/sw/hdf5-1.8.0-pabs/include -HDF5_LIBS=-lz /hdf5-1.8.0-pabs/lib/libhdf5_fortran.a \ - /sw/hdf5-1.8.0-pabs/lib/libhdf5.a \ - /sw/hdf5-1.8.0-pabs/lib/libhdf5_hl.a - -#--------------------------------------------------------------- -# If you have a version of hdf5 compiled in parallel, then you -# may benefit from collective I/O, then use this flag = 1 -# Otherwise, set it to zero. - -USE_COLLECTIVE_MPIO=0 - -#--------------------------------------------------------------- - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=0 - -#----------------- SGI -n32 ------------------------------------ -#CMACH=SGI -#F_COMP=f90 -#F_OPTS=-n32 -mips4 -r10000 -O2 -freeform \ -# -OPT:IEEE_arithmetic=3:roundoff=3 -OPT:fold_arith_limit=3200 -#C_COMP=cc -#C_OPTS=-O -n32 -mips4 -DUNDERSCORE -#LOADER=f90 -#LOADER_OPTS=-n32 -#LIBS=-lm -#----------------------------------------------------------------- -#CMACH=IBM -#F_COMP=mpif77 -#F_OPTS= -FR -O3 -I/sw/netcdf-3.6.2-gfortran/include \ -# -L/sw/netcdf-3.6.2-gfortran/lib -lnetcdf -#C_COMP=gcc -O2 -I/sw/openmpi-1.2.2-gfortran-static/include/openmpi \ -# -D_REENTRANT -I/sw/openmpi-1.2.2-gfortran-static/include \ -# -Wl,-u,_munmap -Wl,-multiply_defined,suppress \ -# -L/sw/openmpi-1.2.2-gfortran-static/lib \ -# -lmpi_cxx -lmpi -lopen-rte -lopen-pal -#C_OPTS= -g -DLITTLE -#C_PP_OPTS= -#LOADER= $(F_COMP) -#LOADER_OPTS= -#C_LOADER= $(C_COMP) -#C_LOADER_OPTS= -#LIBS= -#MOD_EXT=mod -#PAR_DEFS=-DRAMS_MPI - -#----------------- Absoft Pro-Fortran on MacOS ----------------- -CMACH=PC_LINUX1 #THE UNDERSCORING IS VER LINUX LIKE -FC_TYPE=GNU -F_COMP=mpif77 -#F_OPTS= -g -fbounds-check -ffpe-trap=zero#,invalid,overflow -F_OPTS= -O3 -C_COMP=mpicc -#C_OPTS= -g -C_OPTS= -O3 -USE_INTERF=1 -CPP_OPTS= -LOADER=$(F_COMP) -LOADER_OPTS= -C_LOADER=$(C_COMP) -C_LOADER_OPTS= -LIBS= -MOD_EXT=mod -PAR_DEFS=-DRAMS_MPI - -#----------------- gfortran on Linux x86_64 -------------------- -CMACH=PC_LINUX1 -F_COMP=mpif77 -#F_OPTS= -g -fbounds-check -ffpe-trap=zero#,invalid,overflow -F_OPTS= -O3 -C_COMP=mpicc -#C_OPTS= -g -C_OPTS= -O3 -USE_INTERF=1 -CPP_OPTS= -LOADER=$(F_COMP) -LOADER_OPTS= -C_LOADER=$(C_COMP) -C_LOADER_OPTS= -LIBS= -MOD_EXT=mod -PAR_DEFS=-DRAMS_MPI -#----------------- IBM ------------------------------------ -#CMACH=IBM -#F_COMP=f77 -#F_OPTS=-O -NA18000 -NQ30000 -qcharlen=10000 -k -#C_COMP=cc -#C_OPTS=-O -#C_PP_OPTS=-P -#LOADER=f77 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- IBM mpxl ------------------------------------ -#CMACH=IBM -#F_COMP=mpxlf90 -#F_OPTS=-O3 -qstrict -qtune=pwr3 -qarch=pwr3 -NA18000 -NQ30000 -qcharlen=10000 \ -# -qmaxmem=-1 -#C_COMP=mpcc -#C_OPTS=-w -O -#C_PP_OPTS=-P -#LOADER=mpxlf90 -#LOADER_OPTS=-bmaxdata:1024000000 -bmaxstack:1024000000 -lmassts -#LIBS= -#----------------------------------------------------------------- - -#----------------- Sun ------------------------------------------- -#CMACH=SUN -#F_COMP=f90 -#F_OPTS=-O4 -#C_COMP=cc -#C_OPTS= -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- HP/Exemplar ------------------------------------ -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +source=free +U77 +Olibcalls +Odataprefetch +Ofltacc -#C_COMP=cc -#C_OPTS=-O -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-Wl,-aarchive_shared -lm -lcnx_syscall /lib/libail.sl -lU77 -lc -#----------------------------------------------------------------- - -#----------------- HP/K460 --------------------------------------- -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +U77 +Olibcalls +Odataprefetch +Ofltacc +DA2.0 +DS2.0 -#C_COMP=/usr/bin/cc -#C_OPTS=-O -Aa +e -D_HPUX_SOURCE -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------------DEC/Compaq Alpha-------------------------- -#CMACH=ALPHA -#F_COMP=f90 -#F_OPTS=-O -fpe4 -NA18000 -NQ30000 -qcharlen=10000 -#C_COMP=cc -#C_OPTS=-DUNDERSCORE -DLITTLE -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=pgf90 -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio - -# -tp athlonxp -fastsse - -#C_COMP=gcc -#C_COMP=pgcc -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER=pgf90 -#LOADER_OPTS=-v -Wl,-static -#LIBS= -#----------------------------------------------------------------- - -#---------------- NEC-SX6 --------------- -#CMACH=NEC_SX -#F_COMP=sxmpif90 -#C_COMP=sxmpic++ -#LOADER=sxmpif90 -#C_LOADER=sxmpic++ -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-eC -C debug -Wf "-cont -init stack=nan heap=nan" -#F_OPTS=-ftrace -#F_OPTS=-C ssafe -#F_OPTS= -#C_OPTS=-f90lib -#C_OPTS=-f90lib -C ssafe -#C_OPTS=-f90lib -ftrace -#LOADER_OPTS=-eC -C debug -f90lib -Wf "-cont -init stack=nan heap=nan" -#LOADER_OPTS=-C debug -f90lib -#LOADER_OPTS=-ftrace -#LOADER_OPTS= -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -#CMACH=PC_LINUX1 -#F_COMP=ifort -#C_COMP=icc -#LOADER=ifort -#C_LOADER=icc -#LIBS= -#MOD_EXT=mod - -#----------------- gfortran on Linux x86_64 -------------------- -#CMACH=PC_LINUX1 -#F_COMP=mpif77 -#F_OPTS=-FR -O3 -#C_COMP=mpicc -#C_OPTS= -#CPP_OPTS= -#LOADER=$(F_COMP) -#LOADER_OPTS= -#C_LOADER=$(C_COMP) -#C_LOADER_OPTS= -#LIBS= -#MOD_EXT=mod -#PAR_DEFS=-DRAMS_MPI - -#Compiler options - -# A. Pickiest -#USE_INTERF=0 -#F_OPTS= -FR -O2 -Vaxlib -static -check all -warn all -g -fpe0 -ftz -gen-interfaces \ -# -warn interfaces -debug extended -debug-parameters all -traceback -ftrapuv -#C_OPTS= -O2 -DLITTLE -static -g -traceback -debug extended -#LOADER_OPTS= -FR -O2 -Vaxlib -static -warn all -check all -g -fpe0 -ftz -gen-interfaces \ -# -warn interfaces -debug extended -debug-parameters all -traceback -ftrapuv -#C_LOADER_OPTS=-v -g -traceback - -# B. Full interfacing, no fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O3 -Vaxlib -static -check all -warn all -gen-interfaces -traceback -#C_OPTS= -O3 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O3 -Vaxlib -static -warn all -check all -gen-interfaces -traceback -#C_LOADER_OPTS=-v -traceback - -# C. No interface, with fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O2 -Vaxlib -static -fpe0 -no-ftz -check all -warn all -traceback -g \ - -debug extended -debug-parameters all -ftrapuv -#C_OPTS= -O2 -DLITTLE -static -traceback -g -debug extended -#LOADER_OPTS= -FR -O2 -Vaxlib -static -fpe0 -no-ftz -check all -warn all -traceback \ - -g -debug extended -debug-parameters all -ftrapuv -#C_LOADER_OPTS=-v -traceback -g - -# D. No interface, no fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O2 -Vaxlib -static -check all -traceback -#C_OPTS= -O2 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O2 -Vaxlib -static -check all -traceback -#C_LOADER_OPTS=-v -traceback - -# E. Fast... -#USE_INTERF=1 -#F_OPTS= -FR -O3 -Vaxlib -static -traceback -#C_OPTS= -O3 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O3 -Vaxlib -static -traceback -#C_LOADER_OPTS=-v -traceback -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich-1.2.7p1/intel_9.1.036_64 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.arch_linux b/ED/build/make/include.mk.arch_linux deleted file mode 100644 index 6fb7e969a..000000000 --- a/ED/build/make/include.mk.arch_linux +++ /dev/null @@ -1,94 +0,0 @@ -# Makefile include include.mk.opt - -# Define make (gnu make works best). -MAKE=/usr/bin/make - -# libraries. -BASE=$(ED_ROOT)/build/ - -# HDF 5 Libraries -# For 64-bit -HDF5_INCS= -HDF5_LIBS=-lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl -lz -USE_COLLECTIVE_MPIO=1 -------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - -# Compile flags ------------------------------------------------ -CMACH=PC_LINUX1 -FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -#F_COMP = gfortran -#C_COMP = gcc -#LOADER = gfortran - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # -# E. Running, most relaxed compilation flags, highest performance. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) - F_OPTS= -g -fopenmp -O0 -Wall -W -ffpe-trap=invalid,zero,overflow -Wconversion \ - -fbounds-check -fbacktrace -fdump-core - C_OPTS = -g -fopenmp -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check - LOADER_OPTS=${F_OPTS} -endif -ifeq ($(KIND_COMP),E) - F_OPTS= -fopenmp -g -Wall -W -ffpe-trap=invalid,zero,overflow -Wconversion -fbounds-check -fbacktrace -fdump-core - #F_OPTS= -V -FR -O2 -recursive -static -Vaxlib -check all -g -fpe0 -ftz -debug extended \ - # -debug inline_debug_info -debug-parameters all -traceback -ftrapuv - #F_OPTS= -03 - C_OPTS = -fopenmp -O3 -DLITTLE - #C_OPTS= -O2 -DLITTLE -g -static -traceback -debug extended - LOADER_OPTS=${F_OPTS} -endif - - - - -LIBS= -MOD_EXT=mod - -# MPI Flags ---------------------------------------------------- -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs - diff --git a/ED/build/make/include.mk.bnl b/ED/build/make/include.mk.bnl deleted file mode 100644 index 204546ad3..000000000 --- a/ED/build/make/include.mk.bnl +++ /dev/null @@ -1,58 +0,0 @@ -#Makefile include include.mk.opt.ubuntu -############################################################################ - -# Define make (gnu make works best). -MAKE=/usr/bin/make - -# libraries. -BASE=$(ED_ROOT)/build/ - -# HDF 5 Libraries -HDF5_HOME=/data/software/hdf5/1.8.19-gcc540 -HDF5_INCS=-I${HDF5_HOME}/include -HDF5_LIBS=-L${HDF5_HOME}/lib -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl -lz -USE_COLLECTIVE_MPIO=0 - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface -USE_INTERF=1 - -# MPI_Wtime -USE_MPIWTIME=1 - -# gfortran -CMACH=PC_LINUX1 -FC_TYPE=GNU -F_COMP=mpif90 -F_OPTS=-O3 -ffree-line-length-none -fno-whole-file -C_COMP=mpicc -C_OPTS=-O3 -LOADER=mpif90 -LOADER_OPTS=${F_OPTS} -C_LOADER=mpicc -LIBS= -MOD_EXT=mod - -# using MPI libraries: -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs diff --git a/ED/build/make/include.mk.bu_geo b/ED/build/make/include.mk.bu_geo deleted file mode 100644 index 26cc72970..000000000 --- a/ED/build/make/include.mk.bu_geo +++ /dev/null @@ -1,137 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -# HDF libraries ----------------------------------------------- -# HDF4 library: Instructions to install: www.cptec.inpe.br/brams -# If you run "configure" script, you don't need to edit line bellow -#HDF_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz -# -------------------------------------------------------------- - -# HDF 5 Libraries -HDF5_INCS=-I${SCC_HDF5_INCLUDE} -HDF5C_INCS=-I${SCC_HDF5_INCLUDE} -HDF5_LIBS=-L${SCC_HDF5_LIB} -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl -lz - -USE_COLLECTIVE_MPIO=1 - -#--------------------------------------------------------------- - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - - -# GFORTRAN DEVELOPERS: REMOVE ffree-line-length-0 -# CODE IS INTENDED TO BE LINE WIDTH COMPLIANT WITHIN 132 - - -#----------------- gfortran on Linux ----------- -CMACH=PC_GFORTRAN -FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # -# E. Running, most relaxed compilation flags, highest performance. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) - F_OPTS= -g -fopenmp -O0 -Wall -W -ffpe-trap=invalid,zero,overflow -Wconversion -fbounds-check -fbacktrace -fdump-core - C_OPTS = -g -fopenmp -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check - LOADER_OPTS=${F_OPTS} -endif -ifeq ($(KIND_COMP),E) - F_OPTS= -g -fopenmp -Wall -W -ffpe-trap=invalid,zero,overflow -Wconversion -fbounds-check -fbacktrace -fdump-core - C_OPTS=-g -O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 - LOADER_OPTS=${F_OPTS} -endif - -LIBS= -MOD_EXT=mod - -# Ancillary Compiler options -#USE_INTERF=1 -#F_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_OPTS= -O3 -DLITTLE -#LOADER_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_LOADER_OPTS=-v - - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.cannon b/ED/build/make/include.mk.cannon deleted file mode 100644 index f100fe8e4..000000000 --- a/ED/build/make/include.mk.cannon +++ /dev/null @@ -1,183 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.odyssey # -# # -# Compilation controls optimised for Odyssey cluster at Harvard. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -HDF5_PATH=$(HOME)/Util/Modules/hdf5/1.14.6_intel -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH= -LAPACK_INCS= -LAPACK_LIBS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=ODYSSEY -FC_TYPE=INTEL -F_COMP=ifx -C_COMP=icx -LOADER=ifx -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -warn declarations \ - -gen-interfaces -qopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -warn declarations \ - -gen-interfaces -qopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -warn interfaces \ - -warn declarations -warn errors -qopenmp -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -warn interfaces \ - -warn declarations -warn errors -qopenmp - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ - -assume byterecl -qopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ - -assume byterecl -qopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ - -ftrapuv -implicitnone -assume byterecl -qopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz \ - -traceback -ftrapuv -implicitnone -assume byterecl -qopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp -static - C_OPTS= -O3 -DLITTLE -traceback -qopenmp -static - F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -qopenmp -static - LOADER_OPTS=-FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#PAR_DEFS=-DRAMS_MPI -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.cornell b/ED/build/make/include.mk.cornell deleted file mode 100644 index 06ac81d1e..000000000 --- a/ED/build/make/include.mk.cornell +++ /dev/null @@ -1,137 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.odyssey # -# # -# Compilation controls optimised for Odyssey cluster at Harvard. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -USE_HDF5=1 - -#HDF5_PATH=/programs/hdf5-1.10.6/ -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS=-L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -lm -lz -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=0 - - -# GFORTRAN DEVELOPERS: REMOVE ffree-line-length-0 -# CODE IS INTENDED TO BE LINE WIDTH COMPLIANT WITHIN 132 - - -#################################### COMPILER SETTINGS ##################################### -CMACH=CBXU_GFORTRAN -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -FC_TYPE=GFORTRAN -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# -##################################### COMPILER OPTIONS ##################################### -##------------------------------------------------------------------------------------------# -## A/B/C/D. Debugging, strictest compilation flags, lowest performance. # -## E. Running, most relaxed compilation flags, highest performance. # -##------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif - -ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) - F_OPTS= -g -fopenmp -O0 -Wall -W -ffpe-trap=invalid,zero,overflow -Wconversion -fbounds-check -fbacktrace -fdump-core - C_OPTS = -g -fopenmp -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check - LOADER_OPTS=${F_OPTS} -endif - -ifeq ($(KIND_COMP),E) - # fastest runtime options - F_OPTS= -O3 -march=native -fopenmp -funroll-loops -fbacktrace - C_OPTS= -O2 -march=native -fopenmp -funroll-loops -fbacktrace #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 - LOADER_OPTS=${F_OPTS} -endif - -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -#PAR_DEFS= -PAR_DEFS=-DRAMS_MPI -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.dbg.sdumont b/ED/build/make/include.mk.dbg.sdumont deleted file mode 100644 index 88949d631..000000000 --- a/ED/build/make/include.mk.dbg.sdumont +++ /dev/null @@ -1,182 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.hpc # -# # -# Compilation controls optimised for SunHPC at LNCC. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/scratch/bramsolam/marcos.longo/Util/zlib-1.2.8/intel -HDF5_PATH=/scratch/bramsolam/marcos.longo/Util/hdf5-1.8.17/intel -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH= -LAPACK_INCS= -LAPACK_LIBS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=SUNHPC -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -gen-interfaces \ - -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -gen-interfaces - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all -fpe0 -no-ftz -traceback -ftrapuv \ - -fp-stack-check -implicitnone -assume byterecl -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -fpe0 -no-ftz -traceback -ftrapuv \ - -fp-stack-check -implicitnone -assume byterecl - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl -static - C_OPTS= -O3 -DLITTLE -traceback -static - F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -static - LOADER_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#PAR_DEFS=-DRAMS_MPI -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.dbg.sunhpc b/ED/build/make/include.mk.dbg.sunhpc deleted file mode 100644 index 41da2f52c..000000000 --- a/ED/build/make/include.mk.dbg.sunhpc +++ /dev/null @@ -1,184 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.hpc # -# # -# Compilation controls optimised for SunHPC at LNCC. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/prj/prjidfca/marcosl/Util/zlib-1.2.8/intel -HDF5_PATH=/prj/prjidfca/marcosl/Util/hdf5-1.8.17/intel -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS=-lm -L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH= -LAPACK_INCS= -LAPACK_LIBS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=SUNHPC -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -gen-interfaces -qopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -gen-interfaces -qopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -warn interfaces \ - -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all -fpe0 -no-ftz -traceback -ftrapuv \ - -fp-stack-check -implicitnone -assume byterecl -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -fpe0 -no-ftz -traceback -ftrapuv \ - -fp-stack-check -implicitnone -assume byterecl - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl -static - C_OPTS= -O3 -DLITTLE -traceback -static - F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -static - LOADER_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#PAR_DEFS=-DRAMS_MPI -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.dmm b/ED/build/make/include.mk.dmm deleted file mode 100644 index 7f0055606..000000000 --- a/ED/build/make/include.mk.dmm +++ /dev/null @@ -1,323 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -# HDF 5 Libraries -HDF5_INCS=-I/n/Moorcroft_Lab/Lab/apps/i91/lib -I/n/Moorcroft_Lab/Lab/apps/i91/include -HDF5_LIBS=-L/n/Moorcroft_Lab/Lab/apps/i91/lib -lhdf5 -lm -lhdf5_fortran \ - -lhdf5 -lhdf5_hl -L/n/Moorcroft_Lab/Users/mlongo/util/hdflib/hdf4_64/zlib/lib -lz - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=0 - -#----------------- SGI -n32 ------------------------------------ -#CMACH=SGI -#F_COMP=f90 -#F_OPTS=-n32 -mips4 -r10000 -O2 -freeform \ -# -OPT:IEEE_arithmetic=3:roundoff=3 -OPT:fold_arith_limit=3200 -#C_COMP=cc -#C_OPTS=-O -n32 -mips4 -DUNDERSCORE -#LOADER=f90 -#LOADER_OPTS=-n32 -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------- IBM ------------------------------------ -#CMACH=IBM -#F_COMP=f77 -#F_OPTS=-O -NA18000 -NQ30000 -qcharlen=10000 -k -#C_COMP=cc -#C_OPTS=-O -#C_PP_OPTS=-P -#LOADER=f77 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- IBM mpxl ------------------------------------ -#CMACH=IBM -#F_COMP=mpxlf90 -#F_OPTS=-O3 -qstrict -qtune=pwr3 -qarch=pwr3 -NA18000 -NQ30000 -qcharlen=10000 \ -# -qmaxmem=-1 -#C_COMP=mpcc -#C_OPTS=-w -O -#C_PP_OPTS=-P -#LOADER=mpxlf90 -#LOADER_OPTS=-bmaxdata:1024000000 -bmaxstack:1024000000 -lmassts -#LIBS= -#----------------------------------------------------------------- - -#----------------- Sun ------------------------------------------- -#CMACH=SUN -#F_COMP=f90 -#F_OPTS=-O4 -#C_COMP=cc -#C_OPTS= -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- HP/Exemplar ------------------------------------ -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +source=free +U77 +Olibcalls +Odataprefetch +Ofltacc -#C_COMP=cc -#C_OPTS=-O -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-Wl,-aarchive_shared -lm -lcnx_syscall /lib/libail.sl -lU77 -lc -#----------------------------------------------------------------- - -#----------------- HP/K460 --------------------------------------- -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +U77 +Olibcalls +Odataprefetch +Ofltacc +DA2.0 +DS2.0 -#C_COMP=/usr/bin/cc -#C_OPTS=-O -Aa +e -D_HPUX_SOURCE -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------------DEC/Compaq Alpha-------------------------- -#CMACH=ALPHA -#F_COMP=f90 -#F_OPTS=-O -fpe4 -NA18000 -NQ30000 -qcharlen=10000 -#C_COMP=cc -#C_OPTS=-DUNDERSCORE -DLITTLE -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=pgf90 -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio - -# -tp athlonxp -fastsse - -#C_COMP=gcc -#C_COMP=pgcc -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER=pgf90 -#LOADER_OPTS=-v -Wl,-static -#LIBS= -#----------------------------------------------------------------- - -#---------------- NEC-SX6 --------------- -#CMACH=NEC_SX -#F_COMP=sxmpif90 -#C_COMP=sxmpic++ -#LOADER=sxmpif90 -#C_LOADER=sxmpic++ -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-eC -C debug -Wf "-cont -init stack=nan heap=nan" -#F_OPTS=-ftrace -#F_OPTS=-C ssafe -#F_OPTS= -#C_OPTS=-f90lib -#C_OPTS=-f90lib -C ssafe -#C_OPTS=-f90lib -ftrace -#LOADER_OPTS=-eC -C debug -f90lib -Wf "-cont -init stack=nan heap=nan" -#LOADER_OPTS=-C debug -f90lib -#LOADER_OPTS=-ftrace -#LOADER_OPTS= -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -#CMACH=PC_LINUX1 -#F_COMP=/n/Moorcroft_Lab/Lab/apps/intel9.1/bin/ifort -#C_COMP=/n/Moorcroft_Lab/Lab/apps/intel9.1/bin/icc -#LOADER=/n/Moorcroft_Lab/Lab/apps/intel9.1/bin/ifort -#C_LOADER=/n/Moorcroft_Lab/Lab/apps/intel9.1/bin/icc -#LIBS= -#MOD_EXT=mod -CMACH=PC_LINUX1 -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -C_LOADER=icc -LIBS= -MOD_EXT=mod - -#----------------- gfortran on Linux x86_64 -------------------- -#CMACH=PC_LINUX1 -#F_COMP=mpif77 -#F_OPTS=-FR -O3 -#C_COMP=mpicc -#C_OPTS= -#CPP_OPTS= -#LOADER=$(F_COMP) -#LOADER_OPTS= -#C_LOADER=$(C_COMP) -#C_LOADER_OPTS= -#LIBS= -#MOD_EXT=mod -#PAR_DEFS=-DRAMS_MPI - -#Compiler options - -# A. Pickiest -#USE_INTERF=0 -#F_OPTS= -FR -O2 -Vaxlib -static -check all -warn all -g -fpe0 -ftz -gen-interfaces \ -# -warn interfaces -debug extended -debug-parameters all -traceback -ftrapuv -#C_OPTS= -O2 -DLITTLE -static -g -traceback -debug extended -#LOADER_OPTS= -FR -O2 -Vaxlib -static -warn all -check all -g -fpe0 -ftz -gen-interfaces \ -# -warn interfaces -debug extended -debug-parameters all -traceback -ftrapuv -#C_LOADER_OPTS=-v -g -traceback - -# B. Full interfacing, no fpe0 -#USE_INTERF=0 -#F_OPTS= -FR -O3 -Vaxlib -static -check all -warn all -gen-interfaces -traceback -#C_OPTS= -O3 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O3 -Vaxlib -static -warn all -check all -gen-interfaces -traceback -#C_LOADER_OPTS=-v -traceback - -# C. No interface, with fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O2 -Vaxlib -static -fpe0 -no-ftz -check all -warn all -traceback -g \ - -debug extended -debug-parameters all -ftrapuv -#C_OPTS= -O2 -DLITTLE -static -traceback -g -debug extended -#LOADER_OPTS= -FR -O2 -Vaxlib -static -fpe0 -no-ftz -check all -warn all -traceback \ - -g -debug extended -debug-parameters all -ftrapuv -#C_LOADER_OPTS=-v -traceback -g - -# D. No interface, no fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O2 -Vaxlib -static -check all -traceback -#C_OPTS= -O2 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O2 -Vaxlib -static -check all -traceback -#C_LOADER_OPTS=-v -traceback - -#F_OPTS= -g -free -prec-div -check all -inline-debug-info -traceback -debug extended -check uninit -ftrapuv -auto -fpe0 ## Full traceback debugging -#F_OPTS= -g -check all -inline-debug-info -traceback -debug extended ## Full traceback debugging -#LOADER_OPTS = $(F_OPTS) - -## E. Fast... -USE_INTERF=1 -F_OPTS=-O3 -fno-alias -prec-div -free## -FR -O3 -Vaxlib -static -traceback -recursive -C_OPTS= -O3 -DUNDERSCORE -DLITTLE# -static -traceback -LOADER_OPTS= -i-static $(F_OPTS)##-FR -O3 -Vaxlib -static -traceback -C_LOADER_OPTS=-v -traceback - - - - -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -MPI_PATH=/n/Moorcroft_Lab/Lab/apps -PAR_INCS=-I$(MPI_PATH)/include -PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.docker b/ED/build/make/include.mk.docker deleted file mode 100644 index 5d428e888..000000000 --- a/ED/build/make/include.mk.docker +++ /dev/null @@ -1,64 +0,0 @@ -#Makefile include include.mk.opt.ubuntu -############################################################################ - -# Define make (gnu make works best). -MAKE=/usr/bin/make - -# libraries. -BASE=$(ED_ROOT)/build/ - -# HDF 5 Libraries -USE_HDF5=1 -HDF5_INCS=-I/usr/include/hdf5/openmpi -HDF5_LIBS=-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -lz -lhdf5_fortran -lhdf5 -lhdf5_hl -#HDF5_INCS=-I/usr/include -#HDF5_LIBS=-lz -lhdf5_fortran -lhdf5 -lhdf5_hl -USE_COLLECTIVE_MPIO=0 - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface -USE_INTERF=1 - -# MPI_Wtime -USE_MPIWTIME=1 - -# gfortran -CMACH=PC_LINUX1 -FC_TYPE=GNU -# F_COMP=mpif90 -F_COMP=gfortran -F_OPTS=-O3 -ffree-line-length-none -fno-whole-file -# C_COMP=mpicc -C_COMP=gcc -C_OPTS=-O3 -# LOADER=mpif90 -LOADER=gfortran -LOADER_OPTS=${F_OPTS} -# C_LOADER=mpicc # C_LOADER is obsolete and can be removed -LIBS= -MOD_EXT=mod - -# using MPI libraries: -MPI_PATH= -PAR_INCS= -PAR_LIBS= -# PAR_DEFS=-DRAMS_MPI -PAR_DEFS= - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs diff --git a/ED/build/make/include.mk.docker.gnu b/ED/build/make/include.mk.docker.gnu index f7051965a..cfa0f55a8 100644 --- a/ED/build/make/include.mk.docker.gnu +++ b/ED/build/make/include.mk.docker.gnu @@ -1,44 +1,54 @@ #==========================================================================================# #==========================================================================================# -# Make file include.mk.docker.gnu # +# Makefile include.mk.docker.gnu # +# # +# Compilation controls for GNU-based Fortran/C for building the Docker container. # #------------------------------------------------------------------------------------------# + + #----- Define make (gnu make works best). -------------------------------------------------# MAKE=/usr/bin/make #------------------------------------------------------------------------------------------# -#----- Libraries. -------------------------------------------------------------------------# + + +#----- Main path for compilation. ---------------------------------------------------------# BASE=$(ED_ROOT)/build/ #------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# -# HDF5 libraries # +# HDF 5 libraries. # # # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # +# Since ED-2.1, this is no longer optional. You must provide HDF5 libraries, which # +# have been compiled with the same compiler defined in F_COMP and C_COMP (see below). # #------------------------------------------------------------------------------------------# HDF5_INCS=-I/usr/include/hdf5/openmpi HDF5_LIBS= -L/usr/lib/$(shell uname -m)-linux-gnu/hdf5/openmpi -lhdf5_fortran -lhdf5_hl -lhdf5 -lz -lm - #------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# # Linear Algebra Package (LAPACK) libraries. # # # # Lapack is a well-established package for solving linear systems in Fortran. This is # # more efficient than the former built-in solution, and thus it became the new default. # # # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # +# For those compiling the code with Intel compilers (ifx/icx, or ifort/icc in older # +# systems), leave these empty and compile the code with the Math Kernel Library option # +# instead (-mkl or -qmkl depending on the ifx/ifort version). Otherwise, provide the path # +# to Lapack installation. # #------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack +LAPACK_PATH=/usr LAPACK_INCS=-I$(LAPACK_PATH)/include LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas #------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# # If you have a version of hdf5 compiled in parallel, then you may benefit from # # collective I/O, then use this flag = 1. Otherwise, set it to zero. # @@ -46,28 +56,51 @@ LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas USE_COLLECTIVE_MPIO=0 #------------------------------------------------------------------------------------------# + + +#################################### MACHINE SETTINGS ###################################### #------------------------------------------------------------------------------------------# -# This should be 1 unless you are running with -gen-interfaces. Interfaces usually # -# make the compilation to crash when the -gen-interfaces option are on, so this flag # -# bypass all interfaces in the code. # +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # +# # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -USE_INTERF=1 +CMACH=LINUX #------------------------------------------------------------------------------------------# + #################################### COMPILER SETTINGS ##################################### -CMACH=DOCKER_GNU +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# INTEL -- ifx and icx (or ifort and icc in older systems) # +# PGI -- pgfortran and pgcc. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# FC_TYPE=GNU -#F_COMP=gfortran F_COMP=mpif90.openmpi -#C_COMP=gcc C_COMP=mpicc.openmpi -#LOADER=gfortran -LOADER=mpif90.openmpi -#C_LOADER=gcc -C_LOADER=mpicc.openmpi +LOADER=$(F_COMP) LIBS= MOD_EXT=mod -############################################################################################ +#------------------------------------------------------------------------------------------# @@ -75,27 +108,10 @@ MOD_EXT=mod ##################################### COMPILER OPTIONS ##################################### #------------------------------------------------------------------------------------------# -# A. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif +# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # +# E. Running, most relaxed compilation flags, highest performance. # #------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) +ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) F_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -static @@ -104,30 +120,42 @@ ifeq ($(KIND_COMP),A) -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) +else ifeq ($(KIND_COMP),E) F_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -static C_OPTS= -O0 -DLITTLE -g -static LOADER_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp #---------------------------------------------------------------------------------------# +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." endif #------------------------------------------------------------------------------------------# ############################################################################################ + + + #------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS. # +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (-lmpi_f90 or -lmpi_usempif08 may be needed too). # #------------------------------------------------------------------------------------------# MPI_PATH= PAR_INCS= PAR_LIBS= -PAR_DEFS= #------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# -# Archive options. # +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # #------------------------------------------------------------------------------------------# -#ARCHIVE=libtool -c -static -stack_size 0x1000000 -o ARCHIVE=ar rs #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.docker.intel b/ED/build/make/include.mk.docker.intel index ebfd603f0..5bd01a6a0 100644 --- a/ED/build/make/include.mk.docker.intel +++ b/ED/build/make/include.mk.docker.intel @@ -1,22 +1,29 @@ #==========================================================================================# #==========================================================================================# # Makefile include.mk.docker.intel # +# # +# Compilation controls for intel-based Fortran/C for building the Docker container. # #------------------------------------------------------------------------------------------# + + #----- Define make (gnu make works best). -------------------------------------------------# MAKE=/usr/bin/make #------------------------------------------------------------------------------------------# + + #----- Main path for compilation. ---------------------------------------------------------# BASE=$(ED_ROOT)/build/ #------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# # HDF 5 libraries. # # # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # +# Since ED-2.1, this is no longer optional. You must provide HDF5 libraries, which # +# have been compiled with the same compiler defined in F_COMP and C_COMP (see below). # #------------------------------------------------------------------------------------------# HDF5_PATH=/opt/HDF_Group/HDF5/1.10.9 HDF5_INCS=-I$(HDF5_PATH)/include/static @@ -25,21 +32,25 @@ HDF5_LIBS=-L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5_f90cstub -lhdf5_hl -lhdf5 \ #------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# # Linear Algebra Package (LAPACK) libraries. # # # # Lapack is a well-established package for solving linear systems in Fortran. This is # # more efficient than the former built-in solution, and thus it became the new default. # # # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # +# For those compiling the code with Intel compilers (ifx/icx, or ifort/icc in older # +# systems), leave these empty and compile the code with the Math Kernel Library option # +# instead (-mkl or -qmkl depending on the ifx/ifort version). Otherwise, provide the path # +# to Lapack installation. # #------------------------------------------------------------------------------------------# LAPACK_PATH= LAPACK_INCS= LAPACK_LIBS= #------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# # If you have a version of hdf5 compiled in parallel, then you may benefit from # # collective I/O, then use this flag = 1. Otherwise, set it to zero. # @@ -47,24 +58,54 @@ LAPACK_LIBS= USE_COLLECTIVE_MPIO=0 #------------------------------------------------------------------------------------------# + + +#################################### MACHINE SETTINGS ###################################### #------------------------------------------------------------------------------------------# -# This should be 1 unless you are running with -gen-interfaces. Interfaces usually # -# make the compilation to crash when the -gen-interfaces option are on, so this flag # -# bypass all interfaces in the code. # +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # +# # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -USE_INTERF=1 +CMACH=LINUX #------------------------------------------------------------------------------------------# + #################################### COMPILER SETTINGS ##################################### -CMACH=DOCKER_INTEL +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# INTEL -- ifx and icx (or ifort and icc in older systems) # +# PGI -- pgfortran and pgcc. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# FC_TYPE=INTEL F_COMP=ifort C_COMP=icc -LOADER=ifort +LOADER=$(F_COMP) LIBS= MOD_EXT=mod #------------------------------------------------------------------------------------------# + + ##################################### COMPILER OPTIONS ##################################### #------------------------------------------------------------------------------------------# # A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # @@ -91,12 +132,7 @@ MOD_EXT=mod # problems, which means that this is an option suitable for end users, not de- # # velopers. # #------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# ifeq ($(KIND_COMP),A) - USE_INTERF=0 F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ @@ -107,9 +143,7 @@ ifeq ($(KIND_COMP),A) -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ -warn declarations -gen-interfaces -qopenmp -diag-error=all -static #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 +else ifeq ($(KIND_COMP),B) F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ @@ -120,9 +154,7 @@ ifeq ($(KIND_COMP),B) -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ -warn interfaces -warn declarations -qopenmp -diag-error=all -static #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 +else ifeq ($(KIND_COMP),C) F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ -implicitnone -assume byterecl -qopenmp -diag-error=all -static @@ -131,9 +163,7 @@ ifeq ($(KIND_COMP),C) -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ -implicitnone -assume byterecl -qopenmp -diag-error=all -static #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 +else ifeq ($(KIND_COMP),D) F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp \ -diag-error=all -static @@ -142,32 +172,43 @@ ifeq ($(KIND_COMP),D) -traceback -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp \ -diag-error=all -static #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 +else ifeq ($(KIND_COMP),E) F_OPTS=-FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp -static C_OPTS=-O3 -DLITTLE -traceback -qmkl -qopenmp -static F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -qopenmp -static LOADER_OPTS=-FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp -static #---------------------------------------------------------------------------------------# +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." endif #------------------------------------------------------------------------------------------# ############################################################################################ + + + #------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (-lmpi_f90 or -lmpi_usempif08 may be needed too). # #------------------------------------------------------------------------------------------# MPI_PATH= PAR_INCS= PAR_LIBS= -PAR_DEFS= #------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# -# Archive options. # +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # #------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# ARCHIVE=ar rs #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.ebi b/ED/build/make/include.mk.ebi deleted file mode 100644 index 28541c138..000000000 --- a/ED/build/make/include.mk.ebi +++ /dev/null @@ -1,145 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ -LIBUTILS=$(BASE)/libutils-$(UTILS_VERSION)-opt.a - -# HDF 5 Libraries -USE_COLLECTIVE_MPIO=0 -HDF5_INCS=-I/home/mdietze/hdf5-1.8.1/hdf5/include -HDF5_LIBS=-L/home/mdietze/hdf5-1.8.1/hdf5/lib -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl \ - -lz - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=0 - - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=mpif90 -#C_COMP=mpicc -#LOADER=mpif90 -#C_LOADER=mpicc -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 -Mfree -#If using AMD Athlon -# -tp athlonxp -fastsse -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER_OPTS=-v -Wl,-static -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -#CMACH=PC_LINUX1 -#F_COMP=mpif90 -#C_COMP=mpicc -#LOADER=mpif90 -#C_LOADER=mpicc -#LIBS= -#MOD_EXT=mod -#Compiler options -#F_OPTS=-tpp6 -FR -O3 -Vaxlib -static -#C_OPTS=-tpp6 -O3 -DLITTLE -#LOADER_OPTS=-tpp6 -O3 -static -Vaxlib -#C_LOADER_OPTS=-v -#----------------------------------------------------------------- - -#----------------- LINUX G95 compiler g95/gcc ------------------ -CMACH=PC_LINUX1 -FC_TYPE=GNU -F_COMP=mpif90 -#F_COMP=/home/mdietze/bin/gcc-build/bin/gfortran \ -# -I/usr/include/openmpi/1.2.3-gcc/64 \ -# -I/usr/include/openmpi/1.2.3-gcc -m64 -pthread \ -# -I/usr/lib64/openmpi/1.2.3-gcc -L/usr/lib64/openmpi/1.2.3-gcc \ -# -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -ldl \ -# -Wl,--export-dynamic -lnsl -lutil -lm -ldl -C_COMP=mpicc -LOADER=mpif90 -#LOADER=$(FCOMP) -C_LOADER=mpicc -LIBS= -MOD_EXT=mod -#Compiler options -### debugging -#F_OPTS= -g -Wall -W -ffpe-trap=invalid,zero,overflow -Wconversion -fbounds-check #-fbacktrace -fdump-core -## FAST -F_OPTS= -O3 ##-static -fno-second-underscore -C_OPTS=-O3 -DLITTLE -LOADER_OPTS= -g -Wl,-rpath -Wl,/home/mdietze/hdf5-1.8.1/hdf5/lib -#LOADER_OPTS=-O3 -static -fno-second-underscore -C_LOADER_OPTS=-v -static -#MPI_PATH=/n/Moorcroft_Lab/Lab/apps/i91 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.gfortran b/ED/build/make/include.mk.gfortran deleted file mode 100644 index 9218cfdc4..000000000 --- a/ED/build/make/include.mk.gfortran +++ /dev/null @@ -1,183 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- - -# HDF libraries ----------------------------------------------- -# HDF4 library: Instructions to install: www.cptec.inpe.br/brams -# If you run "configure" script, you don't need to edit line bellow -#HDF_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz -# -------------------------------------------------------------- - -# HDF 5 Libraries -HDF5_HOME=/usr -HDF5_INCS=-I${HDF5_HOME}/include -HDF5C_INCS=-I${HDF5_HOME}/include -HDF5_LIBS=-lhdf5 -lhdf5_fortran -lhdf5_hl -lz - -USE_COLLECTIVE_MPIO=0 - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -#--------------------------------------------------------------- - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - - -# GFORTRAN DEVELOPERS: REMOVE ffree-line-length-0 -# CODE IS INTENDED TO BE LINE WIDTH COMPLIANT WITHIN 132 - - -#----------------- gfortran on Linux ----------- -CMACH=PC_GFORTRAN -FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # -# E. Running, most relaxed compilation flags, highest performance. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) - F_OPTS=-g -ffree-line-length-none -fno-whole-file -O0 -fopenmp -ffpe-trap=invalid,zero,overflow -fbounds-check #-std=f2003 - C_OPTS=-fopenmp -g -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check - LOADER_OPTS=${F_OPTS} -endif -ifeq ($(KIND_COMP),E) - F_OPTS=-g -ffree-line-length-none -fno-whole-file -O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 - C_OPTS=-g -O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 - LOADER_OPTS=${F_OPTS} -endif - - -LIBS= -MOD_EXT=mod - -# Ancillary Compiler options -#USE_INTERF=1 -#F_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_OPTS= -O3 -DLITTLE -#LOADER_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_LOADER_OPTS=-v - - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich-1.2.7p1/intel_9.1.036_64 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.gfortran2 b/ED/build/make/include.mk.gfortran2 deleted file mode 100644 index 48eaa5270..000000000 --- a/ED/build/make/include.mk.gfortran2 +++ /dev/null @@ -1,210 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- - -# HDF libraries ----------------------------------------------- -# HDF4 library: Instructions to install: www.cptec.inpe.br/brams -# If you run "configure" script, you don't need to edit line bellow -#HDF_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz -# -------------------------------------------------------------- - -# HDF 5 Libraries -#HDF5_INCS=-I/n/Moorcroft_Lab/Lab/apps/i91/lib -I/n/Moorcroft_Lab/Lab/apps/i91/include -#HDF5_LIBS=-L/n/Moorcroft_Lab/Lab/apps/i91/lib -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl \ -# -L/n/Moorcroft_Lab/Lab/mlongo/util/hdflib/hdf4_64/zlib/lib -lz - -#HDF5_INCS=-p /sw/hdf5-1.8.0-pabs/include -#HDF5C_INCS=-I/sw/hdf5-1.8.0-pabs/include -#HDF5_LIBS=-lz /sw/hdf5-1.8.0-pabs/lib/libhdf5_fortran.a \ -# /sw/hdf5-1.8.0-pabs/lib/libhdf5.a \ -# /sw/hdf5-1.8.0-pabs/lib/libhdf5_hl.a - -#HDF5_INCS=-I/sw/hdf5-1.6.6-gfortran/lib -#HDF5C_INCS=-I/sw/hdf5-1.6.6-gfortran/include -#HDF5_LIBS=-lz /sw/hdf5-1.6.6-gfortran/lib/libhdf5_fortran.a \ -# /sw/hdf5-1.6.6-gfortran/lib/libhdf5.a \ -# /sw/hdf5-1.6.6-gfortran/lib/libhdf5_hl.a - -HDF5_INCS=-I/usr/local/hdf5-1.8.2/include -HDF5C_INCS=-I/usr/local/hdf5-1.8.2/include -HDF5_LIBS=-lz /usr/local/hdf5-1.8.2/lib/libhdf5_fortran.a \ - /usr/local/hdf5-1.8.2/lib/libhdf5.a \ - /usr/local/hdf5-1.8.2/lib/libhdf5_hl.a - - -# tormenta.mit.edu - -HDF5_INCS=-I/opt/hdf5/1.8.1/ompi-tcp-gnu41/include -HDF5C_INCS=-I/opt/hdf5/1.8.1/ompi-tcp-gnu41/include -HDF5_LIBS=-lz -L/opt/hdf5/1.8.1/ompi-tcp-gnu41/lib \ - -lhdf5_fortran -lhdf5 -lhdf5_hl -#--------------------------------------------------------------- -# If you have a version of hdf5 compiled in parallel, then you -# may benefit from collective I/O, then use this flag = 1 -# Otherwise, set it to zero. - -USE_COLLECTIVE_MPIO=0 - -#--------------------------------------------------------------- - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - - -# GFORTRAN DEVELOPERS: REMOVE ffree-line-length-0 -# CODE IS INTENDED TO BE LINE WIDTH COMPLIANT WITHIN 132 - - -#----------------- gfortran on Linux (optimized build)----------- -CMACH=PC_LINUX1 -FC_TYPE=GNU -F_COMP=mpif90 -F_OPTS=-O3 -ffree-line-length-none -C_COMP=mpicc -C_OPTS=-O3 -LOADER=mpif90 -LOADER_OPTS=${F_OPTS} -C_LOADER=mpicc -LIBS= -MOD_EXT=mod - - -#----------------- gfortran on Linux (debugging build)----------- -#CMACH=PC_LINUX1 -#F_COMP=mpif90 -#F_OPTS=-g -ffpe-trap=invalid,zero,overflow -fbounds-check -ffree-line-length-0 -#C_COMP=mpicc -#C_OPTS=-g -ffpe-trap=invalid,zero,overflow -fbounds-check -ffree-line-length-0 -#LOADER=mpif90 -#LOADER_OPTS=${F_OPTS} -#C_LOADER=mpicc -#LIBS= -#MOD_EXT=mod - - -# Ancillary Compiler options -#USE_INTERF=1 -#F_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_OPTS= -O3 -DLITTLE -#LOADER_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_LOADER_OPTS=-v - - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich-1.2.7p1/intel_9.1.036_64 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.gnu b/ED/build/make/include.mk.gnu index 7c927e6ea..f58951d4c 100644 --- a/ED/build/make/include.mk.gnu +++ b/ED/build/make/include.mk.gnu @@ -1,280 +1,164 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). +#==========================================================================================# +#==========================================================================================# +# Makefile include.mk.gfortran # +# # +# Compilation controls for GNU-based Fortran/C. # +#------------------------------------------------------------------------------------------# + + +#----- Define make (gnu make works best). -------------------------------------------------# MAKE=/usr/bin/make +#------------------------------------------------------------------------------------------# -# libraries. -BASE=$(RAMS_ROOT)/build/ -LIBUTILS=$(BASE)/libutils-$(UTILS_VERSION)-opt.a -# Activate appropriate parts below, comment out others. +#----- Main path for compilation. ---------------------------------------------------------# +BASE=$(ED_ROOT)/build/ +#------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# -# HDF5 libraries # +# HDF 5 libraries. # # # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # +# Since ED-2.1, this is no longer optional. You must provide HDF5 libraries, which # +# have been compiled with the same compiler defined in F_COMP and C_COMP (see below). # #------------------------------------------------------------------------------------------# -ZLIB_PATH=/usr/local -HDF5_PATH=/usr/local +HDF5_PATH=/path/to/hdf5-compiled-with-gcc-gfortran HDF5_INCS=-I$(HDF5_PATH)/include -HDF5C_INCS=$(HDF5_INCS) -HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl +HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl #------------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# If you have a version of hdf5 compiled in parallel, then you may benefit from # +# collective I/O, then use this flag = 1. Otherwise, set it to zero. # +#------------------------------------------------------------------------------------------# +USE_COLLECTIVE_MPIO=0 +#------------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------------# # Linear Algebra Package (LAPACK) libraries. # # # # Lapack is a well-established package for solving linear systems in Fortran. This is # # more efficient than the former built-in solution, and thus it became the new default. # # # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # +# For those compiling the code with Intel compilers (ifort/icc or ifx/icx), leave # +# these empty and compile the code with the Math Kernel Library option instead (-mkl or # +# -qmkl depending on the ifort/icc version). Otherwise, provide the path to Lapack # +# installation. # #------------------------------------------------------------------------------------------# LAPACK_PATH=/usr/local/opt/lapack LAPACK_INCS=-I$(LAPACK_PATH)/include LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas #------------------------------------------------------------------------------------------# -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - - -#----------------- SGI -n32 ------------------------------------ -#CMACH=SGI -#F_COMP=f90 -#F_OPTS=-n32 -mips4 -r10000 -O2 -freeform \ -# -OPT:IEEE_arithmetic=3:roundoff=3 -OPT:fold_arith_limit=3200 -#C_COMP=cc -#C_OPTS=-O -n32 -mips4 -DUNDERSCORE -#LOADER=f90 -#LOADER_OPTS=-n32 -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------- IBM ------------------------------------ -#CMACH=IBM -#F_COMP=f77 -#F_OPTS=-O -NA18000 -NQ30000 -qcharlen=10000 -k -#C_COMP=cc -#C_OPTS=-O -#C_PP_OPTS=-P -#LOADER=f77 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- IBM mpxl ------------------------------------ -#CMACH=IBM -#F_COMP=mpxlf90 -#F_OPTS=-O3 -qstrict -qtune=pwr3 -qarch=pwr3 -NA18000 -NQ30000 -qcharlen=10000 \ -# -qmaxmem=-1 -#C_COMP=mpcc -#C_OPTS=-w -O -#C_PP_OPTS=-P -#LOADER=mpxlf90 -#LOADER_OPTS=-bmaxdata:1024000000 -bmaxstack:1024000000 -lmassts -#LIBS= -#----------------------------------------------------------------- - -#----------------- Sun ------------------------------------------- -#CMACH=SUN -#F_COMP=f90 -#F_OPTS=-O4 -#C_COMP=cc -#C_OPTS= -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- HP/Exemplar ------------------------------------ -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +source=free +U77 +Olibcalls +Odataprefetch +Ofltacc -#C_COMP=cc -#C_OPTS=-O -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-Wl,-aarchive_shared -lm -lcnx_syscall /lib/libail.sl -lU77 -lc -#----------------------------------------------------------------- - -#----------------- HP/K460 --------------------------------------- -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +U77 +Olibcalls +Odataprefetch +Ofltacc +DA2.0 +DS2.0 -#C_COMP=/usr/bin/cc -#C_OPTS=-O -Aa +e -D_HPUX_SOURCE -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------------DEC/Compaq Alpha-------------------------- -#CMACH=ALPHA -#F_COMP=f90 -#F_OPTS=-O -fpe4 -NA18000 -NQ30000 -qcharlen=10000 -#C_COMP=cc -#C_OPTS=-DUNDERSCORE -DLITTLE -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=mpif90 -#C_COMP=mpicc -#LOADER=mpif90 -#C_LOADER=mpicc -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 -Mfree -#If using AMD Athlon -# -tp athlonxp -fastsse -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER_OPTS=-v -Wl,-static -#----------------------------------------------------------------- - -#---------------- NEC-SX6 --------------- -#CMACH=NEC_SX -#F_COMP=sxmpif90 -#C_COMP=sxmpic++ -#LOADER=sxmpif90 -#C_LOADER=sxmpic++ -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-eC -C debug -Wf "-cont -init stack=nan heap=nan" -#F_OPTS=-ftrace -#F_OPTS=-C ssafe -#F_OPTS= -#C_OPTS=-f90lib -#C_OPTS=-f90lib -C ssafe -#C_OPTS=-f90lib -ftrace -#LOADER_OPTS=-eC -C debug -f90lib -Wf "-cont -init stack=nan heap=nan" -#LOADER_OPTS=-C debug -f90lib -#LOADER_OPTS=-ftrace -#LOADER_OPTS= -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -#CMACH=PC_LINUX1 -#F_COMP=mpif90 -#C_COMP=mpicc -#LOADER=mpif90 -#C_LOADER=mpicc -#LIBS= -#MOD_EXT=mod -#Compiler options -#F_OPTS=-tpp6 -FR -O3 -Vaxlib -static -#C_OPTS=-tpp6 -O3 -DLITTLE -#LOADER_OPTS=-tpp6 -O3 -static -Vaxlib -#C_LOADER_OPTS=-v -#----------------------------------------------------------------- - -#----------------- LINUX G95 compiler g95/gcc ------------------ -CMACH=PC_LINUX1 + + +#################################### MACHINE SETTINGS ###################################### +#------------------------------------------------------------------------------------------# +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # +# # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # +#------------------------------------------------------------------------------------------# +CMACH=LINUX +#------------------------------------------------------------------------------------------# + + + + + +#################################### COMPILER SETTINGS ##################################### +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# GFORTRAN -- same as GNU. # +# INTEL -- ifx and icx (or ifort and icc in older systems) # +# IFORT -- same as INTEL. # +# PGI -- pgf90 and pgcc. # +# PGF90 -- same as PGI. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -C_LOADER=mpicc +F_COMP=gfortran +C_COMP=gcc +LOADER=$(F_COMP) LIBS= MOD_EXT=mod -#Compiler options -F_OPTS=-O3 -static -fno-second-underscore -C_OPTS=-O3 -DLITTLE -LOADER_OPTS=-O3 -static -fno-second-underscore -C_LOADER_OPTS=-v -static -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/LINUX/ch_p4 -lmpich -#PAR_DEFS=-DRAMS_MPI -#MPI_PATH=/shared/tools/mpichp4-1.2.4 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' +#------------------------------------------------------------------------------------------# + + + + + +##################################### COMPILER OPTIONS ##################################### +#------------------------------------------------------------------------------------------# +# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # +# E. Running, most relaxed compilation flags, highest performance. # +#------------------------------------------------------------------------------------------# +ifeq ($(KIND_COMP),) + KIND_COMP=E +endif +ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) + F_OPTS=-g -ffree-line-length-none -fno-whole-file -O0 -fopenmp -ffpe-trap=invalid,zero,overflow -fbounds-check #-std=f2003 + C_OPTS=-fopenmp -g -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check + LOADER_OPTS=${F_OPTS} +else ifeq ($(KIND_COMP),E) + F_OPTS=-ffree-line-length-none -fno-whole-file -O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 + C_OPTS=-O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 + LOADER_OPTS=${F_OPTS} +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." +endif +#------------------------------------------------------------------------------------------# +############################################################################################ + + + +#------------------------------------------------------------------------------------------# +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (-lmpi_f90 or -lmpi_usempif08 may be needed too). # +#------------------------------------------------------------------------------------------# +MPI_PATH= +PAR_INCS= +PAR_LIBS= +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # +#------------------------------------------------------------------------------------------# +ARCHIVE=ar rs +#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.gnu-odyssey b/ED/build/make/include.mk.gnu-odyssey deleted file mode 100644 index 2fd570fb8..000000000 --- a/ED/build/make/include.mk.gnu-odyssey +++ /dev/null @@ -1,142 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Make file include.mk.opt.embrapa # -#------------------------------------------------------------------------------------------# - - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - -#----- Libraries. -------------------------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF5 libraries # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # -#------------------------------------------------------------------------------------------# -HDF5_PATH=/n/home00/mlongo/Util/Modules/hdf5/1.10.2_gnu -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/n/home00/mlongo/Util/Modules/lapack/3.12.0_gnu -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - - -#------------------------------------------------------------------------------------------# -# This should be 1 unless you are running with -gen-interfaces. Interfaces usually # -# make the compilation to crash when the -gen-interfaces option are on, so this flag # -# bypass all interfaces in the code. # -#------------------------------------------------------------------------------------------# -USE_INTERF=1 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=MAC_OS_X -FC_TYPE=GNU -F_COMP=gfortran -C_COMP=gcc -LOADER=gfortran -C_LOADER=gcc -LIBS= -MOD_EXT=mod -############################################################################################ - - - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - F_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ - -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ - -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -static - C_OPTS= -O0 -DLITTLE -g -static - LOADER_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ - -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ - -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - F_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -static - C_OPTS= -O0 -DLITTLE -g -static - LOADER_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options for Mac OS X. # -#------------------------------------------------------------------------------------------# -#ARCHIVE=libtool -c -static -stack_size 0x1000000 -o -ARCHIVE=ar rs -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.intel b/ED/build/make/include.mk.intel index a2c185086..f60eefcdf 100644 --- a/ED/build/make/include.mk.intel +++ b/ED/build/make/include.mk.intel @@ -1,10 +1,12 @@ #==========================================================================================# #==========================================================================================# -# Makefile include.mk.opt.odyssey # +# Makefile include.mk.intel # # # -# Compilation controls optimised for Odyssey cluster at Harvard. # +# Compilation controls for intel-based Fortran/C. # #------------------------------------------------------------------------------------------# + + #----- Define make (gnu make works best). -------------------------------------------------# MAKE=/usr/bin/make #------------------------------------------------------------------------------------------# @@ -16,33 +18,34 @@ BASE=$(ED_ROOT)/build/ #------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# # HDF 5 libraries. # # # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # +# Since ED-2.1, this is no longer optional. You must provide HDF5 libraries, which # +# have been compiled with the same compiler defined in F_COMP and C_COMP (see below). # #------------------------------------------------------------------------------------------# -#HDF5_PATH=/n/sw/fasrcsw/apps/MPI/intel/17.0.2-fasrc01/impi/2017.2.174-fasrc01/hdf5/1.10.1-fasrc01 -HDF5_PATH=/n/home00/mlongo/Util/Modules/hdf5/1.10.2_intel +HDF5_PATH=/path/to/hdf5-compiled-with-icx-ifx HDF5_INCS=-I$(HDF5_PATH)/include HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl #------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# # Linear Algebra Package (LAPACK) libraries. # # # # Lapack is a well-established package for solving linear systems in Fortran. This is # # more efficient than the former built-in solution, and thus it became the new default. # # # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # +# For those compiling the code with Intel compilers (ifx/icx, or ifort/icc in older # +# systems), leave these empty and compile the code with the Math Kernel Library option # +# instead (-mkl or -qmkl depending on the ifx/ifort version). Otherwise, provide the path # +# to Lapack installation. # #------------------------------------------------------------------------------------------# -LAPACK_PATH=/n/home00/mlongo/Util/Modules/lapack/3.12.0_intel -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas +LAPACK_PATH= +LAPACK_INCS= +LAPACK_LIBS= #------------------------------------------------------------------------------------------# @@ -56,12 +59,46 @@ USE_COLLECTIVE_MPIO=0 +#################################### MACHINE SETTINGS ###################################### +#------------------------------------------------------------------------------------------# +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # +# # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # +#------------------------------------------------------------------------------------------# +CMACH=LINUX +#------------------------------------------------------------------------------------------# + + #################################### COMPILER SETTINGS ##################################### -CMACH=ODYSSEY +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# INTEL -- ifx and icx (or ifort and icc in older systems) # +# PGI -- pgfortran and pgcc. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort +F_COMP=ifx +C_COMP=icx +LOADER=$(F_COMP) LIBS= MOD_EXT=mod #------------------------------------------------------------------------------------------# @@ -94,65 +131,52 @@ MOD_EXT=mod # problems, which means that this is an option suitable for end users, not de- # # velopers. # #------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn declarations -gen-interfaces -qopenmp -diag-error=all -static + F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ + -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ + -assume byterecl -warn unused -warn uncalled -warn usage -warn declarations \ + -gen-interfaces -qopenmp -diag-error=all -static C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn declarations -gen-interfaces -qopenmp -diag-error=all + LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ + -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ + -assume byterecl -warn unused -warn uncalled -warn usage -warn declarations \ + -gen-interfaces -qopenmp -diag-error=all #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces -warn declarations -qopenmp -diag-error=all -static +else ifeq ($(KIND_COMP),B) + F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ + -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ + -assume byterecl -warn unused -warn uncalled -warn usage -warn interfaces \ + -warn declarations -warn errors -qopenmp -static C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces -warn declarations -qopenmp -diag-error=all + LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ + -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ + -assume byterecl -warn unused -warn uncalled -warn usage -warn interfaces \ + -warn declarations -warn errors -qopenmp #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -qopenmp -diag-error=all -static +else ifeq ($(KIND_COMP),C) + F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ + -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ + -assume byterecl -qopenmp -diag-error=all -static C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -qopenmp -diag-error=all + LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug full \ + -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -implicitnone \ + -assume byterecl -qopenmp -diag-error=all #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ - -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp \ - -diag-error=all -static +else ifeq ($(KIND_COMP),D) + F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ + -ftrapuv -implicitnone -assume byterecl -qopenmp -diag-error=all -static C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ - -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp \ - -diag-error=all + LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz \ + -traceback -ftrapuv -implicitnone -assume byterecl -qopenmp -diag-error=all #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -traceback -assume byterecl -qopenmp -static +else ifeq ($(KIND_COMP),E) + F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp -static C_OPTS= -O3 -DLITTLE -traceback -qopenmp -static - F_LOWO_OPTS=-FR -O2 -recursive -traceback -assume byterecl -qopenmp -static - LOADER_OPTS=-FR -O3 -recursive -traceback -assume byterecl -qopenmp + F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -qopenmp -static + LOADER_OPTS=-FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp #---------------------------------------------------------------------------------------# +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." endif #------------------------------------------------------------------------------------------# ############################################################################################ @@ -161,26 +185,27 @@ endif #------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (-lmpi_f90 or -lmpi_usempif08 may be needed too). # #------------------------------------------------------------------------------------------# MPI_PATH= PAR_INCS= PAR_LIBS= -PAR_DEFS= -#PAR_DEFS=-DRAMS_MPI #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# -# Archive options. # +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # #------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.jpl b/ED/build/make/include.mk.jpl deleted file mode 100644 index f1dbdee29..000000000 --- a/ED/build/make/include.mk.jpl +++ /dev/null @@ -1,185 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.odyssey # -# # -# Compilation controls optimised for Odyssey cluster at Harvard. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/home/mlongo/Util/Modules/zlib/1.2.11_intel -HDF5_PATH=/home/mlongo/Util/Modules/hdf5/1.10.2_intel -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS= -lm -L$(ZLIB_PATH) -lz -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/home/mlongo/Util/Modules/lapack/3.12.0_intel -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=ODYSSEY -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn declarations -gen-interfaces -fopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -fopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn declarations -gen-interfaces -fopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces -warn declarations -fopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -fopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces -warn declarations -fopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -fopenmp -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -fopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -g -debug extended \ - -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -fopenmp -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ - -ftrapuv -fp-stack-check -implicitnone -assume byterecl -fopenmp \ - -diag-error=all -static - C_OPTS= -O0 -DLITTLE -g -traceback -fopenmp -static - LOADER_OPTS=-FR -O0 -recursive -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ - -ftrapuv -fp-stack-check -implicitnone -assume byterecl -fopenmp \ - -diag-error=all - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -traceback -assume byterecl -fopenmp -static - C_OPTS= -O3 -DLITTLE -traceback -fopenmp -static - F_LOWO_OPTS=-FR -O2 -recursive -traceback -assume byterecl -fopenmp -static - LOADER_OPTS=-FR -O3 -recursive -traceback -assume byterecl -fopenmp - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.macos b/ED/build/make/include.mk.macos new file mode 100644 index 000000000..9d0f940d1 --- /dev/null +++ b/ED/build/make/include.mk.macos @@ -0,0 +1,166 @@ +#==========================================================================================# +#==========================================================================================# +# Makefile include.mk.macos # +# # +# Compilation controls for MacOS using gfortran/gcc installed from Homebrew. # +# Make sure to install HomeBrew (see instructions on https://brew.sh) and install the # +# following packages: # +# - gcc # +# - hdf5 # +# - lapack # +# - open-mpi (not required, needed if planning on using OpenMPI). # +#------------------------------------------------------------------------------------------# + + + +#----- Define make (gnu make works best). -------------------------------------------------# +MAKE=$(HOMEBREW_PREFIX)/bin/gmake +#------------------------------------------------------------------------------------------# + + + +#----- Main path for compilation. ---------------------------------------------------------# +BASE=$(ED_ROOT)/build/ +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# HDF 5 libraries. # +# # +# Since ED-2.1, this is no longer optional. You must provide HDF5 libraries, which # +# have been compiled with the same compiler defined in F_COMP and C_COMP (see below). # +#------------------------------------------------------------------------------------------# +HDF5_PATH=$(HOMEBREW_PREFIX) +HDF5_INCS=-I$(HDF5_PATH)/include +HDF5_LIBS=-lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Linear Algebra Package (LAPACK) libraries. # +# # +# Lapack is a well-established package for solving linear systems in Fortran. This is # +# more efficient than the former built-in solution, and thus it became the new default. # +# # +# For those compiling the code with Intel compilers (ifx/icx, or ifort/icc in older # +# systems), leave these empty and compile the code with the Math Kernel Library option # +# instead (-mkl or -qmkl depending on the ifx/ifort version). Otherwise, provide the path # +# to Lapack installation. # +#------------------------------------------------------------------------------------------# +LAPACK_PATH=$(HOMEBREW_PREFIX)/opt/lapack +LAPACK_INCS=-I$(LAPACK_PATH)/include +LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# If you have a version of hdf5 compiled in parallel, then you may benefit from # +# collective I/O, then use this flag = 1. Otherwise, set it to zero. # +#------------------------------------------------------------------------------------------# +USE_COLLECTIVE_MPIO=0 +#------------------------------------------------------------------------------------------# + + + +#################################### MACHINE SETTINGS ###################################### +#------------------------------------------------------------------------------------------# +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # +# # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # +#------------------------------------------------------------------------------------------# +CMACH=MACOS +#------------------------------------------------------------------------------------------# + + +#################################### COMPILER SETTINGS ##################################### +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# INTEL -- ifort and icc. # +# PGI -- pgf90 and pgcc. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the ## default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# +FC_TYPE=GNU +F_COMP=$(HOMEBREW_PREFIX)/bin/gfortran-15 +C_COMP=$(HOMEBREW_PREFIX)/bin/gcc-15 +LOADER=$(F_COMP) +LIBS= +MOD_EXT=mod +#------------------------------------------------------------------------------------------# + + + + + +##################################### COMPILER OPTIONS ##################################### +#------------------------------------------------------------------------------------------# +# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # +# E. Running, most relaxed compilation flags, highest performance. # +#------------------------------------------------------------------------------------------# +ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) + F_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ + -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ + -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -fbacktrace -static + C_OPTS= -O0 -DLITTLE -g -fbacktrace -static + LOADER_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ + -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ + -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -fbacktrace + #---------------------------------------------------------------------------------------# +else ifeq ($(KIND_COMP),E) + F_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -fbacktrace -static + C_OPTS= -O3 -DLITTLE -g -fbacktrace -static + LOADER_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -fbacktrace + #---------------------------------------------------------------------------------------# +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." +endif +#------------------------------------------------------------------------------------------# +############################################################################################ + + + + +#------------------------------------------------------------------------------------------# +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (sometimes -lmpif90 is also needed). # +#------------------------------------------------------------------------------------------# +MPI_PATH= +PAR_INCS= +PAR_LIBS= +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # +#------------------------------------------------------------------------------------------# +ARCHIVE=ar rs +#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.macos_homebrew b/ED/build/make/include.mk.macos_homebrew deleted file mode 100644 index f58b45fce..000000000 --- a/ED/build/make/include.mk.macos_homebrew +++ /dev/null @@ -1,161 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# ED2 installation options for MacOS with additional libraries installed via Homebrew. -# Make sure you have the following libraries installed (`brew install `): -# - hdf5 -# - gfortran -#------------------------------------------------------------------------------------------# - - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - -#----- Libraries. -------------------------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF5 libraries # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # -#------------------------------------------------------------------------------------------# -BREW_PREFIX=/usr/local -HDF5_INCS=-I$(BREW_PREFIX)/include -HDF5C_INCS=$(HDF5_INCS) -HDF5_LIBS=-L$(BREW_PREFIX)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -lz -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF5 libraries # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/usr/local -HDF5_PATH=/usr/local -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5C_INCS=$(HDF5_INCS) -HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - - -#------------------------------------------------------------------------------------------# -# This should be 1 unless you are running with -gen-interfaces. Interfaces usually # -# make the compilation to crash when the -gen-interfaces option are on, so this flag # -# bypass all interfaces in the code. # -#------------------------------------------------------------------------------------------# -USE_INTERF=1 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=MAC_OS_X -FC_TYPE=GNU -F_COMP=gfortran -C_COMP=gcc -LOADER=gfortran -C_LOADER=gcc -LIBS= -MOD_EXT=mod -############################################################################################ - - - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - F_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ - -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ - -fcheck=all -fsignaling-nans -Werror -mmacosx-version-min=10.12 \ - -static - C_OPTS= -O0 -DLITTLE -g -static - LOADER_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ - -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ - -fcheck=all -fsignaling-nans -Werror -mmacosx-version-min=10.12 - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - F_OPTS= -O3 -ffree-line-length-none -mmacosx-version-min=10.12 -static - C_OPTS= -O0 -DLITTLE -g -static - LOADER_OPTS= -O3 -ffree-line-length-none -mmacosx-version-min=10.12 - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options for Mac OS X. # -#------------------------------------------------------------------------------------------# -ARCHIVE=ar rs -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.macosx b/ED/build/make/include.mk.macosx deleted file mode 100644 index 87d016cee..000000000 --- a/ED/build/make/include.mk.macosx +++ /dev/null @@ -1,142 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Make file include.mk.opt.embrapa # -#------------------------------------------------------------------------------------------# - - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=$(HOMEBREW_PREFIX)/bin/make -#------------------------------------------------------------------------------------------# - -#----- Libraries. -------------------------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF5 libraries # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=$(HOMEBREW_PREFIX) -HDF5_PATH=$(HOMEBREW_PREFIX) -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5C_INCS=$(HDF5_INCS) -HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=$(HOMEBREW_PREFIX)/opt/lapack -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# This should be 1 unless you are running with -gen-interfaces. Interfaces usually # -# make the compilation to crash when the -gen-interfaces option are on, so this flag # -# bypass all interfaces in the code. # -#------------------------------------------------------------------------------------------# -USE_INTERF=1 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=MAC_OS_X -FC_TYPE=GNU -F_COMP=$(HOMEBREW_PREFIX)/bin/gfortran-15 -C_COMP=$(HOMEBREW_PREFIX)/bin/gcc-15 -LOADER=$(HOMEBREW_PREFIX)/bin/gfortran-15 -LIBS= -MOD_EXT=mod -############################################################################################ - - - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - F_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ - -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ - -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -fbacktrace -static - C_OPTS= -O0 -DLITTLE -g -fbacktrace -static - LOADER_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ - -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ - -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -fbacktrace - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - F_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -fbacktrace -static - C_OPTS= -O3 -DLITTLE -g -fbacktrace -static - LOADER_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -fbacktrace - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options for Mac OS X. # -#------------------------------------------------------------------------------------------# -#ARCHIVE=libtool -c -static -stack_size 0x1000000 -o -ARCHIVE=ar rs -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.ncsa b/ED/build/make/include.mk.ncsa deleted file mode 100644 index d4cbab4d0..000000000 --- a/ED/build/make/include.mk.ncsa +++ /dev/null @@ -1,356 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- - -# HDF 5 Libraries -HDF5_INCS= -I/usr/apps/hdf/hdf5/v181/include -HDF5_LIBS= -L/usr/apps/hdf/hdf5/v181/lib -lhdf5 -lm -lhdf5_fortran -lhdf5 \ - -lhdf5_hl -L/usr/apps/hdf/zlib/v1.2.3/shared/lib \ - -lz -L/usr/apps/hdf/szip/v2.1/shared/encoder/lib -lsz -## -L. -lsz -#--------------------------------------------------------------- -# If you have a version of hdf5 compiled in parallel, then you -# may benefit from collective I/O, then use this flag = 1 -# Otherwise, set it to zero. - -USE_COLLECTIVE_MPIO=0 - -#--------------------------------------------------------------- - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/usr/local -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - -#----------------- SGI -n32 ------------------------------------ -#CMACH=SGI -#F_COMP=f90 -#F_OPTS=-n32 -mips4 -r10000 -O2 -freeform \ -# -OPT:IEEE_arithmetic=3:roundoff=3 -OPT:fold_arith_limit=3200 -#C_COMP=cc -#C_OPTS=-O -n32 -mips4 -DUNDERSCORE -#LOADER=f90 -#LOADER_OPTS=-n32 -#LIBS=-lm - -#----------------- IBM ------------------------------------ -#CMACH=IBM -#F_COMP=f77 -#F_OPTS=-O -NA18000 -NQ30000 -qcharlen=10000 -k -#C_COMP=cc -#C_OPTS=-O -#C_PP_OPTS=-P -#LOADER=f77 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- IBM mpxl ------------------------------------ -#CMACH=IBM -#F_COMP=mpxlf90 -#F_OPTS=-O3 -qstrict -qtune=pwr3 -qarch=pwr3 -NA18000 -NQ30000 -qcharlen=10000 \ -# -qmaxmem=-1 -#C_COMP=mpcc -#C_OPTS=-w -O -#C_PP_OPTS=-P -#LOADER=mpxlf90 -#LOADER_OPTS=-bmaxdata:1024000000 -bmaxstack:1024000000 -lmassts -#LIBS= -#----------------------------------------------------------------- - -#----------------- Sun ------------------------------------------- -#CMACH=SUN -#F_COMP=f90 -#F_OPTS=-O4 -#C_COMP=cc -#C_OPTS= -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- HP/Exemplar ------------------------------------ -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +source=free +U77 +Olibcalls +Odataprefetch +Ofltacc -#C_COMP=cc -#C_OPTS=-O -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-Wl,-aarchive_shared -lm -lcnx_syscall /lib/libail.sl -lU77 -lc -#----------------------------------------------------------------- - -#----------------- HP/K460 --------------------------------------- -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +U77 +Olibcalls +Odataprefetch +Ofltacc +DA2.0 +DS2.0 -#C_COMP=/usr/bin/cc -#C_OPTS=-O -Aa +e -D_HPUX_SOURCE -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------------DEC/Compaq Alpha-------------------------- -#CMACH=ALPHA -#F_COMP=f90 -#F_OPTS=-O -fpe4 -NA18000 -NQ30000 -qcharlen=10000 -#C_COMP=cc -#C_OPTS=-DUNDERSCORE -DLITTLE -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=pgf90 -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio - -# -tp athlonxp -fastsse - -#C_COMP=gcc -#C_COMP=pgcc -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER=pgf90 -#LOADER_OPTS=-v -Wl, -#LIBS= -#----------------------------------------------------------------- - -#---------------- NEC-SX6 --------------- -#CMACH=NEC_SX -#F_COMP=sxmpif90 -#C_COMP=sxmpic++ -#LOADER=sxmpif90 -#C_LOADER=sxmpic++ -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-eC -C debug -Wf "-cont -init stack=nan heap=nan" -#F_OPTS=-ftrace -#F_OPTS=-C ssafe -#F_OPTS= -#C_OPTS=-f90lib -#C_OPTS=-f90lib -C ssafe -#C_OPTS=-f90lib -ftrace -#LOADER_OPTS=-eC -C debug -f90lib -Wf "-cont -init stack=nan heap=nan" -#LOADER_OPTS=-C debug -f90lib -#LOADER_OPTS=-ftrace -#LOADER_OPTS= -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -CMACH=PC_LINUX1 -FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -C_LOADER=mpicc -LIBS= -MOD_EXT=mod - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./compile.sh) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./compile.sh) # -# If the compilation fails either at step 1 or 3, then your code has inter- # -# face problems. If it successfully compiles, then you can switch to B. # -# B. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# C. Fast debugging - This will check pretty much the same as B, but with higher optimiza- # -# tion. However, by setting -O2 you won't be able to see all variables on the debugger. # -# You should use this if your run seems to be working fine at the beginning, but it is # -# failing or giving instabilities, or funny results after a long time. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -KIND_COMP=E - -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -Vaxlib -check all -g -fpe0 -ftz -gen-interfaces \ - -warn interfaces -debug extended -debug inline_debug_info \ - -debug-parameters all -traceback -ftrapuv - C_OPTS= -O0 -DLITTLE -g -traceback -debug extended - LOADER_OPTS= -FR -O0 -Vaxlib -check all -g -fpe0 -ftz -gen-interfaces \ - -warn interfaces -debug extended -debug inline_debug_info \ - -debug-parameters all -traceback -ftrapuv - C_LOADER_OPTS=-v -g -traceback - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -Vaxlib -check all -g -fpe0 -ftz -debug extended \ - -debug inline_debug_info -debug-parameters all -traceback -ftrapuv - C_OPTS= -O0 -DLITTLE -g -traceback -debug extended - LOADER_OPTS= -FR -O0 -Vaxlib -check all -g -fpe0 -ftz -debug extended \ - -debug inline_debug_info -debug-parameters all -traceback -ftrapuv - C_LOADER_OPTS=-v -g -traceback - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O2 -recursive -Vaxlib -check all -g -fpe0 -ftz -debug extended \ - -debug inline_debug_info -debug-parameters all -traceback -ftrapuv - C_OPTS= -O2 -DLITTLE -g -traceback -debug extended - LOADER_OPTS= -FR -O2 -Vaxlib -check all -g -fpe0 -ftz -debug extended \ - -debug inline_debug_info -debug-parameters all -traceback -ftrapuv - C_LOADER_OPTS=-v -g -traceback - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O2 -recursive -Vaxlib -check all -fpe0 -ftz -traceback -ftrapuv - C_OPTS= -O2 -DLITTLE -traceback - LOADER_OPTS= -FR -O2 -Vaxlib -check all -fpe0 -ftz -traceback -ftrapuv - C_LOADER_OPTS=-v -traceback - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -Vaxlib -traceback -axP - C_OPTS= -O3 -DLITTLE -traceback - LOADER_OPTS= -FR -O3 -Vaxlib -traceback -axP - C_LOADER_OPTS=-v -traceback - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# - -############################################################################################ - -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/n/Moorcroft_Lab/Lab/apps/i91 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.nec b/ED/build/make/include.mk.nec deleted file mode 100644 index de77fdcb7..000000000 --- a/ED/build/make/include.mk.nec +++ /dev/null @@ -1,284 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(RAMS_ROOT)/build/ -LIBUTILS=$(BASE)/libutils-$(UTILS_VERSION)-opt.a - -# Activate appropriate parts below, comment out others. - -# NCAR Graphics. - -#--------------------------------------------------------------- -# If you are using a standard installation of NCAR Graphics, set: -# LOADER=ncargf90 -# in the machine-dependent sections below -#LIBNCARG= -#--------------------------------------------------------------- -# If you are using the NCAR dummy libraries... - -NCARG_DIR=$(BASE) -#LIBNCARG=-L$(NCARG_DIR) -lncarg-$(UTILS_VERSION) -lncarg_c-$(UTILS_VERSION) \ -# -lncarg_gks-$(UTILS_VERSION) -#LIBNCARG=-L$(NCARG_DIR) -lncarg-$(UTILS_VERSION) -LIBNCARG=$(BASE)/libncarg-$(UTILS_VERSION).a -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- - - -#------------------------------------------------------------------------------------------# -# HDF5 libraries # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have HDF5 # -# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still # -# be able to compile without HDF5 but it will not run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/usr/local -HDF5_PATH=/usr/local -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5C_INCS=$(HDF5_INCS) -HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# compile the code with the Math Kernel Library option instead (-mkl or -qmkl depending on # -# the ifort/icc version). Otherwise, provide the path to Lapack installation. # -#------------------------------------------------------------------------------------------# - - -# MPI_Wtime. -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=0 - - -#----------------- SGI -n32 ------------------------------------ -#CMACH=SGI -#F_COMP=f90 -#F_OPTS=-n32 -mips4 -r10000 -O2 -freeform \ -# -OPT:IEEE_arithmetic=3:roundoff=3 -OPT:fold_arith_limit=3200 -#C_COMP=cc -#C_OPTS=-O -n32 -mips4 -DUNDERSCORE -#LOADER=f90 -#LOADER_OPTS=-n32 -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------- IBM ------------------------------------ -#CMACH=IBM -#F_COMP=f77 -#F_OPTS=-O -NA18000 -NQ30000 -qcharlen=10000 -k -#C_COMP=cc -#C_OPTS=-O -#C_PP_OPTS=-P -#LOADER=f77 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- IBM mpxl ------------------------------------ -#CMACH=IBM -#F_COMP=mpxlf90 -#F_OPTS=-O3 -qstrict -qtune=pwr3 -qarch=pwr3 -NA18000 -NQ30000 -qcharlen=10000 \ -# -qmaxmem=-1 -#C_COMP=mpcc -#C_OPTS=-w -O -#C_PP_OPTS=-P -#LOADER=mpxlf90 -#LOADER_OPTS=-bmaxdata:1024000000 -bmaxstack:1024000000 -lmassts -#LIBS= -#----------------------------------------------------------------- - -#----------------- Sun ------------------------------------------- -#CMACH=SUN -#F_COMP=f90 -#F_OPTS=-O4 -#C_COMP=cc -#C_OPTS= -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- HP/Exemplar ------------------------------------ -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +source=free +U77 +Olibcalls +Odataprefetch +Ofltacc -#C_COMP=cc -#C_OPTS=-O -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-Wl,-aarchive_shared -lm -lcnx_syscall /lib/libail.sl -lU77 -lc -#----------------------------------------------------------------- - -#----------------- HP/K460 --------------------------------------- -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +U77 +Olibcalls +Odataprefetch +Ofltacc +DA2.0 +DS2.0 -#C_COMP=/usr/bin/cc -#C_OPTS=-O -Aa +e -D_HPUX_SOURCE -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------------DEC/Compaq Alpha-------------------------- -#CMACH=ALPHA -#F_COMP=f90 -#F_OPTS=-O -fpe4 -NA18000 -NQ30000 -qcharlen=10000 -#C_COMP=cc -#C_OPTS=-DUNDERSCORE -DLITTLE -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=pgf90 -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio - -# -tp athlonxp -fastsse - -#C_COMP=gcc -#C_COMP=pgcc -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER=pgf90 -#LOADER_OPTS=-v -Wl,-static -#LIBS= -#----------------------------------------------------------------- - -#---------------- NEC-SX6 --------------- -CMACH=NEC_SX -FC_TYPE=NEC -F_COMP=sxmpif90 -C_COMP=sxmpic++ -LOADER=sxmpif90 -C_LOADER=sxmpic++ -LIBS= -MOD_EXT=mod -#Compiler options: -#F_OPTS=-eC -C debug -Wf "-cont -init stack=nan heap=nan" -#F_OPTS=-ftrace -#F_OPTS=-C ssafe -F_OPTS= -C_OPTS=-f90lib -#C_OPTS=-f90lib -C ssafe -#C_OPTS=-f90lib -ftrace -#LOADER_OPTS=-eC -C debug -f90lib -Wf "-cont -init stack=nan heap=nan" -#LOADER_OPTS=-C debug -f90lib -#LOADER_OPTS=-ftrace -LOADER_OPTS= -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -#CMACH=PC_LINUX1 -#F_COMP=mpif90 -#C_COMP=mpicc -#LOADER=mpif90 -#C_LOADER=mpicc -#LIBS= -#MOD_EXT=mod -#Compiler options -#F_OPTS=-tpp6 -FR -O3 -Vaxlib -static -#C_OPTS=-tpp6 -O3 -DLITTLE -#LOADER_OPTS=-tpp6 -O3 -static -Vaxlib -#C_LOADER_OPTS=-v -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/LINUX/ch_p4 -lmpich -#PAR_DEFS=-DRAMS_MPI -#MPI_PATH=/shared/tools/mpichp4-1.2.4 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -#ARCHIVE=ar rs -# For NEC SX-6 -ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.pecan2 b/ED/build/make/include.mk.pecan2 deleted file mode 100644 index 9ea14c65d..000000000 --- a/ED/build/make/include.mk.pecan2 +++ /dev/null @@ -1,186 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- - -# HDF libraries ----------------------------------------------- -# HDF4 library: Instructions to install: www.cptec.inpe.br/brams -# If you run "configure" script, you don't need to edit line bellow -#HDF_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz -# -------------------------------------------------------------- - -# HDF 5 Libraries -HDF5_INCS=-I/fs/data2/rykelly/local/include -HDF5C_INCS=-I/fs/data2/rykelly/local/include -HDF5_LIBS=-L/fs/data2/rykelly/local/lib/ -lhdf5_fortran \ - -lhdf5 \ - -lhdf5_hl -lz - -USE_COLLECTIVE_MPIO=0 - -#--------------------------------------------------------------- - - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/fs/data2/rykelly/local -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -# MPI_Wtime. --------------------------------------------------- -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - - -# GFORTRAN DEVELOPERS: REMOVE ffree-line-length-0 -# CODE IS INTENDED TO BE LINE WIDTH COMPLIANT WITHIN 132 - - -#----------------- gfortran on Linux ----------- -CMACH=PC_GFORTRAN -FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # -# E. Running, most relaxed compilation flags, highest performance. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) - F_OPTS=-g -ffree-line-length-none -fno-whole-file -O0 -fopenmp -ffpe-trap=invalid,zero,overflow -fbounds-check #-std=f2003 - C_OPTS=-fopenmp -g -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check - LOADER_OPTS=${F_OPTS} -endif -ifeq ($(KIND_COMP),E) - F_OPTS=-g -ffree-line-length-none -fno-whole-file -O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 - C_OPTS=-g -O2 -fopenmp #-ffpe-trap=invalid,zero,overflow -fbounds-check #-O2 - LOADER_OPTS=${F_OPTS} -endif - -LIBS= -MOD_EXT=mod - -# Ancillary Compiler options -#USE_INTERF=1 -#F_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_OPTS= -O3 -DLITTLE -#LOADER_OPTS= -ffree-form -O3 -fconvert=little-endian -frecord-marker=4 -#C_LOADER_OPTS=-v - - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich-1.2.7p1/intel_9.1.036_64 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/build/make/include.mk.pgi b/ED/build/make/include.mk.pgi index 4c2a3e877..f92fa5820 100644 --- a/ED/build/make/include.mk.pgi +++ b/ED/build/make/include.mk.pgi @@ -1,141 +1,151 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). +#==========================================================================================# +#==========================================================================================# +# Makefile include.mk.pgi # +# # +# Compilation controls for Portland Group Fortran/C. # +#------------------------------------------------------------------------------------------# + + +#----- Define make (gnu make works best). -------------------------------------------------# MAKE=/usr/bin/make +#------------------------------------------------------------------------------------------# + -# libraries. +#----- Main path for compilation. ---------------------------------------------------------# BASE=$(ED_ROOT)/build/ +#------------------------------------------------------------------------------------------# -# Activate appropriate parts below, comment out others. -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- +#------------------------------------------------------------------------------------------# +# HDF 5 libraries. # +# # +# Since ED-2.1, this is no longer optional. You must provide HDF5 libraries, which # +# have been compiled with the same compiler defined in F_COMP and C_COMP (see below). # +#------------------------------------------------------------------------------------------# +HDF5_PATH=/path/to/hdf5-compiled-with-pgcc-pgf90 +HDF5_INCS=-I$(HDF5_PATH)/include +HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl +#------------------------------------------------------------------------------------------# -# HDF libraries ----------------------------------------------- -# HDF4 library: Instructions to install: www.cptec.inpe.br/brams -# If you run "configure" script, you don't need to edit line bellow -#HDF_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz -# -------------------------------------------------------------- -# HDF 5 Libraries -#HDF5_INCS=-I/opt/hdf5/1.8.1/ib-openpi-pgi72-nocxx/include -#HDF5C_INCS=-I/opt/hdf5/1.8.1/ib-openpi-pgi72-nocxx/include -#HDF5_LIBS=-lz -L/opt/hdf5/1.8.1/ib-openpi-pgi72-nocxx/lib \ -# -lhdf5_fortran -lhdf5 -lhdf5_hl +#------------------------------------------------------------------------------------------# +# Linear Algebra Package (LAPACK) libraries. # +# # +# Lapack is a well-established package for solving linear systems in Fortran. This is # +# more efficient than the former built-in solution, and thus it became the new default. # +# # +# For those compiling the code with Intel compilers (ifx/icx, or ifort/icc in older # +# systems), leave these empty and compile the code with the Math Kernel Library option # +# instead (-mkl or -qmkl depending on the ifx/ifort version). Otherwise, provide the path # +# to Lapack installation. # +#------------------------------------------------------------------------------------------# +LAPACK_PATH=/path/to/lapack-compiled-with-pgcc-pgf90 +LAPACK_INCS=-I$(LAPACK_PATH)/include +LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas +#------------------------------------------------------------------------------------------# -HDF5_INCS=-I/opt/hdf5/1.8.1/ompi-tcp-gnu41/include -HDF5C_INCS=-I/opt/hdf5/1.8.1/ompi-tcp-gnu41/include -HDF5_LIBS=-lz -L/opt/hdf5/1.8.1/ompi-tcp-gnu41/lib \ - -lhdf5_fortran -lhdf5 -lhdf5_hl -#--------------------------------------------------------------- -# If you have a version of hdf5 compiled in parallel, then you -# may benefit from collective I/O, then use this flag = 1 -# Otherwise, set it to zero. +#------------------------------------------------------------------------------------------# +# If you have a version of hdf5 compiled in parallel, then you may benefit from # +# collective I/O, then use this flag = 1. Otherwise, set it to zero. # +#------------------------------------------------------------------------------------------# USE_COLLECTIVE_MPIO=0 +#------------------------------------------------------------------------------------------# -#--------------------------------------------------------------- - +#################################### MACHINE SETTINGS ###################################### #------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # # # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # # # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -LAPACK_PATH=/opt/lapack/X.X.X/ompi-tcp-gnu41 -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas +CMACH=LINUX #------------------------------------------------------------------------------------------# -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - - -# MPI_Wtime. -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=1 - -#----------------- PGI Compiler on Linux x86_64 ---------------- -CMACH=PC_LINUX1 -FC_TYPE=GNU -F_COMP=mpif90 -F_OPTS=-O2 -#F_OPTS = -g -ffpe-trap=invalid,zero,underflow,overflow -fbounds-check -#F_OPTS= -Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio -# -tp athlonxp -fastsse -#F_OPTS= -fastsse -Mipa=fast,inline -tp amd64e -Mvect=sse \ -# -Mcache_align -Mconcur=nonuma -Msmartalloc -#F_OPTS= -g -Ktrap=divz,fp,inv,ovf,unf -Mbounds -C_COMP=mpicc -C_OPTS=-O2 -#C_OPTS= -g -Ktrap=divz,fp,inv,ovf,unf -Mbounds -#C_OPTS= -fastsse -Mipa=fast,inline -tp amd64e -Mvect=sse \ -# -Mcache_align -Msmartalloc -#C_OPTS= -g -ffpe-trap=invalid,zero,underflow,overflow -fbounds-check -USE_INTERF=1 -CPP_OPTS= + +#################################### COMPILER SETTINGS ##################################### +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# INTEL -- ifx and icx (or ifort and icc in older systems) # +# PGI -- pgfortran and pgcc. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# +FC_TYPE=PGI +F_COMP=pgfortran +C_COMP=pgcc LOADER=$(F_COMP) -LOADER_OPTS=$(F_OPTS) -C_LOADER=$(C_COMP) -C_LOADER_OPTS= LIBS= MOD_EXT=mod -PAR_DEFS=-DRAMS_MPI +#------------------------------------------------------------------------------------------# -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=pgf90 -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio -# -tp athlonxp -fastsse +##################################### COMPILER OPTIONS ##################################### +#------------------------------------------------------------------------------------------# +# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # +# E. Running, most relaxed compilation flags, highest performance. # +#------------------------------------------------------------------------------------------# +ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) + F_OPTS=-g -O0 -traceback -C -Mbounds -Mchkptr -Mchkstk -mp + C_OPTS=-g -O0 -traceback -C -Mbounds -Mchkptr -Mchkstk -mp + LOADER_OPTS=${F_OPTS} +else ifeq ($(KIND_COMP),E) + F_OPTS=-O3 -traceback + C_OPTS=-O3 -traceback + LOADER_OPTS=${F_OPTS} +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." +endif +#------------------------------------------------------------------------------------------# -#C_COMP=gcc -#C_COMP=pgcc -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER=pgf90 -#LOADER_OPTS=-v -Wl,-static -#LIBS= -#----------------------------------------------------------------- -ARCHIVE=ar rs +#------------------------------------------------------------------------------------------# +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (-lmpi_f90 or -lmpi_usempif08 may be needed too). # +#------------------------------------------------------------------------------------------# +MPI_PATH= +PAR_INCS= +PAR_LIBS= +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # +#------------------------------------------------------------------------------------------# +ARCHIVE=ar rs +#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.sdumont b/ED/build/make/include.mk.sdumont deleted file mode 100644 index 0142084ad..000000000 --- a/ED/build/make/include.mk.sdumont +++ /dev/null @@ -1,183 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.hpc # -# # -# Compilation controls optimised for SunHPC at LNCC. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/scratch/bramsolam/marcos.longo/Util/zlib-1.2.8/intel -HDF5_PATH=/scratch/bramsolam/marcos.longo/Util/hdf5-1.8.17/intel -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH= -LAPACK_INCS= -LAPACK_LIBS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=SUNHPC -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -gen-interfaces -qopenmp -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -gen-interfaces -qopenmp - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces -qopenmp -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces -qopenmp - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -qopenmp -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -qopenmp - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz -traceback \ - -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp -static - C_OPTS= -O0 -DLITTLE -g -traceback -qopenmp -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all,noarg_temp_created -fpe0 -no-ftz \ - -traceback -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp -static - C_OPTS= -O3 -DLITTLE -traceback -qopenmp -static - F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -qopenmp -static - LOADER_OPTS=-FR -O3 -recursive -qmkl -traceback -assume byterecl -qopenmp - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#PAR_DEFS=-DRAMS_MPI -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.sunhpc b/ED/build/make/include.mk.sunhpc deleted file mode 100644 index 7d6ce8280..000000000 --- a/ED/build/make/include.mk.sunhpc +++ /dev/null @@ -1,184 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.mk.opt.hpc # -# # -# Compilation controls optimised for SunHPC at LNCC. # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -ZLIB_PATH=/prj/prjidfca/marcosl/Util/zlib-1.2.8/intel -HDF5_PATH=/prj/prjidfca/marcosl/Util/hdf5-1.8.17/intel -HDF5_INCS=-I$(HDF5_PATH)/include -HDF5_LIBS=-lm -L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH= -LAPACK_INCS= -LAPACK_LIBS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=SUNHPC -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -gen-interfaces \ - -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -gen-interfaces - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -warn interfaces \ - -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ - -warn interfaces - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -g -debug extended \ - -debug-parameters used -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ - -implicitnone -assume byterecl - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O0 -recursive -qmkl -check all -fpe0 -no-ftz -traceback -ftrapuv \ - -fp-stack-check -implicitnone -assume byterecl -static - C_OPTS= -O0 -DLITTLE -g -traceback -static - LOADER_OPTS=-FR -O0 -recursive -qmkl -check all -fpe0 -no-ftz -traceback -ftrapuv \ - -fp-stack-check -implicitnone -assume byterecl - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl -static - C_OPTS= -O3 -DLITTLE -traceback -static - F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl -static - LOADER_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#PAR_DEFS=-DRAMS_MPI -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# -ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' -#------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.travisci b/ED/build/make/include.mk.travisci index a287660da..ff41f2082 100644 --- a/ED/build/make/include.mk.travisci +++ b/ED/build/make/include.mk.travisci @@ -1,8 +1,8 @@ #==========================================================================================# #==========================================================================================# -# Makefile include.mk.opt.hpc # +# Makefile include.mk.travisci # # # -# Compilation controls optimised for TravisCI. # +# Compilation controls optimised for Continuous Integration. # #------------------------------------------------------------------------------------------# #----- Define make (gnu make works best). -------------------------------------------------# @@ -35,9 +35,10 @@ HDF5_LIBS=-lz -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -lhdf5 -lhdf5_fortran -lh # Lapack is a well-established package for solving linear systems in Fortran. This is # # more efficient than the former built-in solution, and thus it became the new default. # # # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # +# For those compiling the code with Intel compilers (ifx/icx, or ifort/icc in older # +# systems), leave these empty and compile the code with the Math Kernel Library option # +# instead (-mkl or -qmkl depending on the ifx/ifort version). Otherwise, provide the path # +# to Lapack installation. # #------------------------------------------------------------------------------------------# LAPACK_PATH=/usr/local LAPACK_INCS=-I$(LAPACK_PATH)/include @@ -55,23 +56,46 @@ USE_COLLECTIVE_MPIO=0 - +#################################### MACHINE SETTINGS ###################################### #------------------------------------------------------------------------------------------# -# This should be 1 unless you are running with -gen-interfaces. Interfaces usually # -# make the compilation to crash when the -gen-interfaces option are on, so this flag # -# bypass all interfaces in the code. # +# CMACH. This tells the code which type of machine is being used. This is useful for # +# setting up a few system-dependent pre-compilation instructions. Current options include # +# the following: # +# # +# LINUX -- Linux or Unix systems. # +# MACOS -- MacOS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# # +# We currently do not support compilation in Windows. If you know how to set up ED2 to # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -USE_INTERF=1 +CMACH=LINUX #------------------------------------------------------------------------------------------# - #################################### COMPILER SETTINGS ##################################### -CMACH=TRAVISCI +#------------------------------------------------------------------------------------------# +# FC_TYPE -- Specify from which family of compilers the code should be built. Current # +# options include: # +# GNU -- gfortran and gcc. # +# INTEL -- ifx and icx (or ifort and icc in older systems) # +# PGI -- pgf90 and pgcc. # +# F_COMP -- Fortran compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpif90. # +# C_COMP -- C compiler. If empty, the code builder will automatically select the # +# default compiler names based on FC_TYPE. If you intend to compile ED2 with # +# openmpi, then set this to mpicc. # +# LOADER -- Fortran compiler to build the executable. By default, this is the same as # +# F_COMP. # +# LIBS -- Libraries that should be linked to the compilation. Most of the time, this # +# should be left empty. # +# MOD_EXT -- Suffix for external modules. This should be typically set to mod. # +#------------------------------------------------------------------------------------------# FC_TYPE=GNU F_COMP=gfortran C_COMP=gcc -LOADER=gfortran +LOADER=$(F_COMP) LIBS= MOD_EXT=mod #------------------------------------------------------------------------------------------# @@ -83,10 +107,6 @@ MOD_EXT=mod # A/B/C/D. Strict compilation. It turns on several checks and turn off optimisation. # # E. Performance compilation. It turns off most checks, allowing faster runs. # #------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) F_OPTS= -O0 -ffree-line-length-none -g -fimplicit-none -Wall -finit-real=snan \ -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ @@ -96,8 +116,7 @@ ifeq ($(KIND_COMP),$(filter $(KIND_COMP), A B C D)) -finit-integer=-2147483648 -ffpe-trap=invalid,zero,overflow,underflow \ -fcheck=all -frecursive -fsignaling-nans -Werror -fopenmp -fbacktrace #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) +else ifeq ($(KIND_COMP),E) F_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -fbacktrace -static C_OPTS= -O3 -DLITTLE -g -fbacktrace -static LOADER_OPTS= -O3 -ffree-line-length-none -frecursive -fopenmp -fbacktrace @@ -110,25 +129,27 @@ endif #------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # +# MPI configuration. Most users should leave all of the settings below empty. # +# The only exception is when users want to compile ED2 with OpenMPI/MPICH and, for # +# whichever reason, they cannot set F_COMP=mpif90 and C_COMP=mpicc. # +# # +# In case you truly need to set these variables, the commented-out example below shows # +# how to set these variables: # +# # +# MPI_PATH=/path/to/openmpi # +# PAR_INCS=-I$(MPI_PATH)/include # +# PAR_LIBS=-L$(MPI_PATH)/lib -lmpi (-lmpi_f90 or -lmpi_usempif08 may be needed too). # #------------------------------------------------------------------------------------------# MPI_PATH= PAR_INCS= PAR_LIBS= -PAR_DEFS= #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# -# Archive options. # +# Archive options. This is typically "ar rs", so do not change it unless you know your # +# system has a different standard. # #------------------------------------------------------------------------------------------# -#------ For IBM, HP, SGI, ALPHA, LINUX, and MAC_OS_X use these. ---------------------------# ARCHIVE=ar rs -#------ For NEC SX-6. ---------------------------------------------------------------------# -#ARCHIVE=sxar rs -#------ For SUN, CONVEX. ------------------------------------------------------------------# -#ARCHIVE=ar r' #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.ugent b/ED/build/make/include.mk.ugent deleted file mode 100644 index 348134163..000000000 --- a/ED/build/make/include.mk.ugent +++ /dev/null @@ -1,185 +0,0 @@ -#==========================================================================================# -#==========================================================================================# -# Makefile include.intel.mk # -# # -# Compilation controls optimised for Gent Univeristy Cluster # -#------------------------------------------------------------------------------------------# - -#----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/bin/make -#------------------------------------------------------------------------------------------# - - -#----- Main path for compilation. ---------------------------------------------------------# -BASE=$(ED_ROOT)/build/ -#------------------------------------------------------------------------------------------# - - -#------ Detect current system. -----------------------------------------------------------# -UNAME_S := $(shell uname -s) -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# HDF 5 libraries. # -# # -# Since ED-2.1, this is no longer optional for real simulations. You must have the # -# HDF5 libraries compiled with the same compiler you set for F_COMP and C_COMP. You may # -# still be able to compile without HDF5 but the code is not going to run. # -#------------------------------------------------------------------------------------------# -ifeq ($(UNAME_S),Linux) - HDF5_LIBS=-lz -lm -lhdf5 -lhdf5_fortran -lhdf5_hl -endif -ifeq ($(UNAME_S),Darwin) - HDF5_INCS=-I/usr/local/hdf5_mio/include - HDF5_LIBS=-lm -lz -L/usr/local/hdf5_mio/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -endif -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH= -LAPACK_INCS= -LAPACK_LIBS= -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=PC_INTEL -FC_TYPE=INTEL -F_COMP=ifort -C_COMP=icc -LOADER=ifort -LIBS= -MOD_EXT=mod -#------------------------------------------------------------------------------------------# - - - -##################################### COMPILER OPTIONS ##################################### -#------------------------------------------------------------------------------------------# -# A/B. Pickiest - Use this whenever you change arguments on functions and subroutines. # -# This will perform the same tests as B but it will also check whether all # -# arguments match between subroutine declaration and subroutine calls. # -# WARNING: In order to really check all interfaces you must compile with # -# this option twice: # -# 1. Compile (./install.sh A) # -# 2. Prepare second compilation(./2ndcomp.sh) # -# 3. Compile one more time (./install.sh B) # -# If the compilation fails either at step 3, then your code has interface # -# problems. If it successfully compiles, then the code is fine for # -# interfaces. # -# C. Pickiest with no interface - This will compile fast but the run will be slow due to # -# the -O0 option. However, by setting -O0 you will take full advantage of the intel # -# debugger. # -# Ideally, you should compile your code with this option whenever you make any changes. # -# Note, however, that if you change arguments you should first try A. # -# D. Fast check - This will check pretty much the same as C, but it will not set up # -# anything for the debugger. Use this only if you really don't want to deal with idb or # -# if you have a good idea of which problem you are dealing with. # -# E. Fast - This is all about performance, use only when you are sure that the model has # -# no code problem, and you want results asap. This will not check for any # -# problems, which means that this is an option suitable for end users, not de- # -# velopers. # -#------------------------------------------------------------------------------------------# -ifeq ($(KIND_COMP),) - KIND_COMP=E -endif -#------------------------------------------------------------------------------------------# -################################# DEBUG BUILD ######################################### -ifeq ($(KIND_COMP),A) - USE_INTERF=0 - F_OPTS= -FR -O0 -qmkl -check -g -debug extended -debug-parameters -traceback -ftrapuv \ - -u -fp-stack-check -assume byterecl -warn unused -warn uncalled -gen-interfaces - C_OPTS= -O0 -g -traceback - #---------------------------------------------------------------------------------------# -endif -############################ LEGACY DEBUG BUILD ######################################### -ifeq ($(KIND_COMP),B) - USE_INTERF=0 - F_OPTS= -FR -O0 -recursive -qmkl -check all -g -debug extended -debug-parameters used \ - -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check -implicitnone \ - -assume byterecl -warn unused -warn uncalled -warn usage -gen-interfaces - C_OPTS= -O0 -DLITTLE -g -traceback - #---------------------------------------------------------------------------------------# -endif -######################## DEBUG BUILD WITH INTEL PROFILING ############################### -ifeq ($(KIND_COMP),C) - USE_INTERF=0 - F_OPTS= -O0 -qmkl -check -g -prof-gen=srcpos -debug extended -debug-parameters \ - -traceback -u -ftrapuv -fp-stack-check -assume byterecl -gen-interfaces - C_OPTS= -O0 -g -traceback - #---------------------------------------------------------------------------------------# -endif -############################### LEGACY OPTIMIZED BUILD #################################### -ifeq ($(KIND_COMP),D) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -qmkl -traceback -assume byterecl - C_OPTS= -O3 -DLITTLE -traceback - F_LOWO_OPTS=-FR -O2 -recursive -qmkl -traceback -assume byterecl - #---------------------------------------------------------------------------------------# -endif -###################################### OPTIMIZED BUILD ################################## -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -O3 -xHost -qmkl -g -assume byterecl - C_OPTS= -O3 -xHost -g - F_LOWO_OPTS= -O2 -xHost -qmkl -g - #---------------------------------------------------------------------------------------# -endif -########################### OPTIMIZED BUILD WITH OpenMP ################################# -ifeq ($(KIND_COMP),F) - USE_INTERF=1 - F_OPTS= -O3 -xHost -qmkl -g -assume byterecl -qopenmp - C_OPTS= -O3 -xHost -qmkl -g -qopenmp - F_LOWO_OPTS= -O2 -xHost -qmkl -g -qopenmp - #---------------------------------------------------------------------------------------# -endif -#------------------------------------------------------------------------------------------# -############################################################################################ - - - -#------------------------------------------------------------------------------------------# -# If you have a version of hdf5 compiled in parallel, then you may benefit from # -# collective I/O, then use this flag = 1. Otherwise, set it to zero. # -#------------------------------------------------------------------------------------------# -USE_COLLECTIVE_MPIO=0 -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# If using mpicc and mpif90 as compilers (recommended), leave MPI_PATH, PAR_INCS, and # -# PAR_LIBS blank, otherwise provide the includes and libraries for mpi. Either way, don't # -# change PAR_DEFS unless you know what you are doing. # -#------------------------------------------------------------------------------------------# -MPI_PATH= -PAR_INCS= -PAR_LIBS= -PAR_DEFS= -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# Archive options. # -#------------------------------------------------------------------------------------------# -ifeq ($(UNAME_S),Linux) - ARCHIVE=ar rs -endif -ifeq ($(UNAME_S),Darwin) - ARCHIVE=libtool -c -static -o -endif -#------------------------------------------------------------------------------------------# - - diff --git a/ED/build/make/include.mk.xlf b/ED/build/make/include.mk.xlf deleted file mode 100644 index 67ea65d42..000000000 --- a/ED/build/make/include.mk.xlf +++ /dev/null @@ -1,382 +0,0 @@ -#Makefile include include.mk.opt -############################## Change Log ################################## -# 1.0.0.2 -# -# 000908 MJB include.mk-mrc ## -# Added MAKE environment varaible. -# Added free format option to F_OPTS for some platforms. ## -# 000907 MJB include.mk-mrc ## -# Changed the defualts to no NCAR Graphics and no parallel. -# Also commented out the machine specifics to force the user to -# select the appropriate machine for them. ## -# 000823 MJB include.mk-mrc ## -# New - defines all make environment varaibles and is included -# in all make files. ## -# -############################################################################ - -# Define make (gnu make works best). - -MAKE=/usr/bin/make - -# libraries. - -BASE=$(ED_ROOT)/build/ - -# Activate appropriate parts below, comment out others. - -#--------------------------------------------------------------- -# If you are using a real distribution of NCAR Graphics... -#NCARG_DIR=/usr/local/ncarg-4.3.0/lib -#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl -#--------------------------------------------------------------- - -# HDF libraries ----------------------------------------------- -# HDF4 library: Instructions to install: www.cptec.inpe.br/brams -# If you run "configure" script, you don't need to edit line bellow -#HDF_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz -# -------------------------------------------------------------- - -# HDF 5 Libraries -#HDF5_INCS=-I/n/Moorcroft_Lab/Lab/apps/i91/lib -I/n/Moorcroft_Lab/Lab/apps/i91/include -#HDF5_LIBS=-L/n/Moorcroft_Lab/Lab/apps/i91/lib -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl \ -# -L/n/Moorcroft_Lab/Lab/mlongo/util/hdflib/hdf4_64/zlib/lib -lz - -#HDF5_INCS=-I/sw/hdf5-1.6.6-gfortran/lib -#HDF5C_INCS=-I/sw/hdf5-1.6.6-gfortran/include -#HDF5_LIBS=-lz /sw/hdf5-1.6.6-gfortran/lib/libhdf5_fortran.a \ -# /sw/hdf5-1.6.6-gfortran/lib/libhdf5.a \ -# /sw/hdf5-1.6.6-gfortran/lib/libhdf5_hl.a - -#HDF5_INCS=-I/usr/local/hdf5-1.8.0/include -#HDF5C_INCS=-I/usr/local/hdf5-1.8.0/include -#HDF5_LIBS=-lz /usr/local/hdf5-1.8.0/lib/libhdf5_fortran.a \ -# /usr/local/hdf5-1.8.0/lib/libhdf5.a \ -# /usr/local/hdf5-1.8.0/lib/libhdf5_hl.a - -HDF5_INCS=-I/sw/hdf5-1.8.0-xlf/include -HDF5C_INCS=-I/sw/hdf5-1.8.0-xlf/include -HDF5_LIBS=-lz /sw/hdf5-1.8.0-xlf/lib/libhdf5_fortran.a \ - /sw/hdf5-1.8.0-xlf/lib/libhdf5.a \ - /sw/hdf5-1.8.0-xlf/lib/libhdf5_hl.a - - - -#------------------------------------------------------------------------------------------# -# Linear Algebra Package (LAPACK) libraries. # -# # -# Lapack is a well-established package for solving linear systems in Fortran. This is # -# more efficient than the former built-in solution, and thus it became the new default. # -# # -# For those compiling the code with Intel compilers (ifort/icc), leave these empty and # -# add -qmkl to F_OPTS and LOADER_OPTS instead. Otherwise, provide the path to Lapack # -# installation. # -#------------------------------------------------------------------------------------------# -LAPACK_PATH=/sw/lapack-X.X.X -LAPACK_INCS=-I$(LAPACK_PATH)/include -LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas -#------------------------------------------------------------------------------------------# - - -# MPI_Wtime. -# If USE_MPIWTIME=1, then it will use MPI libraries to compute -# the wall time (the only double-precision intrinsic). In case -# you don't have it, leave USE_MPIWTIME=0, in which case it will -# use a simpler, single-precision function. -USE_MPIWTIME=0 - -# interface ---------------------------------------------------- -# This should be 1 unless you are running with -gen-interfaces. -# Interfaces usually make the compilation to crash when the -# -gen-interfaces option are on, so this flag bypass all -# interfaces in the code. -USE_INTERF=1 - -#----------------- SGI -n32 ------------------------------------ -#CMACH=SGI -#F_COMP=f90 -#F_OPTS=-n32 -mips4 -r10000 -O2 -freeform \ -# -OPT:IEEE_arithmetic=3:roundoff=3 -OPT:fold_arith_limit=3200 -#C_COMP=cc -#C_OPTS=-O -n32 -mips4 -DUNDERSCORE -#LOADER=f90 -#LOADER_OPTS=-n32 -#LIBS=-lm -#----------------------------------------------------------------- -#CMACH=IBM -#F_COMP=mpif77 -#F_OPTS= -FR -O3 -I/sw/netcdf-3.6.2-gfortran/include \ -# -L/sw/netcdf-3.6.2-gfortran/lib -lnetcdf -#C_COMP=gcc -O0 -I/sw/openmpi-1.2.2-gfortran-static/include/openmpi \ -# -D_REENTRANT -I/sw/openmpi-1.2.2-gfortran-static/include \ -# -Wl,-u,_munmap -Wl,-multiply_defined,suppress \ -# -L/sw/openmpi-1.2.2-gfortran-static/lib \ -# -lmpi_cxx -lmpi -lopen-rte -lopen-pal -#C_OPTS= -g -DLITTLE -#C_PP_OPTS= -#LOADER= $(F_COMP) -#LOADER_OPTS= -#C_LOADER= $(C_COMP) -#C_LOADER_OPTS= -#LIBS= -#MOD_EXT=mod -#PAR_DEFS=-DRAMS_MPI - -#----------------- XLF on MacOS ----------------- -CMACH=IBM -FC_TYPE=XLF -F_COMP=xlf90_r -qmoddir=/tmp -I/tmp -F_OPTS= -qmaxmem=-1 -qsuffix=cpp=F90 -qarch=g5 \ - -qsuffix=f=f90 -I/sw/mpich2-xlf/include \ - -L/sw/mpich2-xlf/lib -lpmpich \ - -lmpich -qfree=f90 -qflag=s:e -qfloat=nomaf -C_COMP=gcc -C_OPTS= -O3 -USE_INTERF=1 -CPP_OPTS= -LOADER=$(F_COMP) -LOADER_OPTS= -qmaxmem=-1 -qsuffix=cpp=F90 -qsuffix=f=f90 \ - -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1 \ - -L/usr/lib -lSystemStubs \ - -L/sw/mpich2-xlf/lib -lpmpich \ - -lmpich -C_LOADER=$(C_COMP) -C_LOADER_OPTS= -LIBS= -MOD_EXT=mod -PAR_DEFS=-DRAMS_MPI - - -#----------------- IBM ------------------------------------ -#CMACH=IBM -#F_COMP=f77 -#F_OPTS=-O -NA18000 -NQ30000 -qcharlen=10000 -k -#C_COMP=cc -#C_OPTS=-O -#C_PP_OPTS=-P -#LOADER=f77 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- IBM mpxl ------------------------------------ -#CMACH=IBM -#F_COMP=mpxlf90 -#F_OPTS=-O3 -qstrict -qtune=pwr3 -qarch=pwr3 -NA18000 -NQ30000 -qcharlen=10000 \ -# -qmaxmem=-1 -#C_COMP=mpcc -#C_OPTS=-w -O -#C_PP_OPTS=-P -#LOADER=mpxlf90 -#LOADER_OPTS=-bmaxdata:1024000000 -bmaxstack:1024000000 -lmassts -#LIBS= -#----------------------------------------------------------------- - -#----------------- Sun ------------------------------------------- -#CMACH=SUN -#F_COMP=f90 -#F_OPTS=-O4 -#C_COMP=cc -#C_OPTS= -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- HP/Exemplar ------------------------------------ -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +source=free +U77 +Olibcalls +Odataprefetch +Ofltacc -#C_COMP=cc -#C_OPTS=-O -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-Wl,-aarchive_shared -lm -lcnx_syscall /lib/libail.sl -lU77 -lc -#----------------------------------------------------------------- - -#----------------- HP/K460 --------------------------------------- -#CMACH=HP -#F_COMP=f90 -#F_OPTS=+O2 +U77 +Olibcalls +Odataprefetch +Ofltacc +DA2.0 +DS2.0 -#C_COMP=/usr/bin/cc -#C_OPTS=-O -Aa +e -D_HPUX_SOURCE -#LOADER=f90 -#LOADER_OPTS= -#LIBS=-lm -#----------------------------------------------------------------- - -#----------------------DEC/Compaq Alpha-------------------------- -#CMACH=ALPHA -#F_COMP=f90 -#F_OPTS=-O -fpe4 -NA18000 -NQ30000 -qcharlen=10000 -#C_COMP=cc -#C_OPTS=-DUNDERSCORE -DLITTLE -#LOADER=f90 -#LOADER_OPTS= -#LIBS= -#----------------------------------------------------------------- - -#----------------- LINUX Portland Group pgf77/gcc --------------- -#CMACH=PC_LINUX1 -#F_COMP=pgf90 -#F_OPTS=-Mvect=cachesize:262144,sse -Munroll -Mnoframe -O2 -pc 64 \ -# -Mfree -# -Mbyteswapio - -# -tp athlonxp -fastsse - -#C_COMP=gcc -#C_COMP=pgcc -#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -#LOADER=pgf90 -#LOADER_OPTS=-v -Wl,-static -#LIBS= -#----------------------------------------------------------------- - -#---------------- NEC-SX6 --------------- -#CMACH=NEC_SX -#F_COMP=sxmpif90 -#C_COMP=sxmpic++ -#LOADER=sxmpif90 -#C_LOADER=sxmpic++ -#LIBS= -#MOD_EXT=mod -#Compiler options: -#F_OPTS=-eC -C debug -Wf "-cont -init stack=nan heap=nan" -#F_OPTS=-ftrace -#F_OPTS=-C ssafe -#F_OPTS= -#C_OPTS=-f90lib -#C_OPTS=-f90lib -C ssafe -#C_OPTS=-f90lib -ftrace -#LOADER_OPTS=-eC -C debug -f90lib -Wf "-cont -init stack=nan heap=nan" -#LOADER_OPTS=-C debug -f90lib -#LOADER_OPTS=-ftrace -#LOADER_OPTS= -#----------------------------------------------------------------- - -#----------------- LINUX INTEL FORTRAN-95 Compiler/GCC --------- -#CMACH=PC_LINUX1 -#F_COMP=ifort -#C_COMP=icc -#LOADER=ifort -#C_LOADER=icc -#LIBS= -#MOD_EXT=mod - -#----------------- gfortran on Linux x86_64 -------------------- -#CMACH=PC_LINUX1 -#F_COMP=mpif77 -#F_OPTS=-FR -O3 -#C_COMP=mpicc -#C_OPTS= -#CPP_OPTS= -#LOADER=$(F_COMP) -#LOADER_OPTS= -#C_LOADER=$(C_COMP) -#C_LOADER_OPTS= -#LIBS= -#MOD_EXT=mod -#PAR_DEFS=-DRAMS_MPI - -#Compiler options - -# A. Pickiest -#USE_INTERF=0 -#F_OPTS= -FR -O2 -Vaxlib -static -check all -warn all -g -fpe0 -ftz -gen-interfaces \ -# -warn interfaces -debug extended -debug-parameters all -traceback -ftrapuv -#C_OPTS= -O2 -DLITTLE -static -g -traceback -debug extended -#LOADER_OPTS= -FR -O2 -Vaxlib -static -warn all -check all -g -fpe0 -ftz -gen-interfaces \ -# -warn interfaces -debug extended -debug-parameters all -traceback -ftrapuv -#C_LOADER_OPTS=-v -g -traceback - -# B. Full interfacing, no fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O3 -Vaxlib -static -check all -warn all -gen-interfaces -traceback -#C_OPTS= -O3 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O3 -Vaxlib -static -warn all -check all -gen-interfaces -traceback -#C_LOADER_OPTS=-v -traceback - -# C. No interface, with fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O2 -Vaxlib -static -fpe0 -no-ftz -check all -warn all -traceback -g \ -# -debug extended -debug-parameters all -ftrapuv -#C_OPTS= -O2 -DLITTLE -static -traceback -g -debug extended -#LOADER_OPTS= -FR -O2 -Vaxlib -static -fpe0 -no-ftz -check all -warn all -traceback \ -# -g -debug extended -debug-parameters all -ftrapuv -#C_LOADER_OPTS=-v -traceback -g - -# D. No interface, no fpe0 -#USE_INTERF=1 -#F_OPTS= -FR -O2 -Vaxlib -static -check all -traceback -#C_OPTS= -O2 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O2 -Vaxlib -static -check all -traceback -#C_LOADER_OPTS=-v -traceback - -# E. Fast... -#USE_INTERF=1 -#F_OPTS= -FR -O3 -Vaxlib -static -traceback -#C_OPTS= -O3 -DLITTLE -static -traceback -#LOADER_OPTS= -FR -O3 -Vaxlib -static -traceback -#C_LOADER_OPTS=-v -traceback -#----------------------------------------------------------------- - -# If compiling for a single-CPU platform only (without MPI): - -#----------------------------------------------------------------- -#PAR_LIBS= -#PAR_DEFS= -#----------------------------------------------------------------- - -# Else if using MPI libraries: - -#---------------SGI----------------------------------------------- -#with mpich parallel stuff -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/IRIXN32/ch_shmem -lmpi -# or with SGI Parallel stuff -#PAR_LIBS=-L/usr/lib32 -lmpi -# need this for both -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------IBM----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/rs6000/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------Sun----------------------------------------------- -#MPI_PATH=/usr/local/mpich -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib/solaris/ch_p4 -lmpi -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------HP-Exemplar--------------------------------------- -#MPI_PATH=/opt/mpi -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=$(MPI_PATH)/lib/pa1.1/libmpi.a -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------LINUX Portland Group pgf77/gcc-------------------- -#MPI_PATH=/n/Moorcroft_Lab/Users/mlongo/util/mpich-1.2.7p1/intel_9.1.036_64 -#PAR_INCS=-I$(MPI_PATH)/include -#PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -#---------------If using scritps 'mpicc' e 'mpif90'---------------' -#PAR_DEFS=-DRAMS_MPI -#----------------------------------------------------------------- - -# For IBM,HP,SGI,ALPHA,LINUX use these: -ARCHIVE=ar rs -# For NEC SX-6 -#ARCHIVE=sxar rs -# For SUN,CONVEX -#ARCHIVE=ar r' - diff --git a/ED/src/include/utils_sub_names.h b/ED/src/include/utils_sub_names.h index f770a9078..3f32afc0b 100644 --- a/ED/src/include/utils_sub_names.h +++ b/ED/src/include/utils_sub_names.h @@ -7,7 +7,7 @@ !########################################################################### */ -#if defined(SUN) || defined(ALPHA) || defined(IBM) || defined (PC_LINUX1) || defined(CRAY) +#if defined(LINUX) #define fegetenv fegetenv_ #define form_tmpname form_tmpname_ @@ -55,9 +55,7 @@ #define par_pause par_pause_ #define par_ready par_ready_ -#endif - -#if defined(CRAY2) +#elif defined(WINDOWS) #define fegetenv FEGETENV #define form_tmpname FORM_TMPNAME @@ -73,39 +71,41 @@ #define rams_c_write RAMS_C_WRITE #define vfirecr VFIRECR #define vforecr VFORECR -#define readdted1 READDTED1_ -#define rams_master RAMS_MASTER_ -#define rams_node RAMS_NODE_ -#define walltime WALLTIME_ -#define par_init_fortran PAR_INIT_FORTRAN_ -#define par_init_put PAR_INIT_PUT_ -#define par_send PAR_SEND_ -#define par_put_int PAR_PUT_INT_ -#define par_put_float PAR_PUT_FLOAT_ -#define par_put_char PAR_PUT_CHAR_ - -#define par_send_noblock PAR_SEND_NOBLOCK_ - -#define par_send_noblock_c2f PAR_SEND_NOBLOCK_C2F_ - -#define par_get_noblock PAR_GET_NOBLOCK_ - -#define par_get_noblock_c2f PAR_GET_NOBLOCK_C2F_ - -#define par_assoc_buff PAR_ASSOC_BUFF_ - -#define par_wait PAR_WAIT_ - -#define par_wait_c2f PAR_WAIT_C2F_ - -#define par_get_new PAR_GET_NEW_ -#define par_get_int PAR_GET_INT_ -#define par_get_float PAR_GET_FLOAT_ -#define par_get_char PAR_GET_CHAR_ -#define par_init PAR_INIT_ -#define par_enroll PAR_ENROLL_ -#define par_exit PAR_EXIT_ -#define par_pause PAR_PAUSE_ -#define par_ready PAR_READY_ +#define readdted1 READDTED1 +#define rams_master RAMS_MASTER +#define rams_node RAMS_NODE +#define walltime WALLTIME +#define par_init_fortran PAR_INIT_FORTRAN +#define par_init_put PAR_INIT_PUT +#define par_send PAR_SEND +#define par_put_int PAR_PUT_INT +#define par_put_float PAR_PUT_FLOAT +#define par_put_char PAR_PUT_CHAR +#define par_send_noblock PAR_SEND_NOBLOCK +#define par_get_noblock PAR_GET_NOBLOCK +#define par_assoc_buff PAR_ASSOC_BUFF +#define par_wait PAR_WAIT +#define par_get_new PAR_GET_NEW +#define par_get_int PAR_GET_INT +#define par_get_float PAR_GET_FLOAT +#define par_get_char PAR_GET_CHAR +#define par_init PAR_INIT +#define par_enroll PAR_ENROLL +#define par_exit PAR_EXIT +#define par_pause PAR_PAUSE +#define par_ready PAR_READY +#define fh5f_open_ FH5F_OPEN +#define fh5f_create_ FH5F_CREATE +#define fh5f_close_ FH5F_CLOSE +#define fh5d_open_ FH5D_OPEN +#define fh5d_close_ FH5D_CLOSE +#define fh5s_get_ndims_ FH5S_GET_NDIMS +#define fh5s_get_dims_ FH5S_GET_DIMS +#define fh5_prepare_read_ FH5_PREPARE_READ +#define fh5d_read_ FH5D_READ +#define fh5_close_read_ FH5_CLOSE_READ +#define fh5_prepare_write_ FH5_PREPARE_WRITE +#define fh5_write_ FH5_WRITE +#define fh5_close_write_ FH5_CLOSE_WRITE #endif diff --git a/ED/src/memory/ed_max_dims.F90 b/ED/src/memory/ed_max_dims.F90 index 9e581ab26..7aa48b705 100644 --- a/ED/src/memory/ed_max_dims.F90 +++ b/ED/src/memory/ed_max_dims.F90 @@ -48,7 +48,7 @@ module ed_max_dims integer, parameter :: maxdimp = brams_maxdimp integer, parameter :: nxyzpm = brams_nxyzpm integer, parameter :: maxmach = brams_maxmach -#elif defined(MAC_OS_X) +#elif defined(MACOS) ! Restrict maximum size to avoid stack memory issues integer, parameter :: maxgrds = 3 integer, parameter :: nxpmax = 50 @@ -252,7 +252,7 @@ module ed_max_dims !---------------------------------------------------------------------------------------! integer, parameter :: huge_polygon = nxpmax * nypmax integer, parameter :: huge_site = ed_nstyp -#if defined(MAC_OS_X) +#if defined(MACOS) integer, parameter :: huge_patch = 200 integer, parameter :: huge_cohort = 20000 integer, parameter :: max_water = 5 @@ -266,7 +266,7 @@ module ed_max_dims !----- Maximum number of land use polygons that can be read by filelist. ---------------! -#if defined(MAC_OS_X) +#if defined(MACOS) integer, parameter :: huge_lu = 999 #else integer, parameter :: huge_lu = 99999 @@ -284,7 +284,7 @@ module ed_max_dims !----- Maximum number of files that can be read by filelist. ---------------------------! #if defined(COUPLED) integer, parameter :: maxfiles = brams_maxfiles -#elif defined(MAC_OS_X) +#elif defined(MACOS) integer, parameter :: maxfiles = 999 #else integer, parameter :: maxfiles = 99999 @@ -293,7 +293,7 @@ module ed_max_dims !----- Maximum observation times that can be stored by the obs_timelist ----------------! -#if defined(MAC_OS_X) +#if defined(MACOS) integer, parameter :: max_obstime = 999 #else integer, parameter :: max_obstime = 99999 diff --git a/ED/src/preproc/ascii2hdf/utils_sub_names.h b/ED/src/preproc/ascii2hdf/utils_sub_names.h index fc409f043..21f7fef9c 100644 --- a/ED/src/preproc/ascii2hdf/utils_sub_names.h +++ b/ED/src/preproc/ascii2hdf/utils_sub_names.h @@ -36,7 +36,7 @@ ! the software authors, Robert L. Walko (robert.walko@duke.edu) ! or Roni Avissar (avissar@duke.edu). !===============================================================================*/ -#if defined(SUN) || defined(ALPHA) || defined(SGI) || defined (PC_LINUX1) || defined(NEC_SX) +#if defined(LINUX) #define fegetenv fegetenv_ #define form_tmpname form_tmpname_ @@ -89,64 +89,7 @@ #define fh5_write fh5_write_ #define fh5_close_write fh5_close_write_ -#endif - -#if defined(CRAY) - -#define fegetenv FEGETENV -#define form_tmpname FORM_TMPNAME -#define irsleep IRSLEEP -#define iralloc IRALLOC -#define irfree IRFREE -#define rams_c_open RAMS_C_OPEN -#define rams_c_close RAMS_C_CLOSE -#define rams_c_pos RAMS_C_POS -#define rams_c_tell RAMS_C_TELL -#define rams_c_read RAMS_C_READ -#define rams_c_read_char RAMS_C_READ_CHAR -#define rams_c_write RAMS_C_WRITE -#define vfirecr VFIRECR -#define vforecr VFORECR -#define readdted1 READDTED1 -#define rams_master RAMS_MASTER -#define rams_node RAMS_NODE -#define walltime WALLTIME -#define par_init_fortran PAR_INIT_FORTRAN -#define par_init_put PAR_INIT_PUT -#define par_send PAR_SEND -#define par_put_int PAR_PUT_INT -#define par_put_float PAR_PUT_FLOAT -#define par_put_char PAR_PUT_CHAR -#define par_send_noblock PAR_SEND_NOBLOCK -#define par_get_noblock PAR_GET_NOBLOCK -#define par_assoc_buff PAR_ASSOC_BUFF -#define par_wait PAR_WAIT -#define par_get_new PAR_GET_NEW -#define par_get_int PAR_GET_INT -#define par_get_float PAR_GET_FLOAT -#define par_get_char PAR_GET_CHAR -#define par_init PAR_INIT -#define par_enroll PAR_ENROLL -#define par_exit PAR_EXIT -#define par_pause PAR_PAUSE -#define par_ready PAR_READY -#define fh5f_open FH5F_OPEN -#define fh5f_create FH5F_CREATE -#define fh5f_close FH5F_CLOSE -#define fh5d_open FH5D_OPEN -#define fh5d_close FH5D_CLOSE -#define fh5s_get_ndims FH5S_GET_NDIMS -#define fh5s_get_dims FH5S_GET_DIMS -#define fh5_prepare_read FH5_PREPARE_READ -#define fh5d_read FH5D_READ -#define fh5_close_read FH5_CLOSE_READ -#define fh5_prepare_write FH5_PREPARE_WRITE -#define fh5_write FH5_WRITE -#define fh5_close_write FH5_CLOSE_WRITE - -#endif - -#if defined(PC_NT1) +#elif defined(WINDOWS) #define fegetenv FEGETENV #define form_tmpname FORM_TMPNAME diff --git a/ED/src/utils/ed_filelist.F90 b/ED/src/utils/ed_filelist.F90 index e4f81745a..dd8a20fb1 100644 --- a/ED/src/utils/ed_filelist.F90 +++ b/ED/src/utils/ed_filelist.F90 @@ -66,9 +66,11 @@ subroutine ed_filelist(fnames,file_prefix,nfile) !----- Use preprocessor tool. Windows require different way to list... --------------------! -#if defined (PC_NT1) +#if defined(WINDOWS) !---------------------------------------------------------------------------------------! ! First change all "/" to "\" so same namelist can be used for Unix/Linux/Windows ! + ! Note that ED2 currently does not support Windows machines, but this is kept just in ! + ! case someone is ever interested in trying to make the code run in Windows. ! !---------------------------------------------------------------------------------------! do nc=1,iprelen if(file_prefix(nc:nc) == '/') file_prefix(nc:nc)='\' diff --git a/ED/src/utils/random_utils.F90 b/ED/src/utils/random_utils.F90 index 13aaf4089..ccc5bd58a 100644 --- a/ED/src/utils/random_utils.F90 +++ b/ED/src/utils/random_utils.F90 @@ -31,7 +31,7 @@ subroutine init_random_seed() ! case you create a new name, please be creative so it doesn't conflict with other ! ! user's choice. ! !------------------------------------------------------------------------------------! -#if defined(ODYSSEY) || defined(SUNHPC) || defined(PC_INTEL) || defined(DOCKER_INTEL) +#if defined(INTEL) use ifport, only : getpid #endif !------------------------------------------------------------------------------------! diff --git a/ED/src/utils/rsys.F90 b/ED/src/utils/rsys.F90 index ff3b45567..1e0a06ebc 100644 --- a/ED/src/utils/rsys.F90 +++ b/ED/src/utils/rsys.F90 @@ -28,11 +28,7 @@ subroutine ugetarg(i,arg) character(len=*) :: arg -#if defined(HP) - call getarg(i+1,arg) -#else call getarg(i,arg) -#endif return end subroutine ugetarg @@ -51,19 +47,7 @@ subroutine timing(icall,t1) real , intent(out) :: t1 real , dimension(2) :: et(2) -#if defined(VAX) - integer :: iad0 -#endif - -#if defined(IBM) - real , external :: mclock -#elif defined(CRAY) - real , external :: cputime -#elif defined(__APPLE__) - real :: etime -#elif defined(PC_GFORTRAN) - real :: etime -#elif defined(__GFORTRAN__) +#if defined(GNU) real :: etime #else real ,external :: etime @@ -72,29 +56,10 @@ subroutine timing(icall,t1) select case (icall) !----- Start call. ---------------------------------------------------------------------! case (1) -#if defined(CRAY) - call cpu_time(T1) -#elif defined(VAX) - iad0=0 - call lib$init_timer(iad0) -#elif defined(IBM) - T1=mclock(et)/100. -#else T1=ETIME(et) -#endif - !----- End call. -----------------------------------------------------------------------! case (2) -#if defined(VAX) - call LIB$SHOW_TIMER(IAD0,2) -#elif defined(CRAY) - call cpu_time(T1) -#elif defined(IBM) - T1=mclock(et)/100. -#else T1=ETIME(et) -#endif - end select return diff --git a/ED/src/utils/utils_c.c b/ED/src/utils/utils_c.c index ac26b5727..34c3059af 100644 --- a/ED/src/utils/utils_c.c +++ b/ED/src/utils/utils_c.c @@ -11,32 +11,16 @@ #include #include -#ifdef CRAY + +#if defined(MACOS) #include -#endif -#if defined(IBM) || defined(__APPLE__) #include #else #include #endif -#ifdef MAC_OS_X -#include -#endif - -#ifdef SUNHPC -#include -#include -#endif - /*#include */ -#ifdef SGI -#include -#include -#include -#endif - /* Prototypes not needed except for C++ int vfscale(float *,int ,double *,double *); void *malloc(int); @@ -60,15 +44,9 @@ int iralloc(int *memtot,int *ia,int *ioff) /* Compute the offset for Fortran */ -#ifdef CRAY - ifaddr = (int)ia; - imaddr = (int)iaddr; - *ioff=(imaddr-ifaddr); -#else - ifaddr = (int )ia; - imaddr = (int )iaddr; - *ioff = (imaddr-ifaddr)/sizeof(float); -#endif +ifaddr = (int )ia; +imaddr = (int )iaddr; +*ioff = (imaddr-ifaddr)/sizeof(float); /* Find first empty location in address array */ @@ -106,9 +84,7 @@ void irsleep(int *seconds) { extern int sleep(int); -#if !defined (PC_NT1) sleep( *seconds ); -#endif return; } @@ -117,19 +93,6 @@ void irsleep(int *seconds) FILE *ramsfile; -#ifdef STARDENT - -int rams_c_open(filename,faccess) - struct { char *string; int len; } *filename,*faccess; -{ - extern FILE *ramsfile; - - /* printf(" C_open - %s %s \n",filename->string,faccess->string); */ - ramsfile=fopen(filename->string,faccess->string); - return(0); -} -#else - int rams_c_open(char *filename,char *faccess) { @@ -139,7 +102,6 @@ int rams_c_open(char *filename,char *faccess) /* perror("rams_c_open"); */ return(0); } -#endif /*********************************************************/ @@ -534,8 +496,7 @@ void filelist_c_( int *inum, int *indices, char *prefix, char *chario){ } /* This is for the omp thread/processor pinning check. */ -/* MLO. This didn't work in the SUNHPC cluster, disabling it for now */ -#if defined(SUNHPC) || defined(__APPLE__) +#if defined(MACOS) int findmycpu_ () { int cpu; @@ -552,4 +513,3 @@ int findmycpu_ () return cpu; } #endif -