|
|
|
@ -124,7 +124,7 @@ subroutine psb_d_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
real(psb_dpk_), allocatable :: xta(:), yta(:)
|
|
|
|
|
integer(psb_ipk_) :: i, j, nr1, nc1,nr2, nc2 ,&
|
|
|
|
|
& map_kind, nr, ictxt
|
|
|
|
|
character(len=20), parameter :: name='psb_map_X2Y'
|
|
|
|
|
character(len=20), parameter :: name='psb_map_X2Yv'
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
|
if (.not.map%is_asb()) then
|
|
|
|
@ -137,7 +137,8 @@ subroutine psb_d_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
|
|
|
|
|
select case(map_kind)
|
|
|
|
|
case(psb_map_aggr_)
|
|
|
|
|
|
|
|
|
|
!!$ write(0,*) 'Using a map_aggr_ map',allocated(map%p_desc_X%v_halo_index%v),&
|
|
|
|
|
!!$ & allocated(map%p_desc_Y%v_halo_index%v)
|
|
|
|
|
ictxt = map%p_desc_Y%get_context()
|
|
|
|
|
nr2 = map%p_desc_Y%get_global_rows()
|
|
|
|
|
nc2 = map%p_desc_Y%get_local_cols()
|
|
|
|
@ -153,11 +154,12 @@ subroutine psb_d_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Error from inner routines',info
|
|
|
|
|
info = -1
|
|
|
|
|
else
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
end if
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
|
|
|
|
|
case(psb_map_gen_linear_)
|
|
|
|
|
|
|
|
|
|
!!$ write(0,*) 'Using a gen_linear_ map'
|
|
|
|
|
ictxt = map%desc_Y%get_context()
|
|
|
|
|
nr1 = map%desc_X%get_local_rows()
|
|
|
|
|
nc1 = map%desc_X%get_local_cols()
|
|
|
|
@ -180,10 +182,11 @@ subroutine psb_d_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Error from inner routines',info
|
|
|
|
|
info = -1
|
|
|
|
|
else
|
|
|
|
|
call xt%free(info)
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
call xt%free(info)
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Invalid descriptor input', &
|
|
|
|
@ -264,7 +267,7 @@ subroutine psb_d_map_Y2X(alpha,x,beta,y,map,info,work)
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Error from inner routines',info
|
|
|
|
|
info = -1
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Invalid descriptor input'
|
|
|
|
@ -287,7 +290,7 @@ subroutine psb_d_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
real(psb_dpk_), allocatable :: xta(:), yta(:)
|
|
|
|
|
integer(psb_ipk_) :: i, j, nr1, nc1,nr2, nc2,&
|
|
|
|
|
& map_kind, nr, ictxt
|
|
|
|
|
character(len=20), parameter :: name='psb_map_Y2X'
|
|
|
|
|
character(len=20), parameter :: name='psb_map_Y2Xv'
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
|
if (.not.map%is_asb()) then
|
|
|
|
@ -300,7 +303,7 @@ subroutine psb_d_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
|
|
|
|
|
select case(map_kind)
|
|
|
|
|
case(psb_map_aggr_)
|
|
|
|
|
|
|
|
|
|
!!$ write(0,*) 'Using a map_aggr_ map'
|
|
|
|
|
ictxt = map%p_desc_X%get_context()
|
|
|
|
|
nr2 = map%p_desc_X%get_global_rows()
|
|
|
|
|
nc2 = map%p_desc_X%get_local_cols()
|
|
|
|
@ -316,11 +319,12 @@ subroutine psb_d_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Error from inner routines',info
|
|
|
|
|
info = -1
|
|
|
|
|
else
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
end if
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
|
|
|
|
|
case(psb_map_gen_linear_)
|
|
|
|
|
|
|
|
|
|
!!$ write(0,*) 'Using a gen_linear_ map'
|
|
|
|
|
ictxt = map%desc_X%get_context()
|
|
|
|
|
nr1 = map%desc_Y%get_local_rows()
|
|
|
|
|
nc1 = map%desc_Y%get_local_cols()
|
|
|
|
@ -342,10 +346,10 @@ subroutine psb_d_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Error from inner routines',info
|
|
|
|
|
info = -1
|
|
|
|
|
else
|
|
|
|
|
call xt%free(info)
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
call xt%free(info)
|
|
|
|
|
call yt%free(info)
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
write(psb_err_unit,*) trim(name),' Invalid descriptor input'
|
|
|
|
@ -373,7 +377,7 @@ function psb_d_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) &
|
|
|
|
|
select case(map_kind)
|
|
|
|
|
case (psb_map_aggr_)
|
|
|
|
|
! OK
|
|
|
|
|
|
|
|
|
|
!!$ write(0,*) 'Creating a map_aggr_ map'
|
|
|
|
|
if (psb_is_ok_desc(desc_X)) then
|
|
|
|
|
this%p_desc_X=>desc_X
|
|
|
|
|
else
|
|
|
|
@ -384,6 +388,9 @@ function psb_d_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) &
|
|
|
|
|
else
|
|
|
|
|
info = psb_err_invalid_ovr_num_
|
|
|
|
|
endif
|
|
|
|
|
!!$ write(0,*) 'Creating a map_aggr_ map 2:',allocated(this%p_desc_X%v_halo_index%v),&
|
|
|
|
|
!!$ & allocated(this%p_desc_Y%v_halo_index%v)
|
|
|
|
|
|
|
|
|
|
if (present(iaggr)) then
|
|
|
|
|
if (.not.present(naggr)) then
|
|
|
|
|
info = 7
|
|
|
|
@ -400,7 +407,7 @@ function psb_d_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) &
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
case(psb_map_gen_linear_)
|
|
|
|
|
|
|
|
|
|
!!$ write(0,*) 'Creating a gen_linear_ map'
|
|
|
|
|
if (desc_X%is_ok()) then
|
|
|
|
|
call psb_cdcpy(desc_X, this%desc_X,info)
|
|
|
|
|
else
|
|
|
|
|