From 5b6f42727c81c0ec8f70cf8277fd01fb8fabe549 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 14 Jul 1998 19:48:16 -0500 Subject: [svn-r494] Added test to take several differently shaped hyperslabs and perform I/O on them to verify the iterators are processed in the correct order. --- test/.distdep | 146 ++++++++++++++++++++++++++++----------------------------- test/tselect.c | 82 +++++++++++++++++++++++++++++--- 2 files changed, 149 insertions(+), 79 deletions(-) diff --git a/test/.distdep b/test/.distdep index 78faef0..767ca09 100644 --- a/test/.distdep +++ b/test/.distdep @@ -4,6 +4,30 @@ testhdf5.o: \ ../src/H5private.h \ ../src/H5public.h \ ../src/H5config.h +tattr.o: \ + tattr.c \ + testhdf5.h \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ + ../src/H5Ipublic.h \ + ../src/hdf5.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Spublic.h tfile.o: \ tfile.c \ testhdf5.h \ @@ -106,6 +130,33 @@ tstab.o: \ ../src/H5Tpublic.h \ ../src/H5Sprivate.h \ ../src/H5Spublic.h +th5s.o: \ + th5s.c \ + testhdf5.h \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ + ../src/H5Ipublic.h \ + ../src/H5Bprivate.h \ + ../src/H5Bpublic.h \ + ../src/H5Fprivate.h \ + ../src/H5Fpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Sprivate.h \ + ../src/H5Spublic.h \ + ../src/H5Gprivate.h \ + ../src/H5Gpublic.h \ + ../src/H5Oprivate.h \ + ../src/H5Opublic.h \ + ../src/H5HGprivate.h \ + ../src/H5HGpublic.h \ + ../src/H5Tprivate.h \ + ../src/H5Tpublic.h \ + ../src/H5Zprivate.h \ + ../src/H5Zpublic.h \ + ../src/H5Pprivate.h dtypes.o: \ dtypes.c \ ../src/hdf5.h \ @@ -165,6 +216,28 @@ istore.o: \ ../src/H5Tprivate.h \ ../src/H5Tpublic.h \ ../src/H5Sprivate.h +dsets.o: \ + dsets.c \ + ../src/hdf5.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Ipublic.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Epublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h cmpd_dset.o: \ cmpd_dset.c \ ../src/hdf5.h \ @@ -373,30 +446,6 @@ bittests.o: \ ../src/H5Gprivate.h \ ../src/H5Gpublic.h \ ../src/H5Bprivate.h -tattr.o: \ - tattr.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/hdf5.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ - ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Spublic.h tselect.o: \ tselect.c \ testhdf5.h \ @@ -421,52 +470,3 @@ tselect.o: \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ ../src/H5Spublic.h -th5s.o: \ - th5s.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/H5Bprivate.h \ - ../src/H5Bpublic.h \ - ../src/H5Fprivate.h \ - ../src/H5Fpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Sprivate.h \ - ../src/H5Spublic.h \ - ../src/H5Gprivate.h \ - ../src/H5Gpublic.h \ - ../src/H5Oprivate.h \ - ../src/H5Opublic.h \ - ../src/H5HGprivate.h \ - ../src/H5HGpublic.h \ - ../src/H5Tprivate.h \ - ../src/H5Tpublic.h \ - ../src/H5Zprivate.h \ - ../src/H5Zpublic.h \ - ../src/H5Pprivate.h -dsets.o: \ - dsets.c \ - ../src/hdf5.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Ipublic.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ - ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Epublic.h \ - ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h diff --git a/test/tselect.c b/test/tselect.c index 6b0d46d..3edd9b5 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -60,14 +60,19 @@ test_select_hyper(void) { hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ - hid_t group; /* Group ID */ hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; hsize_t dims3[] = {SPACE3_DIM1, SPACE3_DIM2}; + hsize_t start[SPACE1_RANK]; /* Starting location of hyperslab */ + hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */ + hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */ + hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */ uint8 *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ + *rbuf, /* buffer read from disk */ + *tbuf, /* temporary buffer pointer */ + *tbuf2; /* temporary buffer pointer */ + intn i,j; /* Counters */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -75,7 +80,12 @@ test_select_hyper(void) /* Allocate write & read buffers */ wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2); - rbuf=malloc(sizeof(uint8)*SPACE3_DIM1*SPACE3_DIM2); + rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2); + + /* Initialize write buffer */ + for(i=0, tbuf=wbuf; i