summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2008-06-11 18:47:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2008-06-11 18:47:36 (GMT)
commit706129d731d2f71289b9dac8f906c3e18cf4dd82 (patch)
tree370c8e8d6139da7fbdf688f9d8461f5074a736aa
parentd0acd2431f5151d25e32d67667cda93587dc33e4 (diff)
downloadhdf5-706129d731d2f71289b9dac8f906c3e18cf4dd82.zip
hdf5-706129d731d2f71289b9dac8f906c3e18cf4dd82.tar.gz
hdf5-706129d731d2f71289b9dac8f906c3e18cf4dd82.tar.bz2
[svn-r15198] testh5recover.sh.in:
Sun does not like variable and function having a common name of H5DIFF. Rename the function as MYH5DIFF. trecover_writer.c: Change dataset datatype to the machine independent type of H5T_STD_I32LE. This allows the h5dump output easier to match the expectd output. Tested: smirom, linew, kagiso (serial passed).
-rw-r--r--tools/h5recover/testh5recover.sh.in4
-rw-r--r--tools/h5recover/trecover_writer.c18
2 files changed, 7 insertions, 15 deletions
diff --git a/tools/h5recover/testh5recover.sh.in b/tools/h5recover/testh5recover.sh.in
index c0ddace..b4dd188 100644
--- a/tools/h5recover/testh5recover.sh.in
+++ b/tools/h5recover/testh5recover.sh.in
@@ -33,7 +33,7 @@ RECOVERTOOL_BIN=`pwd`/$RECOVERTOOL # The path of the tool binary
# Use my own h5diff since h5diff has errors such as returning 0 when comparing
# an empty file with a non-empty one.
#H5DIFF=../h5diff/h5diff
-H5DIFF=H5DIFF
+H5DIFF=MYH5DIFF
H5DUMP=../h5dump/h5dump
TESTDIR=`pwd`/../testfiles
@@ -130,7 +130,7 @@ SKIP() {
# an empty file with a non-empty one.
# Compare the h5dump output of two files, return 0 if the same, else 1.
# The cp to x.data is needed to make h5dump output showing the same filename.
-H5DIFF(){
+MYH5DIFF(){
xout1=x1.out
xerr1=x1.err
xout2=x2.out
diff --git a/tools/h5recover/trecover_writer.c b/tools/h5recover/trecover_writer.c
index 01e3ca0..f7252ef 100644
--- a/tools/h5recover/trecover_writer.c
+++ b/tools/h5recover/trecover_writer.c
@@ -63,7 +63,7 @@ void
writer(hid_t file, int dstype, int rank, hsize_t *dims, hsize_t *dimschunk)
{
hid_t dataset; /* dataset handle */
- hid_t datatype, dataspace, plist; /* handles */
+ hid_t dataspace, plist; /* handles */
herr_t status;
int data[NX][NY]; /* data to write */
int i, j;
@@ -82,20 +82,13 @@ writer(hid_t file, int dstype, int rank, hsize_t *dims, hsize_t *dimschunk)
*/
dataspace = H5Screate_simple(RANK, dims, NULL);
- /*
- * Define datatype for the data in the file.
- * We will store little endian INT numbers.
- */
- datatype = H5Tcopy(H5T_NATIVE_INT);
- status = H5Tset_order(datatype, H5T_ORDER_LE);
-
if (dstype & DSContig) {
/* =============================================================
* Create a new dataset within the file using defined dataspace and
* datatype and default dataset creation properties.
* =============================================================
*/
- dataset = H5Dcreate2(file, DATASETNAME, datatype, dataspace,
+ dataset = H5Dcreate2(file, DATASETNAME, H5T_STD_I32LE, dataspace,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
@@ -118,7 +111,7 @@ writer(hid_t file, int dstype, int rank, hsize_t *dims, hsize_t *dimschunk)
*/
plist = H5Pcreate(H5P_DATASET_CREATE);
H5Pset_chunk(plist, RANK, dimschunk);
- dataset = H5Dcreate2(file, CHUNKDATASETNAME, H5T_NATIVE_INT,
+ dataset = H5Dcreate2(file, CHUNKDATASETNAME, H5T_STD_I32LE,
dataspace, H5P_DEFAULT, plist, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -145,7 +138,7 @@ writer(hid_t file, int dstype, int rank, hsize_t *dims, hsize_t *dimschunk)
plist = H5Pcreate(H5P_DATASET_CREATE);
H5Pset_chunk(plist, RANK, dimschunk);
H5Pset_deflate( plist, 6);
- dataset = H5Dcreate2(file, ZDATASETNAME, H5T_NATIVE_INT,
+ dataset = H5Dcreate2(file, ZDATASETNAME, H5T_STD_I32LE,
dataspace, H5P_DEFAULT, plist, H5P_DEFAULT);
status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
H5P_DEFAULT, data);
@@ -174,7 +167,7 @@ writer(hid_t file, int dstype, int rank, hsize_t *dims, hsize_t *dimschunk)
plist = H5Pcreate(H5P_DATASET_CREATE);
H5Pset_chunk(plist, RANK, dimschunk);
H5Pset_szip (plist, H5_SZIP_NN_OPTION_MASK, 8);
- dataset = H5Dcreate2(file, SZDATASETNAME, H5T_NATIVE_INT,
+ dataset = H5Dcreate2(file, SZDATASETNAME, H5T_STD_I32LE,
dataspace, H5P_DEFAULT, plist, H5P_DEFAULT);
status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
H5P_DEFAULT, data);
@@ -197,7 +190,6 @@ writer(hid_t file, int dstype, int rank, hsize_t *dims, hsize_t *dimschunk)
* All done, close/release resources.
*/
H5Sclose(dataspace);
- H5Tclose(datatype);
return;
}