Fix deallocation of vector in DIAG/BJAC free

This commit is contained in:
sfilippone
2026-10-07 14:54:28 +02:00
parent b0cd524b12
commit e0e49cf415
8 changed files with 20 additions and 4 deletions
+4
View File
@@ -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)
+1 -1
View File
@@ -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)
+4
View File
@@ -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)
+1 -1
View File
@@ -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)
+4
View File
@@ -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)
+1 -1
View File
@@ -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)
+4
View File
@@ -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)
+1 -1
View File
@@ -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)