From adf1fea5431f9bee37683026f4bce4fab2044c95 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 5 Aug 2013 10:37:54 +0000 Subject: [PATCH] psblas-3.99 base/modules/Makefile base/modules/psb_cd_tools_mod.f90 base/tools/psb_icdasb.F90 util/psb_d_genpde_impl.f90 util/psb_d_genpde_mod.f90 util/psb_s_genpde_impl.f90 util/psb_s_genpde_mod.f90 added MOLD to cdasb, called from genpde. --- base/modules/Makefile | 3 ++- base/modules/psb_cd_tools_mod.f90 | 4 ++-- base/tools/psb_icdasb.F90 | 2 +- util/psb_d_genpde_impl.f90 | 12 +++++++----- util/psb_d_genpde_mod.f90 | 12 +++++++----- util/psb_s_genpde_impl.f90 | 10 ++++++---- util/psb_s_genpde_mod.f90 | 12 +++++++----- 7 files changed, 32 insertions(+), 23 deletions(-) diff --git a/base/modules/Makefile b/base/modules/Makefile index fb07c6b8..2866a966 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -61,9 +61,10 @@ psb_ip_reord_mod.o psi_serial_mod.o psb_sort_mod.o: $(BASIC_MODS) psb_base_mat_mod.o: psi_serial_mod.o psb_s_base_mat_mod.o psb_d_base_mat_mod.o psb_c_base_mat_mod.o psb_z_base_mat_mod.o: psb_base_mat_mod.o psb_s_base_mat_mod.o: psb_s_base_vect_mod.o -psb_d_base_mat_mod.o: psb_d_base_vect_mod.o +psb_d_base_mat_mod.o: psb_d_base_vect_mod.o psb_c_base_mat_mod.o: psb_c_base_vect_mod.o psb_z_base_mat_mod.o: psb_z_base_vect_mod.o +psb_c_base_vect_mod.o psb_s_base_vect_mod.o psb_d_base_vect_mod.o psb_z_base_vect_mod.o: psb_i_base_vect_mod.o psb_i_base_vect_mod.o psb_c_base_vect_mod.o psb_s_base_vect_mod.o psb_d_base_vect_mod.o psb_z_base_vect_mod.o: psi_serial_mod.o psb_realloc_mod.o psb_s_mat_mod.o: psb_s_base_mat_mod.o psb_s_csr_mat_mod.o psb_s_csc_mat_mod.o psb_s_vect_mod.o psb_d_mat_mod.o: psb_d_base_mat_mod.o psb_d_csr_mat_mod.o psb_d_csc_mat_mod.o psb_d_vect_mod.o diff --git a/base/modules/psb_cd_tools_mod.f90 b/base/modules/psb_cd_tools_mod.f90 index db1f445a..d8641017 100644 --- a/base/modules/psb_cd_tools_mod.f90 +++ b/base/modules/psb_cd_tools_mod.f90 @@ -149,7 +149,7 @@ module psb_cd_tools_mod Type(psb_desc_type), intent(inout) :: desc integer(psb_ipk_), intent(out) :: info logical, intent(in),optional :: ext_hv - type(psb_i_base_vect_type), optional, intent(in) :: mold + class(psb_i_base_vect_type), optional, intent(in) :: mold end subroutine psb_icdasb end interface @@ -205,7 +205,7 @@ contains Type(psb_desc_type), intent(inout) :: desc integer(psb_ipk_), intent(out) :: info - type(psb_i_base_vect_type), optional, intent(in) :: mold + class(psb_i_base_vect_type), optional, intent(in) :: mold call psb_icdasb(desc,info,ext_hv=.false.,mold=mold) end subroutine psb_cdasb diff --git a/base/tools/psb_icdasb.F90 b/base/tools/psb_icdasb.F90 index 7d46e322..1045abaa 100644 --- a/base/tools/psb_icdasb.F90 +++ b/base/tools/psb_icdasb.F90 @@ -56,7 +56,7 @@ subroutine psb_icdasb(desc,info,ext_hv,mold) type(psb_desc_type), intent(inout) :: desc integer(psb_ipk_), intent(out) :: info logical, intent(in), optional :: ext_hv - type(psb_i_base_vect_type), optional, intent(in) :: mold + class(psb_i_base_vect_type), optional, intent(in) :: mold !....Locals.... integer(psb_ipk_) :: int_err(5) diff --git a/util/psb_d_genpde_impl.f90 b/util/psb_d_genpde_impl.f90 index 989ebb40..9d5f0af8 100644 --- a/util/psb_d_genpde_impl.f90 +++ b/util/psb_d_genpde_impl.f90 @@ -34,7 +34,7 @@ ! the rhs. ! subroutine psb_d_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,nrl) + & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,imold,nrl) use psb_base_mod use psb_d_genpde_mod, psb_protect_name => psb_d_gen_pde3d ! @@ -62,7 +62,8 @@ subroutine psb_d_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& character(len=*) :: afmt procedure(d_func_3d), optional :: f class(psb_d_base_sparse_mat), optional :: amold - class(psb_d_base_vect_type), optional :: vmold + class(psb_d_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl ! Local variables. @@ -285,7 +286,7 @@ subroutine psb_d_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& call psb_barrier(ictxt) t1 = psb_wtime() - call psb_cdasb(desc_a,info) + call psb_cdasb(desc_a,info,mold=imold) tcdasb = psb_wtime()-t1 call psb_barrier(ictxt) t1 = psb_wtime() @@ -349,7 +350,7 @@ end subroutine psb_d_gen_pde3d ! the rhs. ! subroutine psb_d_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,b1,b2,c,g,info,f,amold,vmold,nrl) + & a1,a2,b1,b2,c,g,info,f,amold,vmold,imold,nrl) use psb_base_mod use psb_d_genpde_mod, psb_protect_name => psb_d_gen_pde2d ! @@ -378,6 +379,7 @@ subroutine psb_d_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& procedure(d_func_2d), optional :: f class(psb_d_base_sparse_mat), optional :: amold class(psb_d_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl ! Local variables. @@ -575,7 +577,7 @@ subroutine psb_d_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& call psb_barrier(ictxt) t1 = psb_wtime() - call psb_cdasb(desc_a,info) + call psb_cdasb(desc_a,info,mold=imold) tcdasb = psb_wtime()-t1 call psb_barrier(ictxt) t1 = psb_wtime() diff --git a/util/psb_d_genpde_mod.f90 b/util/psb_d_genpde_mod.f90 index 1afafec7..87994dea 100644 --- a/util/psb_d_genpde_mod.f90 +++ b/util/psb_d_genpde_mod.f90 @@ -33,7 +33,7 @@ module psb_d_genpde_mod use psb_base_mod, only : psb_dpk_, psb_ipk_, psb_desc_type,& & psb_dspmat_type, psb_d_vect_type, dzero,& - & psb_d_base_sparse_mat, psb_d_base_vect_type + & psb_d_base_sparse_mat, psb_d_base_vect_type, psb_i_base_vect_type interface function d_func_3d(x,y,z) result(val) @@ -45,7 +45,7 @@ module psb_d_genpde_mod interface psb_gen_pde3d subroutine psb_d_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt, & - & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,nrl) + & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,imold,nrl) ! ! Discretizes the partial differential equation ! @@ -62,7 +62,7 @@ module psb_d_genpde_mod ! Note that if b1=b2=b3=c=0., the PDE is the Laplace equation. ! import :: psb_ipk_, psb_desc_type, psb_dspmat_type, psb_d_vect_type,& - & d_func_3d, psb_d_base_sparse_mat, psb_d_base_vect_type + & d_func_3d, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_i_base_vect_type implicit none procedure(d_func_3d) :: a1,a2,a3,c,b1,b2,b3,g integer(psb_ipk_) :: idim @@ -74,6 +74,7 @@ module psb_d_genpde_mod procedure(d_func_3d), optional :: f class(psb_d_base_sparse_mat), optional :: amold class(psb_d_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl end subroutine psb_d_gen_pde3d end interface @@ -89,7 +90,7 @@ module psb_d_genpde_mod interface psb_gen_pde2d subroutine psb_d_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,b1,b2,c,g,info,f,amold,vmold,nrl) + & a1,a2,b1,b2,c,g,info,f,amold,vmold,imold,nrl) ! ! Discretizes the partial differential equation ! @@ -106,7 +107,7 @@ module psb_d_genpde_mod ! Note that if b1=b2=c=0., the PDE is the Laplace equation. ! import :: psb_ipk_, psb_desc_type, psb_dspmat_type, psb_d_vect_type,& - & d_func_2d, psb_d_base_sparse_mat, psb_d_base_vect_type + & d_func_2d, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_i_base_vect_type implicit none procedure(d_func_2d) :: a1,a2,c,b1,b2,g integer(psb_ipk_) :: idim @@ -118,6 +119,7 @@ module psb_d_genpde_mod procedure(d_func_2d), optional :: f class(psb_d_base_sparse_mat), optional :: amold class(psb_d_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl end subroutine psb_d_gen_pde2d end interface diff --git a/util/psb_s_genpde_impl.f90 b/util/psb_s_genpde_impl.f90 index b01f67ca..3c4e5721 100644 --- a/util/psb_s_genpde_impl.f90 +++ b/util/psb_s_genpde_impl.f90 @@ -34,7 +34,7 @@ ! the rhs. ! subroutine psb_s_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,nrl) + & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,imold,nrl) use psb_base_mod use psb_s_genpde_mod, psb_protect_name => psb_s_gen_pde3d ! @@ -63,6 +63,7 @@ subroutine psb_s_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& procedure(s_func_3d), optional :: f class(psb_s_base_sparse_mat), optional :: amold class(psb_s_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl ! Local variables. @@ -285,7 +286,7 @@ subroutine psb_s_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& call psb_barrier(ictxt) t1 = psb_wtime() - call psb_cdasb(desc_a,info) + call psb_cdasb(desc_a,info,mold=imold) tcdasb = psb_wtime()-t1 call psb_barrier(ictxt) t1 = psb_wtime() @@ -349,7 +350,7 @@ end subroutine psb_s_gen_pde3d ! the rhs. ! subroutine psb_s_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,b1,b2,c,g,info,f,amold,vmold,nrl) + & a1,a2,b1,b2,c,g,info,f,amold,vmold,imold,nrl) use psb_base_mod use psb_s_genpde_mod, psb_protect_name => psb_s_gen_pde2d ! @@ -378,6 +379,7 @@ subroutine psb_s_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& procedure(s_func_2d), optional :: f class(psb_s_base_sparse_mat), optional :: amold class(psb_s_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl ! Local variables. @@ -575,7 +577,7 @@ subroutine psb_s_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& call psb_barrier(ictxt) t1 = psb_wtime() - call psb_cdasb(desc_a,info) + call psb_cdasb(desc_a,info,mold=imold) tcdasb = psb_wtime()-t1 call psb_barrier(ictxt) t1 = psb_wtime() diff --git a/util/psb_s_genpde_mod.f90 b/util/psb_s_genpde_mod.f90 index e2b8c00b..46b1051c 100644 --- a/util/psb_s_genpde_mod.f90 +++ b/util/psb_s_genpde_mod.f90 @@ -33,7 +33,7 @@ module psb_s_genpde_mod use psb_base_mod, only : psb_spk_, psb_ipk_, psb_desc_type,& & psb_sspmat_type, psb_s_vect_type, szero,& - & psb_s_base_sparse_mat, psb_s_base_vect_type + & psb_s_base_sparse_mat, psb_s_base_vect_type, psb_i_base_vect_type interface function s_func_3d(x,y,z) result(val) @@ -45,7 +45,7 @@ module psb_s_genpde_mod interface psb_gen_pde3d subroutine psb_s_gen_pde3d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,nrl) + & a1,a2,a3,b1,b2,b3,c,g,info,f,amold,vmold,imold,nrl) ! ! Discretizes the partial differential equation ! @@ -62,7 +62,7 @@ module psb_s_genpde_mod ! Note that if b1=b2=b3=c=0., the PDE is the Laplace equation. ! import :: psb_ipk_, psb_desc_type, psb_sspmat_type, psb_s_vect_type, & - & s_func_3d, psb_s_base_sparse_mat, psb_s_base_vect_type + & s_func_3d, psb_s_base_sparse_mat, psb_s_base_vect_type, psb_i_base_vect_type implicit none procedure(s_func_3d) :: a1,a2,a3,c,b1,b2,b3,g integer(psb_ipk_) :: idim @@ -74,6 +74,7 @@ module psb_s_genpde_mod procedure(s_func_3d), optional :: f class(psb_s_base_sparse_mat), optional :: amold class(psb_s_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl end subroutine psb_s_gen_pde3d end interface @@ -89,7 +90,7 @@ module psb_s_genpde_mod interface psb_gen_pde2d subroutine psb_s_gen_pde2d(ictxt,idim,a,bv,xv,desc_a,afmt,& - & a1,a2,b1,b2,c,g,info,f,amold,vmold,nrl) + & a1,a2,b1,b2,c,g,info,f,amold,vmold,imold,nrl) ! ! Discretizes the partial differential equation ! @@ -106,7 +107,7 @@ module psb_s_genpde_mod ! Note that if b1=b2=c=0., the PDE is the Laplace equation. ! import :: psb_ipk_, psb_desc_type, psb_sspmat_type, psb_s_vect_type,& - & s_func_2d, psb_s_base_sparse_mat, psb_s_base_vect_type + & s_func_2d, psb_s_base_sparse_mat, psb_s_base_vect_type, psb_i_base_vect_type implicit none procedure(s_func_2d) :: a1,a2,c,b1,b2,g integer(psb_ipk_) :: idim @@ -118,6 +119,7 @@ module psb_s_genpde_mod procedure(s_func_2d), optional :: f class(psb_s_base_sparse_mat), optional :: amold class(psb_s_base_vect_type), optional :: vmold + class(psb_i_base_vect_type), optional :: imold integer(psb_ipk_), optional :: nrl end subroutine psb_s_gen_pde2d end interface