Thanks for figuring this out. We should have done this debugging and figured 
it out.

   I hunted through the HDF5 docs and includes and though they document the 
maximum chunk size they do not seem to have any way of getting it using the 
preprocessor or compiler (that it is not defined by a macro or function). 

   This means we need to defined PETSC_HDF5_MAX_CHUNKSIZE 2147483647 inside our 
hdf5 include file and use this macro whenever we check for chunk size instead 
of using PETSC_HDF5_INT_MAX 

   Are you able to make a MR with this feature for maint or should we?

   Thanks again, and sorry for the side effect that someone unintentionally 
introduced when they "fixed" the code.

   Barry


> On Oct 15, 2019, at 3:59 PM, Sajid Ali via petsc-users 
> <[email protected]> wrote:
> 
> Hi PETSc-developers,
> 
> I think I’ve found the commit that broke this. In MR-1706, the definition of 
> PETSC_HDF5_INT_MAX was changed from being set to 2147483647 to (~(hsize_t)0).
> 
> This new definition sets PETSC_HDF5_INT_MAX to 18446744073709551615 thereby 
> changing the thresholds in the chunking logic at 
> src/vec/vec/impls/mpi/pdvec.c (which causes the error I’m observing).
> 
> I’m not sure where the number 2147483647 comes from but I tried looking at 
> the older commits only to realize that include/petscviewerhdf5.h has always 
> had this number (ever since this definition was moved over from 
> include/petscviewer.h).
> 
> Snippet to check value of (~(hsize_t)0) :
> 
> (ipy3) [sajid@xrmlite misc]$ cat ex.c
> #include "hdf5.h"
> 
> int main() {
>         printf("ref=%llu \n",(~(hsize_t)0));
>         size_t size = sizeof(hsize_t);
>         printf("size = %zu\n", size);
>         }
> (ipy3) [sajid@xrmlite misc]$ h5cc ex.c
> (ipy3) [sajid@xrmlite misc]$ ./a.out
> ref=18446744073709551615
> size = 8
> 
> 
> Thank You,
> Sajid Ali
> Applied Physics
> Northwestern University
> s-sajid-ali.github.io
> 

Reply via email to