mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-16 19:02:09 +00:00
Step for working remap. Needs to rethink map_clone
This commit is contained in:
@@ -57,6 +57,10 @@ module psb_base_linmap_mod
|
||||
procedure, pass(map) :: set_kind => base_set_kind
|
||||
procedure, pass(map) :: free => base_free
|
||||
procedure, pass(map) :: clone => base_clone
|
||||
procedure, pass(map) :: set_pU => base_set_pU
|
||||
procedure, pass(map) :: set_pV => base_set_pV
|
||||
procedure, pass(map) :: get_pU => base_get_pU
|
||||
procedure, pass(map) :: get_pV => base_get_pV
|
||||
end type psb_base_linmap_type
|
||||
|
||||
|
||||
@@ -134,8 +138,13 @@ contains
|
||||
if (.not.associated(map%p_desc_U)) return
|
||||
if (.not.associated(map%p_desc_V)) return
|
||||
res = map%p_desc_U%is_asb().and.map%p_desc_V%is_asb()
|
||||
!!$ write(0,*) 'map_aggr ',map%p_desc_U%is_asb(),map%p_desc_V%is_asb()
|
||||
case(psb_map_gen_linear_)
|
||||
res = map%desc_U%is_asb().and.map%desc_V%is_asb()
|
||||
res = map%desc_U%is_asb().and.map%desc_V%is_asb()
|
||||
!!$ write(0,*) 'map_gen_linear ',map%desc_U%is_asb(),map%desc_V%is_asb()
|
||||
case default
|
||||
write(0,*) 'Unknown map kind ',map%get_kind(),&
|
||||
& psb_map_aggr_, psb_map_gen_linear_
|
||||
end select
|
||||
|
||||
end function base_is_asb
|
||||
@@ -221,7 +230,42 @@ contains
|
||||
if (map%desc_V%is_ok()) call map%desc_V%free(info)
|
||||
|
||||
end subroutine base_free
|
||||
|
||||
|
||||
subroutine base_set_pU(map,desc)
|
||||
implicit none
|
||||
class(psb_base_linmap_type) :: map
|
||||
type(psb_desc_type), target :: desc
|
||||
|
||||
map%p_desc_U => desc
|
||||
|
||||
end subroutine base_set_pU
|
||||
|
||||
subroutine base_set_pV(map,desc)
|
||||
implicit none
|
||||
class(psb_base_linmap_type) :: map
|
||||
type(psb_desc_type), target :: desc
|
||||
|
||||
map%p_desc_V => desc
|
||||
|
||||
end subroutine base_set_pV
|
||||
|
||||
function base_get_pU(map) result(desc)
|
||||
implicit none
|
||||
class(psb_base_linmap_type) :: map
|
||||
type(psb_desc_type), pointer :: desc
|
||||
|
||||
desc => map%p_desc_U
|
||||
|
||||
end function base_get_pU
|
||||
|
||||
function base_get_pV(map) result(desc)
|
||||
implicit none
|
||||
class(psb_base_linmap_type) :: map
|
||||
type(psb_desc_type), pointer :: desc
|
||||
|
||||
desc => map%p_desc_V
|
||||
|
||||
end function base_get_pV
|
||||
|
||||
|
||||
end module psb_base_linmap_mod
|
||||
|
||||
@@ -56,9 +56,19 @@ subroutine psb_c_map_U2V_a(alpha,x,beta,y,map,info,work)
|
||||
character(len=20), parameter :: name='psb_map_U2V'
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
info = 1
|
||||
if (.not.map%is_asb()) then
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
info = 1
|
||||
end block
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -132,7 +142,17 @@ subroutine psb_c_map_U2V_v(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
end block
|
||||
info = 1
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -120,7 +120,7 @@ subroutine psb_c_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, &
|
||||
goto 9999
|
||||
endif
|
||||
if (rnp >= np) then
|
||||
write(0,*) ' No remapping on larger proc count now'
|
||||
write(0,*) ' No remapping on larger proc count now',rnp,np
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
|
||||
@@ -56,9 +56,19 @@ subroutine psb_d_map_U2V_a(alpha,x,beta,y,map,info,work)
|
||||
character(len=20), parameter :: name='psb_map_U2V'
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
info = 1
|
||||
if (.not.map%is_asb()) then
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
info = 1
|
||||
end block
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -132,7 +142,17 @@ subroutine psb_d_map_U2V_v(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
end block
|
||||
info = 1
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -56,9 +56,19 @@ subroutine psb_s_map_U2V_a(alpha,x,beta,y,map,info,work)
|
||||
character(len=20), parameter :: name='psb_map_U2V'
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
info = 1
|
||||
if (.not.map%is_asb()) then
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
info = 1
|
||||
end block
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -132,7 +142,17 @@ subroutine psb_s_map_U2V_v(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
end block
|
||||
info = 1
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -120,7 +120,7 @@ subroutine psb_s_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, &
|
||||
goto 9999
|
||||
endif
|
||||
if (rnp >= np) then
|
||||
write(0,*) ' No remapping on larger proc count now'
|
||||
write(0,*) ' No remapping on larger proc count now',rnp,np
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
|
||||
@@ -56,9 +56,19 @@ subroutine psb_z_map_U2V_a(alpha,x,beta,y,map,info,work)
|
||||
character(len=20), parameter :: name='psb_map_U2V'
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
info = 1
|
||||
if (.not.map%is_asb()) then
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
info = 1
|
||||
end block
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -132,7 +142,17 @@ subroutine psb_z_map_U2V_v(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
|
||||
info = psb_success_
|
||||
if (.not.map%is_asb()) then
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled'
|
||||
block
|
||||
integer(psb_ipk_) :: meu,npu,mev,npv
|
||||
type(psb_ctxt_type) :: ct
|
||||
ct = map%p_desc_u%get_context()
|
||||
call psb_info(ct,meu,npu)
|
||||
ct = map%p_desc_v%get_context()
|
||||
call psb_info(ct,mev,npv)
|
||||
|
||||
write(psb_err_unit,*) trim(name),' Invalid map input: unassembled',&
|
||||
& ':',meu,npu,mev,npv
|
||||
end block
|
||||
info = 1
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -120,7 +120,7 @@ subroutine psb_z_remap(np_remap, desc_in, a_in, ipd, isrc, nrsrc, naggr, &
|
||||
goto 9999
|
||||
endif
|
||||
if (rnp >= np) then
|
||||
write(0,*) ' No remapping on larger proc count now'
|
||||
write(0,*) ' No remapping on larger proc count now',rnp,np
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
|
||||
Reference in New Issue
Block a user