From 898f363a82ca6a6cc173fac2e2b4c9e3fe2b577a Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 23 Jun 2009 12:45:15 +0000 Subject: [PATCH] config/pac.m4 mlprec/mld_caggrmat_smth_asb.F90 mlprec/mld_daggrmat_smth_asb.F90 mlprec/mld_saggrmat_smth_asb.F90 mlprec/mld_zaggrmat_smth_asb.F90 mld2p4: Switched order of arguments in sp_scal; now it is more logical (D,A) <-> A = DA --- config/pac.m4 | 65 +++++++++++++++++++++++++++++++- mlprec/mld_caggrmat_smth_asb.F90 | 4 +- mlprec/mld_daggrmat_smth_asb.F90 | 4 +- mlprec/mld_saggrmat_smth_asb.F90 | 4 +- mlprec/mld_zaggrmat_smth_asb.F90 | 4 +- 5 files changed, 72 insertions(+), 9 deletions(-) diff --git a/config/pac.m4 b/config/pac.m4 index 064bbd1d..8651862e 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -376,7 +376,7 @@ dnl Depending on the compiler flags, this could cause a conftest.mod file to app dnl in the present directory, or in another, or with another name. So be warned! dnl dnl @author Michele Martone -dnl +dnl @author Salvatore Filippone AC_DEFUN(PAC_FORTRAN_TEST_TR15581, ac_exeext='' ac_ext='f90' @@ -441,9 +441,56 @@ program testtr15581 end program testtr15581 EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + AC_MSG_RESULT([yes]) ifelse([$1], , :, [ $1]) else + AC_MSG_RESULT([no]) + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$2], , , [ + $2 +])dnl +fi +cd .. +rm -fr tmpdir_$i]) +dnl @synopsis PAC_FORTRAN_TEST_VOLATILE( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +dnl Will try to compile and link a program checking the VOLATILE Fortran support. +dnl +dnl Will use MPIFC, otherwise '$FC'. +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 Michele Martone +dnl @author Salvatore Filippone +AC_DEFUN(PAC_FORTRAN_TEST_VOLATILE, +ac_exeext='' +ac_ext='f90' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +dnl Warning : square brackets are EVIL! +[AC_MSG_CHECKING([support for Fortran VOLATILE]) +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 <&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$2], , , [ @@ -600,6 +647,22 @@ fi ])dnl +dnl @synopsis PAC_MAKE_IS_GNUMAKE +dnl +dnl @author Salvatore Filippone +dnl +define(PAC_MAKE_IS_GNUMAKE,[ +AC_MSG_CHECKING(for gnumake) +MAKE=${MAKE:-make} + +if $MAKE --version 2>&1 | grep -e"GNU Make" >/dev/null; then + AC_MSG_RESULT(yes) + psblas_make_gnumake='yes' +else + AC_MSG_RESULT(no) + psblas_make_gnumake='no' +fi +])dnl dnl @synopsis PAC_CHECK_UMFPACK dnl diff --git a/mlprec/mld_caggrmat_smth_asb.F90 b/mlprec/mld_caggrmat_smth_asb.F90 index e4c4ce65..61946d42 100644 --- a/mlprec/mld_caggrmat_smth_asb.F90 +++ b/mlprec/mld_caggrmat_smth_asb.F90 @@ -301,9 +301,9 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info) end if end do - if (filter_mat) call psb_sp_scal(af,adiag,info) + if (filter_mat) call psb_sp_scal(adiag,af,info) - call psb_sp_scal(am3,adiag,info) + call psb_sp_scal(adiag,am3,info) if (info /= 0) goto 9999 diff --git a/mlprec/mld_daggrmat_smth_asb.F90 b/mlprec/mld_daggrmat_smth_asb.F90 index 8357ba43..0b8c9311 100644 --- a/mlprec/mld_daggrmat_smth_asb.F90 +++ b/mlprec/mld_daggrmat_smth_asb.F90 @@ -301,9 +301,9 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info) end if end do - if (filter_mat) call psb_sp_scal(af,adiag,info) + if (filter_mat) call psb_sp_scal(adiag,af,info) - call psb_sp_scal(am3,adiag,info) + call psb_sp_scal(adiag,am3,info) if (info /= 0) goto 9999 diff --git a/mlprec/mld_saggrmat_smth_asb.F90 b/mlprec/mld_saggrmat_smth_asb.F90 index 390da85b..bf1853a7 100644 --- a/mlprec/mld_saggrmat_smth_asb.F90 +++ b/mlprec/mld_saggrmat_smth_asb.F90 @@ -301,9 +301,9 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info) end if end do - if (filter_mat) call psb_sp_scal(af,adiag,info) + if (filter_mat) call psb_sp_scal(adiag,af,info) - call psb_sp_scal(am3,adiag,info) + call psb_sp_scal(adiag,am3,info) if (info /= 0) goto 9999 diff --git a/mlprec/mld_zaggrmat_smth_asb.F90 b/mlprec/mld_zaggrmat_smth_asb.F90 index 12e8a935..b1acd28d 100644 --- a/mlprec/mld_zaggrmat_smth_asb.F90 +++ b/mlprec/mld_zaggrmat_smth_asb.F90 @@ -301,9 +301,9 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info) end if end do - if (filter_mat) call psb_sp_scal(af,adiag,info) + if (filter_mat) call psb_sp_scal(adiag,af,info) - call psb_sp_scal(am3,adiag,info) + call psb_sp_scal(adiag,am3,info) if (info /= 0) goto 9999