Fix remap support

remap-coarse
sfilippone 4 weeks ago
parent 97299b8b3f
commit 094c9b1197

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save