diff --git a/base/modules/Makefile b/base/modules/Makefile index ab164d8c..26dcc84d 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -413,10 +413,10 @@ tools/psb_c_tools_a_mod.o tools/psb_z_tools_a_mod.o: desc/psb_desc_mod.o psi_mod tools/psb_i_tools_mod.o: serial/psb_i_vect_mod.o tools/psb_m_tools_a_mod.o tools/psb_e_tools_a_mod.o tools/psb_l_tools_mod.o: serial/psb_l_vect_mod.o tools/psb_m_tools_a_mod.o tools/psb_e_tools_a_mod.o -tools/psb_s_tools_mod.o: serial/psb_s_vect_mod.o -tools/psb_d_tools_mod.o: serial/psb_d_vect_mod.o -tools/psb_c_tools_mod.o: serial/psb_c_vect_mod.o -tools/psb_z_tools_mod.o: serial/psb_z_vect_mod.o +tools/psb_s_tools_mod.o: serial/psb_s_vect_mod.o comm/psb_s_linmap_mod.o +tools/psb_d_tools_mod.o: serial/psb_d_vect_mod.o comm/psb_d_linmap_mod.o +tools/psb_c_tools_mod.o: serial/psb_c_vect_mod.o comm/psb_c_linmap_mod.o +tools/psb_z_tools_mod.o: serial/psb_z_vect_mod.o comm/psb_z_linmap_mod.o psblas/psb_s_psblas_mod.o: serial/psb_s_vect_mod.o serial/psb_s_mat_mod.o psblas/psb_d_psblas_mod.o: serial/psb_d_vect_mod.o serial/psb_d_mat_mod.o diff --git a/base/modules/tools/psb_c_tools_mod.F90 b/base/modules/tools/psb_c_tools_mod.F90 index 148ddf59..c51fc97d 100644 --- a/base/modules/tools/psb_c_tools_mod.F90 +++ b/base/modules/tools/psb_c_tools_mod.F90 @@ -36,9 +36,10 @@ Module psb_c_tools_mod & psb_lc_csr_sparse_mat, psb_lc_coo_sparse_mat, & & psb_c_csr_sparse_mat, psb_c_coo_sparse_mat use psb_l_vect_mod, only : psb_l_vect_type + use psb_c_linmap_mod, only : psb_clinmap_type use psb_c_multivect_mod, only : psb_c_base_multivect_type, psb_c_multivect_type use psi_mod, only : psb_snd, psb_rcv ! Needed only for psb_getelem - + interface psb_geall subroutine psb_calloc_vect(x, desc_a,info, dupl, bldmode) import @@ -469,6 +470,16 @@ Module psb_c_tools_mod integer(psb_ipk_), allocatable, intent(out) :: isrc(:), nrsrc(:), naggr(:) integer(psb_ipk_), intent(out) :: info end subroutine psb_c_remap + subroutine psb_c_remap2(map_in, desc_new, map_out, flag, info) + import + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_clinmap_type), intent(inout) :: map_in + type(psb_clinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + end subroutine psb_c_remap2 end interface psb_remap end module psb_c_tools_mod diff --git a/base/modules/tools/psb_d_tools_mod.F90 b/base/modules/tools/psb_d_tools_mod.F90 index 97f70fc1..048beefe 100644 --- a/base/modules/tools/psb_d_tools_mod.F90 +++ b/base/modules/tools/psb_d_tools_mod.F90 @@ -36,9 +36,10 @@ Module psb_d_tools_mod & psb_ld_csr_sparse_mat, psb_ld_coo_sparse_mat, & & psb_d_csr_sparse_mat, psb_d_coo_sparse_mat use psb_l_vect_mod, only : psb_l_vect_type + use psb_d_linmap_mod, only : psb_dlinmap_type use psb_d_multivect_mod, only : psb_d_base_multivect_type, psb_d_multivect_type use psi_mod, only : psb_snd, psb_rcv ! Needed only for psb_getelem - + interface psb_geall subroutine psb_dalloc_vect(x, desc_a,info, dupl, bldmode) import @@ -469,6 +470,16 @@ Module psb_d_tools_mod integer(psb_ipk_), allocatable, intent(out) :: isrc(:), nrsrc(:), naggr(:) integer(psb_ipk_), intent(out) :: info end subroutine psb_d_remap + subroutine psb_d_remap2(map_in, desc_new, map_out, flag, info) + import + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_dlinmap_type), intent(inout) :: map_in + type(psb_dlinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + end subroutine psb_d_remap2 end interface psb_remap end module psb_d_tools_mod diff --git a/base/modules/tools/psb_i_tools_mod.F90 b/base/modules/tools/psb_i_tools_mod.F90 index 28899c9f..e1b3b0d9 100644 --- a/base/modules/tools/psb_i_tools_mod.F90 +++ b/base/modules/tools/psb_i_tools_mod.F90 @@ -37,7 +37,7 @@ Module psb_i_tools_mod use psb_l_vect_mod, only : psb_l_vect_type use psb_i_multivect_mod, only : psb_i_base_multivect_type, psb_i_multivect_type use psi_mod, only : psb_snd, psb_rcv ! Needed only for psb_getelem - + interface psb_geall subroutine psb_ialloc_vect(x, desc_a,info, dupl, bldmode) import diff --git a/base/modules/tools/psb_l_tools_mod.F90 b/base/modules/tools/psb_l_tools_mod.F90 index 078f06dc..07fbbb98 100644 --- a/base/modules/tools/psb_l_tools_mod.F90 +++ b/base/modules/tools/psb_l_tools_mod.F90 @@ -37,7 +37,7 @@ Module psb_l_tools_mod ! use psb_i_vect_mod, only : psb_i_vect_type use psb_l_multivect_mod, only : psb_l_base_multivect_type, psb_l_multivect_type use psi_mod, only : psb_snd, psb_rcv ! Needed only for psb_getelem - + interface psb_geall subroutine psb_lalloc_vect(x, desc_a,info, dupl, bldmode) import diff --git a/base/modules/tools/psb_s_tools_mod.F90 b/base/modules/tools/psb_s_tools_mod.F90 index c87607bc..e8f4397a 100644 --- a/base/modules/tools/psb_s_tools_mod.F90 +++ b/base/modules/tools/psb_s_tools_mod.F90 @@ -36,9 +36,10 @@ Module psb_s_tools_mod & psb_ls_csr_sparse_mat, psb_ls_coo_sparse_mat, & & psb_s_csr_sparse_mat, psb_s_coo_sparse_mat use psb_l_vect_mod, only : psb_l_vect_type + use psb_s_linmap_mod, only : psb_slinmap_type use psb_s_multivect_mod, only : psb_s_base_multivect_type, psb_s_multivect_type use psi_mod, only : psb_snd, psb_rcv ! Needed only for psb_getelem - + interface psb_geall subroutine psb_salloc_vect(x, desc_a,info, dupl, bldmode) import @@ -469,6 +470,16 @@ Module psb_s_tools_mod integer(psb_ipk_), allocatable, intent(out) :: isrc(:), nrsrc(:), naggr(:) integer(psb_ipk_), intent(out) :: info end subroutine psb_s_remap + subroutine psb_s_remap2(map_in, desc_new, map_out, flag, info) + import + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_slinmap_type), intent(inout) :: map_in + type(psb_slinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + end subroutine psb_s_remap2 end interface psb_remap end module psb_s_tools_mod diff --git a/base/modules/tools/psb_z_tools_mod.F90 b/base/modules/tools/psb_z_tools_mod.F90 index 8a6c2d34..e48ce1cf 100644 --- a/base/modules/tools/psb_z_tools_mod.F90 +++ b/base/modules/tools/psb_z_tools_mod.F90 @@ -36,9 +36,10 @@ Module psb_z_tools_mod & psb_lz_csr_sparse_mat, psb_lz_coo_sparse_mat, & & psb_z_csr_sparse_mat, psb_z_coo_sparse_mat use psb_l_vect_mod, only : psb_l_vect_type + use psb_z_linmap_mod, only : psb_zlinmap_type use psb_z_multivect_mod, only : psb_z_base_multivect_type, psb_z_multivect_type use psi_mod, only : psb_snd, psb_rcv ! Needed only for psb_getelem - + interface psb_geall subroutine psb_zalloc_vect(x, desc_a,info, dupl, bldmode) import @@ -469,6 +470,16 @@ Module psb_z_tools_mod integer(psb_ipk_), allocatable, intent(out) :: isrc(:), nrsrc(:), naggr(:) integer(psb_ipk_), intent(out) :: info end subroutine psb_z_remap + subroutine psb_z_remap2(map_in, desc_new, map_out, flag, info) + import + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_zlinmap_type), intent(inout) :: map_in + type(psb_zlinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + end subroutine psb_z_remap2 end interface psb_remap end module psb_z_tools_mod diff --git a/base/tools/psb_c_remap.F90 b/base/tools/psb_c_remap.F90 index 9b40dd29..8e07dbac 100644 --- a/base/tools/psb_c_remap.F90 +++ b/base/tools/psb_c_remap.F90 @@ -86,7 +86,6 @@ subroutine psb_c_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & endif !!$ write(0,*) ' Remapping from ',np,' onto ', np_remap - mipd = ipd if (desc_in%get_fmt() == 'BLOCK') then ! ! Should we spread the processes in the new context, @@ -245,6 +244,7 @@ subroutine psb_c_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & else naggr(me+1) = 0 end if + ipd = mipd call psb_sum(ctxt,naggr) end block @@ -257,3 +257,16 @@ subroutine psb_c_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & return end subroutine psb_c_remap +subroutine psb_c_remap2(map_in, desc_new, map_out, flag, info) + + use psb_base_mod, psb_protect_name => psb_c_remap2 + + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_clinmap_type), intent(inout) :: map_in + type(psb_clinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + +end subroutine psb_c_remap2 diff --git a/base/tools/psb_d_remap.F90 b/base/tools/psb_d_remap.F90 index a2c9c291..e84db78f 100644 --- a/base/tools/psb_d_remap.F90 +++ b/base/tools/psb_d_remap.F90 @@ -86,7 +86,6 @@ subroutine psb_d_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & endif !!$ write(0,*) ' Remapping from ',np,' onto ', np_remap - mipd = ipd if (desc_in%get_fmt() == 'BLOCK') then ! ! Should we spread the processes in the new context, @@ -245,6 +244,7 @@ subroutine psb_d_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & else naggr(me+1) = 0 end if + ipd = mipd call psb_sum(ctxt,naggr) end block @@ -257,3 +257,16 @@ subroutine psb_d_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & return end subroutine psb_d_remap +subroutine psb_d_remap2(map_in, desc_new, map_out, flag, info) + + use psb_base_mod, psb_protect_name => psb_d_remap2 + + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_dlinmap_type), intent(inout) :: map_in + type(psb_dlinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + +end subroutine psb_d_remap2 diff --git a/base/tools/psb_s_remap.F90 b/base/tools/psb_s_remap.F90 index 6f5365b3..6401a1ad 100644 --- a/base/tools/psb_s_remap.F90 +++ b/base/tools/psb_s_remap.F90 @@ -86,7 +86,6 @@ subroutine psb_s_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & endif !!$ write(0,*) ' Remapping from ',np,' onto ', np_remap - mipd = ipd if (desc_in%get_fmt() == 'BLOCK') then ! ! Should we spread the processes in the new context, @@ -245,6 +244,7 @@ subroutine psb_s_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & else naggr(me+1) = 0 end if + ipd = mipd call psb_sum(ctxt,naggr) end block @@ -257,3 +257,16 @@ subroutine psb_s_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & return end subroutine psb_s_remap +subroutine psb_s_remap2(map_in, desc_new, map_out, flag, info) + + use psb_base_mod, psb_protect_name => psb_s_remap2 + + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_slinmap_type), intent(inout) :: map_in + type(psb_slinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + +end subroutine psb_s_remap2 diff --git a/base/tools/psb_z_remap.F90 b/base/tools/psb_z_remap.F90 index c8d23a60..521d5e78 100644 --- a/base/tools/psb_z_remap.F90 +++ b/base/tools/psb_z_remap.F90 @@ -86,7 +86,6 @@ subroutine psb_z_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & endif !!$ write(0,*) ' Remapping from ',np,' onto ', np_remap - mipd = ipd if (desc_in%get_fmt() == 'BLOCK') then ! ! Should we spread the processes in the new context, @@ -245,6 +244,7 @@ subroutine psb_z_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & else naggr(me+1) = 0 end if + ipd = mipd call psb_sum(ctxt,naggr) end block @@ -257,3 +257,16 @@ subroutine psb_z_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, & return end subroutine psb_z_remap +subroutine psb_z_remap2(map_in, desc_new, map_out, flag, info) + + use psb_base_mod, psb_protect_name => psb_z_remap2 + + implicit none + !....parameters... + type(psb_desc_type), intent(inout) :: desc_new + type(psb_zlinmap_type), intent(inout) :: map_in + type(psb_zlinmap_type), intent(out) :: map_out + integer(psb_ipk_), intent(in) :: flag + integer(psb_ipk_), intent(out) :: info + +end subroutine psb_z_remap2