mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-20 04:42:10 +00:00
mld2p4:
Add check in configury for version 2.3.1 of PSBLAS.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
dnl @synopsis AX_F90_MODULE_FLAG
|
||||
dnl
|
||||
dnl @summary Find Fortran 90 modules inclusion flag.
|
||||
dnl
|
||||
dnl Find Fortran 90 modules inclusion flag. The module inclusion flag
|
||||
dnl is stored in the cached variable ax_f90_modflag. An error is
|
||||
dnl triggered if the flag cannot be found. Supported are the -I GNU
|
||||
dnl compilers flag, the -M SUN compilers flag, and the -p Absoft Pro
|
||||
dnl Fortran compiler flag.
|
||||
dnl
|
||||
dnl @category Fortran
|
||||
dnl @author Luc Maisonobe <luc@spaceroots.org>
|
||||
dnl @author Julian C. Cummings <cummings@cacr.caltech.edu>
|
||||
dnl @version 2006-01-28
|
||||
dnl @license AllPermissive
|
||||
dnl modified Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl make it work even if ac_fc_ext="f"
|
||||
|
||||
AC_DEFUN([AX_F90_MODULE_FLAG],[
|
||||
AC_CACHE_CHECK([fortran 90 modules inclusion flag],
|
||||
ax_f90_modflag,
|
||||
[AC_LANG_PUSH(Fortran)
|
||||
i=0
|
||||
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
mkdir tmpdir_$i
|
||||
cd tmpdir_$i
|
||||
AC_COMPILE_IFELSE([
|
||||
module conftest_module
|
||||
contains
|
||||
subroutine conftest_routine
|
||||
write(*,'(a)') 'gotcha!'
|
||||
end subroutine conftest_routine
|
||||
end module conftest_module
|
||||
],[],[])
|
||||
cd ..
|
||||
ax_f90_modflag="not found"
|
||||
for ax_flag in "-I " "-M" "-p"; do
|
||||
if test "$ax_f90_modflag" = "not found" ; then
|
||||
ax_save_FCFLAGS="$FCFLAGS"
|
||||
FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i"
|
||||
AC_COMPILE_IFELSE([
|
||||
program conftest_program
|
||||
use conftest_module
|
||||
call conftest_routine
|
||||
end program conftest_program
|
||||
],[ax_f90_modflag="$ax_flag"],[])
|
||||
FCFLAGS="$ax_save_FCFLAGS"
|
||||
fi
|
||||
done
|
||||
rm -fr tmpdir_$i
|
||||
if test "$ax_flag" = "not found" ; then
|
||||
AC_MSG_ERROR([unable to find compiler flag for modules inclusion])
|
||||
fi
|
||||
AC_LANG_POP(Fortran)
|
||||
])])
|
||||
+39
-4
@@ -307,16 +307,51 @@ dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_FORTRAN_HAVE_PSBLAS,
|
||||
ac_exeext=''
|
||||
ac_objext='.o'
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[cat > conftest.$ac_ext <<EOF
|
||||
[AC_MSG_CHECKING([for working source dir of PSBLAS])
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test
|
||||
use psb_base_mod
|
||||
end program test
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
if AC_TRY_EVAL(ac_compile) && test -s conftest${ac_objext}; then
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [ rm -rf conftest*
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_HAVE_PSB_LONG_INT( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile with psb_long_int_k_
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_FORTRAN_HAVE_PSB_LONG_INT,
|
||||
ac_objext='.o'
|
||||
ac_ext='f90'
|
||||
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[AC_MSG_CHECKING([for version of PSBLAS supporting psb_long_int_k_])
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test
|
||||
use psb_base_mod
|
||||
integer(psb_long_int_k_) :: val
|
||||
end program test
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_compile) && test -s conftest${ac_objext}; then
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for MLD2P4 1.0.
|
||||
# Generated by GNU Autoconf 2.61 for MLD2P4 1.0.1.
|
||||
#
|
||||
# Report bugs to <bugreport@mld2p4.it>.
|
||||
#
|
||||
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='MLD2P4'
|
||||
PACKAGE_TARNAME='mld2p4'
|
||||
PACKAGE_VERSION='1.0'
|
||||
PACKAGE_STRING='MLD2P4 1.0'
|
||||
PACKAGE_VERSION='1.0.1'
|
||||
PACKAGE_STRING='MLD2P4 1.0.1'
|
||||
PACKAGE_BUGREPORT='bugreport@mld2p4.it'
|
||||
|
||||
ac_unique_file="mlprec/mld_prec_type.f90"
|
||||
@@ -1200,7 +1200,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures MLD2P4 1.0 to adapt to many kinds of systems.
|
||||
\`configure' configures MLD2P4 1.0.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1261,7 +1261,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of MLD2P4 1.0:";;
|
||||
short | recursive ) echo "Configuration of MLD2P4 1.0.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1375,7 +1375,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
MLD2P4 configure 1.0
|
||||
MLD2P4 configure 1.0.1
|
||||
generated by GNU Autoconf 2.61
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1389,7 +1389,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by MLD2P4 $as_me 1.0, which was
|
||||
It was created by MLD2P4 $as_me 1.0.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3055,10 +3055,6 @@ fi
|
||||
# But PSBLAS examples could take advantage of these libraries, too.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# BLACS library presence checks
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks
|
||||
###############################################################################
|
||||
@@ -4817,10 +4813,183 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Note : We would like to detect PSBLAS, but this is complicated by the
|
||||
# module symbols mangling rules, which are compiler specific !
|
||||
#
|
||||
# Moreover, the PSBLAS doesn't have an installer, currently.
|
||||
###############################################################################
|
||||
# PSBLAS library presence checks
|
||||
###############################################################################
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking fortran 90 modules inclusion flag" >&5
|
||||
echo $ECHO_N "checking fortran 90 modules inclusion flag... $ECHO_C" >&6; }
|
||||
if test "${ax_f90_modflag+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_ext=${ac_fc_srcext-f}
|
||||
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
|
||||
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
|
||||
|
||||
i=0
|
||||
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
mkdir tmpdir_$i
|
||||
cd tmpdir_$i
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
||||
module conftest_module
|
||||
contains
|
||||
subroutine conftest_routine
|
||||
write(*,'(a)') 'gotcha!'
|
||||
end subroutine conftest_routine
|
||||
end module conftest_module
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_fc_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
:
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
cd ..
|
||||
ax_f90_modflag="not found"
|
||||
for ax_flag in "-I " "-M" "-p"; do
|
||||
if test "$ax_f90_modflag" = "not found" ; then
|
||||
ax_save_FCFLAGS="$FCFLAGS"
|
||||
FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
||||
program conftest_program
|
||||
use conftest_module
|
||||
call conftest_routine
|
||||
end program conftest_program
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_fc_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
ax_f90_modflag="$ax_flag"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
FCFLAGS="$ax_save_FCFLAGS"
|
||||
fi
|
||||
done
|
||||
rm -fr tmpdir_$i
|
||||
if test "$ax_flag" = "not found" ; then
|
||||
{ { echo "$as_me:$LINENO: error: unable to find compiler flag for modules inclusion" >&5
|
||||
echo "$as_me: error: unable to find compiler flag for modules inclusion" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ax_f90_modflag" >&5
|
||||
echo "${ECHO_T}$ax_f90_modflag" >&6; }
|
||||
FMFLAG="${ax_f90_modflag%% *}"
|
||||
ac_objext='.o'
|
||||
ac_ext='f90'
|
||||
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
|
||||
{ echo "$as_me:$LINENO: checking for working source dir of PSBLAS" >&5
|
||||
echo $ECHO_N "checking for working source dir of PSBLAS... $ECHO_C" >&6; }
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test
|
||||
use psb_base_mod
|
||||
end program test
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && test -s conftest${ac_objext}; then
|
||||
rm -rf conftest*
|
||||
{ echo "$as_me:$LINENO: result: yes." >&5
|
||||
echo "${ECHO_T}yes." >&6; }
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
{ { echo "$as_me:$LINENO: error: no.
|
||||
Could not find working version of PSBLAS." >&5
|
||||
echo "$as_me: error: no.
|
||||
Could not find working version of PSBLAS." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
ac_objext='.o'
|
||||
ac_ext='f90'
|
||||
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
|
||||
{ echo "$as_me:$LINENO: checking for version of PSBLAS supporting psb_long_int_k_" >&5
|
||||
echo $ECHO_N "checking for version of PSBLAS supporting psb_long_int_k_... $ECHO_C" >&6; }
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test
|
||||
use psb_base_mod
|
||||
integer(psb_long_int_k_) :: val
|
||||
end program test
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && test -s conftest${ac_objext}; then
|
||||
rm -rf conftest*
|
||||
{ echo "$as_me:$LINENO: result: yes." >&5
|
||||
echo "${ECHO_T}yes." >&6; }
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
{ { echo "$as_me:$LINENO: error: no.
|
||||
Your version of PSBLAS appears to be old; pleas get version 2.3.1 or newer." >&5
|
||||
echo "$as_me: error: no.
|
||||
Your version of PSBLAS appears to be old; pleas get version 2.3.1 or newer." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -5275,7 +5444,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by MLD2P4 $as_me 1.0, which was
|
||||
This file was extended by MLD2P4 $as_me 1.0.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -5318,7 +5487,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
MLD2P4 config.status 1.0
|
||||
MLD2P4 config.status 1.0.1
|
||||
configured by $0, generated by GNU Autoconf 2.61,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
+11
-9
@@ -38,7 +38,7 @@ dnl NOTE : odd configurations like ifc + gcc still await in the mist of the unkn
|
||||
###############################################################################
|
||||
|
||||
# NOTE: the literal for version (the second argument to AC_INIT should be a literal!)
|
||||
AC_INIT([MLD2P4],1.0, bugreport@mld2p4.it)
|
||||
AC_INIT([MLD2P4],1.0.1, bugreport@mld2p4.it)
|
||||
|
||||
# VERSION is the file containing the PSBLAS version code
|
||||
# FIXME
|
||||
@@ -150,10 +150,6 @@ PAC_ARG_WITH_FLAGS(module-path,MODULE_PATH)
|
||||
# But PSBLAS examples could take advantage of these libraries, too.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# BLACS library presence checks
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks
|
||||
###############################################################################
|
||||
@@ -199,10 +195,16 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Note : We would like to detect PSBLAS, but this is complicated by the
|
||||
# module symbols mangling rules, which are compiler specific !
|
||||
#
|
||||
# Moreover, the PSBLAS doesn't have an installer, currently.
|
||||
###############################################################################
|
||||
# PSBLAS library presence checks
|
||||
###############################################################################
|
||||
AX_F90_MODULE_FLAG
|
||||
FMFLAG="${ax_f90_modflag%%[ ]*}"
|
||||
PAC_FORTRAN_HAVE_PSBLAS([AC_MSG_RESULT([yes.])],[AC_MSG_ERROR([no.
|
||||
Could not find working version of PSBLAS.])])
|
||||
|
||||
PAC_FORTRAN_HAVE_PSB_LONG_INT([AC_MSG_RESULT([yes.])],[AC_MSG_ERROR([no.
|
||||
Your version of PSBLAS appears to be old; pleas get version 2.3.1 or newer.])])
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user