summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-03-06 03:41:49 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-03-06 03:41:49 (GMT)
commitf96b4b79a0e11abe48c0aa5db6abd13bef0a7063 (patch)
tree7ba4862c18fc3ce63d20eaca9f3de126bf92d9ae /testpar
parentedee5efb643690685fe25d7eb8a509c8780dcb71 (diff)
downloadhdf5-f96b4b79a0e11abe48c0aa5db6abd13bef0a7063.zip
hdf5-f96b4b79a0e11abe48c0aa5db6abd13bef0a7063.tar.gz
hdf5-f96b4b79a0e11abe48c0aa5db6abd13bef0a7063.tar.bz2
[svn-r308] revised according API changes.
Added #define FAIL patch due to confusion that API's are still defined to return FAIL while FAIL has been undefined from public.h.
Diffstat (limited to 'testpar')
-rw-r--r--testpar/testphdf5.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index e6a00c3..1ec2e90 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -39,6 +39,7 @@
#define DATASETNAME2 "Data2"
#define DATASETNAME3 "Data3"
+#define FAIL -1
/* Example of using the parallel HDF5 library to create a dataset */
void
@@ -50,9 +51,9 @@ phdf5write()
hid_t file_dataspace; /* File dataspace ID */
hid_t mem_dataspace; /* memory dataspace ID */
hid_t dataset1, dataset2; /* Dataset ID */
- uint32 rank = SPACE1_RANK; /* Logical rank of dataspace */
+ int rank = SPACE1_RANK; /* Logical rank of dataspace */
size_t dims1[SPACE1_RANK] = {SPACE1_DIM1,SPACE1_DIM2}; /* dataspace dim sizes */
- int32 data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
+ int data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
int start[SPACE1_RANK]; /* for hyperslab setting */
size_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
@@ -101,13 +102,13 @@ phdf5write()
/* create a dataset collectively */
- dataset1 = H5Dcreate(fid1, DATASETNAME1, H5T_NATIVE_INT32, sid1,
+ dataset1 = H5Dcreate(fid1, DATASETNAME1, H5T_NATIVE_INT, sid1,
H5P_DEFAULT);
assert(dataset1 != FAIL);
MESG("H5Dcreate succeed");
/* create another dataset collectively */
- dataset2 = H5Dcreate(fid1, DATASETNAME2, H5T_NATIVE_INT32, sid1,
+ dataset2 = H5Dcreate(fid1, DATASETNAME2, H5T_NATIVE_INT, sid1,
H5P_DEFAULT);
assert(dataset2 != FAIL);
MESG("H5Dcreate succeed");
@@ -145,13 +146,13 @@ start[0], start[1], count[0], count[1], count[0]*count[1]);
assert (mem_dataspace != FAIL);
/* write data independently */
- ret = H5Dwrite(dataset1, H5T_NATIVE_INT32, mem_dataspace, file_dataspace,
+ ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
H5P_DEFAULT, data_array1);
assert(ret != FAIL);
MESG("H5Dwrite succeed");
/* write data independently */
- ret = H5Dwrite(dataset2, H5T_NATIVE_INT32, mem_dataspace, file_dataspace,
+ ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
H5P_DEFAULT, data_array1);
assert(ret != FAIL);
MESG("H5Dwrite succeed");
@@ -182,15 +183,15 @@ phdf5read()
hid_t file_dataspace; /* File dataspace ID */
hid_t mem_dataspace; /* memory dataspace ID */
hid_t dataset1, dataset2; /* Dataset ID */
- uint32 rank = SPACE1_RANK; /* Logical rank of dataspace */
+ int rank = SPACE1_RANK; /* Logical rank of dataspace */
size_t dims1[] = {SPACE1_DIM1,SPACE1_DIM2}; /* dataspace dim sizes */
- int32 data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
+ int data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
int start[SPACE1_RANK]; /* for hyperslab setting */
size_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
- intn i, j;
+ int i, j;
int numprocs, myid;
#ifdef HAVE_PARALLEL
MPI_Comm comm = MPI_COMM_WORLD;
@@ -255,7 +256,7 @@ start[0], start[1], count[0], count[1], count[0]*count[1]);
/* read data independently */
- ret = H5Dread(dataset1, H5T_NATIVE_INT32, mem_dataspace, file_dataspace,
+ ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
H5P_DEFAULT, data_array1);
assert(ret != FAIL);
@@ -269,7 +270,7 @@ start[0], start[1], count[0], count[1], count[0]*count[1]);
}
/* read data independently */
- ret = H5Dread(dataset2, H5T_NATIVE_INT32, mem_dataspace, file_dataspace,
+ ret = H5Dread(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
H5P_DEFAULT, data_array1);
assert(ret != FAIL);
statsplain -rw-r--r--H5B.c79658logstatsplain -rw-r--r--H5B2.c53693logstatsplain -rw-r--r--H5B2cache.c35152logstatsplain -rw-r--r--H5B2dbg.c14186logstatsplain -rw-r--r--H5B2hdr.c20143logstatsplain -rw-r--r--H5B2int.c147173logstatsplain -rw-r--r--H5B2pkg.h18794logstatsplain -rw-r--r--H5B2private.h7668logstatsplain -rw-r--r--H5B2public.h1926logstatsplain -rw-r--r--H5B2stat.c4289logstatsplain -rw-r--r--H5B2test.c15169logstatsplain -rw-r--r--H5Bcache.c13094logstatsplain -rw-r--r--H5Bdbg.c9975logstatsplain -rw-r--r--H5Bpkg.h3744logstatsplain -rw-r--r--H5Bprivate.h7833logstatsplain -rw-r--r--H5Bpublic.h1666logstatsplain -rw-r--r--H5C.c356871logstatsplain -rw-r--r--H5CS.c9865logstatsplain -rw-r--r--H5CSprivate.h1914logstatsplain -rw-r--r--H5Cmpio.c46135logstatsplain -rw-r--r--H5Cpkg.h203108logstatsplain -rw-r--r--H5Cprivate.h84008logstatsplain -rw-r--r--H5Cpublic.h1918logstatsplain -rw-r--r--H5D.c35796logstatsplain -rw-r--r--H5Dbtree.c53523logstatsplain -rw-r--r--H5Dchunk.c231485logstatsplain -rw-r--r--H5Dcompact.c23202logstatsplain -rw-r--r--H5Dcontig.c63647logstatsplain -rw-r--r--H5Ddbg.c3730logstatsplain -rw-r--r--H5Ddeprec.c17072logstatsplain -rw-r--r--H5Defl.c20244logstatsplain -rw-r--r--H5Dfill.c30398logstatsplain -rw-r--r--H5Dint.c113254logstatsplain -rw-r--r--H5Dio.c54565logstatsplain -rw-r--r--H5Dlayout.c18642logstatsplain -rw-r--r--H5Dmpio.c80003logstatsplain -rw-r--r--H5Doh.c16548logstatsplain -rw-r--r--H5Dpkg.h37831logstatsplain -rw-r--r--H5Dprivate.h9140logstatsplain -rw-r--r--H5Dpublic.h6700logstatsplain -rw-r--r--H5Dscatgath.c46746logstatsplain -rw-r--r--H5Dselect.c13189logstatsplain -rw-r--r--H5Dtest.c6039logstatsplain -rw-r--r--H5E.c57837logstatsplain -rw-r--r--H5EA.c42349logstatsplain -rw-r--r--H5EAcache.c70095logstatsplain -rw-r--r--H5EAdbg.c18740logstatsplain -rw-r--r--H5EAdblkpage.c10315logstatsplain -rw-r--r--H5EAdblock.c16533logstatsplain -rw-r--r--H5EAhdr.c27295logstatsplain -rw-r--r--H5EAiblock.c16927logstatsplain -rw-r--r--H5EAint.c4060logstatsplain -rw-r--r--H5EApkg.h23741logstatsplain -rw-r--r--H5EAprivate.h7026logstatsplain -rw-r--r--H5EAsblock.c15291logstatsplain -rw-r--r--H5EAstat.c3067logstatsplain -rw-r--r--H5EAtest.c15143logstatsplain -rw-r--r--H5Edefin.h12463logstatsplain -rw-r--r--H5Edeprec.c16042logstatsplain -rw-r--r--H5Einit.h53926logstatsplain -rw-r--r--H5Eint.c35757logstatsplain -rw-r--r--H5Epkg.h5682logstatsplain -rw-r--r--H5Eprivate.h8344logstatsplain -rw-r--r--H5Epubgen.h20246logstatsplain -rw-r--r--H5Epublic.h9181logstatsplain -rw-r--r--H5Eterm.h5025logstatsplain -rw-r--r--H5F.c49710logstatsplain -rw-r--r--H5FA.c25267logstatsplain -rw-r--r--H5FAcache.c35974logstatsplain -rw-r--r--H5FAdbg.c10939logstatsplain -rw-r--r--H5FAdblkpage.c10047logstatsplain -rw-r--r--H5FAdblock.c15024logstatsplain -rw-r--r--H5FAhdr.c16271logstatsplain -rw-r--r--H5FApkg.h14287logstatsplain -rw-r--r--H5FAprivate.h5661logstatsplain -rw-r--r--H5FAstat.c3006logstatsplain -rw-r--r--H5FAtest.c12562logstatsplain -rw-r--r--H5FD.c63983logstatsplain -rw-r--r--H5FDcore.c58465logstatsplain -rw-r--r--H5FDcore.h1648logstatsplain -rw-r--r--H5FDdirect.c46549logstatsplain -rw-r--r--H5FDdirect.h2113logstatsplain -rw-r--r--H5FDfamily.c45311logstatsplain -rw-r--r--H5FDfamily.h1664logstatsplain -rw-r--r--H5FDint.c12231logstatsplain -rw-r--r--H5FDlog.c60906logstatsplain -rw-r--r--H5FDlog.h3186logstatsplain -rw-r--r--H5FDmpi.c14507logstatsplain -rw-r--r--H5FDmpi.h2731logstatsplain -rw-r--r--H5FDmpio.c73225logstatsplain -rw-r--r--H5FDmpio.h2598logstatsplain -rw-r--r--H5FDmulti.c61507logstatsplain -rw-r--r--H5FDmulti.h1958logstatsplain -rw-r--r--H5FDpkg.h2461logstatsplain -rw-r--r--H5FDprivate.h7376logstatsplain -rw-r--r--H5FDpublic.h15841logstatsplain -rw-r--r--H5FDsec2.c35019logstatsplain -rw-r--r--H5FDsec2.h1497logstatsplain -rw-r--r--H5FDspace.c15366logstatsplain -rw-r--r--H5FDstdio.c38274logstatsplain -rw-r--r--H5FDstdio.h1526logstatsplain -rw-r--r--H5FDwindows.c2988logstatsplain -rw-r--r--H5FDwindows.h1572logstatsplain -rw-r--r--H5FL.c83299logstatsplain -rw-r--r--H5FLprivate.h18774logstatsplain -rw-r--r--H5FO.c18971logstatsplain -rw-r--r--H5FOprivate.h2367logstatsplain -rw-r--r--H5FS.c45441logstatsplain -rw-r--r--H5FScache.c52172logstatsplain -rw-r--r--H5FSdbg.c10401logstatsplain -rw-r--r--H5FSpkg.h12067logstatsplain -rw-r--r--H5FSprivate.h11876logstatsplain -rw-r--r--H5FSpublic.h1932logstatsplain -rw-r--r--H5FSsection.c97466logstatsplain -rw-r--r--H5FSstat.c3112logstatsplain -rw-r--r--H5FStest.c4562logstatsplain -rw-r--r--H5Faccum.c49874logstatsplain -rw-r--r--H5Fcwfs.c10525logstatsplain -rw-r--r--H5Fdbg.c6989logstatsplain -rw-r--r--H5Fdeprec.c6235logstatsplain -rw-r--r--H5Fefc.c37182logstatsplain -rw-r--r--H5Ffake.c4320logstatsplain -rw-r--r--H5Fint.c81787logstatsplain -rw-r--r--H5Fio.c5696logstatsplain -rw-r--r--H5Fmount.c27807logstatsplain -rw-r--r--H5Fmpi.c6973logstatsplain