mld2p4-2:

Make.inc.in
 config/pac.m4
 configure.ac
 configure

Added MUMPS to configry stuff.
stopcriterion
Salvatore Filippone 9 years ago
parent cabed9fc26
commit 260a6aa3ce

@ -25,6 +25,10 @@ INSTALL_DOCSDIR=@INSTALL_DOCSDIR@
# PSBLAS main Make.inc # # PSBLAS main Make.inc #
# # # #
# Examples: # # Examples: #
# MUMPSLIBS=-ldmumps -lmumps_common #
# -lpord -L/path/to/MUMPS/lib #
# MUMPSFLAGS=-DHave_MUMPS_ -I/path/to/MUMPS/include #
# #
# UMFLIBS=-lumfpack -lamd -L/path/to/UMFPACK # # UMFLIBS=-lumfpack -lamd -L/path/to/UMFPACK #
# UMFFLAGS=-DHave_UMF_ -I/path/to/UMFPACK # # UMFFLAGS=-DHave_UMF_ -I/path/to/UMFPACK #
# # # #
@ -36,23 +40,25 @@ INSTALL_DOCSDIR=@INSTALL_DOCSDIR@
# # # #
########################################################## ##########################################################
MUMPSLIBS=@MUMPS_LIBS@
MUMPSFLAGS=@MUMPS_FLAGS@
SLULIBS=@SLU_LIBS@ SLULIBS=@SLU_LIBS@
SLUFLAGS=@SLU_FLAGS@ SLUFLAGS=@SLU_FLAGS@
SLUDISTLIBS=@SLUDIST_LIBS@ SLUDISTLIBS=@SLUDIST_LIBS@
SLUDISTFLAGS=@SLUDIST_FLAGS@ SLUDISTFLAGS=@SLUDIST_FLAGS@
UMFLIBS=@UMF_LIBS@ UMFLIBS=@UMF_LIBS@
UMFFLAGS=@UMF_FLAGS@ UMFFLAGS=@UMF_FLAGS@
EXTRALIBS=@EXTRA_LIBS@ EXTRALIBS=@EXTRA_LIBS@
MLDLDLIBS=$(SLULIBS) $(SLUDISTLIBS) $(UMFLIBS) $(EXTRALIBS) $(PSBLDLIBS) MLDLDLIBS=$(MUMPSLIBS) $(SLULIBS) $(SLUDISTLIBS) $(UMFLIBS) $(EXTRALIBS) $(PSBLDLIBS)
LDLIBS=$(MLDLDLIBS) LDLIBS=$(MLDLDLIBS)
# #
MLDCDEFINES=$(SLUFLAGS) $(UMFFLAGS) $(SLUDISTFLAGS) $(PSBCDEFINES) MLDCDEFINES=$(MUMPSFLAGS) $(SLUFLAGS) $(UMFFLAGS) $(SLUDISTFLAGS) $(PSBCDEFINES)
MLDFDEFINES=@FDEFINES@ $(PSBFDEFINES) MLDFDEFINES=@FDEFINES@ $(PSBFDEFINES)
CDEFINES=$(MLDCDEFINES) CDEFINES=$(MLDCDEFINES)

@ -855,6 +855,120 @@ fi
AC_LANG_POP([C]) AC_LANG_POP([C])
])dnl ])dnl
dnl @synopsis PAC_CHECK_MUMPS
dnl
dnl Will try to find the MUMPS library and headers.
dnl
dnl Will use $CC
dnl
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
dnl Note : This file will be likely to induce the compiler to create a module file
dnl (for a module called conftest).
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
dnl in the present directory, or in another, or with another name. So be warned!
dnl
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
dnl
AC_DEFUN(PAC_CHECK_MUMPS,
[AC_ARG_WITH(mumps, AC_HELP_STRING([--with-mumps=LIBNAME], [Specify the libname for MUMPS. Default: "-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common -lpord"]),
[mld2p4_cv_mumps=$withval],
[mld2p4_cv_mumps='-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common -lpord'])
AC_ARG_WITH(mumpsdir, AC_HELP_STRING([--with-mumpsdir=DIR], [Specify the directory for MUMPS library and includes. Note: you will need to add auxiliary libraries with --extra-libs; this depends on how MUMPS was configured and installed, at a minimum you will need SCALAPACK and BLAS]),
[mld2p4_cv_mumpsdir=$withval],
[mld2p4_cv_mumpsdir=''])
AC_ARG_WITH(mumpsincdir, AC_HELP_STRING([--with-mumpsincdir=DIR], [Specify the directory for MUMPS includes.]),
[mld2p4_cv_mumpsincdir=$withval],
[mld2p4_cv_mumpsincdir=''])
AC_ARG_WITH(mumpslibdir, AC_HELP_STRING([--with-mumpslibdir=DIR], [Specify the directory for MUMPS library.]),
[mld2p4_cv_mumpslibdir=$withval],
[mld2p4_cv_mumpslibdir=''])
AC_LANG_PUSH([Fortran])
save_LIBS="$LIBS"
save_FC="$FC"
FC=${MPIFC}
if test "x$mld2p4_cv_mumpsincdir" != "x"; then
AC_MSG_NOTICE([mumps dir $mld2p4_cv_mumpsincdir])
MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsincdir"
elif test "x$mld2p4_cv_mumpsdir" != "x"; then
AC_MSG_NOTICE([mumps dir $mld2p4_cv_mumpsdir])
MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsdir"
fi
if test "x$mld2p4_cv_mumpslibdir" != "x"; then
MUMPS_LIBS="-L$mld2p4_cv_mumpslibdir"
elif test "x$mld2p4_cv_mumpsdir" != "x"; then
MUMPS_LIBS="-L$mld2p4_cv_mumpsdir"
fi
LIBS="$MUMPS_LIBS $save_LIBS $EXTRA_LIBS"
CPPFLAGS="$MUMPS_INCLUDES $save_CPPFLAGS"
ac_objext='o'
ac_ext='f90'
ac_fc="${MPIFC-$FC}";
save_FCFLAGS="$FCFLAGS";
FCFLAGS=" $MUMPS_INCLUDES $save_FCFLAGS"
AC_COMPILE_IFELSE([
program test
use dmumps_struc_def
end program test],
[pac_mumps_header_ok=yes; mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES";],
[pac_mumps_header_ok=no; MUMPS_INCLUDES=""])
if test "x$pac_mumps_header_ok" == "xno" ; then
dnl Maybe Include or include subdirs?
MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsdir/include"
FCFLAGS="$MUMPS_INCLUDES $save_CPPFLAGS"
AC_COMPILE_IFELSE([
program test
use dmumps_struc_def
end program test],
[pac_mumps_header_ok=yes mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES";],
[pac_mumps_header_ok=no; MUMPS_INCLUDES=""])
fi
if test "x$pac_mumps_header_ok" == "xno" ; then
dnl Maybe Include or include subdirs?
MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsdir/Include"
FCFLAGS="$MUMPS_INCLUDES $save_CPPFLAGS"
AC_COMPILE_IFELSE([
program test
use dmumps_struc_def
end program test],
[pac_mumps_header_ok=yes mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES";],
[pac_mumps_header_ok=no; MUMPS_INCLUDES=""])
fi
if test "x$pac_mumps_header_ok" == "xyes" ; then
MUMPS_LIBS="$mld2p4_cv_mumps $MUMPS_LIBS"
LIBS="$MUMPS_LIBS $save_LIBS $EXTRA_LIBS";
AC_MSG_CHECKING([for dmumps in $MUMPS_LIBS])
AC_TRY_LINK_FUNC(dmumps,
[mld2p4_cv_have_mumps=yes;pac_mumps_lib_ok=yes;],
[mld2p4_cv_have_mumps=no;pac_mumps_lib_ok=no;
MUMPS_LIBS=""; ])
if test "x$pac_mumps_lib_ok" == "xno" ; then
dnl Maybe lib?
MUMPS_LIBS="$mld2p4_cv_mumps -L$mld2p4_cv_mumpsdir/lib";
LIBS="$MUMPS_LIBS $save_LIBS $EXTRA_LIBS";
AC_TRY_LINK_FUNC(dmumps,
[mld2p4_cv_have_mumps=yes;pac_mumps_lib_ok=yes;],
[mld2p4_cv_have_mumps=no;pac_mumps_lib_ok=no;
MUMPS_LIBS="";MUMPS_INCLUDES=""])
fi
AC_MSG_RESULT($pac_mumps_lib_ok)
fi
LIBS="$save_LIBS";
CPPFLAGS="$save_CPPFLAGS";
FC="$save_FC";
AC_LANG_POP([Fortran])
])dnl
dnl @synopsis PAC_ARG_SERIAL_MPI dnl @synopsis PAC_ARG_SERIAL_MPI
dnl dnl
dnl Test for --with-serial-mpi={yes|no} dnl Test for --with-serial-mpi={yes|no}

8468
configure vendored

File diff suppressed because it is too large Load Diff

@ -153,27 +153,8 @@ dnl CPPFLAGS="$INCLUDEPATH $CPPFLAGS"
############################################################################### ###############################################################################
# METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks #
############################################################################### ###############################################################################
# Note : also SuperLUStat,superlu_gridexit,..
# Note : SuperLU_Dist produces superlu.a by default..
# Note : THESE WERE NOT TESTED
dnl AC_MSG_CHECKING([SuperLU_Dist])
dnl AC_CHECK_LIB(superlu,[superlu_malloc_dist],mld2p4_cv_have_superludist=yes,mld2p4_cv_have_superludist=no)
dnl AC_MSG_RESULT([$mld2p4_cv_have_superludist])
dnl AC_MSG_CHECKING([SuperLU])
dnl AC_CHECK_LIB(superlu,[superlu_malloc],mld2p4_cv_have_superlu=yes,mld2p4_cv_have_superlu=no)
dnl AC_MSG_RESULT([$mld2p4_cv_have_superlu])
PAC_CHECK_UMFPACK
if test "x$mld2p4_cv_have_umfpack" == "xyes" ; then
UMF_FLAGS="-DHave_UMF_ $UMF_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_UMF_ $FDEFINES"
else
UMF_FLAGS=""
fi
PAC_ARG_SERIAL_MPI PAC_ARG_SERIAL_MPI
#Note : we miss the name of the Intel C compiler #Note : we miss the name of the Intel C compiler
@ -216,24 +197,6 @@ dnl Now on, MPIFC should be set, as MPIF77 and MPICC
# Sanity checks, although redundant (useful when debugging this configure.ac)! # Sanity checks, although redundant (useful when debugging this configure.ac)!
############################################################################### ###############################################################################
PAC_CHECK_SUPERLU
if test "x$mld2p4_cv_have_superlu" == "xyes" ; then
SLU_FLAGS="-DHave_SLU_ -DSLU_VERSION_$pac_slu_version $SLU_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_SLU_ $FDEFINES"
else
SLU_FLAGS=""
fi
PAC_CHECK_SUPERLUDIST
if test "x$mld2p4_cv_have_superludist" == "xyes" ; then
SLUDIST_FLAGS=""
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
else
SLUDIST_FLAGS=""
fi
############################################################################### ###############################################################################
# PSBLAS library presence checks # PSBLAS library presence checks
############################################################################### ###############################################################################
@ -247,6 +210,7 @@ if test "x$FMFLAG" == "xnot" ; then
FIFLAG="-I" FIFLAG="-I"
fi fi
PAC_FORTRAN_HAVE_PSBLAS([AC_MSG_RESULT([yes.])], PAC_FORTRAN_HAVE_PSBLAS([AC_MSG_RESULT([yes.])],
[AC_MSG_ERROR([no. Could not find working version of PSBLAS.])]) [AC_MSG_ERROR([no. Could not find working version of PSBLAS.])])
@ -266,6 +230,44 @@ if (( $pac_cv_psblas_major < 3 )) ||
else else
AC_MSG_NOTICE([Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.$pac_cv_psblas_patchlevel.]) AC_MSG_NOTICE([Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.$pac_cv_psblas_patchlevel.])
fi fi
###############################################################################
# Auxiliary packages
###############################################################################
PAC_CHECK_MUMPS
if test "x$mld2p4_cv_have_mumps" == "xyes" ; then
MUMPS_FLAGS="-DHave_MUMPS_ $MUMPS_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_MUMPS_ $mld2p4_cv_mumpsincdir $FDEFINES"
else
MUMPS_FLAGS=""
fi
PAC_CHECK_UMFPACK
if test "x$mld2p4_cv_have_umfpack" == "xyes" ; then
UMF_FLAGS="-DHave_UMF_ $UMF_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_UMF_ $FDEFINES"
else
UMF_FLAGS=""
fi
PAC_CHECK_SUPERLU
if test "x$mld2p4_cv_have_superlu" == "xyes" ; then
SLU_FLAGS="-DHave_SLU_ -DSLU_VERSION_$pac_slu_version $SLU_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_SLU_ $FDEFINES"
else
SLU_FLAGS=""
fi
PAC_CHECK_SUPERLUDIST
if test "x$mld2p4_cv_have_superludist" == "xyes" ; then
SLUDIST_FLAGS=""
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
FDEFINES="$mld_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
else
SLUDIST_FLAGS=""
fi
############################################################################### ###############################################################################
# Variable substitutions : the Make.inc.in will have these @VARIABLES@ # Variable substitutions : the Make.inc.in will have these @VARIABLES@
@ -282,6 +284,8 @@ AC_SUBST(INSTALL_INCLUDEDIR)
AC_SUBST(INSTALL_DOCSDIR) AC_SUBST(INSTALL_DOCSDIR)
AC_SUBST(EXTRA_LIBS) AC_SUBST(EXTRA_LIBS)
AC_SUBST(MUMPS_FLAGS)
AC_SUBST(MUMPS_LIBS)
AC_SUBST(SLU_FLAGS) AC_SUBST(SLU_FLAGS)
AC_SUBST(SLU_LIBS) AC_SUBST(SLU_LIBS)
AC_SUBST(UMF_FLAGS) AC_SUBST(UMF_FLAGS)
@ -303,6 +307,7 @@ AC_MSG_NOTICE([
${PACKAGE_NAME} ${mld2p4_cv_version} has been configured as follows: ${PACKAGE_NAME} ${mld2p4_cv_version} has been configured as follows:
PSBLAS library : ${PSBLAS_DIR} PSBLAS library : ${PSBLAS_DIR}
MUMPS detected : ${mld2p4_cv_have_mumps}
SuperLU detected : ${mld2p4_cv_have_superlu} SuperLU detected : ${mld2p4_cv_have_superlu}
SuperLU_Dist detected : ${mld2p4_cv_have_superludist} SuperLU_Dist detected : ${mld2p4_cv_have_superludist}
UMFPack detected : ${mld2p4_cv_have_umfpack} UMFPack detected : ${mld2p4_cv_have_umfpack}

Loading…
Cancel
Save