[petsc-users] DMDAVecRestoreArrayF90

Barry Smith bsmith at petsc.dev
Mon Mar 31 14:46:18 CDT 2025


 
   PETSc 2.23 introduced some incompatibilities in the Fortran bindings with previous versions of PETSc. 

   As part of upgrading Fortran code for use with PETSc 2.23 the suffix F90 should be removed from all PETSc Fortran calls; for routines such as DMDAVecGetArrayF90() no other changes are needed to the function call. The array arguments remain Fortran pointers to arrays.

   Barry


> On Mar 31, 2025, at 3:12 PM, Zhao-Yi Yan <13971216897 at 163.com> wrote:
> 
> 
> Hi, Dear developers,
> 
> I am using 3.22.4 and find that
> 
>  DMDAVecGetArrayF90 
> 
> should be used in pair with 
> 
> DMDAVecRestoreArrayF90 
> 
> And should NOT be used in pair with
> 
>  DMDAVecRestoreArray 
> 
> Otherwise, strange memory leakage can be caused.
> 
> I know F90-style function has been discarded in 3.23 version. So this is a simply record mail; However, it is appreciated if any comment feedback.
> 
> Best regard,
> 
> Zhao-Yi Yan
>  
>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250331/03550ee4/attachment.html>


More information about the petsc-users mailing list