Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yaxt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dkrz-sw
yaxt
Commits
9ce968e8
Commit
9ce968e8
authored
12 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Also check Fortran MPI module flags during configure.
parent
295c78fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.ac
+10
-4
10 additions, 4 deletions
configure.ac
m4/acx_fortran_check_include.m4
+93
-0
93 additions, 0 deletions
m4/acx_fortran_check_include.m4
with
103 additions
and
4 deletions
configure.ac
+
10
−
4
View file @
9ce968e8
...
...
@@ -47,14 +47,20 @@ dnl
dnl ######################################################################
dnl Checks for MPI.
dnl ######################################################################
ACX_FORTRAN_PACKAGE([MPI],[mpif.h],,,
[AC_MSG_ERROR([Required include mpif.h not found or not compilable.])],
[mpi_waitall],[mpi mpi_f90 mpi_f77 mpich],[[-lmpi_f77 -lmpi],[-lmpi]],,
[AC_MSG_ERROR([Cannot link Fortran MPI programs.])],[])
ACX_C_PACKAGE([MPI],[mpi.h],,,
[AC_MSG_ERROR([Required header mpi.h not found or not compilable.])],
[MPI_Waitall],[mpi mpich],,,
[AC_MSG_ERROR([Cannot link C MPI programs.])])
ACX_FORTRAN_PACKAGE([MPI],[mpif.h],,,
[AC_MSG_ERROR([Required include mpif.h not found or not compilable.])],
[mpi_waitall],[mpi mpi_f90 mpi_f77 mpich],[[-lmpi_f77 -lmpi],[-lmpi]],,
[AC_MSG_ERROR([Cannot link Fortran MPI programs.])],[])
ACX_F90_PACKAGE([MPI],[mpi],,,
[AC_MSG_ERROR([Required Fortran 90 module not found or incompatible.])],
[mpi_waitall],[mpi mpi_f90 mpi_f77 mpich],[[-lmpi_f77 -lmpi],[-lmpi]],,
[AC_MSG_ERROR([Cannot link Fortran 90 MPI programs.])],,
[ INTEGER :: req(1), stat(mpi_status_size, 1), ierror
],[(1, req, stat, ierror)])
# the following is needed for source parts from libraries with
# optional MPI dependencies
...
...
This diff is collapsed.
Click to expand it.
m4/acx_fortran_check_include.m4
0 → 100644
+
93
−
0
View file @
9ce968e8
dnl acx_fortran_check_include.m4 --- check module inclusion in compilation
dnl
dnl Copyright (C) 2012 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords:
dnl Author: Thomas Jahns <jahns@dkrz.de>
dnl Maintainer: Thomas Jahns <jahns@dkrz.de>
dnl URL: https://www.dkrz.de/redmine/projects/show/scales-ppm
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions are
dnl met:
dnl
dnl Redistributions of source code must retain the above copyright notice,
dnl this list of conditions and the following disclaimer.
dnl
dnl Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in the
dnl documentation and/or other materials provided with the distribution.
dnl
dnl Neither the name of the DKRZ GmbH nor the names of its contributors
dnl may be used to endorse or promote products derived from this software
dnl without specific prior written permission.
dnl
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
dnl IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl
# _ACX_FORTRAN_CHECK_MOD_IFELSE(MOD-FILE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
# [PREAMBLE])
# ------------------------------------------------------------------
# Check the compiler accepts MOD-FILE. The PREAMBLE might be defaulted.
m4_defun([_ACX_FORTRAN_CHECK_MOD_IFELSE],
[AC_LANG_PUSH([Fortran])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([program conftest
$4
use $1
end program conftest])],
[AS_VAR_SET([acx_Mod], [yes])])
AC_LANG_POP([Fortran])
AS_VAR_SET_IF([acx_Mod],[$2],[$3])dnl
])# _ACX_FORTRAN_CHECK_MOD_IFELSE
# ACX_FORTRAN_CHECK_MOD_PATHS_IFELSE(MOD-FILE, PATH...
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
# [MODS], [MOD-FLAGS], [TAG])
# ------------------------------------------------------------------
# Check the compiler loads MOD-FILE. The MODS might be defaulted.
# TAG defaults to extra
AC_DEFUN([ACX_FORTRAN_CHECK_MOD_PATHS_IFELSE],
[AC_REQUIRE([AC_PROG_FC])
AC_REQUIRE([ACX_SL_FC_CHECK_MOD_PATH_FLAG])
AS_VAR_PUSHDEF([acx_Mod], [acx_cv_fortran_mod_$1])dnl
AC_MSG_CHECKING([for $1 m4_default([$7],[extra]) module path])
AC_CACHE_VAL([acx_Mod],dnl
[ac_mod_search_FCFLAGS_SAVE="$FCFLAGS"
for ac_moddir in '' $2; do
AS_IF([test -z "$ac_moddir"],
[ac_res="none required"
FCFLAGS="m4_ifval([$6],[$6 ])$ac_mod_search_FCFLAGS_SAVE"],
[ac_res="$FC_MOD_FLAG$ac_moddir"
FCFLAGS="m4_ifval([$6],[$6 ])$ac_res $ac_mod_search_FCFLAGS_SAVE"])
_ACX_FORTRAN_CHECK_MOD_IFELSE([$1],dnl
[AS_IF([test -z "$ac_moddir"],dnl
[AS_VAR_SET([acx_Mod],["$6"])],dnl
[AS_VAR_SET([acx_Mod],["]m4_ifval([$6],[$6 ])[$FC_MOD_FLAG$ac_moddir"])])],,[$5])
AS_VAR_SET_IF([acx_Mod], [break])dnl
done
FCFLAGS="$ac_mod_search_FCFLAGS_SAVE"])
AS_VAR_SET_IF([acx_Mod],dnl
[AS_IF([test x"AS_VAR_GET([acx_Mod])" = x],dnl
[AC_MSG_RESULT([(none required)])],dnl
[AC_MSG_RESULT([AS_VAR_GET([acx_Mod])])])],
[AC_MSG_RESULT([not found])])
AS_VAR_SET_IF([acx_Mod], [$3], [$4])[]dnl
AS_VAR_POPDEF([acx_Mod])dnl
])# ACX_FORTRAN_CHECK_MOD_PATHS_IFELSE
dnl
dnl Local Variables:
dnl mode: autoconf
dnl license-project-url: "https://www.dkrz.de/redmine/projects/show/scales-ppm"
dnl license-default: "bsd"
dnl End:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment