~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/m4/ga_mpif77_test.m4

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# GA_MPIF77_TEST_PROGRAM
 
2
# ----------------------
 
3
# Create an MPI test program in Fortran 77.
 
4
AC_DEFUN([GA_MPIF77_TEST_PROGRAM], [
 
5
AC_LANG_PUSH([Fortran 77])
 
6
AC_LANG_CONFTEST([AC_LANG_PROGRAM([],
 
7
[[      include 'mpif.h'
 
8
      integer ierr
 
9
      call MPI_Init( ierr )
 
10
      call MPI_Finalize( ierr )]])])
 
11
AC_LANG_POP([Fortran 77])
 
12
])dnl
 
13
 
 
14
# GA_MPIF77_TEST_COMPILE
 
15
# ----------------------
 
16
# Attempt to compile a simple MPI program in Fortran 77.
 
17
AC_DEFUN([GA_MPIF77_TEST_COMPILE], [
 
18
AC_LANG_PUSH([Fortran 77])
 
19
GA_MPIF77_TEST_PROGRAM()
 
20
AC_CACHE_CHECK([whether a simple Fortran MPI program compiles],
 
21
    [ga_cv_f77_mpi_test_compile],
 
22
    [ga_save_FFLAGS="$FFLAGS"; FFLAGS="$FFLAGS $GA_MP_CPPFLAGS"
 
23
     AC_COMPILE_IFELSE([],
 
24
        [ga_cv_f77_mpi_test_compile=yes],
 
25
        [ga_cv_f77_mpi_test_compile=no])
 
26
     FFLAGS="$ga_save_FFLAGS"])
 
27
rm -f conftest.$ac_ext
 
28
AC_LANG_POP([Fortran 77])
 
29
AS_IF([test "x$ga_cv_f77_mpi_test_compile" = xno],
 
30
    [AC_MSG_FAILURE([could not compile simple Fortran MPI program])])
 
31
])dnl
 
32
 
 
33
# GA_MPIF77_TEST_LINK
 
34
# -------------------
 
35
# Attempt to compile a simple MPI program in Fortran 77.
 
36
AC_DEFUN([GA_MPIF77_TEST_LINK], [
 
37
AC_LANG_PUSH([Fortran 77])
 
38
GA_MPIF77_TEST_PROGRAM()
 
39
ga_cv_f77_mpi_test_link=no
 
40
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
41
    [AC_MSG_CHECKING([whether a Fortran MPI program links natively])
 
42
     AC_LINK_IFELSE([],
 
43
        [ga_cv_f77_mpi_test_link=yes
 
44
         GA_MP_LIBS=
 
45
         GA_MP_LDFLAGS=
 
46
         GA_MP_CPPFLAGS=],
 
47
        [ga_cv_f77_mpi_test_link=no])
 
48
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
49
# That didn't work.  Let's try adding our GA_MP_* flags.
 
50
# The CPPFLAGS are added to FFLAGS since *.f doesn't use CPP.  LIBS changes.
 
51
ga_save_LIBS="$LIBS"
 
52
ga_save_FFLAGS="$FFLAGS";   FFLAGS="$FFLAGS $GA_MP_CPPFLAGS"
 
53
ga_save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LDFLAGS $GA_MP_LDFLAGS"
 
54
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
55
    [AC_MSG_CHECKING([whether a Fortran MPI program links with additional env])
 
56
     LIBS="$LIBS $GA_MP_LIBS"
 
57
     AC_LINK_IFELSE([],
 
58
        [ga_cv_f77_mpi_test_link=yes],
 
59
        [ga_cv_f77_mpi_test_link=no])
 
60
     LIBS="$ga_save_LIBS"
 
61
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
62
# That didn't work, so now let's try with specific libs.
 
63
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
64
    [AC_MSG_CHECKING([for mvapich libraries])
 
65
     for lib in "-lmpichf90nc -lmpichfarg -lmpich -lpthread" "-lmpichf90 -lmpichfarg -lmpich -pthread" "-lmpichf90nc -lmpichfarg -lmpich" "-lmpichf90 -lmpichfarg -lmpich" "-lmpichfarg -lmpich -lpthread" "-lmpichfarg -lmpich"
 
66
     do
 
67
        LIBS="$LIBS $lib"
 
68
        AC_LINK_IFELSE([],
 
69
            [ga_cv_f77_mpi_test_link="$lib"; break],
 
70
            [ga_cv_f77_mpi_test_link=no])
 
71
        LIBS="$ga_save_LIBS"
 
72
     done
 
73
     LIBS="$ga_save_LIBS"
 
74
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
75
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
76
    [AC_MSG_CHECKING([for mpich libraries])
 
77
     for lib in "-lmpichf90 -lmpich -lpthread" "-lmpichf90 -lmpich" "-lmpich -pthread" "-lmpich"
 
78
     do
 
79
        LIBS="$LIBS $lib"
 
80
        AC_LINK_IFELSE([],
 
81
            [ga_cv_f77_mpi_test_link="$lib"; break],
 
82
            [ga_cv_f77_mpi_test_link=no])
 
83
        LIBS="$ga_save_LIBS"
 
84
     done
 
85
     LIBS="$ga_save_LIBS"
 
86
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
87
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
88
    [AC_MSG_CHECKING([for hpmpi libraries])
 
89
     for lib in "-lhpmpio -lhpmpi"
 
90
     do
 
91
        LIBS="$LIBS $lib"
 
92
        AC_LINK_IFELSE([],
 
93
            [ga_cv_f77_mpi_test_link="$lib"; break],
 
94
            [ga_cv_f77_mpi_test_link=no])
 
95
        LIBS="$ga_save_LIBS"
 
96
     done
 
97
     LIBS="$ga_save_LIBS"
 
98
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
99
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
100
    [AC_MSG_CHECKING([for intelmpi libraries])
 
101
     for lib in "-lmpi -lmpigf -lmpigi -lpthread" "-lmpi -lmpigf -lmpigi"
 
102
     do
 
103
        LIBS="$LIBS $lib"
 
104
        AC_LINK_IFELSE([],
 
105
            [ga_cv_f77_mpi_test_link="$lib"; break],
 
106
            [ga_cv_f77_mpi_test_link=no])
 
107
        LIBS="$ga_save_LIBS"
 
108
     done
 
109
     LIBS="$ga_save_LIBS"
 
110
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
111
AS_IF([test "x$ga_cv_f77_mpi_test_link" = xno],
 
112
    [AC_MSG_CHECKING([for openmpi libraries])
 
113
     for lib in "-lmpi_f90 -lmpi_f77 -lmpi" "-lmpi_f77 -lmpi"
 
114
     do
 
115
        LIBS="$LIBS $lib"
 
116
        AC_LINK_IFELSE([],
 
117
            [ga_cv_f77_mpi_test_link="$lib"; break],
 
118
            [ga_cv_f77_mpi_test_link=no])
 
119
        LIBS="$ga_save_LIBS"
 
120
     done
 
121
     LIBS="$ga_save_LIBS"
 
122
     AC_MSG_RESULT([$ga_cv_f77_mpi_test_link])])
 
123
rm -f conftest.$ac_ext
 
124
LIBS="$ga_save_LIBS"
 
125
LDFLAGS="$ga_save_LDFLAGS"
 
126
FFLAGS="$ga_save_FFLAGS"
 
127
AC_LANG_POP([Fortran 77])
 
128
AS_CASE([$ga_cv_f77_mpi_test_link],
 
129
    [yes],  [],
 
130
    [no],   [AC_MSG_FAILURE([could not link simple Fortran MPI program])],
 
131
    [*],    [GA_MP_LIBS="$ga_cv_f77_mpi_test_link"],
 
132
    [])
 
133
])dnl