Fix double allocation in DDIAG%BLD

development
sfilippone 4 weeks ago
parent 0e1d7de857
commit c8d065fa55

@ -91,6 +91,10 @@ subroutine amg_c_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = cone/sv%d(i) sv%d(i) = cone/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)
@ -172,6 +176,10 @@ subroutine amg_c_l1_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = cone/sv%d(i) sv%d(i) = cone/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)

@ -91,6 +91,10 @@ subroutine amg_d_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = done/sv%d(i) sv%d(i) = done/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)
@ -172,6 +176,10 @@ subroutine amg_d_l1_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = done/sv%d(i) sv%d(i) = done/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)

@ -91,6 +91,10 @@ subroutine amg_s_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = sone/sv%d(i) sv%d(i) = sone/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)
@ -172,6 +176,10 @@ subroutine amg_s_l1_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = sone/sv%d(i) sv%d(i) = sone/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)

@ -91,6 +91,10 @@ subroutine amg_z_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = zone/sv%d(i) sv%d(i) = zone/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)
@ -172,6 +176,10 @@ subroutine amg_z_l1_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
sv%d(i) = zone/sv%d(i) sv%d(i) = zone/sv%d(i)
end if end if
end do end do
if (allocated(sv%dv)) then
call sv%dv%free(info)
deallocate(sv%dv)
end if
allocate(sv%dv,stat=info) allocate(sv%dv,stat=info)
if (info == psb_success_) then if (info == psb_success_) then
call sv%dv%bld(sv%d) call sv%dv%bld(sv%d)

Loading…
Cancel
Save