mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 21:02:26 +00:00
Fix deallocation of vector in DIAG/BJAC free
This commit is contained in:
@@ -644,6 +644,10 @@ subroutine psb_c_bjac_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
enddo
|
||||
deallocate(prec%av,stat=info)
|
||||
endif
|
||||
if (allocated (prec%dv)) then
|
||||
call prec%dv%free(info)
|
||||
if (info == 0) deallocate(prec%dv)
|
||||
end if
|
||||
end if
|
||||
if (.not.allocated(prec%av)) then
|
||||
allocate(prec%av(psb_max_avsz),stat=info)
|
||||
|
||||
@@ -270,7 +270,7 @@ subroutine psb_c_diag_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
prec%d(i) = cone
|
||||
end do
|
||||
|
||||
allocate(prec%dv,stat=info)
|
||||
if (.not.allocated(prec%dv)) allocate(prec%dv,stat=info)
|
||||
if (info == 0) then
|
||||
if (present(vmold)) then
|
||||
allocate(prec%dv%v,mold=vmold,stat=info)
|
||||
|
||||
@@ -644,6 +644,10 @@ subroutine psb_d_bjac_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
enddo
|
||||
deallocate(prec%av,stat=info)
|
||||
endif
|
||||
if (allocated (prec%dv)) then
|
||||
call prec%dv%free(info)
|
||||
if (info == 0) deallocate(prec%dv)
|
||||
end if
|
||||
end if
|
||||
if (.not.allocated(prec%av)) then
|
||||
allocate(prec%av(psb_max_avsz),stat=info)
|
||||
|
||||
@@ -270,7 +270,7 @@ subroutine psb_d_diag_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
prec%d(i) = done
|
||||
end do
|
||||
|
||||
allocate(prec%dv,stat=info)
|
||||
if (.not.allocated(prec%dv)) allocate(prec%dv,stat=info)
|
||||
if (info == 0) then
|
||||
if (present(vmold)) then
|
||||
allocate(prec%dv%v,mold=vmold,stat=info)
|
||||
|
||||
@@ -644,6 +644,10 @@ subroutine psb_s_bjac_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
enddo
|
||||
deallocate(prec%av,stat=info)
|
||||
endif
|
||||
if (allocated (prec%dv)) then
|
||||
call prec%dv%free(info)
|
||||
if (info == 0) deallocate(prec%dv)
|
||||
end if
|
||||
end if
|
||||
if (.not.allocated(prec%av)) then
|
||||
allocate(prec%av(psb_max_avsz),stat=info)
|
||||
|
||||
@@ -270,7 +270,7 @@ subroutine psb_s_diag_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
prec%d(i) = sone
|
||||
end do
|
||||
|
||||
allocate(prec%dv,stat=info)
|
||||
if (.not.allocated(prec%dv)) allocate(prec%dv,stat=info)
|
||||
if (info == 0) then
|
||||
if (present(vmold)) then
|
||||
allocate(prec%dv%v,mold=vmold,stat=info)
|
||||
|
||||
@@ -644,6 +644,10 @@ subroutine psb_z_bjac_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
enddo
|
||||
deallocate(prec%av,stat=info)
|
||||
endif
|
||||
if (allocated (prec%dv)) then
|
||||
call prec%dv%free(info)
|
||||
if (info == 0) deallocate(prec%dv)
|
||||
end if
|
||||
end if
|
||||
if (.not.allocated(prec%av)) then
|
||||
allocate(prec%av(psb_max_avsz),stat=info)
|
||||
|
||||
@@ -270,7 +270,7 @@ subroutine psb_z_diag_precbld(a,desc_a,prec,info,amold,vmold,imold)
|
||||
prec%d(i) = zone
|
||||
end do
|
||||
|
||||
allocate(prec%dv,stat=info)
|
||||
if (.not.allocated(prec%dv)) allocate(prec%dv,stat=info)
|
||||
if (info == 0) then
|
||||
if (present(vmold)) then
|
||||
allocate(prec%dv%v,mold=vmold,stat=info)
|
||||
|
||||
Reference in New Issue
Block a user