[petsc-users] Error Writing Large HDF5 File

Lawrence Mitchell wence at gmx.li
Fri Nov 26 09:25:19 CST 2021

This is failing setting the chunksize:

It is hard for me to follow this code, but it looks like the chunk is just
set to the total extent of the DA (on the process?). This can grow too
large for HDF5, which has limits described here

chunks must have fewer than 2^32-1 elements and a max size of 4GB

I suspect you’re hitting that limit.

I guess this part of the code should be fully refactored to set sensible
chunk sizes. That same document suggests 1MB is a good option.


On Fri, 26 Nov 2021 at 15:10, David Scott <d.scott at epcc.ed.ac.uk> wrote:

> Hello,
> I am trying to write out HDF5 files. The program I have works all right
> up to a point but then fails when I double the size of the file that I
> am trying to write out. I have attached a file containing the error
> message and another file containing the short program that I used to
> generate it.
> The first of these files reports that Petsc 3.14.2 was used. I know that
> this is old but I have obtained the same result with Petsc 3.16.1. Also,
> I have observed the same behaviour on two different machines. I tried
> using 64 bit indices but it made no difference.
> The program runs successfully with the following command line options
> -global_dim_x 1344 -global_dim_y 336 -global_dim_z 336
> but fails with these
> -global_dim_x 2688 -global_dim_y 336 -global_dim_z 336
> All the best,
> David
> The University of Edinburgh is a charitable body, registered in Scotland,
> with registration number SC005336. Is e buidheann carthannais a th’ ann an
> Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211126/b5ace03a/attachment.html>

More information about the petsc-users mailing list