[svn-r1405]

converted all the types to native types to fix the errors
This commit is contained in:
Patrick Lu 1999-07-02 09:47:52 -05:00
parent a129c4d54e
commit ccc388ba1c

View File

@ -109,22 +109,22 @@ int i, j;
/* dset1 */
dims[0] = 10; dims[1] = 20;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(fid, "/dset1", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
for (j = 0; j < 20; j++)
dset1[i][j] = j;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
H5Dclose(dataset);
/* dset2 */
dims[0] = 30; dims[1] = 20;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT);
dataset = H5Dcreate(fid, "/dset2", H5T_NATIVE_DOUBLE, space, H5P_DEFAULT);
for (i = 0; i < 30; i++)
for (j = 0; j < 20; j++)
dset2[i][j] = 0.0001*j;
H5Dwrite(dataset, H5T_IEEE_F64BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Sclose(space);
H5Dclose(dataset);
@ -152,11 +152,11 @@ int i, j;
dims[0] = 10; dims[1] = 20;
maxdims[0] = H5S_UNLIMITED; maxdims[1] = 20;
space = H5Screate_simple(2, dims, maxdims);
dataset = H5Dcreate(fid, "/dset1", H5T_STD_I32BE, space, create_plist);
dataset = H5Dcreate(fid, "/dset1", H5T_NATIVE_INT, space, create_plist);
for (i = 0; i < 10; i++)
for (j = 0; j < 20; j++)
dset1[i][j] = j;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
H5Dclose(dataset);
@ -164,11 +164,11 @@ int i, j;
dims[0] = 30; dims[1] = 10;
maxdims[0] = 30; maxdims[1] = H5S_UNLIMITED;
space = H5Screate_simple(2, dims, maxdims);
dataset = H5Dcreate(fid, "/dset2", H5T_IEEE_F64BE, space, create_plist);
dataset = H5Dcreate(fid, "/dset2", H5T_NATIVE_DOUBLE, space, create_plist);
for (i = 0; i < 30; i++)
for (j = 0; j < 10; j++)
dset2[i][j] = j;
H5Dwrite(dataset, H5T_IEEE_F64BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Sclose(space);
H5Dclose(dataset);
@ -203,25 +203,25 @@ int point = 100;
/* attribute 2 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (root, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
attr = H5Acreate (root, "attr2", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 10; i++) data[i] = i+1;
H5Awrite(attr, H5T_STD_I32BE, data);
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Sclose(space);
H5Aclose(attr);
/* attribute 3 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT);
attr = H5Acreate (root, "attr3", H5T_NATIVE_DOUBLE, space, H5P_DEFAULT);
for (i = 0; i < 10; i++) d[i] = 0.1 * i;
H5Awrite(attr, H5T_IEEE_F64BE, d);
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space);
H5Aclose(attr);
/* attribute 4 */
space = H5Screate(H5S_SCALAR);
attr = H5Acreate (root, "attr4", H5T_STD_I32BE, space, H5P_DEFAULT);
H5Awrite(attr, H5T_STD_I32BE, &point);
attr = H5Acreate (root, "attr4", H5T_NATIVE_INT, space, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_INT, &point);
H5Sclose(space);
H5Aclose(attr);
@ -281,9 +281,9 @@ int i, dset[5];
dim = 5;
space = H5Screate_simple(1, &dim, NULL);
dataset = H5Dcreate(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(fid, "/dset1", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 5; i++) dset[i] = i;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset);
H5Sclose(space);
H5Dclose(dataset);
@ -372,9 +372,9 @@ hsize_t dset3_dim[2];
type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32BE);
H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "c_name", HOFFSET(dset1_t, c), H5T_IEEE_F64BE);
H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_NATIVE_FLOAT);
H5Tinsert(type, "c_name", HOFFSET(dset1_t, c), H5T_NATIVE_DOUBLE);
dataset = H5Dcreate(fid, "/dset1", type, space, H5P_DEFAULT);
H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
@ -384,8 +384,8 @@ hsize_t dset3_dim[2];
/* shared data type 1 */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset2_t));
H5Tinsert(type, "int_name", HOFFSET(dset2_t, a), H5T_STD_I32BE);
H5Tinsert(type, "float_name", HOFFSET(dset2_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "int_name", HOFFSET(dset2_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "float_name", HOFFSET(dset2_t, b), H5T_NATIVE_FLOAT);
H5Tcommit(fid, "type1", type);
group = H5Gcreate (fid, "/group1", 0);
@ -400,9 +400,9 @@ hsize_t dset3_dim[2];
/* shared data type 2 */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t));
ndims = 1; dim[0] = 4;
H5Tinsert_array(type, "int_array", HOFFSET(dset3_t, a), ndims, dim, NULL, H5T_STD_I32BE);
H5Tinsert_array(type, "int_array", HOFFSET(dset3_t, a), ndims, dim, NULL, H5T_NATIVE_INT);
ndims = 2; dim[0] = 5; dim[1] = 6;
H5Tinsert_array(type, "float_array", HOFFSET(dset3_t, b), ndims, dim, NULL, H5T_IEEE_F32BE);
H5Tinsert_array(type, "float_array", HOFFSET(dset3_t, b), ndims, dim, NULL, H5T_NATIVE_FLOAT);
H5Tcommit(fid, "type2", type);
dset3_dim[0] = 3; dset3_dim[1] = 6;
@ -424,8 +424,8 @@ hsize_t dset3_dim[2];
/* shared data type 3 */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset4_t));
H5Tinsert(type, "int", HOFFSET(dset4_t, a), H5T_STD_I32BE);
H5Tinsert(type, "float", HOFFSET(dset4_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "int", HOFFSET(dset4_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "float", HOFFSET(dset4_t, b), H5T_NATIVE_FLOAT);
H5Tcommit(group, "type3", type);
dataset = H5Dcreate(group, "dset4", type, space, H5P_DEFAULT);
@ -440,8 +440,8 @@ hsize_t dset3_dim[2];
group = H5Gcreate (fid, "/group2", 0);
type = H5Tcreate (H5T_COMPOUND, sizeof(dset5_t));
H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_STD_I32BE);
H5Tinsert(type, "float", HOFFSET(dset5_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "float", HOFFSET(dset5_t, b), H5T_NATIVE_FLOAT);
H5Tcommit(group, "type4", type);
dataset = H5Dcreate(group, "dset5", type, space, H5P_DEFAULT);
H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset5);
@ -533,9 +533,9 @@ hsize_t sdim, maxdim;
type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32BE);
H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "c_name", HOFFSET(dset1_t, c), H5T_IEEE_F64BE);
H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_NATIVE_FLOAT);
H5Tinsert(type, "c_name", HOFFSET(dset1_t, c), H5T_NATIVE_DOUBLE);
dataset = H5Dcreate(fid, "/dset1", type, space, create_plist);
H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
@ -551,8 +551,8 @@ hsize_t sdim, maxdim;
/* shared data type 1 */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset2_t));
H5Tinsert(type, "int_name", HOFFSET(dset2_t, a), H5T_STD_I32BE);
H5Tinsert(type, "float_name", HOFFSET(dset2_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "int_name", HOFFSET(dset2_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "float_name", HOFFSET(dset2_t, b), H5T_NATIVE_FLOAT);
H5Tcommit(fid, "type1", type);
group = H5Gcreate (fid, "/group1", 0);
@ -567,16 +567,16 @@ hsize_t sdim, maxdim;
/* shared data type 2 */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t));
ndims = 1; dim[0] = 4;
H5Tinsert_array(type, "int_array", HOFFSET(dset3_t, a), ndims, dim, perm, H5T_STD_I32BE);
H5Tinsert_array(type, "int_array", HOFFSET(dset3_t, a), ndims, dim, perm, H5T_NATIVE_INT);
ndims = 2; dim[0] = 5; dim[1] = 6;
H5Tinsert_array(type, "float_array", HOFFSET(dset3_t, b), ndims, dim, perm, H5T_STD_I32BE);
H5Tinsert_array(type, "float_array", HOFFSET(dset3_t, b), ndims, dim, perm, H5T_NATIVE_INT);
H5Tcommit(fid, "type2", type);
H5Tclose(type);
/* shared data type 3 */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset4_t));
H5Tinsert(type, "int", HOFFSET(dset4_t, a), H5T_STD_I32BE);
H5Tinsert(type, "float", HOFFSET(dset4_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "int", HOFFSET(dset4_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "float", HOFFSET(dset4_t, b), H5T_NATIVE_FLOAT);
H5Tcommit(group, "type3", type);
dataset = H5Dcreate(group, "dset4", type, space, create_plist);
@ -591,8 +591,8 @@ hsize_t sdim, maxdim;
group = H5Gcreate (fid, "/group2", 0);
type = H5Tcreate (H5T_COMPOUND, sizeof(dset5_t));
H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_STD_I32BE);
H5Tinsert(type, "float", HOFFSET(dset5_t, b), H5T_IEEE_F32BE);
H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_NATIVE_INT);
H5Tinsert(type, "float", HOFFSET(dset5_t, b), H5T_NATIVE_FLOAT);
H5Tcommit(group, "type4", type);
dataset = H5Dcreate(group, "dset5", type, space, create_plist);
H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset5);
@ -659,9 +659,9 @@ float dset2_1[10], dset2_2[3][5];
dims[0] = 2; dims[1] = 2;
space = H5Screate_simple(2, dims, NULL);
attr = H5Acreate (group, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
attr = H5Acreate (group, "attr2", H5T_NATIVE_INT, space, H5P_DEFAULT);
data[0][0] = 0; data[0][1] = 1; data[1][0] = 2; data[1][1] = 3;
H5Awrite(attr, H5T_STD_I32BE, data);
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Sclose(space);
H5Aclose(attr);
@ -672,11 +672,11 @@ float dset2_1[10], dset2_2[3][5];
/* dset1.1.1 */
dims[0] = 10; dims[1] = 10;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(group, "dset1.1.1", H5T_STD_I32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset1.1.1", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
dset1[i][j] = j;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
/* attributes of dset1.1.1 */
@ -701,10 +701,10 @@ float dset2_1[10], dset2_2[3][5];
/* dset1.1.2 */
dims[0] = 20;
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate(group, "dset1.1.2", H5T_STD_I32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset1.1.2", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 20; i++)
dset2[i] = i;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Sclose(space);
H5Dclose(dataset);
@ -720,21 +720,21 @@ float dset2_1[10], dset2_2[3][5];
/* dset2.1 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate(group, "dset2.1", H5T_IEEE_F32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2.1", H5T_NATIVE_FLOAT, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
dset2_1[i] = i*0.1+1;
H5Dwrite(dataset, H5T_IEEE_F32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Sclose(space);
H5Dclose(dataset);
/* dset2.2 */
dims[0] = 3; dims[1] = 5;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(group, "dset2.2", H5T_IEEE_F32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2.2", H5T_NATIVE_FLOAT, space, H5P_DEFAULT);
for (i = 0; i < 3; i++)
for (j = 0; j < 5; j++)
dset2_2[i][j] = i*0.1;
H5Dwrite(dataset, H5T_IEEE_F32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Sclose(space);
H5Dclose(dataset);
@ -842,9 +842,9 @@ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
dim[0] = dim[1] = dim[2] = dim[3] = 2;
H5Tinsert_array(type, "a_array", HOFFSET(dset1_t, a), 4, dim, perm, H5T_STD_I32BE);
H5Tinsert_array(type, "b_array", HOFFSET(dset1_t, b), 4, dim, perm, H5T_IEEE_F64BE);
H5Tinsert_array(type, "c_array", HOFFSET(dset1_t, c), 4, dim, perm, H5T_IEEE_F64BE);
H5Tinsert_array(type, "a_array", HOFFSET(dset1_t, a), 4, dim, perm, H5T_NATIVE_INT);
H5Tinsert_array(type, "b_array", HOFFSET(dset1_t, b), 4, dim, perm, H5T_NATIVE_DOUBLE);
H5Tinsert_array(type, "c_array", HOFFSET(dset1_t, c), 4, dim, perm, H5T_NATIVE_DOUBLE);
H5Tcommit(group, "type1", type);
@ -865,17 +865,17 @@ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */
dims[0] = 2; dims[1] = 2;
space2 = H5Screate_simple(2, dims, NULL);
attr = H5Acreate (dataset, "attr2", H5T_STD_I32BE, space2, H5P_DEFAULT);
attr = H5Acreate (dataset, "attr2", H5T_NATIVE_INT, space2, H5P_DEFAULT);
data[0][0] = 0; data[0][1] = 1; data[1][0] = 2; data[1][1] = 3;
H5Awrite(attr, H5T_STD_I32BE, data);
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Sclose(space2);
H5Aclose(attr);
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT);
attr = H5Acreate (dataset, "attr3", H5T_NATIVE_DOUBLE, space2, H5P_DEFAULT);
for (i = 0; i < 10; i++) d[i] = 0.1 * i;
H5Awrite(attr, H5T_IEEE_F64BE, d);
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space2);
H5Aclose(attr);
@ -927,11 +927,11 @@ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */
dims[0] = 10; dims[1] = 10;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(group, "dset2", H5T_STD_I32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
dset2[i][j] = j;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dclose(dataset);
@ -950,11 +950,11 @@ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */
dims[0] = 10; dims[1] = 10;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(group, "dset3", H5T_STD_I32BE, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset3", H5T_NATIVE_INT, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
dset3[i][j] = i;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3);
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3);
H5Dclose(dataset);
@ -1066,7 +1066,7 @@ size_t mdims[2];
f_type = H5Tcreate (H5T_COMPOUND, sizeof(compound_t));
mdims[0] = 8; mdims[1] = 10;
H5Tinsert_array(f_type, "int_array", HOFFSET(compound_t, a), 2, mdims,
NULL, H5T_STD_I32BE);
NULL, H5T_NATIVE_INT);
str_type = mkstr(32, H5T_STR_SPACEPAD);
mdims[0] = 3; mdims[1] = 4;
H5Tinsert_array(f_type, "string", HOFFSET(compound_t, s), 2, mdims,
@ -1330,13 +1330,13 @@ void test_objref(){
ret=H5Gset_comment(group,".",write_comment);
/* Create a dataset (inside Group1) */
dataset=H5Dcreate(group,"Dataset1",H5T_STD_U32LE,sid1,H5P_DEFAULT);
dataset=H5Dcreate(group,"Dataset1",H5T_NATIVE_UINT,sid1,H5P_DEFAULT);
for(tu32=(uint32_t *)wbuf,i=0; i<SPACE1_DIM1; i++)
*tu32++=i*3;
/* Write selection to disk */
ret=H5Dwrite(dataset,H5T_STD_U32LE,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf);
ret=H5Dwrite(dataset,H5T_NATIVE_UINT,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf);
/* Close Dataset */
ret = H5Dclose(dataset);
@ -1451,13 +1451,13 @@ void test_datareg(){
sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
/* Create a dataset */
dset2=H5Dcreate(fid1,"Dataset2",H5T_STD_U8LE,sid2,H5P_DEFAULT);
dset2=H5Dcreate(fid1,"Dataset2",H5T_NATIVE_UCHAR,sid2,H5P_DEFAULT);
for(tu8=dwbuf,i=0; i<SPACE2_DIM1*SPACE2_DIM2; i++)
*tu8++=i*3;
/* Write selection to disk */
ret=H5Dwrite(dset2,H5T_STD_U8LE,H5S_ALL,H5S_ALL,H5P_DEFAULT,dwbuf);
ret=H5Dwrite(dset2,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,H5P_DEFAULT,dwbuf);
/* Close Dataset */
ret = H5Dclose(dset2);