diff options
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 4d811ee..b8a3753 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -2815,35 +2815,34 @@ static void gent_array7(void) static void gent_array8(void) { - double *buf; /* information to write */ - hid_t fid; /* HDF5 File IDs */ + int *buf; /* information to write */ + hid_t fid; /* HDF5 File ID */ hid_t did; /* dataset ID */ hid_t sid; /* dataspace ID */ hid_t tid; /* datatype ID */ size_t size; hsize_t sdims[] = {1}; - hsize_t tdims[] = {H5TOOLS_BUFSIZE / sizeof(double) + 1}; + hsize_t tdims[] = {H5TOOLS_BUFSIZE / sizeof(int) + 1}; int i; herr_t ret; - size = ( H5TOOLS_BUFSIZE / sizeof(double) + 1 ) * sizeof(double); + size = ( H5TOOLS_BUFSIZE / sizeof(int) + 1 ) * sizeof(int); buf = malloc( size ); - for( i = 0; i < H5TOOLS_BUFSIZE / sizeof(double) + 1; i++) + for( i = 0; i < H5TOOLS_BUFSIZE / sizeof(int) + 1; i++) buf[i] = i; /* create file */ fid = H5Fcreate(FILE64, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /* create a type larger than H5TOOLS_BUFSIZE */ - tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, tdims); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, tdims); size = H5Tget_size(tid); sid = H5Screate_simple(1, sdims, NULL); did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); -#if defined(WRITE_ARRAY) ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); assert(ret >= 0); -#endif + /* close */ ret = H5Dclose(did); @@ -6376,7 +6375,6 @@ int main(void) gent_attr_creation_order(); gent_fpformat(); gent_extlinks(); - gent_array8(); return 0; |