Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5F_LIBVER_ LATEST is hardcoded, but the value changed #474

Closed
ggggggggg opened this issue Apr 30, 2018 · 5 comments
Closed

H5F_LIBVER_ LATEST is hardcoded, but the value changed #474

ggggggggg opened this issue Apr 30, 2018 · 5 comments

Comments

@ggggggggg
Copy link
Contributor

ggggggggg commented Apr 30, 2018

The value of H5F_LIBVER_LATEST appears to have changed. Currently the values are hard coded, but it seems better to read them from the HDF5 library. Can anybody tell me how to do this, and I'd be happy to submit a PR. There are lots of examples of reading constants with the HDF5.read_constant function, but I don't understand it enough to adapt it to this case.

/* Library's format versions */
typedef enum H5F_libver_t {
    H5F_LIBVER_ERROR = -1,
    H5F_LIBVER_EARLIEST = 0,    /* Use the earliest possible format for storing objects */
    H5F_LIBVER_V18 = 1,         /* Use the latest v18 format for storing objects */
    H5F_LIBVER_V110 = 2,        /* Use the latest v10 format for storing objects */
    H5F_LIBVER_NBOUNDS
} H5F_libver_t;

#define H5F_LIBVER_LATEST   H5F_LIBVER_V110

This causes the SWMR tests to fail on my machine. I'm not sure why they aren't failing on travis on OSX, maybe it's installing a different version of the HDF5 library? I have 1.10.2

@musm
Copy link
Member

musm commented Apr 30, 2018

@ggggggggg
Copy link
Contributor Author

I hadn't, but it does note the addition of H5F_LIBVER_V18 and H5F_LIBVER_V110, which I believe are the reason that the value of H5F_LIBVER_LATEST changed.

@ggggggggg
Copy link
Contributor Author

I guess instead of reading the value from the library, I could check the library version before defining the constants. But it seems better to read it from the library if we can.

@musm
Copy link
Member

musm commented Apr 30, 2018

Agreed, is the constant available in the non-cpp api? I tried some things here and there but couldn't get it to load

@ggggggggg
Copy link
Contributor Author

How do you tell if its in the cpp or non-cpp api?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants