Skip to content

Commit

Permalink
Use H5T_STD_I32LE to create datatype in vds examples (#4070)
Browse files Browse the repository at this point in the history
Fixes issues when VDS examples are tested on BE systems
  • Loading branch information
byrnHDF authored Mar 7, 2024
1 parent 577a32f commit 871a49f
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/h5ex_vds-eiger.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ main(void)
status = H5Pset_virtual(dcpl, vspace, "f-%b.h5", "/A", src_space);

/* Create a virtual dataset */
dset = H5Dcreate2(file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, DATASET, H5T_STD_I32LE, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Sclose(vspace);
status = H5Sclose(src_space);
status = H5Dclose(dset);
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/h5ex_vds-exc.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ main(void)
}

/* Create a virtual dataset */
dset = H5Dcreate2(file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Sclose(space);
status = H5Sclose(nsrc_space);
status = H5Sclose(lsrc_space);
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/h5ex_vds-exclim.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ main(void)
}

/* Create a virtual dataset */
dset = H5Dcreate2(file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Sclose(space);
status = H5Sclose(nsrc_space);
status = H5Sclose(lsrc_space);
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/h5ex_vds-percival-unlim-maxmin.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ main(void)
src_space = H5Screate_simple(RANK, dims, dims_max);
dcpl = H5Pcreate(H5P_DATASET_CREATE);
status = H5Pset_chunk(dcpl, RANK, chunk_dims);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_STD_I32LE, src_space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
status = H5Sclose(src_space);
status = H5Pclose(dcpl);
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/h5ex_vds-percival-unlim.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ main(void)
src_space = H5Screate_simple(RANK, dims, dims_max);
dcpl = H5Pcreate(H5P_DATASET_CREATE);
status = H5Pset_chunk(dcpl, RANK, chunk_dims);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_STD_I32LE, src_space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
status = H5Sclose(src_space);
status = H5Pclose(dcpl);
Expand Down
14 changes: 7 additions & 7 deletions HDF5Examples/C/H5VDS/h5ex_vds-percival.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ main(void)

file = H5Fcreate(SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
src_space = H5Screate_simple(RANK, dims, NULL);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
status = H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
status = H5Sclose(src_space);
status = H5Dclose(dset);
status = H5Fclose(file);
dset =
H5Dcreate2(file, SRC_DATASET[i], H5T_STD_I32LE, src_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
status = H5Sclose(src_space);
status = H5Dclose(dset);
status = H5Fclose(file);
}

file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
Expand Down Expand Up @@ -130,7 +130,7 @@ main(void)
H5Sselect_none(vspace);

/* Create a virtual dataset */
dset = H5Dcreate2(file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, DATASET, H5T_STD_I32LE, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Sclose(vspace);
status = H5Sclose(src_space);
status = H5Dclose(dset);
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/h5ex_vds-simpleIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ main(void)
*/
file = H5Fcreate(SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
space = H5Screate_simple(RANK, dims, NULL);
dset = H5Dcreate2(file, SRC_DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dset = H5Dcreate2(file, SRC_DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata[0]);
status = H5Sclose(space);
status = H5Dclose(dset);
Expand Down
4 changes: 2 additions & 2 deletions HDF5Examples/C/H5VDS/h5ex_vds.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ main(void)

file = H5Fcreate(SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
space = H5Screate_simple(RANK1, dims, NULL);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dset = H5Dcreate2(file, SRC_DATASET[i], H5T_STD_I32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
status = H5Sclose(space);
status = H5Dclose(dset);
Expand Down Expand Up @@ -127,7 +127,7 @@ main(void)
}

/* Create a virtual dataset. */
dset = H5Dcreate2(file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
dset = H5Dcreate2(file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
status = H5Sclose(space);
status = H5Sclose(src_space);
status = H5Dclose(dset);
Expand Down

0 comments on commit 871a49f

Please sign in to comment.