[petsc-users] VecView output to HDF5 in 3.12.0 broken ?

Sajid Ali sajidsyed2021 at u.northwestern.edu
Tue Oct 15 15:59:14 CDT 2019


Hi PETSc-developers,

I think I’ve found the commit that broke this. In MR-1706
<https://gitlab.com/petsc/petsc/merge_requests/1706?commit_id=84ccb19e065d3103c2f8e02df068ca6a03ec0e36>,
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 at 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 at xrmlite misc]$ h5cc ex.c
(ipy3) [sajid at xrmlite misc]$ ./a.out
ref=18446744073709551615
size = 8


Thank You,
Sajid Ali
Applied Physics
Northwestern University
s-sajid-ali.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191015/b4048286/attachment-0001.html>


More information about the petsc-users mailing list