[petsc-users] VecLoad into a SubVector ?

Barry Smith bsmith at petsc.dev
Tue Jul 28 11:56:20 CDT 2020


  Sajid,

    This seems like a good fix. 

   Barry


> On Jul 27, 2020, at 11:34 PM, Sajid Ali <sajidsyed2021 at u.northwestern.edu> wrote:
> 
> Hi Barry/Matt,
> 
> The fix to this bug would be to disable replacearray op on a subvector. I modified the source code for vecio.c forcing VecLoad_HDF5 to always perform an array copy and the above test passes for both binary and hdf5 viewers in serial and parallel.
> 
> I can open a PR that adds a line Z->ops->replacearray = NULL; at line 1286 in the rvector.c file if one of you can confirm that the above logic is correct. The example attached in the last email could be used as a test for the same if necessary.
> 
> Thank You,
> Sajid Ali | PhD Candidate
> Applied Physics
> Northwestern University
> s-sajid-ali.github.io <http://s-sajid-ali.github.io/>

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


More information about the petsc-users mailing list