config/pac.m4
 configure.ac
 configure

Added check for mpi_f08 module.
psblas-3.2.0
Salvatore Filippone 11 years ago
parent 4c31ca5a04
commit 13938b910a

@ -254,6 +254,44 @@ rm -f conftest*])
dnl @synopsis PAC_FORTRAN_CHECK_HAVE_MPI_MOD_F08( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl
dnl Will determine if the fortran compiler MPIFC provides mpi_f08
dnl
dnl If yes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
dnl
dnl @author Michele Martone <michele.martone@uniroma2.it>
dnl Modified Salvatore Filippone <salvatore.filippone@uniroma2.it>
dnl
AC_DEFUN(PAC_FORTRAN_CHECK_HAVE_MPI_MOD_F08,
ac_exeext=''
ac_ext='f90'
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
dnl Warning : square brackets are EVIL!
[AC_MSG_CHECKING([MPI Fortran 2008 interface])
cat > conftest.$ac_ext <<EOF
program test
use mpi_f08
end program test
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
pac_cv_mpi_f08="yes";
AC_MSG_RESULT([ use mpi_f08. ])
ifelse([$1], , :, [rm -rf conftest*
$1])
else
pac_cv_mpi_f08="no";
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
AC_MSG_RESULT([ no. ])
ifelse([$2], , , [ rm -rf conftest*
$2
])dnl
fi
rm -f conftest*])
dnl @synopsis PAC_ARG_WITH_FLAGS(lcase_name, UCASE_NAME) dnl @synopsis PAC_ARG_WITH_FLAGS(lcase_name, UCASE_NAME)
dnl dnl
dnl Test for --with-lcase_name="compiler/loader flags". if defined, prepend dnl Test for --with-lcase_name="compiler/loader flags". if defined, prepend

32
configure vendored

@ -7376,6 +7376,36 @@ else
ac_exeext='' ac_exeext=''
ac_ext='f90' ac_ext='f90'
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
{ $as_echo "$as_me:$LINENO: checking MPI Fortran 2008 interface" >&5
$as_echo_n "checking MPI Fortran 2008 interface... " >&6; }
cat > conftest.$ac_ext <<EOF
program test
use mpi_f08
end program test
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext}; then
pac_cv_mpi_f08="yes";
{ $as_echo "$as_me:$LINENO: result: use mpi_f08. " >&5
$as_echo " use mpi_f08. " >&6; }
:
else
pac_cv_mpi_f08="no";
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
{ $as_echo "$as_me:$LINENO: result: no. " >&5
$as_echo " no. " >&6; }
fi
rm -f conftest*
if test x"$pac_cv_mpi_f08" == x"yes" ; then
FDEFINES="$psblas_cv_define_prepend-DMPI_MOD_F08 $FDEFINES";
else
ac_exeext=''
ac_ext='f90'
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
{ $as_echo "$as_me:$LINENO: checking MPI Fortran interface" >&5 { $as_echo "$as_me:$LINENO: checking MPI Fortran interface" >&5
$as_echo_n "checking MPI Fortran interface... " >&6; } $as_echo_n "checking MPI Fortran interface... " >&6; }
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
@ -7399,9 +7429,9 @@ else
$as_echo " include mpif.h " >&6; } $as_echo " include mpif.h " >&6; }
rm -rf conftest* rm -rf conftest*
FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES" FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES"
fi fi
rm -f conftest* rm -f conftest*
fi
fi fi

@ -511,10 +511,14 @@ fi
if test x"$pac_cv_serial_mpi" == x"yes" ; then if test x"$pac_cv_serial_mpi" == x"yes" ; then
FDEFINES="$psblas_cv_define_prepend-DSERIAL_MPI $psblas_cv_define_prepend-DMPI_MOD $FDEFINES"; FDEFINES="$psblas_cv_define_prepend-DSERIAL_MPI $psblas_cv_define_prepend-DMPI_MOD $FDEFINES";
else else
PAC_FORTRAN_CHECK_HAVE_MPI_MOD_F08()
if test x"$pac_cv_mpi_f08" == x"yes" ; then
FDEFINES="$psblas_cv_define_prepend-DMPI_MOD_F08 $FDEFINES";
else
PAC_FORTRAN_CHECK_HAVE_MPI_MOD( PAC_FORTRAN_CHECK_HAVE_MPI_MOD(
[FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES"], [FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES"],
[FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES"] [FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES"])
) fi
fi fi
PAC_ARG_LONG_INTEGERS PAC_ARG_LONG_INTEGERS

Loading…
Cancel
Save