mld2p4-2:

config/pac.m4
 configure.ac
 configure
 mlprec/impl/level/mld_c_base_onelev_descr.f90
 mlprec/impl/level/mld_d_base_onelev_descr.f90
 mlprec/impl/level/mld_s_base_onelev_descr.f90
 mlprec/impl/level/mld_z_base_onelev_descr.f90
 mlprec/impl/mld_cmlprec_bld.f90
 mlprec/impl/mld_dmlprec_bld.f90
 mlprec/impl/mld_smlprec_bld.f90
 mlprec/impl/mld_zmlprec_bld.f90
 mlprec/mld_c_onelev_mod.f90
 mlprec/mld_d_onelev_mod.f90
 mlprec/mld_s_onelev_mod.f90
 mlprec/mld_z_onelev_mod.f90


Fixed new informational message in onelev_descr.
Added check on PSBLAS version in configure machinery.
stopcriterion
Salvatore Filippone 10 years ago
parent 3b3a589c56
commit 5f132cb863

@ -358,7 +358,7 @@ ac_objext='.o'
ac_ext='f90' ac_ext='f90'
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/include $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5' ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/include $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
dnl Warning : square brackets are EVIL! dnl Warning : square brackets are EVIL!
[AC_MSG_CHECKING([for working source dir of PSBLAS]) [AC_MSG_CHECKING([for working installation of PSBLAS])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
program test program test
use psb_base_mod use psb_base_mod
@ -377,6 +377,58 @@ fi
rm -f conftest*]) rm -f conftest*])
dnl @synopsis PAC_FORTRAN_PSBLAS_VERSION( )
dnl
dnl Will try to compile, link and run a program using the PSBLAS library. \
dnl Checks for version major and minor
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 @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
dnl
AC_DEFUN(PAC_FORTRAN_PSBLAS_VERSION,
ac_exeext=''
ac_objext='.o'
ac_ext='f90'
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/include $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $FMFLAG$PSBLAS_DIR/include -L$PSBLAS_DIR/lib -lpsb_base $LIBS 1>&5'
dnl Warning : square brackets are EVIL!
[AC_MSG_CHECKING([for version of PSBLAS])
cat > conftest.$ac_ext <<EOF
program test
use psb_base_mod
print *,psb_version_major_
end program test
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
pac_cv_psblas_major=`./conftest${ac_exeext} | sed 's/^ *//'`
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
pac_cv_psblas_major="unknown";
fi
cat > conftest.$ac_ext <<EOF
program test
use psb_base_mod
print *,psb_version_minor_
end program test
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
pac_cv_psblas_minor=`./conftest${ac_exeext} | sed 's/^ *//'`
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
pac_cv_psblas_minor="unknown";
fi
rm -f conftest*
AC_MSG_RESULT([Done])
]
)
dnl @synopsis PAC_FORTRAN_TEST_TR15581( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl @synopsis PAC_FORTRAN_TEST_TR15581( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl dnl
dnl Will try to compile and link a program checking the TR15581 Fortran extension support. dnl Will try to compile and link a program checking the TR15581 Fortran extension support.

69
configure vendored

@ -7284,8 +7284,8 @@ fi
ac_objext='.o' ac_objext='.o'
ac_ext='f90' ac_ext='f90'
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/include $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5' ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/include $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
{ $as_echo "$as_me:$LINENO: checking for working source dir of PSBLAS" >&5 { $as_echo "$as_me:$LINENO: checking for working installation of PSBLAS" >&5
$as_echo_n "checking for working source dir of PSBLAS... " >&6; } $as_echo_n "checking for working installation of PSBLAS... " >&6; }
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
program test program test
use psb_base_mod use psb_base_mod
@ -7309,6 +7309,71 @@ $as_echo "$as_me: error: no. Could not find working version of PSBLAS." >&2;}
fi fi
rm -f conftest* rm -f conftest*
ac_exeext=''
ac_objext='.o'
ac_ext='f90'
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FMFLAG$PSBLAS_DIR/include $FMFLAG$PSBLAS_DIR/lib conftest.$ac_ext 1>&5'
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $FMFLAG$PSBLAS_DIR/include -L$PSBLAS_DIR/lib -lpsb_base $LIBS 1>&5'
{ $as_echo "$as_me:$LINENO: checking for version of PSBLAS" >&5
$as_echo_n "checking for version of PSBLAS... " >&6; }
cat > conftest.$ac_ext <<EOF
program test
use psb_base_mod
print *,psb_version_major_
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_psblas_major=`./conftest${ac_exeext} | sed 's/^ *//'`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
pac_cv_psblas_major="unknown";
fi
cat > conftest.$ac_ext <<EOF
program test
use psb_base_mod
print *,psb_version_minor_
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_psblas_minor=`./conftest${ac_exeext} | sed 's/^ *//'`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
pac_cv_psblas_minor="unknown";
fi
rm -f conftest*
{ $as_echo "$as_me:$LINENO: result: Done" >&5
$as_echo "Done" >&6; }
if test "x$pac_cv_psblas_major" == "xunknown"; then
{ { $as_echo "$as_me:$LINENO: error: PSBLAS version major \"$pac_cv_psblas_major\"." >&5
$as_echo "$as_me: error: PSBLAS version major \"$pac_cv_psblas_major\"." >&2;}
{ (exit 1); exit 1; }; }
fi
if test "x$pac_cv_psblas_minor" == "xunknown"; then
{ { $as_echo "$as_me:$LINENO: error: PSBLAS version minor \"$pac_cv_psblas_minor\"." >&5
$as_echo "$as_me: error: PSBLAS version minor \"$pac_cv_psblas_minor\"." >&2;}
{ (exit 1); exit 1; }; }
fi
if (( $pac_cv_psblas_major < 3 )) || (( $pac_cv_psblas_minor < 1 )) ; then
{ { $as_echo "$as_me:$LINENO: error: I need at least PSBLAS version 3.1." >&5
$as_echo "$as_me: error: I need at least PSBLAS version 3.1." >&2;}
{ (exit 1); exit 1; }; }
else
{ $as_echo "$as_me:$LINENO: Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor." >&5
$as_echo "$as_me: Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor." >&6;}
fi
############################################################################### ###############################################################################
# Variable substitutions : the Make.inc.in will have these @VARIABLES@ # Variable substitutions : the Make.inc.in will have these @VARIABLES@
# substituted. # substituted.

@ -250,6 +250,19 @@ 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.])])
PAC_FORTRAN_PSBLAS_VERSION()
if test "x$pac_cv_psblas_major" == "xunknown"; then
AC_MSG_ERROR([PSBLAS version major "$pac_cv_psblas_major".])
fi
if test "x$pac_cv_psblas_minor" == "xunknown"; then
AC_MSG_ERROR([PSBLAS version minor "$pac_cv_psblas_minor".])
fi
if (( $pac_cv_psblas_major < 3 )) || (( $pac_cv_psblas_minor < 1 )) ; then
AC_MSG_ERROR([I need at least PSBLAS version 3.1.])
else
AC_MSG_NOTICE([Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.])
fi
############################################################################### ###############################################################################
# Variable substitutions : the Make.inc.in will have these @VARIABLES@ # Variable substitutions : the Make.inc.in will have these @VARIABLES@
# substituted. # substituted.

@ -82,7 +82,7 @@ subroutine mld_c_base_onelev_descr(lv,il,nl,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%map%naggr)) then if (allocated(lv%map%naggr)) then
write(iout_,*) ' Size of coarse matrix: ', & write(iout_,*) ' Size of coarse matrix: ', &
& sum(lv%map%naggr(:)) & sum(lv%map%naggr(:)),lv%ac_nz_tot
write(iout_,*) ' Sizes of aggregates: ', & write(iout_,*) ' Sizes of aggregates: ', &
& lv%map%naggr(:) & lv%map%naggr(:)
end if end if

@ -82,7 +82,7 @@ subroutine mld_d_base_onelev_descr(lv,il,nl,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%map%naggr)) then if (allocated(lv%map%naggr)) then
write(iout_,*) ' Size of coarse matrix: ', & write(iout_,*) ' Size of coarse matrix: ', &
& sum(lv%map%naggr(:)) & sum(lv%map%naggr(:)),lv%ac_nz_tot
write(iout_,*) ' Sizes of aggregates: ', & write(iout_,*) ' Sizes of aggregates: ', &
& lv%map%naggr(:) & lv%map%naggr(:)
end if end if

@ -82,7 +82,7 @@ subroutine mld_s_base_onelev_descr(lv,il,nl,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%map%naggr)) then if (allocated(lv%map%naggr)) then
write(iout_,*) ' Size of coarse matrix: ', & write(iout_,*) ' Size of coarse matrix: ', &
& sum(lv%map%naggr(:)) & sum(lv%map%naggr(:)),lv%ac_nz_tot
write(iout_,*) ' Sizes of aggregates: ', & write(iout_,*) ' Sizes of aggregates: ', &
& lv%map%naggr(:) & lv%map%naggr(:)
end if end if

@ -82,7 +82,7 @@ subroutine mld_z_base_onelev_descr(lv,il,nl,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%map%naggr)) then if (allocated(lv%map%naggr)) then
write(iout_,*) ' Size of coarse matrix: ', & write(iout_,*) ' Size of coarse matrix: ', &
& sum(lv%map%naggr(:)) & sum(lv%map%naggr(:)),lv%ac_nz_tot
write(iout_,*) ' Sizes of aggregates: ', & write(iout_,*) ' Sizes of aggregates: ', &
& lv%map%naggr(:) & lv%map%naggr(:)
end if end if

@ -453,8 +453,16 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
end if end if
end if end if
! Fix nzeros
do i=1,iszv
p%precv(i)%ac_nz_loc = p%precv(i)%ac%get_nzeros()
p%precv(i)%ac_nz_tot = p%precv(i)%ac_nz_loc
call psb_sum(ictxt,p%precv(i)%ac_nz_tot)
end do
! !
! The coarse space hierarchy has been build. ! The coarse space hierarchy has been built.
! !
! Now do the preconditioner build. ! Now do the preconditioner build.
! !
@ -472,7 +480,6 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
info=3111 info=3111

@ -453,8 +453,16 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
end if end if
end if end if
! Fix nzeros
do i=1,iszv
p%precv(i)%ac_nz_loc = p%precv(i)%ac%get_nzeros()
p%precv(i)%ac_nz_tot = p%precv(i)%ac_nz_loc
call psb_sum(ictxt,p%precv(i)%ac_nz_tot)
end do
! !
! The coarse space hierarchy has been build. ! The coarse space hierarchy has been built.
! !
! Now do the preconditioner build. ! Now do the preconditioner build.
! !
@ -472,7 +480,6 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
info=3111 info=3111

@ -453,8 +453,16 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold)
end if end if
end if end if
! Fix nzeros
do i=1,iszv
p%precv(i)%ac_nz_loc = p%precv(i)%ac%get_nzeros()
p%precv(i)%ac_nz_tot = p%precv(i)%ac_nz_loc
call psb_sum(ictxt,p%precv(i)%ac_nz_tot)
end do
! !
! The coarse space hierarchy has been build. ! The coarse space hierarchy has been built.
! !
! Now do the preconditioner build. ! Now do the preconditioner build.
! !
@ -472,7 +480,6 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
info=3111 info=3111

@ -453,8 +453,16 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
end if end if
end if end if
! Fix nzeros
do i=1,iszv
p%precv(i)%ac_nz_loc = p%precv(i)%ac%get_nzeros()
p%precv(i)%ac_nz_tot = p%precv(i)%ac_nz_loc
call psb_sum(ictxt,p%precv(i)%ac_nz_tot)
end do
! !
! The coarse space hierarchy has been build. ! The coarse space hierarchy has been built.
! !
! Now do the preconditioner build. ! Now do the preconditioner build.
! !
@ -472,7 +480,6 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
info=3111 info=3111

@ -123,6 +123,7 @@ module mld_c_onelev_mod
class(mld_c_base_smoother_type), allocatable :: sm class(mld_c_base_smoother_type), allocatable :: sm
type(mld_sml_parms) :: parms type(mld_sml_parms) :: parms
type(psb_cspmat_type) :: ac type(psb_cspmat_type) :: ac
integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot
type(psb_desc_type) :: desc_ac type(psb_desc_type) :: desc_ac
type(psb_cspmat_type), pointer :: base_a => null() type(psb_cspmat_type), pointer :: base_a => null()
type(psb_desc_type), pointer :: base_desc => null() type(psb_desc_type), pointer :: base_desc => null()

@ -123,6 +123,7 @@ module mld_d_onelev_mod
class(mld_d_base_smoother_type), allocatable :: sm class(mld_d_base_smoother_type), allocatable :: sm
type(mld_dml_parms) :: parms type(mld_dml_parms) :: parms
type(psb_dspmat_type) :: ac type(psb_dspmat_type) :: ac
integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot
type(psb_desc_type) :: desc_ac type(psb_desc_type) :: desc_ac
type(psb_dspmat_type), pointer :: base_a => null() type(psb_dspmat_type), pointer :: base_a => null()
type(psb_desc_type), pointer :: base_desc => null() type(psb_desc_type), pointer :: base_desc => null()

@ -123,6 +123,7 @@ module mld_s_onelev_mod
class(mld_s_base_smoother_type), allocatable :: sm class(mld_s_base_smoother_type), allocatable :: sm
type(mld_sml_parms) :: parms type(mld_sml_parms) :: parms
type(psb_sspmat_type) :: ac type(psb_sspmat_type) :: ac
integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot
type(psb_desc_type) :: desc_ac type(psb_desc_type) :: desc_ac
type(psb_sspmat_type), pointer :: base_a => null() type(psb_sspmat_type), pointer :: base_a => null()
type(psb_desc_type), pointer :: base_desc => null() type(psb_desc_type), pointer :: base_desc => null()

@ -123,6 +123,7 @@ module mld_z_onelev_mod
class(mld_z_base_smoother_type), allocatable :: sm class(mld_z_base_smoother_type), allocatable :: sm
type(mld_dml_parms) :: parms type(mld_dml_parms) :: parms
type(psb_zspmat_type) :: ac type(psb_zspmat_type) :: ac
integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot
type(psb_desc_type) :: desc_ac type(psb_desc_type) :: desc_ac
type(psb_zspmat_type), pointer :: base_a => null() type(psb_zspmat_type), pointer :: base_a => null()
type(psb_desc_type), pointer :: base_desc => null() type(psb_desc_type), pointer :: base_desc => null()

Loading…
Cancel
Save