Skip to content

Commit

Permalink
Merge branch 'feature/porting' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
theurich committed Oct 25, 2024
2 parents c92d921 + 9b830ff commit 12002f1
Show file tree
Hide file tree
Showing 41 changed files with 88 additions and 128 deletions.
2 changes: 1 addition & 1 deletion build_config/Cygwin.g95.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ ESMF_F90LINKOPTS += -march=k8 -m64 -mcmodel=medium
endif

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Cygwin.gfortran.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Darwin.absoft.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ ESMF_CXXLINKOPTS += -pthread
endif

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree
ESMF_F90COMPILEFIXCPP = -ffixed
Expand Down
2 changes: 1 addition & 1 deletion build_config/Darwin.g95.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ ESMF_CXXLINKOPTS += -pthread
endif

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Darwin.gfortran.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ ESMF_OPENACC_F90LINKOPTS += -fopenacc
ESMF_OPENACC_CXXLINKOPTS += -fopenacc

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Darwin.gfortranclang.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -Xpreprocessor -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Darwin.nag.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ ESMF_F90LINKOPTS += -thread_safe
endif

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREECPP = -free -fpp
ESMF_F90COMPILEFREENOCPP = -free
Expand Down
2 changes: 1 addition & 1 deletion build_config/Darwin.pgi.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ ESMF_OPENACC_F90LINKOPTS += -acc -Minfo
ESMF_OPENACC_CXXLINKOPTS += -acc -Minfo

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -Mfreeform
ESMF_F90COMPILEFIXCPP = -Mpreprocess -Mnofreeform
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.absoft.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ESMF_PIO = OFF
ESMF_F90IMOD = -p

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree
ESMF_F90COMPILEFIXCPP = -ffixed
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.absoftintel.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ endif
endif

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree
ESMF_F90COMPILEFIXCPP = -ffixed
Expand Down
13 changes: 2 additions & 11 deletions build_config/Linux.aocc.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ESMF_CPPDEFAULT = clang -E -P -x c

ESMF_CXXCOMPILECPPFLAGS += -x c++

# Need this until __aocc__ macro shows up in Fortran preprocessing
ESMF_CPPFLAGS += -DESMF_COMPILER_AOCC

############################################################
Expand Down Expand Up @@ -80,15 +81,6 @@ ESMF_CDEFAULT = mpicc
ESMF_MPIRUNDEFAULT = mpirun $(ESMF_MPILAUNCHOPTIONS)
ESMF_MPIMPMDRUNDEFAULT = mpiexec $(ESMF_MPILAUNCHOPTIONS)
else
ifeq ($(ESMF_COMM),lam)
# LAM (assumed to be built with gfortran) -----------------------
ESMF_CXXCOMPILECPPFLAGS+= -DESMF_NO_SIGUSR2
ESMF_F90DEFAULT = mpif77
ESMF_CXXDEFAULT = mpic++
ESMF_CDEFAULT = mpicc
ESMF_MPIRUNDEFAULT = mpirun $(ESMF_MPILAUNCHOPTIONS)
ESMF_MPIMPMDRUNDEFAULT = mpiexec $(ESMF_MPILAUNCHOPTIONS)
else
ifeq ($(ESMF_COMM),openmpi)
# OpenMPI --------------------------------------------------
ifeq ($(shell $(ESMF_DIR)/scripts/available mpifort),mpifort)
Expand Down Expand Up @@ -116,7 +108,6 @@ endif
endif
endif
endif
endif

############################################################
# Print compiler version string
Expand Down Expand Up @@ -228,7 +219,7 @@ ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.arm.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ ESMF_OPENMP=OFF
# ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.g95.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.gfortran.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ ESMF_OPENACC_F90LINKOPTS += -fopenacc
ESMF_OPENACC_CXXLINKOPTS += -fopenacc

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.gfortranclang.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.intelgcc.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ ESMF_OPENMP_CXXCOMPILEOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -fpp0 -FR
ESMF_F90COMPILEFIXCPP = -fpp
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.lahey.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = --nfix
ESMF_F90COMPILEFIXCPP = --fix -Cpp
Expand Down
76 changes: 23 additions & 53 deletions build_config/Linux.llvm.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ ESMF_CDEFAULT = mpicc
ESMF_MPIRUNDEFAULT = mpirun $(ESMF_MPILAUNCHOPTIONS)
ESMF_MPIMPMDRUNDEFAULT = mpiexec $(ESMF_MPILAUNCHOPTIONS)
else
ifeq ($(ESMF_COMM),lam)
# LAM (assumed to be built with flang-new) -----------------------
ESMF_CXXCOMPILECPPFLAGS+= -DESMF_NO_SIGUSR2
ESMF_F90DEFAULT = mpif77
ESMF_CXXDEFAULT = mpic++
ESMF_CDEFAULT = mpicc
ESMF_MPIRUNDEFAULT = mpirun $(ESMF_MPILAUNCHOPTIONS)
ESMF_MPIMPMDRUNDEFAULT = mpiexec $(ESMF_MPILAUNCHOPTIONS)
else
ifeq ($(ESMF_COMM),openmpi)
# OpenMPI --------------------------------------------------
ifeq ($(shell $(ESMF_DIR)/scripts/available mpifort),mpifort)
Expand Down Expand Up @@ -114,7 +105,6 @@ endif
endif
endif
endif
endif

############################################################
# Print compiler version string
Expand All @@ -126,7 +116,7 @@ ESMF_CCOMPILER_VERSION = ${ESMF_CCOMPILER} -v --version
############################################################
# Special debug flags
#
ESMF_F90OPTFLAG_G +=
ESMF_F90OPTFLAG_G +=

############################################################
# Fortran symbol convention
Expand Down Expand Up @@ -178,31 +168,31 @@ ESMF_CXXCOMPILEOPTS += -m32
ESMF_CXXLINKOPTS += -m32
ESMF_CCOMPILEOPTS += -m32
ESMF_CLINKOPTS += -m32
ESMF_F90COMPILEOPTS += -m32
ESMF_F90LINKOPTS += -m32
ESMF_F90COMPILEOPTS +=
ESMF_F90LINKOPTS +=
endif
ifeq ($(ESMF_ABISTRING),x86_64_small)
ESMF_CXXCOMPILEOPTS += -m64 -mcmodel=small
ESMF_CXXLINKOPTS += -m64 -mcmodel=small
ESMF_CCOMPILEOPTS += -m64 -mcmodel=small
ESMF_CLINKOPTS += -m64 -mcmodel=small
ESMF_F90COMPILEOPTS += -m64 -mcmodel=small
ESMF_F90LINKOPTS += -m64 -mcmodel=small
ESMF_F90COMPILEOPTS +=
ESMF_F90LINKOPTS +=
endif
ifeq ($(ESMF_ABISTRING),x86_64_medium)
ESMF_CXXCOMPILEOPTS += -m64 -mcmodel=medium
ESMF_CXXLINKOPTS += -m64 -mcmodel=medium
ESMF_CCOMPILEOPTS += -m64 -mcmodel=medium
ESMF_CLINKOPTS += -m64 -mcmodel=medium
ESMF_F90COMPILEOPTS += -m64 -mcmodel=medium
ESMF_F90LINKOPTS += -m64 -mcmodel=medium
ESMF_F90COMPILEOPTS +=
ESMF_F90LINKOPTS +=
endif

############################################################
# Conditionally add pthread compiler and linker flags
#
ifeq ($(ESMF_PTHREADS),ON)
ESMF_F90COMPILEOPTS += -pthread
ESMF_F90COMPILEOPTS +=
ESMF_CXXCOMPILEOPTS += -pthread
ESMF_CCOMPILEOPTS += -pthread
ESMF_F90LINKOPTS += -pthread
Expand All @@ -213,22 +203,26 @@ endif
############################################################
# OpenMP compiler and linker flags
#
ESMF_OPENMP=OFF
# ESMF_OPENMP_F90COMPILEOPTS += -fopenmp
# ESMF_OPENMP_CXXCOMPILEOPTS += -fopenmp
# ESMF_OPENMP_F90LINKOPTS += -fopenmp
# ESMF_OPENMP_CXXLINKOPTS += -fopenmp
ESMF_OPENMPDEFAULT = OFF
ESMF_OPENMP_F90COMPILEOPTS += -fopenmp
ESMF_OPENMP_CXXCOMPILEOPTS += -fopenmp
ESMF_OPENMP_F90LINKOPTS += -fopenmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# OpenACC compiler and linker flags
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
ESMF_OPENACCDEFAULT = OFF
ESMF_OPENACC_F90COMPILEOPTS += -fopenacc
ESMF_OPENACC_CXXCOMPILEOPTS += -fopenacc
ESMF_OPENACC_F90LINKOPTS += -fopenacc
ESMF_OPENACC_CXXLINKOPTS += -fopenacc

############################################################
# Set unlimited line length limit for free format files
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEOPTS += -ffree-line-length-none
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form

############################################################
# Set rpath syntax
Expand All @@ -237,30 +231,6 @@ ESMF_F90RPATHPREFIX = -Wl,-rpath,
ESMF_CXXRPATHPREFIX = -Wl,-rpath,
ESMF_CRPATHPREFIX = -Wl,-rpath,

############################################################
# Determine where gcc's libraries are located
#
# Note that the result of -print-file-name will be the full path to the file if it is found
# within the compiler installation, and simply the file name verbatim if it is NOT found.
ESMF_LIBSTDCXX := $(shell $(ESMF_CXXCOMPILER) $(ESMF_CXXCOMPILEOPTS) -print-file-name=libstdc++.so)
ifeq ($(ESMF_LIBSTDCXX),libstdc++.so)
ESMF_LIBSTDCXX := $(shell $(ESMF_CXXCOMPILER) $(ESMF_CXXCOMPILEOPTS) -print-file-name=libstdc++.a)
endif
ESMF_F90LINKPATHS += -L$(dir $(ESMF_LIBSTDCXX))
ESMF_F90LINKRPATHS += $(ESMF_F90RPATHPREFIX)$(dir $(ESMF_LIBSTDCXX))

############################################################
# Determine where flang-new's libraries are located
#
# Note that the result of -print-file-name will be the full path to the file if it is found
# within the compiler installation, and simply the file name verbatim if it is NOT found.
ESMF_LIBFLANG := $(shell $(ESMF_F90COMPILER) $(ESMF_F90COMPILEOPTS) -print-file-name=libflang.so)
ifeq ($(ESMF_LIBFLANG),libflang.so)
ESMF_LIBFLANG := $(shell $(ESMF_F90COMPILER) $(ESMF_F90COMPILEOPTS) -print-file-name=libflang.a)
endif
ESMF_CXXLINKPATHS += -L$(dir $(ESMF_LIBFLANG))
ESMF_CXXLINKRPATHS += $(ESMF_CXXRPATHPREFIX)$(dir $(ESMF_LIBFLANG))

############################################################
# Link against libesmf.a using the F90 linker front-end
#
Expand All @@ -269,7 +239,7 @@ ESMF_F90LINKLIBS += -lrt -lstdc++ -ldl
############################################################
# Link against libesmf.a using the C++ linker front-end
#
ESMF_CXXLINKLIBS += -lrt -lflang -lstdc++ -lm -ldl
ESMF_CXXLINKLIBS += -lrt -lFortranRuntime -lFortranDecimal -lstdc++ -lm -ldl

############################################################
# Linker option that ensures that the specified libraries are
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.nag.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ESMF_OPENMP_F90LINKOPTS += -openmp
ESMF_OPENMP_CXXLINKOPTS += -fopenmp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -free
ESMF_F90COMPILEFIXCPP = -fixed -fpp
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.nagintel.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ ESMF_OPENMP_CXXLINKOPTS += -openmp
endif

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -free
ESMF_F90COMPILEFIXCPP = -fixed -fpp
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.nvhpc.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ ESMF_OPENACC_F90LINKOPTS += -acc -Minfo
ESMF_OPENACC_CXXLINKOPTS += -acc -Minfo

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -Mfreeform
ESMF_F90COMPILEFIXCPP = -Mpreprocess -Mnofreeform
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.pathscale.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ESMF_OPENMP_F90LINKOPTS += -mp
ESMF_OPENMP_CXXLINKOPTS += -mp

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -freeform
ESMF_F90COMPILEFIXCPP = -fixedform -cpp
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.pgi.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ ESMF_OPENACC_F90LINKOPTS += -acc -Minfo
ESMF_OPENACC_CXXLINKOPTS += -acc -Minfo

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -Mfreeform
ESMF_F90COMPILEFIXCPP = -Mpreprocess -Mnofreeform
Expand Down
2 changes: 1 addition & 1 deletion build_config/Linux.pgigcc.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ ESMF_F90LINKPATHS += -L$(dir $(shell gcc -print-file-name=libstdc++.so))
ESMF_F90LINKLIBS += -lstdc++

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -Mfreeform
ESMF_F90COMPILEFIXCPP = -Mpreprocess -Mnofreeform
Expand Down
2 changes: 1 addition & 1 deletion build_config/MinGW.gfortran.default/build_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ESMF_CXXCOMPILECPPFLAGS += -DNO_TIMES
ESMF_PTHREADS := OFF

############################################################
# Need this until the file convention is fixed (then remove these two lines)
# Explicit flags for handling specific format and cpp combos
#
ESMF_F90COMPILEFREENOCPP = -ffree-form
ESMF_F90COMPILEFIXCPP = -cpp -ffixed-form
Expand Down
Loading

0 comments on commit 12002f1

Please sign in to comment.