diff --git a/base/modules/comm/psb_base_linmap_mod.f90 b/base/modules/comm/psb_base_linmap_mod.f90 index aeb3822a3..c85094aa4 100644 --- a/base/modules/comm/psb_base_linmap_mod.f90 +++ b/base/modules/comm/psb_base_linmap_mod.f90 @@ -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 diff --git a/base/tools/psb_c_map.f90 b/base/tools/psb_c_map.f90 index dd027563d..49f061987 100644 --- a/base/tools/psb_c_map.f90 +++ b/base/tools/psb_c_map.f90 @@ -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 diff --git a/base/tools/psb_c_remap.F90 b/base/tools/psb_c_remap.F90 index 8e07dbac9..e5ccd9a04 100644 --- a/base/tools/psb_c_remap.F90 +++ b/base/tools/psb_c_remap.F90 @@ -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 diff --git a/base/tools/psb_d_map.f90 b/base/tools/psb_d_map.f90 index 707ab9a8b..a5d934d4f 100644 --- a/base/tools/psb_d_map.f90 +++ b/base/tools/psb_d_map.f90 @@ -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 diff --git a/base/tools/psb_s_map.f90 b/base/tools/psb_s_map.f90 index 1a4469e01..e78e5631d 100644 --- a/base/tools/psb_s_map.f90 +++ b/base/tools/psb_s_map.f90 @@ -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 diff --git a/base/tools/psb_s_remap.F90 b/base/tools/psb_s_remap.F90 index 6401a1ad8..3f861fd88 100644 --- a/base/tools/psb_s_remap.F90 +++ b/base/tools/psb_s_remap.F90 @@ -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 diff --git a/base/tools/psb_z_map.f90 b/base/tools/psb_z_map.f90 index 8b9ff4cee..39dd60675 100644 --- a/base/tools/psb_z_map.f90 +++ b/base/tools/psb_z_map.f90 @@ -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 diff --git a/base/tools/psb_z_remap.F90 b/base/tools/psb_z_remap.F90 index 521d5e787..706f09869 100644 --- a/base/tools/psb_z_remap.F90 +++ b/base/tools/psb_z_remap.F90 @@ -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