diff options
| author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-01-30 23:41:15 -0500 |
|---|---|---|
| committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-01-30 23:49:11 -0500 |
| commit | 4d54a22b49b197bbb6a91aab3a67572b40b2f677 (patch) | |
| tree | 353563d50adcb0a22e3035979980ca2e37b4c092 /test cases/frameworks/25 hdf5/main.c | |
| parent | 1ebaeadf60fd6f162e73ee3938e88cf72659a8a8 (diff) | |
| download | meson-4d54a22b49b197bbb6a91aab3a67572b40b2f677.tar.gz | |
setup hdf5 test
deblank
Diffstat (limited to 'test cases/frameworks/25 hdf5/main.c')
| -rw-r--r-- | test cases/frameworks/25 hdf5/main.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test cases/frameworks/25 hdf5/main.c b/test cases/frameworks/25 hdf5/main.c new file mode 100644 index 000000000..8773e492e --- /dev/null +++ b/test cases/frameworks/25 hdf5/main.c @@ -0,0 +1,32 @@ +#include <stdio.h> +#include <stdlib.h> + +#include "hdf5.h" + +int main(void) +{ +herr_t ier; +unsigned maj; +unsigned min; +unsigned rel; + +ier = H5open(); +if (ier) { + fprintf(stderr,"Unable to initialize HDF5: %d\n", ier); + return EXIT_FAILURE; +} + +ier = H5get_libversion(&maj, &min, &rel); +if (ier) { + fprintf(stderr,"HDF5 did not initialize!\n"); + return EXIT_FAILURE; +} +printf("C HDF5 version %d.%d.%d\n", maj, min, rel); + +ier = H5close(); +if (ier) { + fprintf(stderr,"Unable to close HDF5: %d\n", ier); + return EXIT_FAILURE; +} +return EXIT_SUCCESS; +} |
