From d41a04d866b112fd76d18c28dda9145c0ecbd622 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Fri, 14 Nov 2025 08:31:22 -0300 Subject: [PATCH 1/4] First commit to clean up the make directory and simplify the preprocessor options through the ED2 code. --- ED/build/make/Makefile | 55 +++- ED/build/make/include.mk.absoft | 393 ------------------------ ED/build/make/include.mk.arch_linux | 85 ----- ED/build/make/include.mk.bnl | 46 --- ED/build/make/include.mk.bu_geo | 130 -------- ED/build/make/include.mk.cannon | 173 ----------- ED/build/make/include.mk.cornell | 121 -------- ED/build/make/include.mk.dbg.sdumont | 165 ---------- ED/build/make/include.mk.dbg.sunhpc | 167 ---------- ED/build/make/include.mk.dmm | 328 -------------------- ED/build/make/include.mk.ebi | 153 --------- ED/build/make/include.mk.gfortran | 253 +++++++-------- ED/build/make/include.mk.gfortran2 | 203 ------------ ED/build/make/include.mk.gnu | 285 ----------------- ED/build/make/include.mk.gnu-odyssey | 126 -------- ED/build/make/include.mk.intel | 101 ++++-- ED/build/make/include.mk.jpl | 169 ---------- ED/build/make/include.mk.macos_homebrew | 130 -------- ED/build/make/include.mk.macosx | 121 +++++--- ED/build/make/include.mk.ncsa | 350 --------------------- ED/build/make/include.mk.nec | 272 ---------------- ED/build/make/include.mk.pecan2 | 176 ----------- ED/build/make/include.mk.sdumont | 167 ---------- ED/build/make/include.mk.sunhpc | 166 ---------- ED/build/make/include.mk.ugent | 169 ---------- ED/build/make/include.mk.xlf | 375 ---------------------- 26 files changed, 305 insertions(+), 4574 deletions(-) delete mode 100644 ED/build/make/include.mk.absoft delete mode 100644 ED/build/make/include.mk.arch_linux delete mode 100644 ED/build/make/include.mk.bnl delete mode 100644 ED/build/make/include.mk.bu_geo delete mode 100644 ED/build/make/include.mk.cannon delete mode 100644 ED/build/make/include.mk.cornell delete mode 100644 ED/build/make/include.mk.dbg.sdumont delete mode 100644 ED/build/make/include.mk.dbg.sunhpc delete mode 100644 ED/build/make/include.mk.dmm delete mode 100644 ED/build/make/include.mk.ebi delete mode 100644 ED/build/make/include.mk.gfortran2 delete mode 100644 ED/build/make/include.mk.gnu delete mode 100644 ED/build/make/include.mk.gnu-odyssey delete mode 100644 ED/build/make/include.mk.jpl delete mode 100644 ED/build/make/include.mk.macos_homebrew delete mode 100644 ED/build/make/include.mk.ncsa delete mode 100644 ED/build/make/include.mk.nec delete mode 100644 ED/build/make/include.mk.pecan2 delete mode 100644 ED/build/make/include.mk.sdumont delete mode 100644 ED/build/make/include.mk.sunhpc delete mode 100644 ED/build/make/include.mk.ugent delete mode 100644 ED/build/make/include.mk.xlf diff --git a/ED/build/make/Makefile b/ED/build/make/Makefile index 6c48ee2e9..f08a710c2 100644 --- a/ED/build/make/Makefile +++ b/ED/build/make/Makefile @@ -20,18 +20,61 @@ ifeq ($(F_LOWO_OPTS),) endif #------------------------------------------------------------------------------------------# -ifeq ($(OPT),"dbg") - INCLUDES = "" + + +#------------------------------------------------------------------------------------------# +# Make variables CMACH and FC_TYPE are correctly set. # +#------------------------------------------------------------------------------------------# +ifeq ($(CMACH),) + CMACH_ERROR=1 +else ifeq($(CMACH),$(filter $(KIND_COMP), LINUX MACOSX DOCKER CINTEG)) + CMACH_ERROR=0 + + ifeq ($(FC_TYPE),) + else ifeq ($(FC_TYPE),$(filter $(FC_TYPE), GFORTRAN GNU)) + else ifeq ($(FC_TYPE),$(filter $(FC_TYPE), IFORT INTEL)) + else ifeq ($(FC_TYPE),$(filter $(FC_TYPE), PGI PGF90)) + +else + CMACH_ERROR=1 +endif +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Gracefully fail if CMACH and FC_TYPE are not correctly set. This will allow users to # +# make sure they selected a supported version. # +#------------------------------------------------------------------------------------------# +ifeq ($(CMACH_ERROR),1) + @echo "" + @echo "---~---" + @echo " FATAL ERROR!" + @echo "---~---" + @echo " Variable CMACH is either not defined or has an invalid value in your" + @echo " include.mk.[PLATFORM]. Please set to one of the following values" + @echo "" + @echo " CMACH=LINUX (For Unix or Linux machines)" + @echo " CMACH=MACOSX (For MacOS machines)" + @echo "" + @echo " It is possible to set CMACH to DOCKER and CINTEG, but these are special and" + @echo " specific cases and should not be used unless you are working on these specific" + @echo " cases." + @echo "---~---" + @echo "" + $(error Variable CMACH is not properly set in your include.mk.[PLATFORM] file.)" endif +#------------------------------------------------------------------------------------------# + #----- Compiler commands. -----------------------------------------------------------------# INCLUDES = $(PAR_INCS) -I$(ED_INCS) $(HDF5_INCS) $(MPI_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) @@ -75,7 +118,7 @@ gendep: $(EXE): $(LIBMODEL) $(MAINOBJ) @echo "" $(LOADER) -o $(EXE) edmain.o $(LOADER_OPTS) $(INCLUDES) $(LIBMODEL) $(HDF5_LIBS) \ - $(PAR_LIBS) $(NC_LIBS) $(LIBS) $(LOADER_OPTS) + $(PAR_LIBS) $(LIBS) $(LOADER_OPTS) @echo "" @echo Finished building === $(EXE) @echo "" diff --git a/ED/build/make/include.mk.absoft b/ED/build/make/include.mk.absoft deleted file mode 100644 index 73c967d72..000000000 --- a/ED/build/make/include.mk.absoft +++ /dev/null @@ -1,393 +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-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 - -#--------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 8b934ac90..000000000 --- a/ED/build/make/include.mk.arch_linux +++ /dev/null @@ -1,85 +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 - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null - -# 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 6028ded24..000000000 --- a/ED/build/make/include.mk.bnl +++ /dev/null @@ -1,46 +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 - -# netCDF libraries -USENC=0 -NC_LIBS=-L/dev/null - -# 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 a22538eb9..000000000 --- a/ED/build/make/include.mk.bu_geo +++ /dev/null @@ -1,130 +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 - -#--------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 4e28cf388..000000000 --- a/ED/build/make/include.mk.cannon +++ /dev/null @@ -1,173 +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=/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_INCS=-I$(HDF5_PATH)/include -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 -#------------------------------------------------------------------------------------------# - - - -#################################### COMPILER SETTINGS ##################################### -CMACH=ODYSSEY -#F_COMP=mpif90 -fc=ifort -#C_COMP=mpicc -cc=icc -#LOADER=mpif90 -fc=ifort -FC_TYPE=INTEL -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -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 -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 - #---------------------------------------------------------------------------------------# -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 -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 -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 - 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 - #---------------------------------------------------------------------------------------# -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 - 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 - #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -FR -O3 -recursive -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 - #---------------------------------------------------------------------------------------# -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 9614c72d5..000000000 --- a/ED/build/make/include.mk.cornell +++ /dev/null @@ -1,121 +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 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# 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 735886808..000000000 --- a/ED/build/make/include.mk.dbg.sdumont +++ /dev/null @@ -1,165 +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 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# 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 -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 -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 -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 -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 -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 -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 -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 -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 -traceback -assume byterecl -static - C_OPTS= -O3 -DLITTLE -traceback -static - F_LOWO_OPTS=-FR -O2 -recursive -traceback -assume byterecl -static - LOADER_OPTS= -FR -O3 -recursive -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 f19174a42..000000000 --- a/ED/build/make/include.mk.dbg.sunhpc +++ /dev/null @@ -1,167 +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 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# 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 -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 -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 -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 -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 -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 -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 -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 -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 -traceback -assume byterecl -static - C_OPTS= -O3 -DLITTLE -traceback -static - F_LOWO_OPTS=-FR -O2 -recursive -traceback -assume byterecl -static - LOADER_OPTS= -FR -O3 -recursive -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 449f3b684..000000000 --- a/ED/build/make/include.mk.dmm +++ /dev/null @@ -1,328 +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/Users/mlongo/util/hdflib/hdf4_64/zlib/lib -lz - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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.ebi b/ED/build/make/include.mk.ebi deleted file mode 100644 index 734137e74..000000000 --- a/ED/build/make/include.mk.ebi +++ /dev/null @@ -1,153 +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 - -# 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 -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 - - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 index 0d09c0aec..aa09cd685 100644 --- a/ED/build/make/include.mk.gfortran +++ b/ED/build/make/include.mk.gfortran @@ -1,86 +1,102 @@ -#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.opt.gfortran # +# # +# Compilation controls for GNU-based 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-gcc-gfortran +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_HOME=/usr -HDF5_INCS=-I${HDF5_HOME}/include -HDF5C_INCS=-I${HDF5_HOME}/include -HDF5_LIBS=-lhdf5 -lhdf5_fortran -lhdf5_hl -lz +#------------------------------------------------------------------------------------------# +# 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 - -#--------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# 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. # +# MACOSX -- Mac OS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # +# this for regular builds. # +# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # +# not use this for regular builds. # +# # +# 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 -- ifort and icc. # +# 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 +F_COMP=gfortran +C_COMP=gcc +LOADER=$(F_COMP) +LIBS= +MOD_EXT=mod +#------------------------------------------------------------------------------------------# + + + + + ##################################### COMPILER OPTIONS ##################################### #------------------------------------------------------------------------------------------# # A/B/C/D. Debugging, strictest compilation flags, lowest performance. # @@ -93,84 +109,41 @@ 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) +else 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} +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." 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 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=-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' + +#------------------------------------------------------------------------------------------# +# 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.gfortran2 b/ED/build/make/include.mk.gfortran2 deleted file mode 100644 index 1adc4b389..000000000 --- a/ED/build/make/include.mk.gfortran2 +++ /dev/null @@ -1,203 +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 - -#--------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 deleted file mode 100644 index 370c9bf2a..000000000 --- a/ED/build/make/include.mk.gnu +++ /dev/null @@ -1,285 +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 -#--------------------------------------------------------------- - -# 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 -# -------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=.TRUE. and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=.FALSE. and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=.FALSE. -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 -FC_TYPE=GNU -F_COMP=mpif90 -C_COMP=mpicc -LOADER=mpif90 -C_LOADER=mpicc -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' - diff --git a/ED/build/make/include.mk.gnu-odyssey b/ED/build/make/include.mk.gnu-odyssey deleted file mode 100644 index b9ad5404a..000000000 --- a/ED/build/make/include.mk.gnu-odyssey +++ /dev/null @@ -1,126 +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 -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# 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 b110fa806..73fb83488 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.opt.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 #------------------------------------------------------------------------------------------# @@ -19,12 +21,10 @@ 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-icc-ifort HDF5_INCS=-I$(HDF5_PATH)/include HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl #------------------------------------------------------------------------------------------# @@ -40,12 +40,53 @@ 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. # +# MACOSX -- Mac OS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # +# this for regular builds. # +# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # +# not use this for regular builds. # +# # +# 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. # +# GFORTRAN -- same as GNU. # +# INTEL -- ifort and icc. # +# 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=INTEL F_COMP=ifort C_COMP=icc -LOADER=ifort +LOADER=$(F_COMP) LIBS= MOD_EXT=mod #------------------------------------------------------------------------------------------# @@ -83,7 +124,6 @@ ifeq ($(KIND_COMP),) 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 \ @@ -94,9 +134,7 @@ ifeq ($(KIND_COMP),A) -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 +else ifeq ($(KIND_COMP),B) 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 \ @@ -107,9 +145,7 @@ ifeq ($(KIND_COMP),B) -implicitnone -assume byterecl -warn unused -warn uncalled -warn usage \ -warn interfaces -warn declarations -qopenmp -diag-error=all #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),C) - USE_INTERF=1 +else ifeq ($(KIND_COMP),C) 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 @@ -118,9 +154,7 @@ ifeq ($(KIND_COMP),C) -debug-parameters all -fpe0 -no-ftz -traceback -ftrapuv -fp-stack-check \ -implicitnone -assume byterecl -qopenmp -diag-error=all #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),D) - USE_INTERF=1 +else ifeq ($(KIND_COMP),D) 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 @@ -129,14 +163,14 @@ ifeq ($(KIND_COMP),D) -ftrapuv -fp-stack-check -implicitnone -assume byterecl -qopenmp \ -diag-error=all #---------------------------------------------------------------------------------------# -endif -ifeq ($(KIND_COMP),E) - USE_INTERF=1 +else ifeq ($(KIND_COMP),E) F_OPTS= -FR -O3 -recursive -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 #---------------------------------------------------------------------------------------# +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." endif #------------------------------------------------------------------------------------------# ############################################################################################ @@ -145,26 +179,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 66a1fcf31..000000000 --- a/ED/build/make/include.mk.jpl +++ /dev/null @@ -1,169 +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 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# 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_homebrew b/ED/build/make/include.mk.macos_homebrew deleted file mode 100644 index 0473fa1f4..000000000 --- a/ED/build/make/include.mk.macos_homebrew +++ /dev/null @@ -1,130 +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 -#------------------------------------------------------------------------------------------# - - -#------------------------------------------------------------------------------------------# -# 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 index 054f1e11b..fe7dc93d2 100644 --- a/ED/build/make/include.mk.macosx +++ b/ED/build/make/include.mk.macosx @@ -1,35 +1,44 @@ #==========================================================================================# #==========================================================================================# -# Make file include.mk.opt.embrapa # +# Makefile include.mk.opt.macosx # +# # +# Compilation controls for MacOS X 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 (upcoming) +# - open-mpi (not required, needed if planning on using OpenMPI). #------------------------------------------------------------------------------------------# + #----- Define make (gnu make works best). -------------------------------------------------# -MAKE=/usr/local/bin/make +MAKE=$(HOMEBREW_PREFIX)/bin/gmake #------------------------------------------------------------------------------------------# -#----- 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). # #------------------------------------------------------------------------------------------# -ZLIB_PATH=/usr/local -HDF5_PATH=/usr/local +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 +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 # +# 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 @@ -37,26 +46,52 @@ 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. # +# MACOSX -- Mac OS system. This applies more limited memory requests so the code can # +# compile and run on personal computers. # +# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # +# this for regular builds. # +# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # +# not use this for regular builds. # +# # +# 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=MACOSX #------------------------------------------------------------------------------------------# - #################################### COMPILER SETTINGS ##################################### -CMACH=MAC_OS_X +#------------------------------------------------------------------------------------------# +# 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=/usr/local/bin/gfortran-14 -C_COMP=/usr/local/bin/gcc-14 -LOADER=/usr/local/bin/gfortran-14 +F_COMP=$(HOMEBREW_PREFIX)/bin/gfortran +C_COMP=$(HOMEBREW_PREFIX)/bin/gcc +LOADER=$(F_COMP) LIBS= MOD_EXT=mod -############################################################################################ +#------------------------------------------------------------------------------------------# @@ -64,21 +99,8 @@ 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. # +# A/B/C/D. Debugging, strictest compilation flags, lowest performance. # +# E. Running, most relaxed compilation flags, highest performance. # #------------------------------------------------------------------------------------------# ifeq ($(KIND_COMP),) KIND_COMP=E @@ -93,12 +115,13 @@ ifeq ($(KIND_COMP),A) -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 #---------------------------------------------------------------------------------------# +else + $(error Option KIND_COMP provided ($(KIND_COMP)) is invalid)." endif #------------------------------------------------------------------------------------------# ############################################################################################ @@ -107,21 +130,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. # +# 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= -PAR_DEFS= #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# -# Archive options for Mac OS X. # +# 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.ncsa b/ED/build/make/include.mk.ncsa deleted file mode 100644 index 1789d7424..000000000 --- a/ED/build/make/include.mk.ncsa +++ /dev/null @@ -1,350 +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 - -#--------------------------------------------------------------- - - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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 19dbfd100..000000000 --- a/ED/build/make/include.mk.nec +++ /dev/null @@ -1,272 +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 -#--------------------------------------------------------------- - -# 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 -# -------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=.TRUE. and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=.FALSE. and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=.FALSE. -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - - -# 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 e63fe2494..000000000 --- a/ED/build/make/include.mk.pecan2 +++ /dev/null @@ -1,176 +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 - -#--------------------------------------------------------------- - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS=-L/dev/null -# -------------------------------------------------------------- - -# 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.sdumont b/ED/build/make/include.mk.sdumont deleted file mode 100644 index 2d27a5ad7..000000000 --- a/ED/build/make/include.mk.sdumont +++ /dev/null @@ -1,167 +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 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# 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 -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 -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 -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 -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 -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 -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 -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 -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 -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 - #---------------------------------------------------------------------------------------# -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 64d5f00cd..000000000 --- a/ED/build/make/include.mk.sunhpc +++ /dev/null @@ -1,166 +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 -#------------------------------------------------------------------------------------------# - - - -#------------------------------------------------------------------------------------------# -# 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 -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 -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 -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 -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 -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 -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 -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 -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 -traceback -assume byterecl -static - C_OPTS= -O3 -DLITTLE -traceback -static - F_LOWO_OPTS=-FR -O2 -recursive -traceback -assume byterecl -static - LOADER_OPTS= -FR -O3 -recursive -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.ugent b/ED/build/make/include.mk.ugent deleted file mode 100644 index 2fbaf4e2d..000000000 --- a/ED/build/make/include.mk.ugent +++ /dev/null @@ -1,169 +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 -#------------------------------------------------------------------------------------------# - - - -#################################### 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 -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 -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 -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 -traceback -assume byterecl - C_OPTS= -O3 -DLITTLE -traceback - F_LOWO_OPTS=-FR -O2 -recursive -traceback -assume byterecl - #---------------------------------------------------------------------------------------# -endif -###################################### OPTIMIZED BUILD ################################## -ifeq ($(KIND_COMP),E) - USE_INTERF=1 - F_OPTS= -O3 -xHost -g -assume byterecl - C_OPTS= -O3 -xHost -g - F_LOWO_OPTS= -O2 -xHost -g - #---------------------------------------------------------------------------------------# -endif -########################### OPTIMIZED BUILD WITH OpenMP ################################# -ifeq ($(KIND_COMP),F) - USE_INTERF=1 - F_OPTS= -O3 -xHost -g -assume byterecl -qopenmp - C_OPTS= -O3 -xHost -g -qopenmp - F_LOWO_OPTS= -O2 -xHost -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 a60ee150e..000000000 --- a/ED/build/make/include.mk.xlf +++ /dev/null @@ -1,375 +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 - - -# netCDF libraries --------------------------------------------- -# If you have netCDF set USENC=1 and type the lib folder -# at NC_LIBS, with the leading -L (e.g. -L/usr/local/lib). -# If you don't have it, leave USENC=0 and type a dummy -# folder for NC_LIBS (e.g. -L/dev/null or leave it blank) -USENC=0 -NC_LIBS= -# -------------------------------------------------------------- - - -# 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' - From 558119da7848c76f95d0f5b3ed9831f5c8c00fd2 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Wed, 26 Nov 2025 09:41:27 -0300 Subject: [PATCH 2/4] Renamed include.mk.gfortran to be consistent with the family of compilers. --- .gitignore | 10 ++++++++++ ED/build/make/{include.mk.gfortran => include.mk.gnu} | 0 2 files changed, 10 insertions(+) rename ED/build/make/{include.mk.gfortran => include.mk.gnu} (100%) 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/include.mk.gfortran b/ED/build/make/include.mk.gnu similarity index 100% rename from ED/build/make/include.mk.gfortran rename to ED/build/make/include.mk.gnu From d0096e0006766ebafe9b83d032930ffc0bfd836f Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Wed, 26 Nov 2025 09:48:14 -0300 Subject: [PATCH 3/4] Removed a few legacy codes, and added DOCKER and CINTEG options in a few places. --- ED/src/include/utils_sub_names.h | 53 ++++++++++++++++++++++ ED/src/preproc/ascii2hdf/utils_sub_names.h | 2 +- ED/src/utils/rsys.F90 | 4 -- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/ED/src/include/utils_sub_names.h b/ED/src/include/utils_sub_names.h index 3daca76d5..3f32afc0b 100644 --- a/ED/src/include/utils_sub_names.h +++ b/ED/src/include/utils_sub_names.h @@ -55,4 +55,57 @@ #define par_pause par_pause_ #define par_ready par_ready_ +#elif defined(WINDOWS) + +#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 diff --git a/ED/src/preproc/ascii2hdf/utils_sub_names.h b/ED/src/preproc/ascii2hdf/utils_sub_names.h index 21f7fef9c..931d9390c 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(LINUX) +#if defined(LINUX) || defined(DOCKER) || defined(CINTEG) #define fegetenv fegetenv_ #define form_tmpname form_tmpname_ diff --git a/ED/src/utils/rsys.F90 b/ED/src/utils/rsys.F90 index bb048fde6..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 From 639c2ac18244eb2853681175f2d3cf0edead5ee6 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Fri, 28 Nov 2025 10:32:21 -0300 Subject: [PATCH 4/4] 1. Removed CMACH options DOCKER and CINTEG for now. If we decide we need special flags to any of them, we can add them. For now they are all assigned to Linux. 2. Fix some of the Makefile commands to issue errors when something was incorrectly set. --- ED/build/make/Makefile | 95 +++++++++++----------- ED/build/make/include.mk.docker.gnu | 8 +- ED/build/make/include.mk.docker.intel | 8 +- ED/build/make/include.mk.gnu | 7 +- ED/build/make/include.mk.intel | 6 +- ED/build/make/include.mk.macos | 6 +- ED/build/make/include.mk.pgi | 6 +- ED/build/make/include.mk.travisci | 8 +- ED/src/preproc/ascii2hdf/utils_sub_names.h | 2 +- 9 files changed, 59 insertions(+), 87 deletions(-) diff --git a/ED/build/make/Makefile b/ED/build/make/Makefile index 1f7a63198..1a4df532f 100644 --- a/ED/build/make/Makefile +++ b/ED/build/make/Makefile @@ -25,22 +25,19 @@ endif #------------------------------------------------------------------------------------------# # Make variables CMACH and FC_TYPE are correctly set. # #------------------------------------------------------------------------------------------# -FATAL_ERROR=0 ifeq ($(CMACH),) - CMACH_ERROR=1 - FATAL_ERROR=1 -else ifeq ($(CMACH),$(filter $(CMACH), LINUX MACOS DOCKER CINTEG)) - CMACH_ERROR=0 - - ifeq ($(FC_TYPE),$(filter $(FC_TYPE), GNU INTEL PGI)) - FCTYPE_ERROR=0 - else - FCTYPE_ERROR=1 - FATAL_ERROR=1 - endif + CMACH_ERROR=Y +else ifeq ($(CMACH),$(filter $(CMACH), LINUX MACOS)) + CMACH_ERROR=N else - CMACH_ERROR=1 - FATAL_ERROR=1 + 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 #------------------------------------------------------------------------------------------# @@ -49,42 +46,44 @@ endif # Gracefully fail if CMACH and FC_TYPE are not correctly set. This will allow users to # # make sure they selected a supported version. # #------------------------------------------------------------------------------------------# -ifeq ($(CMACH_ERROR),1) - @echo "" - @echo "---~---" - @echo " FATAL ERROR!" - @echo "---~---" - @echo " Variable CMACH is either not defined or has an invalid value in your" - @echo " include.mk.[PLATFORM]. Please set to one of the following values" - @echo "" - @echo " CMACH=LINUX (For Linux machines)" - @echo " CMACH=MACOS (For MacOS machines)" - @echo "" - @echo " It is possible to set CMACH to DOCKER and CINTEG, but these are special and" - @echo " specific cases and should not be used unless you are working on these specific" - @echo " cases." - @echo "---~---" - @echo "" +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),1) - @echo "" - @echo "---~---" - @echo " FATAL ERROR!" - @echo "---~---" - @echo " Variable FC_TYPE is either not defined or has an invalid value in your" - @echo " include.mk.[PLATFORM]. Please set to one of the following values" - @echo "" - @echo " FC_TYPE=GNU # To compile ED2 with gfortran/gcc" - @echo " FC_TYPE=INTEL # To compile ED2 with ifx/icx (or ifort/icc in older systems)" - @echo " FC_TYPE=PGI # To compile ED2 with pgfortran/pgcc" - @echo "" - @echo " New types may be added in the future (feel free to contribute with other" - @echo " compilers)." - @echo "---~---" - @echo "" +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),1) - $(error CMACH and/or FC_TYPE are not properly set in your include.mk.[PLATFORM] file.)" +ifeq ($(FATAL_ERROR),Y) + $(error CMACH and/or FC_TYPE are not properly set in your include.mk.[PLATFORM] file.) endif #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.docker.gnu b/ED/build/make/include.mk.docker.gnu index 3461848ef..cfa0f55a8 100644 --- a/ED/build/make/include.mk.docker.gnu +++ b/ED/build/make/include.mk.docker.gnu @@ -67,15 +67,11 @@ USE_COLLECTIVE_MPIO=0 # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -CMACH=DOCKER +CMACH=LINUX #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.docker.intel b/ED/build/make/include.mk.docker.intel index 7772bd91d..5bd01a6a0 100644 --- a/ED/build/make/include.mk.docker.intel +++ b/ED/build/make/include.mk.docker.intel @@ -69,15 +69,11 @@ USE_COLLECTIVE_MPIO=0 # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -CMACH=DOCKER +CMACH=LINUX #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.gnu b/ED/build/make/include.mk.gnu index 1c80762b6..f58951d4c 100644 --- a/ED/build/make/include.mk.gnu +++ b/ED/build/make/include.mk.gnu @@ -58,6 +58,7 @@ LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas +#################################### 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 # @@ -66,13 +67,9 @@ LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# CMACH=LINUX #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.intel b/ED/build/make/include.mk.intel index d5e9b8e6c..f60eefcdf 100644 --- a/ED/build/make/include.mk.intel +++ b/ED/build/make/include.mk.intel @@ -68,13 +68,9 @@ USE_COLLECTIVE_MPIO=0 # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# CMACH=LINUX #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.macos b/ED/build/make/include.mk.macos index 6e93eb9f5..9d0f940d1 100644 --- a/ED/build/make/include.mk.macos +++ b/ED/build/make/include.mk.macos @@ -73,13 +73,9 @@ USE_COLLECTIVE_MPIO=0 # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# CMACH=MACOS #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.pgi b/ED/build/make/include.mk.pgi index 676e20277..f92fa5820 100644 --- a/ED/build/make/include.mk.pgi +++ b/ED/build/make/include.mk.pgi @@ -66,13 +66,9 @@ USE_COLLECTIVE_MPIO=0 # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# CMACH=LINUX #------------------------------------------------------------------------------------------# diff --git a/ED/build/make/include.mk.travisci b/ED/build/make/include.mk.travisci index 2a5c2e21d..ff41f2082 100644 --- a/ED/build/make/include.mk.travisci +++ b/ED/build/make/include.mk.travisci @@ -65,15 +65,11 @@ USE_COLLECTIVE_MPIO=0 # LINUX -- Linux or Unix systems. # # MACOS -- MacOS system. This applies more limited memory requests so the code can # # compile and run on personal computers. # -# DOCKER -- Specific setting for building the containerised version of ED2. Do not use # -# this for regular builds. # -# CINTEG -- Specific setting for building the continuous integration version of ED2. Do # -# not use this for regular builds. # # # # 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!. # +# run on Windows machines, please submit a pull request. # #------------------------------------------------------------------------------------------# -CMACH=CINTEG +CMACH=LINUX #------------------------------------------------------------------------------------------# diff --git a/ED/src/preproc/ascii2hdf/utils_sub_names.h b/ED/src/preproc/ascii2hdf/utils_sub_names.h index 931d9390c..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(LINUX) || defined(DOCKER) || defined(CINTEG) +#if defined(LINUX) #define fegetenv fegetenv_ #define form_tmpname form_tmpname_