h5part AT lists.psi.ch
Subject: H5Part development and discussion
List archive
- From: Jozsef Bakosi <jbakosi AT lanl.gov>
- To: h5part AT lists.psi.ch
- Subject: [H5part] Question on appending particle file
- Date: Thu, 11 Aug 2016 15:23:01 -0600
Hello,
I have successfully been using H5Part to write particle data to several time
steps.
Now I would like to do the same but without keeping the file open during time
stepping, so I'm attempting to open the file using APPEND, but get the
following
error message when I try to call H5PartWriteDataFloat64() with a nonzero error
code:
E: H5PartWriteDataFloat64: Timegroup <= 0.
Here is the sequence that I follow:
I create the file once during initialization:
f = H5PartOpenFileParallel( filename, H5PART_WRITE, MPI_COMM_WORLD);
H5PartWriteFileAttribString( f, "Origin", "somestring" );
H5PartCloseFile( f );
Then every iteration I repeat:
1. Write Time stamp:
f = H5PartOpenFileParallel( filename, H5PART_APPEND, MPI_COMM_WORLD);
H5PartSetStep( f, it );
H5PartSetNumParticles( f, npar );
H5PartCloseFile( f );
2. Write particle coordinates:
f = H5PartOpenFileParallel( filename, H5PART_APPEND, MPI_COMM_WORLD);
H5PartWriteDataFloat64( f, "x", xdata );
H5PartWriteDataFloat64( f, "y", ydata );
H5PartWriteDataFloat64( f, "z", zdata );
H5PartCloseFile( f );
Only the three H5PartWriteDataFloat64() calls generate the above error.
Could someone tell me how I can debug this? Keeping the file open during
iterations works fine, but then I cannot look at the data file only after all
iterations are finished.
Please let me know if you need more information.
Thanks,
Jozsef
--
Jozsef Bakosi
Computational Physics and Algorithms (CCS-2)
MS D413, Los Alamos National Laboratory
Los Alamos, NM 87545, USA
email: jbakosi AT lanl.gov
phone: 505-665-0950
fax: 505-665-4972
- [H5part] Question on appending particle file, Jozsef Bakosi, 08/11/2016
- Re: [H5part] Question on appending particle file, Achim Gsell, 08/11/2016
- Re: [H5part] Question on appending particle file, Jozsef Bakosi, 08/12/2016
- Re: [H5part] Question on appending particle file, Achim Gsell, 08/11/2016
Archive powered by MHonArc 2.6.19.