-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from EPIC-model/dev
New release 0.14.1
- Loading branch information
Showing
31 changed files
with
1,501 additions
and
786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AC_INIT([epic], [0.14.0], [[email protected]], [], [https://github.com/matt-frey/epic]) | ||
AC_INIT([epic], [0.14.1], [[email protected]], [], [https://github.com/matt-frey/epic]) | ||
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) | ||
AC_PROG_FC([gfortran]) | ||
AC_LANG(Fortran) | ||
|
@@ -8,8 +8,7 @@ LT_INIT | |
# change file extension from *.f to *.f90 | ||
# (important for library tests since it autogenerates a file conftest.f90) | ||
AC_FC_SRCEXT(f90) | ||
|
||
FCFLAGS="-std=f2018 -fdefault-real-8 -fdefault-double-8 -cpp -mcmodel=large -fall-intrinsics" | ||
AC_FC_PP_SRCEXT(f90) | ||
|
||
AC_CONFIG_MACRO_DIRS([m4]) | ||
AC_CONFIG_HEADERS([src/config.h]) | ||
|
@@ -41,6 +40,31 @@ AC_CONFIG_FILES([ | |
run-script/Makefile | ||
]) | ||
|
||
# 30 May 2023 | ||
# https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html | ||
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html | ||
AX_COMPILER_VENDOR | ||
|
||
if test "$ax_cv_fc_compiler_vendor" = "unknown"; then | ||
AC_MSG_ERROR([Could not deduce compiler vendor.]) | ||
fi | ||
|
||
AX_CHECK_COMPILE_FLAG([-cpp], [FCFLAGS="$FCFLAGS -cpp"]) | ||
AX_CHECK_COMPILE_FLAG([-mcmodel=large], [FCFLAGS="$FCFLAGS -mcmodel=large"]) | ||
|
||
# gfortran compiler flags | ||
AX_CHECK_COMPILE_FLAG([-std=f2018], [FCFLAGS="$FCFLAGS -std=f2018"]) | ||
AX_CHECK_COMPILE_FLAG([-fall-intrinsics], [FCFLAGS="$FCFLAGS -fall-intrinsics"]) | ||
AX_CHECK_COMPILE_FLAG([-fdefault-real-8], [FCFLAGS="$FCFLAGS -fdefault-real-8"]) | ||
AX_CHECK_COMPILE_FLAG([-fdefault-double-8], [FCFLAGS="$FCFLAGS -fdefault-double-8"]) | ||
|
||
# intel compiler flags | ||
AX_CHECK_COMPILE_FLAG([-std18], [FCFLAGS="$FCFLAGS -std18"]) | ||
AX_CHECK_COMPILE_FLAG([-fp-model=source], [FCFLAGS="$FCFLAGS -fp-model=source"]) | ||
AX_CHECK_COMPILE_FLAG([-real-size 8], [FCFLAGS="$FCFLAGS -real-size 8"]) | ||
AX_CHECK_COMPILE_FLAG([-double-size 64], [FCFLAGS="$FCFLAGS -double-size 64"]) | ||
|
||
|
||
####################################################################################### | ||
## | ||
## "--with" flags | ||
|
@@ -468,11 +492,36 @@ AM_CONDITIONAL([ENABLE_DEBUG], [test "$ENABLE_DEBUG" = "yes"]) | |
AC_MSG_CHECKING([whether we are compiling in debug mode]) | ||
if test "x$ENABLE_DEBUG" = "xyes"; then | ||
AC_MSG_RESULT([yes]) | ||
FCFLAGS="$FCFLAGS -Wall -Wuninitialized -Wmaybe-uninitialized -Werror -g -O0" | ||
FCFLAGS="$FCFLAGS -fcheck=all -fbounds-check -fbacktrace -ffpe-trap=denormal,invalid,zero,overflow,underflow" | ||
AX_CHECK_COMPILE_FLAG([-g], [FCFLAGS="$FCFLAGS -g"]) | ||
AX_CHECK_COMPILE_FLAG([-O0], [FCFLAGS="$FCFLAGS -O0"]) | ||
|
||
# gfortran compiler flags | ||
AX_CHECK_COMPILE_FLAG([-Wall], [FCFLAGS="$FCFLAGS -Wall"]) | ||
AX_CHECK_COMPILE_FLAG([-Wuninitialized], [FCFLAGS="$FCFLAGS -Wuninitialized"]) | ||
AX_CHECK_COMPILE_FLAG([-Wmaybe-uninitialized], [FCFLAGS="$FCFLAGS -Wmaybe-uninitialized"]) | ||
AX_CHECK_COMPILE_FLAG([-Werror], [FCFLAGS="$FCFLAGS -Werror"]) | ||
AX_CHECK_COMPILE_FLAG([-fcheck=all], [FCFLAGS="$FCFLAGS -fcheck=all"]) | ||
AX_CHECK_COMPILE_FLAG([-fbounds-check], [FCFLAGS="$FCFLAGS -fbounds-check"]) | ||
AX_CHECK_COMPILE_FLAG([-fbacktrace], [FCFLAGS="$FCFLAGS -fbacktrace"]) | ||
AX_CHECK_COMPILE_FLAG([-ffpe-trap=denormal,invalid,zero,overflow,underflow], | ||
[FCFLAGS="$FCFLAGS -ffpe-trap=denormal,invalid,zero,overflow,underflow"]) | ||
|
||
# intel compiler flags | ||
AX_CHECK_COMPILE_FLAG([-warn all], [FCFLAGS="$FCFLAGS -Wall"]) | ||
AX_CHECK_COMPILE_FLAG([-warn error], [FCFLAGS="$FCFLAGS -warn error"]) | ||
AX_CHECK_COMPILE_FLAG([-debug full], [FCFLAGS="$FCFLAGS -debug full"]) | ||
else | ||
AC_MSG_RESULT([no]) | ||
FCFLAGS="$FCFLAGS -O3 -funroll-all-loops -flto -DNDEBUG" | ||
AX_CHECK_COMPILE_FLAG([-O3], [FCFLAGS="$FCFLAGS -O3"]) | ||
AX_CHECK_COMPILE_FLAG([-DNDEBUG], [FCFLAGS="$FCFLAGS -DNDEBUG"]) | ||
|
||
# gfortran compiler flags | ||
AX_CHECK_COMPILE_FLAG([-funroll-all-loops], [FCFLAGS="$FCFLAGS -funroll-all-loops"]) | ||
AX_CHECK_COMPILE_FLAG([-flto], [FCFLAGS="$FCFLAGS -flto"]) | ||
|
||
# intel compiler flags | ||
AX_CHECK_COMPILE_FLAG([-funroll-loops], [FCFLAGS="$FCFLAGS -funroll-loops"]) | ||
AX_CHECK_COMPILE_FLAG([-ffat-lto-objects], [FCFLAGS="$FCFLAGS -ffat-lto-objects"]) | ||
fi | ||
|
||
|
||
|
@@ -505,7 +554,11 @@ AM_CONDITIONAL([ENABLE_OPENMP], [test "$ENABLE_OPENMP" = "yes"]) | |
AC_MSG_CHECKING([whether we are enabling OpenMP]) | ||
if test "x$ENABLE_OPENMP" = "xyes"; then | ||
AC_MSG_RESULT([yes]) | ||
FCFLAGS="$FCFLAGS -fopenmp -DENABLE_OPENMP" | ||
# gfortran compiler flags | ||
AX_CHECK_COMPILE_FLAG([-fopenmp], [FCFLAGS="$FCFLAGS -fopenmp -DENABLE_OPENMP"]) | ||
|
||
# intel compiler flags | ||
AX_CHECK_COMPILE_FLAG([-qopenmp], [FCFLAGS="$FCFLAGS -qopenmp -DENABLE_OPENMP"]) | ||
else | ||
AC_MSG_RESULT([no]) | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# =========================================================================== | ||
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html | ||
# =========================================================================== | ||
# | ||
# SYNOPSIS | ||
# | ||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) | ||
# | ||
# DESCRIPTION | ||
# | ||
# Check whether the given FLAG works with the current language's compiler | ||
# or gives an error. (Warnings, however, are ignored) | ||
# | ||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | ||
# success/failure. | ||
# | ||
# If EXTRA-FLAGS is defined, it is added to the current language's default | ||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with | ||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to | ||
# force the compiler to issue an error when a bad flag is given. | ||
# | ||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE. | ||
# | ||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | ||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. | ||
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2008 Guido U. Draheim <[email protected]> | ||
# Copyright (c) 2011 Maarten Bosmans <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 6 | ||
|
||
AC_DEFUN([AX_CHECK_COMPILE_FLAG], | ||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF | ||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl | ||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ | ||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS | ||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" | ||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], | ||
[AS_VAR_SET(CACHEVAR,[yes])], | ||
[AS_VAR_SET(CACHEVAR,[no])]) | ||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) | ||
AS_VAR_IF(CACHEVAR,yes, | ||
[m4_default([$2], :)], | ||
[m4_default([$3], :)]) | ||
AS_VAR_POPDEF([CACHEVAR])dnl | ||
])dnl AX_CHECK_COMPILE_FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# =========================================================================== | ||
# https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html | ||
# =========================================================================== | ||
# | ||
# SYNOPSIS | ||
# | ||
# AX_COMPILER_VENDOR | ||
# | ||
# DESCRIPTION | ||
# | ||
# Determine the vendor of the C, C++ or Fortran compiler. The vendor is | ||
# returned in the cache variable $ax_cv_c_compiler_vendor for C, | ||
# $ax_cv_cxx_compiler_vendor for C++ or $ax_cv_fc_compiler_vendor for | ||
# (modern) Fortran. The value is one of "intel", "ibm", "pathscale", | ||
# "clang" (LLVM), "cray", "fujitsu", "sdcc", "sx", "nvhpc" (NVIDIA HPC | ||
# Compiler), "portland" (PGI), "gnu" (GCC), "sun" (Oracle Developer | ||
# Studio), "hp", "dec", "borland", "comeau", "kai", "lcc", "sgi", | ||
# "microsoft", "metrowerks", "watcom", "tcc" (Tiny CC) or "unknown" (if | ||
# the compiler cannot be determined). | ||
# | ||
# To check for a Fortran compiler, you must first call AC_FC_PP_SRCEXT | ||
# with an appropriate preprocessor-enabled extension. For example: | ||
# | ||
# AC_LANG_PUSH([Fortran]) | ||
# AC_PROG_FC | ||
# AC_FC_PP_SRCEXT([F]) | ||
# AX_COMPILER_VENDOR | ||
# AC_LANG_POP([Fortran]) | ||
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2008 Steven G. Johnson <[email protected]> | ||
# Copyright (c) 2008 Matteo Frigo | ||
# Copyright (c) 2018-19 John Zaitseff <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by the | ||
# Free Software Foundation, either version 3 of the License, or (at your | ||
# option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
# Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program. If not, see <https://www.gnu.org/licenses/>. | ||
# | ||
# As a special exception, the respective Autoconf Macro's copyright owner | ||
# gives unlimited permission to copy, distribute and modify the configure | ||
# scripts that are the output of Autoconf when processing the Macro. You | ||
# need not follow the terms of the GNU General Public License when using | ||
# or distributing such scripts, even though portions of the text of the | ||
# Macro appear in them. The GNU General Public License (GPL) does govern | ||
# all other use of the material that constitutes the Autoconf Macro. | ||
# | ||
# This special exception to the GPL applies to versions of the Autoconf | ||
# Macro released by the Autoconf Archive. When you make and distribute a | ||
# modified version of the Autoconf Macro, you may extend this special | ||
# exception to the GPL to apply to your modified version as well. | ||
|
||
#serial 32 | ||
|
||
AC_DEFUN([AX_COMPILER_VENDOR], [dnl | ||
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [dnl | ||
dnl If you modify this list of vendors, please add similar support | ||
dnl to ax_compiler_version.m4 if at all possible. | ||
dnl | ||
dnl Note: Do NOT check for GCC first since some other compilers | ||
dnl define __GNUC__ to remain compatible with it. Compilers that | ||
dnl are very slow to start (such as Intel) are listed first. | ||
vendors=" | ||
intel: __ICC,__ECC,__INTEL_COMPILER | ||
ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__ | ||
pathscale: __PATHCC__,__PATHSCALE__ | ||
clang: __clang__ | ||
cray: _CRAYC | ||
fujitsu: __FUJITSU | ||
sdcc: SDCC,__SDCC | ||
sx: _SX | ||
nvhpc: __NVCOMPILER | ||
portland: __PGI | ||
gnu: __GNUC__ | ||
sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95 | ||
hp: __HP_cc,__HP_aCC | ||
dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER | ||
borland: __BORLANDC__,__CODEGEARC__,__TURBOC__ | ||
comeau: __COMO__ | ||
kai: __KCC | ||
lcc: __LCC__ | ||
sgi: __sgi,sgi | ||
microsoft: _MSC_VER | ||
metrowerks: __MWERKS__ | ||
watcom: __WATCOMC__ | ||
tcc: __TINYC__ | ||
unknown: UNKNOWN | ||
" | ||
for ventest in $vendors; do | ||
case $ventest in | ||
*:) | ||
vendor=$ventest | ||
continue | ||
;; | ||
*) | ||
vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" | ||
;; | ||
esac | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ | ||
#if !($vencpp) | ||
thisisanerror; | ||
#endif | ||
]])], [break]) | ||
done | ||
ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` | ||
]) | ||
])dnl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.