|
|
|
@ -362,8 +362,7 @@ subroutine mld_dmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
|
|
|
|
|
nr2l = p%precv(level)%base_desc%get_local_rows()
|
|
|
|
|
allocate(mlprec_wrk(level)%x2l(nc2l),mlprec_wrk(level)%y2l(nc2l),&
|
|
|
|
|
& stat=info)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
write(0,*) 'Allocation Error at level ',0
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
info=psb_err_alloc_request_
|
|
|
|
|
call psb_errpush(info,name,&
|
|
|
|
|
& i_err=(/ione*(size(x)+size(y)),izero,izero,izero,izero/),&
|
|
|
|
@ -447,7 +446,6 @@ contains
|
|
|
|
|
& mlprec_wrk(level)%y2l(nc2l),&
|
|
|
|
|
& stat=info)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
write(0,*) 'Allocation Error at level',level, nc2l
|
|
|
|
|
info=psb_err_alloc_request_
|
|
|
|
|
call psb_errpush(info,name,i_err=(/2*nc2l,izero,izero,izero,izero/),&
|
|
|
|
|
& a_err='real(psb_dpk_)')
|
|
|
|
@ -490,18 +488,26 @@ contains
|
|
|
|
|
& p%precv(level)%base_desc, trans,&
|
|
|
|
|
& sweeps,work,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
|
|
|
|
|
if (level < nlev) then
|
|
|
|
|
call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error in recursive call')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
!
|
|
|
|
|
! Apply the prolongator
|
|
|
|
|
!
|
|
|
|
|
call psb_map_Y2X(done,mlprec_wrk(level+1)%y2l,&
|
|
|
|
|
& done,mlprec_wrk(level)%y2l,&
|
|
|
|
|
& p%precv(level+1)%map,info,work=work)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during prolongation')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -524,7 +530,7 @@ contains
|
|
|
|
|
call psb_map_X2Y(done,mlprec_wrk(level-1)%x2l,&
|
|
|
|
|
& dzero,mlprec_wrk(level)%x2l,&
|
|
|
|
|
& p%precv(level)%map,info,work=work)
|
|
|
|
|
!!$ write(0,*) 'inner_ml map_x2y :',level,info
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during restriction')
|
|
|
|
@ -619,13 +625,25 @@ contains
|
|
|
|
|
& mlprec_wrk(level)%y2l,done,mlprec_wrk(level)%x2l,&
|
|
|
|
|
& p%precv(level)%base_desc,info,work=work,trans=trans)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
|
|
|
|
|
call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error in recursive call')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_map_Y2X(done,mlprec_wrk(level+1)%y2l,&
|
|
|
|
|
& done,mlprec_wrk(level)%y2l,&
|
|
|
|
|
& p%precv(level+1)%map,info,work=work)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during prolongation')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -680,12 +698,23 @@ contains
|
|
|
|
|
& p%precv(level)%base_desc,info,work=work,trans=trans)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error in recursive call')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_map_Y2X(done,mlprec_wrk(level+1)%y2l,&
|
|
|
|
|
& done,mlprec_wrk(level)%y2l,&
|
|
|
|
|
& p%precv(level+1)%map,info,work=work)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during prolongation')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -711,14 +740,24 @@ contains
|
|
|
|
|
|
|
|
|
|
if (level < nlev) then
|
|
|
|
|
call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error in recursive call')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Apply the prolongator
|
|
|
|
|
!
|
|
|
|
|
call psb_map_Y2X(done,mlprec_wrk(level+1)%y2l,&
|
|
|
|
|
& dzero,mlprec_wrk(level)%y2l,&
|
|
|
|
|
& p%precv(level+1)%map,info,work=work)
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during prolongation')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Compute the residual
|
|
|
|
|
!
|
|
|
|
@ -799,6 +838,11 @@ contains
|
|
|
|
|
& p%precv(level)%base_desc,info,work=work,trans=trans)
|
|
|
|
|
|
|
|
|
|
call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error in recursive call')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
@ -807,10 +851,10 @@ contains
|
|
|
|
|
call psb_map_Y2X(done,mlprec_wrk(level+1)%y2l,&
|
|
|
|
|
& done,mlprec_wrk(level)%y2l,&
|
|
|
|
|
& p%precv(level+1)%map,info,work=work)
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_ ) then
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during restriction')
|
|
|
|
|
& a_err='Error during prolongation')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -937,7 +981,6 @@ subroutine mld_dmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info)
|
|
|
|
|
if (psb_errstatus_fatal()) then
|
|
|
|
|
nc2l = p%precv(level)%base_desc%get_local_cols()
|
|
|
|
|
info=psb_err_alloc_request_
|
|
|
|
|
write(0,*) 'Allocation Error at level ',0
|
|
|
|
|
call psb_errpush(info,name,i_err=(/2*nc2l,izero,izero,izero,izero/),&
|
|
|
|
|
& a_err='real(psb_dpk_)')
|
|
|
|
|
goto 9999
|
|
|
|
@ -1101,7 +1144,7 @@ contains
|
|
|
|
|
call psb_map_X2Y(done,mlprec_wrk(level-1)%vx2l,&
|
|
|
|
|
& dzero,mlprec_wrk(level)%vx2l,&
|
|
|
|
|
& p%precv(level)%map,info,work=work)
|
|
|
|
|
!!$ write(0,*) 'inner_ml map_x2y :',level,info
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during restriction')
|
|
|
|
@ -1113,11 +1156,6 @@ contains
|
|
|
|
|
|
|
|
|
|
if (level < nlev) then
|
|
|
|
|
call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error in recursive call')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
!
|
|
|
|
|
! Apply the prolongator
|
|
|
|
@ -1125,11 +1163,6 @@ contains
|
|
|
|
|
call psb_map_Y2X(done,mlprec_wrk(level+1)%vy2l,&
|
|
|
|
|
& dzero,mlprec_wrk(level)%vy2l,&
|
|
|
|
|
& p%precv(level+1)%map,info,work=work)
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_internal_error_,name,&
|
|
|
|
|
& a_err='Error during prolongation')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
|
!
|
|
|
|
|
! Compute the residual
|
|
|
|
|