[petsc-users] A question about loading data form .h5 file

Barry Smith bsmith at petsc.dev
Thu Aug 8 13:28:33 CDT 2024


  Try reading the vector back in with a vector created from the DM.



> On Aug 8, 2024, at 10:46 AM, 王惊梦 <pentaerythrotol at gmail.com> wrote:
> 
> This Message Is From an External Sender
> This message came from outside your organization.
> Dear Sir or Madam,
> 
> I met a problem about loading data from hdf5 file. Attached is a simple test program.
> 
> A introduction of the program is as follows:
> I create a 3d DMDA object(50*50*50), and create 2 global vectors x and y by DMDA, then I write the vector x into file test.h5.
> When I try to load the vector y from test.h5, the error occurs that "Global size of array in file is 2500, not 125000 as expected", but the size of the array should be 125000 which I've checked in python.
> 
> Thank you for your help!
> 
> Best regards
> ZHOU Yingjie
> <test.c>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240808/312d3cf2/attachment-0001.html>


More information about the petsc-users mailing list