summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-23 19:09:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-23 19:09:20 (GMT)
commitd20d355b79bf25d2685dc9e3967951b1532951bb (patch)
treec862028f2d6c7ea540c6ffd2ca34d6ac9b715686
parentc951ee8eded3cd63adfeaa87dcdd966ceb3e58c1 (diff)
downloadhdf5-d20d355b79bf25d2685dc9e3967951b1532951bb.zip
hdf5-d20d355b79bf25d2685dc9e3967951b1532951bb.tar.gz
hdf5-d20d355b79bf25d2685dc9e3967951b1532951bb.tar.bz2
OESS-29 Update HD prefix and compare against develop
-rw-r--r--config/cmake_ext_mod/runTest.cmake23
-rw-r--r--hl/test/gen_test_ds.c12
-rw-r--r--hl/test/test_ds.c36
-rw-r--r--hl/test/test_file_image.c8
-rw-r--r--hl/test/test_image.c34
-rw-r--r--hl/test/test_packet_vlen.c78
-rw-r--r--src/H5.c20
-rw-r--r--src/H5A.c107
-rw-r--r--src/H5AC.c458
-rw-r--r--src/H5B.c834
-rw-r--r--src/H5Bdbg.c220
-rw-r--r--src/H5Cmpio.c358
-rw-r--r--src/H5Dchunk.c1172
-rw-r--r--src/H5Dearray.c488
-rw-r--r--src/H5Dfarray.c456
-rw-r--r--src/H5EAdbg.c182
-rw-r--r--src/H5EAtest.c134
-rw-r--r--src/H5Eint.c388
-rw-r--r--src/H5FAtest.c30
-rw-r--r--src/H5FDmpio.c1020
-rw-r--r--src/H5FL.c8
-rw-r--r--src/H5HFdbg.c362
-rw-r--r--src/H5I.c264
-rw-r--r--src/H5Ofill.c236
-rw-r--r--src/H5Omtime.c266
-rw-r--r--src/H5Oname.c70
-rw-r--r--src/H5PB.c224
-rw-r--r--src/H5ST.c16
-rw-r--r--src/H5Sdbg.c34
-rw-r--r--src/H5T.c156
-rw-r--r--src/H5Tconv.c3724
-rw-r--r--src/H5dbg.c92
-rw-r--r--src/H5detect.c53
-rw-r--r--src/H5make_libsettings.c13
-rw-r--r--src/H5timer.c118
-rw-r--r--test/atomic_reader.c30
-rw-r--r--test/atomic_writer.c10
-rw-r--r--test/cache_image.c2999
-rw-r--r--test/cache_tagging.c272
-rw-r--r--test/cmpd_dset.c2
-rw-r--r--test/enc_dec_plist.c2
-rw-r--r--test/external.c1
-rw-r--r--test/istore.c2
-rw-r--r--test/mf.c146
-rw-r--r--test/objcopy.c20
-rw-r--r--test/tattr.c2
-rw-r--r--test/testframe.c202
-rw-r--r--test/testhdf5.h90
-rw-r--r--test/testmeta.c110
-rw-r--r--test/th5s.c4
-rw-r--r--test/trefer.c8
-rw-r--r--test/tselect.c2058
-rw-r--r--test/vds.c2
-rw-r--r--testpar/t_bigio.c528
-rw-r--r--testpar/t_cache.c38
-rw-r--r--testpar/t_cache_image.c68
-rw-r--r--testpar/t_coll_chunk.c30
-rw-r--r--testpar/t_file.c100
-rw-r--r--testpar/t_filter_read.c66
-rw-r--r--testpar/t_filters_parallel.c6
-rw-r--r--testpar/t_mdset.c976
-rw-r--r--testpar/t_mpi.c192
-rw-r--r--testpar/t_ph5basic.c12
-rw-r--r--testpar/t_prestart.c2
-rw-r--r--testpar/t_prop.c2
-rw-r--r--testpar/t_shapesame.c57
-rw-r--r--testpar/t_span_tree.c22
-rw-r--r--testpar/testpar.h24
-rw-r--r--testpar/testphdf5.h58
-rw-r--r--tools/src/h5dump/h5dump.c2
-rw-r--r--tools/src/h5import/h5import.c2
-rw-r--r--tools/src/h5stat/h5stat.c6
-rw-r--r--tools/test/h5dump/h5dumpgentest.c2
-rw-r--r--tools/test/h5repack/h5repacktst.c2
-rw-r--r--tools/test/h5repack/testh5repack_detect_szip.c4
-rw-r--r--tools/test/h5stat/h5stat_gentest.c14
-rw-r--r--tools/test/misc/h5clear_gentest.c138
-rw-r--r--tools/test/misc/h5perf_gentest.c666
-rw-r--r--tools/test/misc/talign.c10
-rw-r--r--tools/test/perform/perf.c12
-rw-r--r--tools/test/perform/sio_engine.c12
81 files changed, 10352 insertions, 10353 deletions
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index a904855..21c8c18 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -125,12 +125,31 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}")
# remove special output
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-string (FIND TEST_STREAM "_pmi_alps" "${TEST_FIND_RESULT}")
-if (TEST_FIND_RESULT GREATER 0)
+string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT)
+if (TEST_FIND_RESULT GREATER -1)
string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
endif ()
+# remove special error output
+if (NOT TEST_ERRREF)
+ # the error stack has been appended to the output file
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+else ()
+ # the error stack remains in the .err file
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+endif ()
+string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT)
+if (TEST_FIND_RESULT GREATER -1)
+ string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+ # write back the changes to the original files
+ if (NOT TEST_ERRREF)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ else ()
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ endif ()
+endif ()
+
# if the output file needs Storage text removed
if (TEST_MASK)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c
index 273e393..285ab77 100644
--- a/hl/test/gen_test_ds.c
+++ b/hl/test/gen_test_ds.c
@@ -79,12 +79,12 @@ int main(int argc , char **argv)
if (argc < 2) {
- printf("Usage: gen_test [le | be]\n");
+ HDprintf("Usage: gen_test [le | be]\n");
return 1;
}
if ( argv[1] && (strcmp("le",argv[1])!=0) && (strcmp("be",argv[1])!=0) ) {
- printf("Usage: gen_test [le | be]\n");
+ HDprintf("Usage: gen_test [le | be]\n");
return 1;
}
@@ -103,11 +103,11 @@ int main(int argc , char **argv)
nerrors += test_long_scalenames(filename) < 0 ? 1 : 0;
if(nerrors) goto error;
- printf("Dimension scales file generation passed.\n");
+ HDprintf("Dimension scales file generation passed.\n");
return 0;
error:
- printf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors);
+ HDprintf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors);
return 1;
}
@@ -188,11 +188,11 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id
if(H5DSis_attached(did, dsid, idx) == 0) {
if(H5DSattach_scale(did, dsid, idx) >= 0) {
if(H5DSis_attached(did, dsid, idx) > 0) {
- /* printf(" scale attached "); */
+ /* HDprintf(" scale attached "); */
ret_value = SUCCEED;
}
else if(H5DSis_attached(did, dsid, idx) == 0) {
- printf(" scale not attached ");
+ HDprintf(" scale not attached ");
}
}
}
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 9389a0d..79e6f45 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -1049,7 +1049,7 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id
ret_value = SUCCEED;
}
else if(H5DSis_attached(did, dsid, idx) == 0) {
- printf(" scale not attached ");
+ HDprintf(" scale not attached ");
}
}
}
@@ -1153,14 +1153,14 @@ static int test_detachscales(void)
/* make datasets; they are three dimensional*/
for (i=0; i < 2; i++) {
- sprintf(dname,"D%d", i);
+ HDsprintf(dname,"D%d", i);
if(H5LTmake_dataset_int(fid, dname, rank3, dims, buf) < 0)
goto out;
}
/* create datasets and make them dim. scales */
for (i=0; i < 4; i++) {
- sprintf(dname, "DS%d", i);
+ HDsprintf(dname, "DS%d", i);
if(H5LTmake_dataset_int(fid, dname, rank1, dims, buf) < 0)
goto out;
}
@@ -2255,7 +2255,7 @@ static int test_simple(void)
char snames[3];
int i, j;
- printf("Testing API functions\n");
+ HDprintf("Testing API functions\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -2919,7 +2919,7 @@ static int test_simple(void)
if((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
for(j = 0; j < 5; j++) {
- sprintf(sname, "ds_%d", j);
+ HDsprintf(sname, "ds_%d", j);
if((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
if(H5DSdetach_scale(did, dsid, DIM0) < 0)
@@ -2942,7 +2942,7 @@ static int test_simple(void)
if((did = H5Dopen2(gid,dname, H5P_DEFAULT)) < 0)
goto out;
for(j=0; j<5; j++) {
- sprintf(sname,"ds_%d",j);
+ HDsprintf(sname,"ds_%d",j);
if((dsid = H5Dopen2(gid,sname, H5P_DEFAULT)) < 0)
goto out;
if(H5DSattach_scale(did,dsid,DIM0) < 0)
@@ -3740,7 +3740,7 @@ static int test_errors(void)
hid_t sidds = -1; /* space ID */
hsize_t pal_dims[] = {9,3};
- printf("Testing error conditions\n");
+ HDprintf("Testing error conditions\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4119,7 +4119,7 @@ static int test_iterators(void)
char dname[30]; /* dataset name */
int i;
- printf("Testing iterators\n");
+ HDprintf("Testing iterators\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4198,7 +4198,7 @@ static int test_iterators(void)
for(i=0; i<100; i++) {
/* make a DS */
- sprintf(dname,"ds_%d",i);
+ HDsprintf(dname,"ds_%d",i);
if(H5LTmake_dataset_int(fid,dname,rankds,s1_dim,NULL) < 0)
goto out;
/* open */
@@ -4311,7 +4311,7 @@ static int test_rank(void)
float buff[1]={1};
int i;
- printf("Testing ranks\n");
+ HDprintf("Testing ranks\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
@@ -4349,7 +4349,7 @@ static int test_rank(void)
goto out;
for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
+ HDsprintf(name,"ds_a_%d",i);
if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
goto out;
if(H5DSattach_scale(did,dsid,(unsigned)i) < 0)
@@ -4377,7 +4377,7 @@ static int test_rank(void)
goto out;
for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
+ HDsprintf(name,"ds_a_%d",i);
if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
goto out;
if(H5DSdetach_scale(did,dsid,(unsigned)i) < 0)
@@ -4403,7 +4403,7 @@ static int test_rank(void)
goto out;
for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
+ HDsprintf(name,"ds_a_%d",i);
if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
goto out;
if(H5DSset_scale(dsid,name) < 0)
@@ -4517,7 +4517,7 @@ static int test_types(void)
const char *s1_str = "ABC";
const char *s2_str = "ABCD";
- printf("Testing scales with several datatypes\n");
+ HDprintf("Testing scales with several datatypes\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4694,7 +4694,7 @@ static int test_data(void)
float fill=-99; /* fill value */
- printf("Testing reading ASCII data and generate HDF5 data with scales\n");
+ HDprintf("Testing reading ASCII data and generate HDF5 data with scales\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4870,7 +4870,7 @@ static int read_data( const char* fname,
/* read first data file */
f = HDfopen(data_file, "r");
if( f == NULL ) {
- printf( "Could not open file %s\n", data_file );
+ HDprintf( "Could not open file %s\n", data_file );
return -1;
}
@@ -4892,7 +4892,7 @@ static int read_data( const char* fname,
*buf = (float*) HDmalloc (nelms * sizeof( float ));
if ( *buf == NULL ) {
- printf( "memory allocation failed\n" );
+ HDprintf( "memory allocation failed\n" );
HDfclose(f);
return -1;
}
@@ -4930,7 +4930,7 @@ static int test_errors2(void)
int nscales; /* number of scales in DIM */
int count; /* visitor data */
- printf("Testing parameter errors\n");
+ HDprintf("Testing parameter errors\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index ef220f9..fd2d0d2 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -47,7 +47,7 @@
buffers if appropriate. */
/*-------------------------------------------------------------------------
-* test file image operations
+* test file image operations
*-------------------------------------------------------------------------
*/
static int
@@ -112,7 +112,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
filename[i] = (char *)HDmalloc(sizeof(char) * 32);
/* create file name */
- sprintf(filename[i], "image_file%d.h5", (int)i);
+ HDsprintf(filename[i], "image_file%d.h5", (int)i);
/* create file */
if ((file_id[i] = H5Fcreate(filename[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -536,11 +536,11 @@ int main( void )
nerrors += test_file_image(open_images, nflags, flags) < 0? 1 : 0;
if (nerrors) goto error;
- printf("File image tests passed.\n");
+ HDprintf("File image tests passed.\n");
return 0;
error:
- printf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
return 1;
}
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index e350533..6d13419 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -75,11 +75,11 @@ int main(void)
nerrors += test_generate()<0 ?1:0;
if (nerrors) goto error;
- printf("All image tests passed.\n");
+ HDprintf("All image tests passed.\n");
return 0;
error:
- printf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
return 1;
}
@@ -344,7 +344,7 @@ static int test_data(void)
if ((fid=H5Fcreate(FILE2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto out;
- printf("Testing read ascii image data and generate images\n");
+ HDprintf("Testing read ascii image data and generate images\n");
/*-------------------------------------------------------------------------
* read 8bit image data
@@ -551,7 +551,7 @@ static int test_generate(void)
if ((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto out;
- printf("Testing read and process data and make indexed images\n");
+ HDprintf("Testing read and process data and make indexed images\n");
/*-------------------------------------------------------------------------
* read data; the file data format is described below
@@ -561,7 +561,7 @@ static int test_generate(void)
f = HDfopen( data_file, "r" ) ;
if ( f == NULL )
{
- printf( "Could not find file %s. Try set $srcdir \n", data_file );
+ HDprintf( "Could not find file %s. Try set $srcdir \n", data_file );
goto out;
}
@@ -602,11 +602,11 @@ static int test_generate(void)
if(fscanf( f, "%d %d %d", &imax, &jmax, &kmax ) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf( f, "%f %f %f", &valex, &xmin, &xmax ) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
@@ -638,7 +638,7 @@ static int test_generate(void)
for ( i = 0; i < n_elements; i++ )
{
if(fscanf( f, "%f ", &value ) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
data[i] = value;
@@ -797,37 +797,37 @@ static int read_data(const char* fname, /*IN*/
*/
if(NULL == (f = HDfopen(data_file, "r"))) {
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
+ HDprintf( "Could not open file %s. Try set $srcdir \n", data_file );
goto out;
}
if(fscanf(f, "%s", str) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%d", &color_planes) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%s", str) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%d", &h) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%s", str) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%d", &w) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
@@ -861,7 +861,7 @@ static int read_data(const char* fname, /*IN*/
/* Read data elements */
for(i = 0; i < n_elements; i++) {
if(fscanf(f, "%d", &n) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
image_data[i] = (unsigned char)n;
@@ -917,7 +917,7 @@ static int read_palette(const char* fname,
/* open the input file */
if (!(file = HDfopen(data_file, "r")))
{
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
+ HDprintf( "Could not open file %s. Try set $srcdir \n", data_file );
return -1;
}
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index 4d83ae6..b41e73d 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -69,7 +69,7 @@ static int test_VLof_atomic(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -108,7 +108,7 @@ static int test_VLof_atomic(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -120,8 +120,8 @@ static int test_VLof_atomic(void)
for (vv = 0; vv < (uu + 1); vv++)
{
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- printf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- printf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ HDprintf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ HDprintf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@@ -186,7 +186,7 @@ static int test_VLof_comptype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
if(writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -242,7 +242,7 @@ static int test_VLof_comptype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -253,13 +253,13 @@ static int test_VLof_comptype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n", __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n", __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
- fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
+ HDfprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -334,7 +334,7 @@ static int test_compound_VL_VLtype(void)
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].v.len = uu + L1_INCM;
@@ -342,7 +342,7 @@ static int test_compound_VL_VLtype(void)
{
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + L2_INCM;
@@ -407,7 +407,7 @@ static int test_compound_VL_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -418,27 +418,27 @@ static int test_compound_VL_VLtype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
+ HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f,readBuf[uu].f)) {
- fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
+ HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
- fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -505,7 +505,7 @@ static int test_VLof_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
@@ -513,7 +513,7 @@ static int test_VLof_VLtype(void)
{
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv * 1;
@@ -559,7 +559,7 @@ static int test_VLof_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -628,7 +628,7 @@ static int verify_ptlengthtype(hid_t fid, const char *table_name, herr_t expecte
HDstrcpy(lenthtype, "fixed-length");
if (expected_value == 1)
HDstrcpy(lenthtype, "variable-length");
- fprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
+ HDfprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
ret = FAIL;
}
@@ -1062,7 +1062,7 @@ static int testfl_VLof_atomic(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -1101,7 +1101,7 @@ static int testfl_VLof_atomic(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1113,8 +1113,8 @@ static int testfl_VLof_atomic(void)
for (vv = 0; vv < (uu + 1); vv++)
{
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- printf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- printf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ HDprintf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ HDprintf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@@ -1179,7 +1179,7 @@ static int testfl_VLof_comptype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
if(writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -1235,7 +1235,7 @@ static int testfl_VLof_comptype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1246,13 +1246,13 @@ static int testfl_VLof_comptype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",__LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",__LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
- fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
+ HDfprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -1327,7 +1327,7 @@ static int testfl_compound_VL_VLtype(void)
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].v.len = uu + L1_INCM;
@@ -1335,7 +1335,7 @@ static int testfl_compound_VL_VLtype(void)
{
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + L2_INCM;
@@ -1400,7 +1400,7 @@ static int testfl_compound_VL_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1411,27 +1411,27 @@ static int testfl_compound_VL_VLtype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
+ HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
- fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
+ HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
- fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -1498,7 +1498,7 @@ static int testfl_VLof_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
@@ -1506,7 +1506,7 @@ static int testfl_VLof_VLtype(void)
{
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + 1;
@@ -1552,7 +1552,7 @@ static int testfl_VLof_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
diff --git a/src/H5.c b/src/H5.c
index 5e342ff..96b4a5b 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -262,7 +262,7 @@ H5_term_library(void)
/* Don't do anything if the library is already closed */
if(!(H5_INIT_GLOBAL))
- goto done;
+ goto done;
/* Indicate that the library is being shut down */
H5_TERM_GLOBAL = TRUE;
@@ -379,18 +379,18 @@ H5_term_library(void)
* down if any of the below code involves using the instrumentation code.
*/
if(H5_MPEinit_g) {
- int mpi_initialized;
- int mpi_finalized;
- int mpe_code;
+ int mpi_initialized;
+ int mpi_finalized;
+ int mpe_code;
- MPI_Initialized(&mpi_initialized);
- MPI_Finalized(&mpi_finalized);
+ MPI_Initialized(&mpi_initialized);
+ MPI_Finalized(&mpi_finalized);
if (mpi_initialized && !mpi_finalized) {
- mpe_code = MPE_Finish_log("h5log");
- HDassert(mpe_code >=0);
- } /* end if */
- H5_MPEinit_g = FALSE; /* turn it off no matter what */
+ mpe_code = MPE_Finish_log("h5log");
+ HDassert(mpe_code >=0);
+ } /* end if */
+ H5_MPEinit_g = FALSE; /* turn it off no matter what */
} /* end if */
#endif
diff --git a/src/H5A.c b/src/H5A.c
index a0408c3..3af0560 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -16,22 +16,22 @@
/****************/
#include "H5Amodule.h" /* This source code file is part of the H5A module */
-#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_FRIEND /* Suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspace functions */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspace functions */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
@@ -216,59 +216,64 @@ H5A_term_package(void)
/*--------------------------------------------------------------------------
- NAME
- H5Acreate2
- PURPOSE
- Creates an attribute on an object
- USAGE
- hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
- aapl_id)
- hid_t loc_id; IN: Object (dataset or group) to be attached to
- const char *attr_name; IN: Name of attribute to locate and open
- hid_t type_id; IN: ID of datatype for attribute
- hid_t space_id; IN: ID of dataspace for attribute
- hid_t acpl_id; IN: ID of creation property list (currently not used)
- hid_t aapl_id; IN: Attribute access property list
- RETURNS
- Non-negative on success/Negative on failure
-
- DESCRIPTION
- This function creates an attribute which is attached to the object
- specified with 'loc_id'. The name specified with 'attr_name' for
- each attribute for an object must be unique for that object. The 'type_id'
- and 'space_id' are created with the H5T and H5S interfaces respectively.
- The 'aapl_id' property list is currently unused, but will be used in the
- future for optional attribute access properties. The attribute ID returned
- from this function must be released with H5Aclose or resource leaks will
- develop.
-
---------------------------------------------------------------------------*/
+ * Function: H5Acreate2
+ *
+ * Purpose: Creates an attribute on an object
+ *
+ * Usage:
+ * hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
+ * aapl_id)
+ *
+ * Description: This function creates an attribute which is attached to the
+ * object specified with 'loc_id'. The name specified with
+ * 'attr_name' for each attribute for an object must be unique
+ * for that object. The 'type_id' and 'space_id' are created
+ * with the H5T and H5S interfaces respectively. The 'aapl_id'
+ * property list is currently unused, but will be used in the
+ * future for optional attribute access properties. The
+ * attribute ID returned from this function must be released
+ * with H5Aclose or resource leaks will develop.
+ *
+ * Parameters:
+ * hid_t loc_id; IN: Object (dataset or group) to be attached to
+ * const char *attr_name; IN: Name of attribute to locate and open
+ * hid_t type_id; IN: ID of datatype for attribute
+ * hid_t space_id; IN: ID of dataspace for attribute
+ * hid_t acpl_id; IN: ID of creation property list (currently not used)
+ * hid_t aapl_id; IN: Attribute access property list
+ *
+ * Return: Success: An ID for the created attribute
+ *
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
hid_t
H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
hid_t acpl_id, hid_t aapl_id)
{
- H5A_t *attr = NULL; /* Attribute created */
- H5G_loc_t loc; /* Object location */
- H5T_t *type; /* Datatype to use for attribute */
- H5S_t *space; /* Dataspace to use for attribute */
- hid_t ret_value; /* Return value */
+ H5A_t *attr = NULL; /* Attribute created */
+ H5G_loc_t loc; /* Object location */
+ H5T_t *type; /* Datatype to use for attribute */
+ H5S_t *space; /* Dataspace to use for attribute */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("i", "i*siiii", loc_id, attr_name, type_id, space_id, acpl_id, aapl_id);
- /* check arguments */
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
+ HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
@@ -336,7 +341,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id,
acpl_id, aapl_id, lapl_id);
- /* check arguments */
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
diff --git a/src/H5AC.c b/src/H5AC.c
index 6714bed..a1b096c 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -134,16 +134,16 @@ static const H5AC_class_t *const H5AC_class_s[] = {
};
-
+
/*-------------------------------------------------------------------------
- * Function: H5AC_init
+ * Function: H5AC_init
*
- * Purpose: Initialize the interface from some other layer.
+ * Purpose: Initialize the interface from some other layer.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 18, 2003
*
*-------------------------------------------------------------------------
@@ -160,15 +160,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5AC__init_package
+ * Function: H5AC__init_package
*
- * Purpose: Initialize interface-specific information
+ * Purpose: Initialize interface-specific information
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 18, 2002
*
*-------------------------------------------------------------------------
@@ -196,17 +196,17 @@ H5AC__init_package(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5AC__init_package() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5AC_term_package
+ * Function: H5AC_term_package
*
- * Purpose: Terminate this interface.
+ * Purpose: Terminate this interface.
*
- * Return: Success: Positive if anything was done that might
- * affect other interfaces; zero otherwise.
- * Failure: Negative.
+ * Return: Success: Positive if anything was done that might
+ * affect other interfaces; zero otherwise.
+ * Failure: Negative.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 18, 2002
*
*-------------------------------------------------------------------------
@@ -223,15 +223,15 @@ H5AC_term_package(void)
FUNC_LEAVE_NOAPI(0)
} /* end H5AC_term_package() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC_cache_image_pending()
*
- * Purpose: Debugging function that tests to see if the load of a
+ * Purpose: Debugging function that tests to see if the load of a
* metadata cache image load is pending (i.e. will be executed
* on the next protect or insert)
- *
+ *
* Returns TRUE if a cache image load is pending, and FALSE
* if not. Throws an assertion failure on error.
*
@@ -261,7 +261,7 @@ H5AC_cache_image_pending(const H5F_t *f)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_cache_image_pending() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_create
*
@@ -284,7 +284,7 @@ herr_t
H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_config_t * image_config_ptr)
{
#ifdef H5_HAVE_PARALLEL
- char prefix[H5C__PREFIX_LEN] = "";
+ char prefix[H5C__PREFIX_LEN] = "";
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
struct H5C_cache_image_ctl_t int_ci_config = H5C__DEFAULT_CACHE_IMAGE_CTL;
@@ -309,9 +309,9 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
#ifdef H5_HAVE_PARALLEL
if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
- MPI_Comm mpi_comm;
- int mpi_rank;
- int mpi_size;
+ MPI_Comm mpi_comm;
+ int mpi_rank;
+ int mpi_size;
if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f)))
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator")
@@ -349,7 +349,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
aux_ptr->sync_point_done = NULL;
aux_ptr->p0_image_len = 0;
- sprintf(prefix, "%d:", mpi_rank);
+ HDsprintf(prefix, "%d:", mpi_rank);
if(mpi_rank == 0) {
if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -400,7 +400,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
#endif /* H5_HAVE_PARALLEL */
if(NULL == f->shared->cache)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed")
#ifdef H5_HAVE_PARALLEL
if(aux_ptr != NULL)
@@ -421,8 +421,8 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "auto resize configuration failed")
/* Don't need to get the current H5C image config here since the
- * cache has just been created, and thus f->shared->cache->image_ctl
- * must still set to its initial value (H5C__DEFAULT_CACHE_IMAGE_CTL).
+ * cache has just been created, and thus f->shared->cache->image_ctl
+ * must still set to its initial value (H5C__DEFAULT_CACHE_IMAGE_CTL).
* Note that this not true as soon as control returns to the application
* program, as some test code modifies f->shared->cache->image_ctl.
*/
@@ -458,7 +458,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_dest
*
@@ -517,10 +517,10 @@ H5AC_dest(H5F_t *f)
/* Sanity check */
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- /* If the file was opened R/W, attempt to flush all entries
+ /* If the file was opened R/W, attempt to flush all entries
* from rank 0 & Bcast clean list to other ranks.
*
- * Must not flush in the R/O case, as this will trigger the
+ * Must not flush in the R/O case, as this will trigger the
* free space manager settle routines.
*/
if(H5F_ACC_RDWR & H5F_INTENT(f))
@@ -556,17 +556,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_dest() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_evict
*
* Purpose: Evict all entries except the pinned entries
- * in the cache.
+ * in the cache.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Vailin Choi
- * Dec 2013
+ * Dec 2013
*
*-------------------------------------------------------------------------
*/
@@ -596,13 +596,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_evict() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_expunge_entry
*
- * Purpose: Expunge the target entry from the cache without writing it
- * to disk even if it is dirty. The entry must not be either
- * pinned or protected.
+ * Purpose: Expunge the target entry from the cache without writing it
+ * to disk even if it is dirty. The entry must not be either
+ * pinned or protected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -639,17 +639,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_expunge_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_flush
*
- * Purpose: Flush (and possibly destroy) the metadata cache associated
- * with the specified file.
+ * Purpose: Flush (and possibly destroy) the metadata cache associated
+ * with the specified file.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be flushed. However
- * all unprotected entries should be flushed before the
- * function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be flushed. However
+ * all unprotected entries should be flushed before the
+ * function returns failure.
*
* Return: Non-negative on success/Negative on failure if there was a
* request to flush all items and something was protected.
@@ -696,18 +696,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_force_cache_image_load()
*
- * Purpose: On rare occasions, it is necessary to run
+ * Purpose: On rare occasions, it is necessary to run
* H5MF_tidy_self_referential_fsm_hack() prior to the first
- * metadata cache access. This is a problem as if there is a
- * cache image at the end of the file, that routine will
+ * metadata cache access. This is a problem as if there is a
+ * cache image at the end of the file, that routine will
* discard it.
*
* We solve this issue by calling this function, which will
- * load the cache image and then call
+ * load the cache image and then call
* H5MF_tidy_self_referential_fsm_hack() to discard it.
*
* Return: SUCCEED on success, and FAIL on failure.
@@ -736,20 +736,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_force_cache_image_load() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_entry_status
*
* Purpose: Given a file address, determine whether the metadata
- * cache contains an entry at that location. If it does,
- * also determine whether the entry is dirty, protected,
- * pinned, etc. and return that information to the caller
- * in *status.
+ * cache contains an entry at that location. If it does,
+ * also determine whether the entry is dirty, protected,
+ * pinned, etc. and return that information to the caller
+ * in *status.
*
- * If the specified entry doesn't exist, set *status_ptr
- * to zero.
+ * If the specified entry doesn't exist, set *status_ptr
+ * to zero.
*
- * On error, the value of *status is undefined.
+ * On error, the value of *status is undefined.
*
* Return: Non-negative on success/Negative on failure
*
@@ -761,14 +761,14 @@ done:
herr_t
H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
{
- hbool_t in_cache; /* Entry @ addr is in the cache */
- hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */
- hbool_t is_protected; /* Entry @ addr is in the cache and protected */
- hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */
- hbool_t is_corked;
- hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
- hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
- hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
+ hbool_t in_cache; /* Entry @ addr is in the cache */
+ hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */
+ hbool_t is_protected; /* Entry @ addr is in the cache and protected */
+ hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */
+ hbool_t is_corked;
+ hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
+ hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
+ hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -781,21 +781,21 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed")
if(in_cache) {
- *status |= H5AC_ES__IN_CACHE;
- if(is_dirty)
- *status |= H5AC_ES__IS_DIRTY;
- if(is_protected)
- *status |= H5AC_ES__IS_PROTECTED;
- if(is_pinned)
- *status |= H5AC_ES__IS_PINNED;
- if(is_corked)
- *status |= H5AC_ES__IS_CORKED;
- if(is_flush_dep_parent)
- *status |= H5AC_ES__IS_FLUSH_DEP_PARENT;
- if(is_flush_dep_child)
- *status |= H5AC_ES__IS_FLUSH_DEP_CHILD;
- if(image_is_up_to_date)
- *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE;
+ *status |= H5AC_ES__IN_CACHE;
+ if(is_dirty)
+ *status |= H5AC_ES__IS_DIRTY;
+ if(is_protected)
+ *status |= H5AC_ES__IS_PROTECTED;
+ if(is_pinned)
+ *status |= H5AC_ES__IS_PINNED;
+ if(is_corked)
+ *status |= H5AC_ES__IS_CORKED;
+ if(is_flush_dep_parent)
+ *status |= H5AC_ES__IS_FLUSH_DEP_PARENT;
+ if(is_flush_dep_child)
+ *status |= H5AC_ES__IS_FLUSH_DEP_CHILD;
+ if(image_is_up_to_date)
+ *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE;
} /* end if */
else
*status = 0;
@@ -804,7 +804,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_entry_status() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_insert_entry
*
@@ -876,7 +876,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_insert_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_load_cache_image_on_next_protect
*
@@ -911,12 +911,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_load_cache_image_on_next_protect() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_dirty
*
- * Purpose: Mark a pinned or protected entry as dirty. The target
- * entry MUST be either pinned, protected, or both.
+ * Purpose: Mark a pinned or protected entry as dirty. The target
+ * entry MUST be either pinned, protected, or both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -965,12 +965,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_clean
*
- * Purpose: Mark a pinned entry as clean. The target
- * entry MUST be pinned.
+ * Purpose: Mark a pinned entry as clean. The target
+ * entry MUST be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1018,12 +1018,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_unserialized
*
- * Purpose: Mark a pinned or protected entry as unserialized. The target
- * entry MUST be either pinned, protected, or both.
+ * Purpose: Mark a pinned or protected entry as unserialized. The target
+ * entry MUST be either pinned, protected, or both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1060,12 +1060,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_unserialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_serialized
*
- * Purpose: Mark a pinned entry as serialized. The target
- * entry MUST be pinned.
+ * Purpose: Mark a pinned entry as serialized. The target
+ * entry MUST be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1101,7 +1101,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_serialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_move_entry
*
@@ -1160,11 +1160,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_move_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_pin_protected_entry()
*
- * Purpose: Pin a protected cache entry. The entry must be protected
+ * Purpose: Pin a protected cache entry. The entry must be protected
* at the time of call, and must be unpinned.
*
* Return: Non-negative on success/Negative on failure
@@ -1203,7 +1203,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_pin_protected_entry() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC_prep_for_file_close
@@ -1241,11 +1241,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_prep_for_file_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_create_flush_dependency()
*
- * Purpose: Create a flush dependency between two entries in the metadata
+ * Purpose: Create a flush dependency between two entries in the metadata
* cache.
*
* Return: Non-negative on success/Negative on failure
@@ -1285,21 +1285,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create_flush_dependency() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_protect
*
* Purpose: If the target entry is not in the cache, load it. If
- * necessary, attempt to evict one or more entries to keep
- * the cache within its maximum size.
+ * necessary, attempt to evict one or more entries to keep
+ * the cache within its maximum size.
*
- * Mark the target entry as protected, and return its address
- * to the caller. The caller must call H5AC_unprotect() when
- * finished with the entry.
+ * Mark the target entry as protected, and return its address
+ * to the caller. The caller must call H5AC_unprotect() when
+ * finished with the entry.
*
- * While it is protected, the entry may not be either evicted
- * or flushed -- nor may it be accessed by another call to
- * H5AC_protect. Any attempt to do so will result in a failure.
+ * While it is protected, the entry may not be either evicted
+ * or flushed -- nor may it be accessed by another call to
+ * H5AC_protect. Any attempt to do so will result in a failure.
*
* Return: Success: Ptr to the object.
* Failure: NULL
@@ -1341,7 +1341,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata,
/* Check for invalid access request */
if((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
#if H5AC_DO_TAGGING_SANITY_CHECKS
if(!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(type) < 0)
@@ -1367,11 +1367,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_protect() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_resize_entry
*
- * Purpose: Resize a pinned or protected entry.
+ * Purpose: Resize a pinned or protected entry.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1420,12 +1420,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_resize_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unpin_entry()
*
- * Purpose: Unpin a cache entry. The entry must be unprotected at
- * the time of call, and must be pinned.
+ * Purpose: Unpin a cache entry. The entry must be unprotected at
+ * the time of call, and must be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1463,11 +1463,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unpin_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_destroy_flush_dependency()
*
- * Purpose: Destroy a flush dependency between two entries.
+ * Purpose: Destroy a flush dependency between two entries.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1506,31 +1506,31 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_destroy_flush_dependency() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unprotect
*
- * Purpose: Undo an H5AC_protect() call -- specifically, mark the
- * entry as unprotected, remove it from the protected list,
- * and give it back to the replacement policy.
+ * Purpose: Undo an H5AC_protect() call -- specifically, mark the
+ * entry as unprotected, remove it from the protected list,
+ * and give it back to the replacement policy.
*
- * The TYPE and ADDR arguments must be the same as those in
- * the corresponding call to H5AC_protect() and the THING
- * argument must be the value returned by that call to
- * H5AC_protect().
+ * The TYPE and ADDR arguments must be the same as those in
+ * the corresponding call to H5AC_protect() and the THING
+ * argument must be the value returned by that call to
+ * H5AC_protect().
*
- * If the deleted flag is TRUE, simply remove the target entry
- * from the cache, clear it, and free it without writing it to
- * disk.
+ * If the deleted flag is TRUE, simply remove the target entry
+ * from the cache, clear it, and free it without writing it to
+ * disk.
*
- * This version of the function is a complete re-write to
- * use the new metadata cache. While there isn't all that
- * much difference between the old and new Purpose sections,
- * the original version is given below.
+ * This version of the function is a complete re-write to
+ * use the new metadata cache. While there isn't all that
+ * much difference between the old and new Purpose sections,
+ * the original version is given below.
*
- * Original purpose section:
+ * Original purpose section:
*
- * This function should be called to undo the effect of
+ * This function should be called to undo the effect of
* H5AC_protect(). The TYPE and ADDR arguments should be the
* same as the corresponding call to H5AC_protect() and the
* THING argument should be the value returned by H5AC_protect().
@@ -1549,8 +1549,8 @@ herr_t
H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
unsigned flags)
{
- hbool_t dirtied;
- hbool_t deleted;
+ hbool_t dirtied;
+ hbool_t deleted;
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
@@ -1571,14 +1571,14 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
HDassert( ((H5AC_info_t *)thing)->type == type );
dirtied = (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) ||
- (((H5AC_info_t *)thing)->dirtied));
+ (((H5AC_info_t *)thing)->dirtied));
deleted = (hbool_t)((flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG);
/* Check if the size changed out from underneath us, if we're not deleting
* the entry.
*/
if(dirtied && !deleted) {
- size_t curr_size = 0;
+ size_t curr_size = 0;
if((type->image_len)(thing, &curr_size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing")
@@ -1618,7 +1618,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unprotect() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_auto_resize_config
*
@@ -1665,7 +1665,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr,
if(internal_config.rpt_fcn == NULL)
config_ptr->rpt_fcn_enabled = FALSE;
else
- config_ptr->rpt_fcn_enabled = TRUE;
+ config_ptr->rpt_fcn_enabled = TRUE;
config_ptr->open_trace_file = FALSE;
config_ptr->close_trace_file = FALSE;
config_ptr->trace_file_name[0] = '\0';
@@ -1698,12 +1698,12 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr,
if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr))) {
config_ptr->dirty_bytes_threshold = aux_ptr->dirty_bytes_threshold;
- config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy;
+ config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy;
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
config_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
- config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
+ config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
#ifdef H5_HAVE_PARALLEL
} /* end else */
}
@@ -1713,7 +1713,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_auto_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_size
*
@@ -1742,7 +1742,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_hit_rate
*
@@ -1769,7 +1769,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_hit_rate() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC_reset_cache_hit_rate_stats()
@@ -1796,7 +1796,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_reset_cache_hit_rate_stats() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_set_cache_auto_resize_config
*
@@ -1813,7 +1813,7 @@ herr_t
H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr)
{
H5C_auto_size_ctl_t internal_config;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1888,21 +1888,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_set_cache_auto_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_validate_config()
*
* Purpose: Run a sanity check on the contents of the supplied
- * instance of H5AC_cache_config_t.
+ * instance of H5AC_cache_config_t.
*
* Do nothing and return SUCCEED if no errors are detected,
* and flag an error and return FAIL otherwise.
*
- * At present, this function operates by packing the data
- * from the instance of H5AC_cache_config_t into an instance
- * of H5C_auto_size_ctl_t, and then calling
- * H5C_validate_resize_config(). As H5AC_cache_config_t and
- * H5C_auto_size_ctl_t diverge, we may have to change this.
+ * At present, this function operates by packing the data
+ * from the instance of H5AC_cache_config_t into an instance
+ * of H5C_auto_size_ctl_t, and then calling
+ * H5C_validate_resize_config(). As H5AC_cache_config_t and
+ * H5C_auto_size_ctl_t diverge, we may have to change this.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1927,7 +1927,7 @@ H5AC_validate_config(H5AC_cache_config_t *config_ptr)
/* don't bother to test trace_file_name unless open_trace_file is TRUE */
if(config_ptr->open_trace_file) {
- size_t name_len;
+ size_t name_len;
/* Can't really test the trace_file_name field without trying to
* open the file, so we will content ourselves with a couple of
@@ -1965,22 +1965,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_validate_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_validate_cache_image_config()
*
* Purpose: Run a sanity check on the contents of the supplied
- * instance of H5AC_cache_image_config_t.
+ * instance of H5AC_cache_image_config_t.
*
* Do nothing and return SUCCEED if no errors are detected,
* and flag an error and return FAIL otherwise.
*
- * At present, this function operates by packing the data
- * from the instance of H5AC_cache_image_config_t into an
- * instance of H5C_cache_image_ctl_t, and then calling
- * H5C_validate_cache_image_config(). If and when
- * H5AC_cache_image_config_t and H5C_cache_image_ctl_t
- * diverge, we may have to change this.
+ * At present, this function operates by packing the data
+ * from the instance of H5AC_cache_image_config_t into an
+ * instance of H5C_cache_image_ctl_t, and then calling
+ * H5C_validate_cache_image_config(). If and when
+ * H5AC_cache_image_config_t and H5C_cache_image_ctl_t
+ * diverge, we may have to change this.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2005,7 +2005,7 @@ H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown image config version")
/* don't need to get the current H5C image config here since the
- * default values of fields not in the H5AC config will always be
+ * default values of fields not in the H5AC config will always be
* valid.
*/
internal_config.version = config_ptr->version;
@@ -2020,19 +2020,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_validate_cache_image_config() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC__check_if_write_permitted
*
* Purpose: Determine if a write is permitted under the current
- * circumstances, and set *write_permitted_ptr accordingly.
- * As a general rule it is, but when we are running in parallel
- * mode with collective I/O, we must ensure that a read cannot
- * cause a write.
+ * circumstances, and set *write_permitted_ptr accordingly.
+ * As a general rule it is, but when we are running in parallel
+ * mode with collective I/O, we must ensure that a read cannot
+ * cause a write.
*
- * In the event of failure, the value of *write_permitted_ptr
- * is undefined.
+ * In the event of failure, the value of *write_permitted_ptr
+ * is undefined.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2048,9 +2048,9 @@ H5_ATTR_UNUSED
*f, hbool_t *write_permitted_ptr)
{
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr = NULL;
+ H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
- hbool_t write_permitted = TRUE;
+ hbool_t write_permitted = TRUE;
FUNC_ENTER_STATIC_NOERR
@@ -2064,9 +2064,9 @@ H5_ATTR_UNUSED
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if((aux_ptr->mpi_rank == 0) || (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
- write_permitted = aux_ptr->write_permitted;
+ write_permitted = aux_ptr->write_permitted;
else
- write_permitted = FALSE;
+ write_permitted = FALSE;
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -2075,17 +2075,17 @@ H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5AC__check_if_write_permitted() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC__ext_config_2_int_config()
*
* Purpose: Utility function to translate an instance of
- * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t.
+ * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t.
*
- * Places translation in *int_conf_ptr and returns SUCCEED
- * if successful. Returns FAIL on failure.
+ * Places translation in *int_conf_ptr and returns SUCCEED
+ * if successful. Returns FAIL on failure.
*
- * Does only minimal sanity checking.
+ * Does only minimal sanity checking.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2141,15 +2141,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC__ext_config_2_int_config() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_ignore_tags()
*
- * Purpose: Override all assertion frameworks and force application of
+ * Purpose: Override all assertion frameworks and force application of
* global tag everywhere. This should really only be used in the
- * tests that need to access functions without going through
+ * tests that need to access functions without going through
* API paths.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2172,17 +2172,17 @@ H5AC_ignore_tags(const H5F_t *f)
/* Set up a new metadata tag */
if(H5C_ignore_tags(f->shared->cache) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "H5C_ignore_tags() failed")
-
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_ignore_tags() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_tag()
*
* Purpose: Sets the metadata tag property in the provided property list.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2205,14 +2205,14 @@ H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag)
FUNC_LEAVE_NOAPI_VOID
} /* H5AC_tag */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_retag_copied_metadata()
*
* Purpose: Searches through cache index for all entries with the
- * H5AC__COPIED_TAG, indicating that it was created as a
+ * H5AC__COPIED_TAG, indicating that it was created as a
* result of an object copy, and applies the provided tag.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2221,7 +2221,7 @@ H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag)
*------------------------------------------------------------------------------
*/
herr_t
-H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
+H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2230,7 +2230,7 @@ H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
/* Sanity checks */
HDassert(f);
HDassert(f->shared);
-
+
/* Call cache-level function to re-tag entries with the COPIED tag */
if(H5C_retag_entries(f->shared->cache, H5AC__COPIED_TAG, metadata_tag) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "Can't retag metadata")
@@ -2239,13 +2239,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_retag_copied_metadata() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_flush_tagged_metadata()
*
* Purpose: Wrapper for cache level function which flushes all metadata
- * that contains the specific tag.
- *
+ * that contains the specific tag.
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2258,8 +2258,8 @@ H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2274,13 +2274,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush_tagged_metadata */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_evict_tagged_metadata()
*
* Purpose: Wrapper for cache level function which flushes all metadata
- * that contains the specific tag.
- *
+ * that contains the specific tag.
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2293,8 +2293,8 @@ H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2309,13 +2309,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_evict_tagged_metadata() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_expunge_tag_type_metadata()
*
* Purpose: Wrapper for cache level function which expunge entries with
* a specific tag and type id.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Vailin Choi; May 2016
@@ -2327,8 +2327,8 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flag
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2343,12 +2343,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_expunge_tag_type_metadata*/
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_get_tag()
*
* Purpose: Get the tag for a metadata cache entry.
- *
+ *
* Return: SUCCEED/FAIL
*
* Programmer: Dana Robinson
@@ -2361,8 +2361,8 @@ H5AC_get_tag(const void *thing, haddr_t *tag)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2377,7 +2377,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_get_tag() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_cork
*
@@ -2424,7 +2424,7 @@ done:
} /* H5AC_cork() */
#if H5AC_DO_TAGGING_SANITY_CHECKS
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC__verify_tag
@@ -2459,14 +2459,14 @@ done:
} /* H5AC__verify_tag */
#endif /* H5AC_DO_TAGGING_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_entry_ring
*
* Purpose: Given a file address, retrieve the ring for an entry at that
* address.
*
- * On error, the value of *ring is not modified.
+ * On error, the value of *ring is not modified.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2495,15 +2495,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_entry_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_set_ring
*
* Purpose: Routine to set the ring on a DXPL (for passing through
* to the metadata cache).
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* Tuesday, September 8, 2015
@@ -2525,7 +2525,7 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring)
FUNC_LEAVE_NOAPI_VOID
} /* end H5AC_set_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unsettle_entry_ring()
*
@@ -2543,11 +2543,11 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring)
* are in the process of a file shutdown, post an error
* message, and return FAIL.
*
- * Note that this function simply passes the call on to
- * the metadata cache proper, and returns the result.
+ * Note that this function simply passes the call on to
+ * the metadata cache proper, and returns the result.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* September 17, 2016
@@ -2573,7 +2573,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unsettle_entry_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unsettle_ring()
*
@@ -2615,12 +2615,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unsettle_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_remove_entry()
*
* Purpose: Remove an entry from the cache. Must be not protected, pinned,
- * dirty, involved in flush dependencies, etc.
+ * dirty, involved in flush dependencies, etc.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2656,7 +2656,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_remove_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_mdc_image_info
*
diff --git a/src/H5B.c b/src/H5B.c
index 53d5529..16772a8 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -13,79 +13,79 @@
/*-------------------------------------------------------------------------
*
- * Created: H5B.c
- * Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5B.c
+ * Jul 10 1997
+ * Robb Matzke <matzke@llnl.gov>
*
- * Purpose: Implements balanced, sibling-linked, N-ary trees
- * capable of storing any type of data with unique key
- * values.
+ * Purpose: Implements balanced, sibling-linked, N-ary trees
+ * capable of storing any type of data with unique key
+ * values.
*
- * A B-link-tree is a balanced tree where each node has
- * a pointer to its left and right siblings. A
- * B-link-tree is a rooted tree having the following
- * properties:
+ * A B-link-tree is a balanced tree where each node has
+ * a pointer to its left and right siblings. A
+ * B-link-tree is a rooted tree having the following
+ * properties:
*
- * 1. Every node, x, has the following fields:
+ * 1. Every node, x, has the following fields:
*
- * a. level[x], the level in the tree at which node
- * x appears. Leaf nodes are at level zero.
+ * a. level[x], the level in the tree at which node
+ * x appears. Leaf nodes are at level zero.
*
- * b. n[x], the number of children pointed to by the
- * node. Internal nodes point to subtrees while
- * leaf nodes point to arbitrary data.
+ * b. n[x], the number of children pointed to by the
+ * node. Internal nodes point to subtrees while
+ * leaf nodes point to arbitrary data.
*
- * c. The child pointers themselves, child[x,i] such
- * that 0 <= i < n[x].
+ * c. The child pointers themselves, child[x,i] such
+ * that 0 <= i < n[x].
*
- * d. n[x]+1 key values stored in increasing
- * order:
+ * d. n[x]+1 key values stored in increasing
+ * order:
*
- * key[x,0] < key[x,1] < ... < key[x,n[x]].
+ * key[x,0] < key[x,1] < ... < key[x,n[x]].
*
- * e. left[x] is a pointer to the node's left sibling
- * or the null pointer if this is the left-most
- * node at this level in the tree.
+ * e. left[x] is a pointer to the node's left sibling
+ * or the null pointer if this is the left-most
+ * node at this level in the tree.
*
- * f. right[x] is a pointer to the node's right
- * sibling or the null pointer if this is the
- * right-most node at this level in the tree.
+ * f. right[x] is a pointer to the node's right
+ * sibling or the null pointer if this is the
+ * right-most node at this level in the tree.
*
- * 3. The keys key[x,i] partition the key spaces of the
- * children of x:
+ * 3. The keys key[x,i] partition the key spaces of the
+ * children of x:
*
- * key[x,i] <= key[child[x,i],j] <= key[x,i+1]
+ * key[x,i] <= key[child[x,i],j] <= key[x,i+1]
*
- * for any valid combination of i and j.
+ * for any valid combination of i and j.
*
- * 4. There are lower and upper bounds on the number of
- * child pointers a node can contain. These bounds
- * can be expressed in terms of a fixed integer k>=2
- * called the `minimum degree' of the B-tree.
+ * 4. There are lower and upper bounds on the number of
+ * child pointers a node can contain. These bounds
+ * can be expressed in terms of a fixed integer k>=2
+ * called the `minimum degree' of the B-tree.
*
- * a. Every node other than the root must have at least
- * k child pointers and k+1 keys. If the tree is
- * nonempty, the root must have at least one child
- * pointer and two keys.
+ * a. Every node other than the root must have at least
+ * k child pointers and k+1 keys. If the tree is
+ * nonempty, the root must have at least one child
+ * pointer and two keys.
*
- * b. Every node can contain at most 2k child pointers
- * and 2k+1 keys. A node is `full' if it contains
- * exactly 2k child pointers and 2k+1 keys.
+ * b. Every node can contain at most 2k child pointers
+ * and 2k+1 keys. A node is `full' if it contains
+ * exactly 2k child pointers and 2k+1 keys.
*
- * 5. When searching for a particular value, V, and
- * key[V] = key[x,i] for some node x and entry i,
- * then:
+ * 5. When searching for a particular value, V, and
+ * key[V] = key[x,i] for some node x and entry i,
+ * then:
*
- * a. If i=0 the child[0] is followed.
+ * a. If i=0 the child[0] is followed.
*
- * b. If i=n[x] the child[n[x]-1] is followed.
+ * b. If i=n[x] the child[n[x]-1] is followed.
*
- * c. Otherwise, the child that is followed
- * (either child[x,i-1] or child[x,i]) is
- * determined by the type of object to which the
- * leaf nodes of the tree point and is controlled
- * by the key comparison function registered for
- * that type of B-tree.
+ * c. Otherwise, the child that is followed
+ * (either child[x,i-1] or child[x,i]) is
+ * determined by the type of object to which the
+ * leaf nodes of the tree point and is controlled
+ * by the key comparison function registered for
+ * that type of B-tree.
*
*
*-------------------------------------------------------------------------
@@ -101,22 +101,22 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-#define H5B_SIZEOF_HDR(F) \
- (H5_SIZEOF_MAGIC + /*magic number */ \
- 4 + /*type, level, num entries */ \
- 2*H5F_SIZEOF_ADDR(F)) /*left and right sibling addresses */
+#define H5B_SIZEOF_HDR(F) \
+ (H5_SIZEOF_MAGIC + /*magic number */ \
+ 4 + /*type, level, num entries */ \
+ 2*H5F_SIZEOF_ADDR(F)) /*left and right sibling addresses */
/* Default initializer for H5B_ins_ud_t */
#define H5B_INS_UD_T_NULL {NULL, HADDR_UNDEF, H5AC__NO_FLAGS_SET}
@@ -149,7 +149,7 @@ static H5B_ins_t H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud,
H5B_ins_ud_t *split_bt_ud/*out*/);
static herr_t H5B__insert_child(H5B_t *bt, unsigned *bt_flags,
unsigned idx, haddr_t child,
- H5B_ins_t anchor, const void *md_key);
+ H5B_ins_t anchor, const void *md_key);
static herr_t H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
void *udata, H5B_ins_ud_t *split_bt_ud/*out*/);
static H5B_t * H5B__copy(const H5B_t *old_bt);
@@ -191,31 +191,31 @@ H5FL_BLK_DEFINE_STATIC(page);
H5FL_SEQ_DEFINE_STATIC(size_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_create
+ * Function: H5B_create
*
- * Purpose: Creates a new empty B-tree leaf node. The UDATA pointer is
- * passed as an argument to the sizeof_rkey() method for the
- * B-tree.
+ * Purpose: Creates a new empty B-tree leaf node. The UDATA pointer is
+ * passed as an argument to the sizeof_rkey() method for the
+ * B-tree.
*
- * Return: Success: Non-negative, and the address of new node is
- * returned through the ADDR_P argument.
+ * Return: Success: Non-negative, and the address of new node is
+ * returned through the ADDR_P argument.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
herr_t
H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p/*out*/)
{
- H5B_t *bt = NULL;
+ H5B_t *bt = NULL;
H5B_shared_t *shared=NULL; /* Pointer to shared B-tree info */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -230,20 +230,20 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p/*out*
* Allocate file and memory data structures.
*/
if(NULL == (bt = H5FL_MALLOC(H5B_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
bt->level = 0;
bt->left = HADDR_UNDEF;
bt->right = HADDR_UNDEF;
bt->nchildren = 0;
if(NULL == (bt->rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
H5UC_INC(bt->rc_shared);
shared=(H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
HDassert(shared);
if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)shared->sizeof_rnode)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "file allocation failed for B-tree root node")
@@ -251,7 +251,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p/*out*
* Cache the new B-tree node.
*/
if(H5AC_insert_entry(f, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
#ifdef H5B_DEBUG
H5B__assert(f, *addr_p, shared->type, udata);
#endif
@@ -262,7 +262,7 @@ done:
H5_CHECK_OVERFLOW(shared->sizeof_rnode,size_t,hsize_t);
(void)H5MF_xfree(f, H5FD_MEM_BTREE, *addr_p, (hsize_t)shared->sizeof_rnode);
} /* end if */
- if(bt)
+ if(bt)
/* Destroy B-tree node */
if(H5B__node_dest(bt) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
@@ -271,40 +271,40 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_create() */ /*lint !e818 Can't make udata a pointer to const */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_find
+ * Function: H5B_find
*
- * Purpose: Locate the specified information in a B-tree and return
- * that information by filling in fields of the caller-supplied
- * UDATA pointer depending on the type of leaf node
- * requested. The UDATA can point to additional data passed
- * to the key comparison function.
+ * Purpose: Locate the specified information in a B-tree and return
+ * that information by filling in fields of the caller-supplied
+ * UDATA pointer depending on the type of leaf node
+ * requested. The UDATA can point to additional data passed
+ * to the key comparison function.
*
- * Note: This function does not follow the left/right sibling
- * pointers since it assumes that all nodes can be reached
- * from the parent node.
+ * Note: This function does not follow the left/right sibling
+ * pointers since it assumes that all nodes can be reached
+ * from the parent node.
*
- * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
+ * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
* through the UDATA argument). Negative on failure (if not found,
* UDATA is undefined).
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
htri_t
H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
{
- H5B_t *bt = NULL;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */
- int cmp = 1; /* Key comparison value */
- htri_t ret_value = FAIL; /* Return value */
+ int cmp = 1; /* Key comparison value */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -336,16 +336,16 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
rt = bt->nchildren;
while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- /* compare */
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ idx = (lt + rt) / 2;
+ /* compare */
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
/* Check if not found */
if(cmp)
- HGOTO_DONE(FALSE)
+ HGOTO_DONE(FALSE)
/*
* Follow the link to the subtree or to the data node.
@@ -353,41 +353,41 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
HDassert(idx < bt->nchildren);
if(bt->level > 0) {
- if((ret_value = H5B_find(f, type, bt->child[idx], udata)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree")
+ if((ret_value = H5B_find(f, type, bt->child[idx], udata)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree")
} /* end if */
else {
- if((ret_value = (type->found)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), udata)) < 0)
+ if((ret_value = (type->found)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), udata)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in leaf node")
} /* end else */
done:
if(bt && H5AC_unprotect(f, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_find() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__split
+ * Function: H5B__split
*
- * Purpose: Split a single node into two nodes. The old node will
- * contain the left children and the new node will contain the
- * right children.
+ * Purpose: Split a single node into two nodes. The old node will
+ * contain the left children and the new node will contain the
+ * right children.
*
- * The UDATA pointer is passed to the sizeof_rkey() method but is
- * otherwise unused.
+ * The UDATA pointer is passed to the sizeof_rkey() method but is
+ * otherwise unused.
*
- * The BT_UD argument is a pointer to a protected B-tree
- * node.
+ * The BT_UD argument is a pointer to a protected B-tree
+ * node.
*
- * Return: Non-negative on success (The address of the new node is
+ * Return: Non-negative on success (The address of the new node is
* returned through the NEW_ADDR argument). Negative on failure.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 3 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 3 1997
*
*-------------------------------------------------------------------------
*/
@@ -397,9 +397,9 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
{
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned nleft, nright; /* Number of keys in left & right halves */
+ unsigned nleft, nright; /* Number of keys in left & right halves */
double split_ratios[3]; /* B-tree split ratios */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -426,18 +426,18 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
#ifdef H5B_DEBUG
if(H5DEBUG(B)) {
- const char *side;
-
- if(!H5F_addr_defined(bt_ud->bt->left) && !H5F_addr_defined(bt_ud->bt->right))
- side = "ONLY";
- else if(!H5F_addr_defined(bt_ud->bt->right))
- side = "RIGHT";
- else if(!H5F_addr_defined(bt_ud->bt->left))
- side = "LEFT";
- else
- side = "MIDDLE";
- fprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s",
- shared->two_k, split_ratios[0], split_ratios[1], split_ratios[2], side);
+ const char *side;
+
+ if(!H5F_addr_defined(bt_ud->bt->left) && !H5F_addr_defined(bt_ud->bt->right))
+ side = "ONLY";
+ else if(!H5F_addr_defined(bt_ud->bt->right))
+ side = "RIGHT";
+ else if(!H5F_addr_defined(bt_ud->bt->left))
+ side = "LEFT";
+ else
+ side = "MIDDLE";
+ HDfprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s",
+ shared->two_k, split_ratios[0], split_ratios[1], split_ratios[2], side);
}
#endif
@@ -446,11 +446,11 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
* and the new node.
*/
if(!H5F_addr_defined(bt_ud->bt->right))
- nleft = (unsigned)((double)shared->two_k * split_ratios[2]); /*right*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[2]); /*right*/
else if(!H5F_addr_defined(bt_ud->bt->left))
- nleft = (unsigned)((double)shared->two_k * split_ratios[0]); /*left*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[0]); /*left*/
else
- nleft = (unsigned)((double)shared->two_k * split_ratios[1]); /*middle*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[1]); /*middle*/
/*
* Keep the new child in the same node as the child that split. This can
@@ -458,25 +458,25 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
* sequentially, but it simplifies stuff below.
*/
if(idx < nleft && nleft == shared->two_k)
- --nleft;
+ --nleft;
else if(idx >= nleft && 0 == nleft)
- nleft++;
+ nleft++;
nright = shared->two_k - nleft;
#ifdef H5B_DEBUG
if(H5DEBUG(B))
- fprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
+ HDfprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
#endif
/*
* Create the new B-tree node.
*/
if(H5B_create(f, shared->type, udata, &split_bt_ud->addr/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
cache_udata.f = f;
cache_udata.type = shared->type;
cache_udata.rc_shared = bt_ud->bt->rc_shared;
if(NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC__NO_FLAGS_SET)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree")
split_bt_ud->bt->level = bt_ud->bt->level;
/*
@@ -485,8 +485,8 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
split_bt_ud->cache_flags = H5AC__DIRTIED_FLAG;
HDmemcpy(split_bt_ud->bt->native,
- bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
- (nright + 1) * shared->type->sizeof_nkey);
+ bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
+ (nright + 1) * shared->type->sizeof_nkey);
HDmemcpy(split_bt_ud->bt->child,
&bt_ud->bt->child[nleft],
nright * sizeof(haddr_t));
@@ -532,17 +532,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__split() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_insert
+ * Function: H5B_insert
*
- * Purpose: Adds a new item to the B-tree.
+ * Purpose: Adds a new item to the B-tree.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -552,22 +552,22 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/*
* These are defined this way to satisfy alignment constraints.
*/
- uint64_t _lt_key[128], _md_key[128], _rt_key[128];
- uint8_t *lt_key=(uint8_t*)_lt_key;
- uint8_t *md_key=(uint8_t*)_md_key;
- uint8_t *rt_key=(uint8_t*)_rt_key;
+ uint64_t _lt_key[128], _md_key[128], _rt_key[128];
+ uint8_t *lt_key=(uint8_t*)_lt_key;
+ uint8_t *md_key=(uint8_t*)_md_key;
+ uint8_t *rt_key=(uint8_t*)_rt_key;
- hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
+ hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
haddr_t old_root_addr = HADDR_UNDEF;
- unsigned level;
+ unsigned level;
H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
H5B_ins_ud_t split_bt_ud = H5B_INS_UD_T_NULL; /* Split B-tree node */
H5B_t *new_root_bt = NULL; /* New root node */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- H5B_ins_t my_ins = H5B_INS_ERROR;
- herr_t ret_value = SUCCEED;
+ H5B_ins_t my_ins = H5B_INS_ERROR;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -595,7 +595,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
if((int)(my_ins = H5B__insert_helper(f, &bt_ud, type, lt_key,
&lt_key_changed, md_key, udata, rt_key, &rt_key_changed,
&split_bt_ud/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key")
/* Check if the root node split */
if(H5B_INS_NOOP == my_ins) {
@@ -612,9 +612,9 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* update left and right keys */
if(!lt_key_changed)
- HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
+ HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
if(!rt_key_changed)
- HDmemcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
+ HDmemcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
/*
* Copy the old root node to some other file location and make the new root
@@ -623,7 +623,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
*/
H5_CHECK_OVERFLOW(shared->sizeof_rnode,size_t,hsize_t);
if(HADDR_UNDEF == (old_root_addr = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)shared->sizeof_rnode)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root")
/*
* Move the node to the new location
@@ -636,12 +636,12 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* Unprotect the old root so we can move it. Also force it to be marked
* dirty so it is written to the new location. */
if(H5AC_unprotect(f, H5AC_BT, bt_ud.addr, bt_ud.bt, H5AC__DIRTIED_FLAG) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root")
bt_ud.bt = NULL; /* Make certain future references will be caught */
/* Move the location of the old root on the disk */
if(H5AC_move_entry(f, H5AC_BT, bt_ud.addr, old_root_addr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
bt_ud.addr = old_root_addr;
/* Update the split b-tree's left pointer to point to the new location */
@@ -688,19 +688,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__insert_child
+ * Function: H5B__insert_child
*
- * Purpose: Insert a child to the left or right of child[IDX] depending
- * on whether ANCHOR is H5B_INS_LEFT or H5B_INS_RIGHT. The BT
- * argument is a pointer to a protected B-tree node.
+ * Purpose: Insert a child to the left or right of child[IDX] depending
+ * on whether ANCHOR is H5B_INS_LEFT or H5B_INS_RIGHT. The BT
+ * argument is a pointer to a protected B-tree node.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 8 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 8 1997
*
*-------------------------------------------------------------------------
*/
@@ -761,35 +761,35 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_insert_child() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__insert_helper
+ * Function: H5B__insert_helper
*
- * Purpose: Inserts the item UDATA into the tree rooted at ADDR and having
- * the specified type.
+ * Purpose: Inserts the item UDATA into the tree rooted at ADDR and having
+ * the specified type.
*
- * On return, if LT_KEY_CHANGED is non-zero, then LT_KEY is
- * the new native left key. Similarly for RT_KEY_CHANGED
- * and RT_KEY.
+ * On return, if LT_KEY_CHANGED is non-zero, then LT_KEY is
+ * the new native left key. Similarly for RT_KEY_CHANGED
+ * and RT_KEY.
*
- * If the node splits, then MD_KEY contains the key that
- * was split between the two nodes (that is, the key that
- * appears as the max key in the left node and the min key
- * in the right node).
+ * If the node splits, then MD_KEY contains the key that
+ * was split between the two nodes (that is, the key that
+ * appears as the max key in the left node and the min key
+ * in the right node).
*
- * Return: Success: A B-tree operation. The address of the new
- * node, if the node splits, is returned through
- * the NEW_NODE_P argument. The new node is always
- * to the right of the previous node. This
- * function is called recursively and the return
- * value influences the behavior of the caller.
- * See also, declaration of H5B_ins_t.
+ * Return: Success: A B-tree operation. The address of the new
+ * node, if the node splits, is returned through
+ * the NEW_NODE_P argument. The new node is always
+ * to the right of the previous node. This
+ * function is called recursively and the return
+ * value influences the behavior of the caller.
+ * See also, declaration of H5B_ins_t.
*
- * Failure: H5B_INS_ERROR
+ * Failure: H5B_INS_ERROR
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 9 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 9 1997
*
*-------------------------------------------------------------------------
*/
@@ -799,15 +799,15 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
uint8_t *rt_key, hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud/*out*/)
{
H5B_t *bt; /* Convenience pointer to B-tree */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
+ unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
int cmp = -1; /* Key comparison value */
H5B_ins_ud_t child_bt_ud = H5B_INS_UD_T_NULL; /* Child B-tree */
H5B_ins_ud_t new_child_bt_ud = H5B_INS_UD_T_NULL; /* Newly split child B-tree */
- H5B_ins_t my_ins = H5B_INS_ERROR;
- H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
+ H5B_ins_t my_ins = H5B_INS_ERROR;
+ H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
FUNC_ENTER_STATIC
@@ -838,7 +838,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -850,11 +850,11 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
rt = bt->nchildren;
while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ idx = (lt + rt) / 2;
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
/* Set up user data for cache callbacks */
@@ -863,26 +863,26 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
cache_udata.rc_shared = rc_shared;
if(0 == bt->nchildren) {
- /*
- * The value being inserted will be the only value in this tree. We
- * must necessarily be at level zero.
- */
- HDassert(0 == bt->level);
- if((type->new_node)(f, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata,
- H5B_NKEY(bt, shared, 1), bt->child + 0/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
- bt->nchildren = 1;
+ /*
+ * The value being inserted will be the only value in this tree. We
+ * must necessarily be at level zero.
+ */
+ HDassert(0 == bt->level);
+ if((type->new_node)(f, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata,
+ H5B_NKEY(bt, shared, 1), bt->child + 0/*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
+ bt->nchildren = 1;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
- idx = 0;
+ idx = 0;
- if(type->follow_min) {
- if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ if(type->follow_min) {
+ if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node")
- } /* end if */
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node")
+ } /* end if */
else
- my_ins = H5B_INS_NOOP;
+ my_ins = H5B_INS_NOOP;
} else if(cmp < 0 && idx == 0) {
if(bt->level > 0) {
/*
@@ -977,36 +977,36 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values")
#endif /* H5_STRICT_FORMAT_CHECKS */
} else if(cmp) {
- /*
- * We couldn't figure out which branch to follow out of this node. THIS
- * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
- */
- HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
+ /*
+ * We couldn't figure out which branch to follow out of this node. THIS
+ * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
+ */
+ HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
#ifdef NDEBUG
- HDabort();
+ HDabort();
#endif /* NDEBUG */
} else if(bt->level > 0) {
- /*
- * Follow a branch out of this node to another subtree.
- */
- HDassert(idx < bt->nchildren);
- child_bt_ud.addr = bt->child[idx];
+ /*
+ * Follow a branch out of this node to another subtree.
+ */
+ HDassert(idx < bt->nchildren);
+ child_bt_ud.addr = bt->child[idx];
if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node")
- if((int)(my_ins = H5B__insert_helper(f, &child_bt_ud, type,
+ if((int)(my_ins = H5B__insert_helper(f, &child_bt_ud, type,
H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata,
H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &new_child_bt_ud/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree")
} else {
- /*
- * Follow a branch out of this node to a leaf node of some other type.
- */
- HDassert(idx < bt->nchildren);
- if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ /*
+ * Follow a branch out of this node to a leaf node of some other type.
+ */
+ HDassert(idx < bt->nchildren);
+ if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
}
HDassert((int)my_ins >= 0);
@@ -1039,40 +1039,40 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
*/
HDassert(!(bt->level == 0) != !(child_bt_ud.bt));
if(H5B_INS_CHANGE == my_ins) {
- /*
- * The insertion simply changed the address for the child.
- */
- HDassert(!child_bt_ud.bt);
- HDassert(bt->level == 0);
- bt->child[idx] = new_child_bt_ud.addr;
+ /*
+ * The insertion simply changed the address for the child.
+ */
+ HDassert(!child_bt_ud.bt);
+ HDassert(bt->level == 0);
+ bt->child[idx] = new_child_bt_ud.addr;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
} else if(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins) {
unsigned *tmp_bt_flags_ptr = NULL;
- H5B_t *tmp_bt;
-
- /*
- * If this node is full then split it before inserting the new child.
- */
- if(bt->nchildren == shared->two_k) {
- if(H5B__split(f, bt_ud, idx, udata, split_bt_ud/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
- if(idx < bt->nchildren) {
- tmp_bt = bt;
+ H5B_t *tmp_bt;
+
+ /*
+ * If this node is full then split it before inserting the new child.
+ */
+ if(bt->nchildren == shared->two_k) {
+ if(H5B__split(f, bt_ud, idx, udata, split_bt_ud/*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
+ if(idx < bt->nchildren) {
+ tmp_bt = bt;
tmp_bt_flags_ptr = &bt_ud->cache_flags;
- } else {
- idx -= bt->nchildren;
- tmp_bt = split_bt_ud->bt;
+ } else {
+ idx -= bt->nchildren;
+ tmp_bt = split_bt_ud->bt;
tmp_bt_flags_ptr = &split_bt_ud->cache_flags;
- }
- } /* end if */
+ }
+ } /* end if */
else {
- tmp_bt = bt;
+ tmp_bt = bt;
tmp_bt_flags_ptr = &bt_ud->cache_flags;
- } /* end else */
+ } /* end else */
- /* Insert the child */
- if(H5B__insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child")
+ /* Insert the child */
+ if(H5B__insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child")
} /* end else-if */
/*
@@ -1080,20 +1080,20 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
* by the left and right node).
*/
if(split_bt_ud->bt) {
- HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
- ret_value = H5B_INS_RIGHT;
+ HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
+ ret_value = H5B_INS_RIGHT;
#ifdef H5B_DEBUG
- /*
- * The max key in the original left node must be equal to the min key
- * in the new node.
- */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata,
- H5B_NKEY(split_bt_ud->bt, shared, 0));
- HDassert(0 == cmp);
+ /*
+ * The max key in the original left node must be equal to the min key
+ * in the new node.
+ */
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata,
+ H5B_NKEY(split_bt_ud->bt, shared, 0));
+ HDassert(0 == cmp);
#endif
} /* end if */
else
- ret_value = H5B_INS_NOOP;
+ ret_value = H5B_INS_NOOP;
done:
if(child_bt_ud.bt)
@@ -1107,18 +1107,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert_helper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__iterate_helper
+ * Function: H5B__iterate_helper
*
- * Purpose: Calls the list callback for each leaf node of the
- * B-tree, passing it the caller's UDATA structure.
+ * Purpose: Calls the list callback for each leaf node of the
+ * B-tree, passing it the caller's UDATA structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -1127,7 +1127,7 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5B_operator_t op, void *udata)
{
H5B_t *bt = NULL; /* Pointer to current B-tree node */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned u; /* Local index variable */
@@ -1174,18 +1174,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__iterate_helper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_iterate
+ * Function: H5B_iterate
*
- * Purpose: Calls the list callback for each leaf node of the
- * B-tree, passing it the UDATA structure.
+ * Purpose: Calls the list callback for each leaf node of the
+ * B-tree, passing it the UDATA structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -1213,27 +1213,27 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_iterate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__remove_helper
+ * Function: H5B__remove_helper
*
- * Purpose: The recursive part of removing an item from a B-tree. The
- * sub B-tree that is being considered is located at ADDR and
- * the item to remove is described by UDATA. If the removed
- * item falls at the left or right end of the current level then
- * it might be necessary to adjust the left and/or right keys
- * (LT_KEY and/or RT_KEY) to to indicate that they changed by
- * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
+ * Purpose: The recursive part of removing an item from a B-tree. The
+ * sub B-tree that is being considered is located at ADDR and
+ * the item to remove is described by UDATA. If the removed
+ * item falls at the left or right end of the current level then
+ * it might be necessary to adjust the left and/or right keys
+ * (LT_KEY and/or RT_KEY) to to indicate that they changed by
+ * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
*
- * Return: Success: A B-tree operation, see comments for
- * H5B_ins_t declaration. This function is
- * called recursively and the return value
- * influences the actions of the caller. It is
- * also called by H5B_remove().
+ * Return: Success: A B-tree operation, see comments for
+ * H5B_ins_t declaration. This function is
+ * called recursively and the return value
+ * influences the actions of the caller. It is
+ * also called by H5B_remove().
*
- * Failure: H5B_INS_ERROR, a negative value.
+ * Failure: H5B_INS_ERROR, a negative value.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, September 16, 1998
*
*-------------------------------------------------------------------------
@@ -1243,14 +1243,14 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
uint8_t *lt_key/*out*/, hbool_t *lt_key_changed/*out*/, void *udata,
uint8_t *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
{
- H5B_t *bt = NULL, *sibling = NULL;
- unsigned bt_flags = H5AC__NO_FLAGS_SET;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL, *sibling = NULL;
+ unsigned bt_flags = H5AC__NO_FLAGS_SET;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned idx = 0, lt = 0, rt; /* Final, left & right indices */
int cmp = 1; /* Key comparison value */
- H5B_ins_t ret_value = H5B_INS_ERROR;
+ H5B_ins_t ret_value = H5B_INS_ERROR;
FUNC_ENTER_STATIC
@@ -1265,7 +1265,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1277,18 +1277,18 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
if(NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node")
rt = bt->nchildren;
while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ idx = (lt + rt) / 2;
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
if(cmp)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found")
/*
* Follow the link to the subtree or to the data node. The return value
@@ -1296,31 +1296,31 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
*/
HDassert(idx < bt->nchildren);
if(bt->level > 0) {
- /* We're at an internal node -- call recursively */
- if((int)(ret_value = H5B__remove_helper(f, bt->child[idx], type,
+ /* We're at an internal node -- call recursively */
+ if((int)(ret_value = H5B__remove_helper(f, bt->child[idx], type,
level + 1, H5B_NKEY(bt, shared, idx)/*out*/,
lt_key_changed/*out*/, udata, H5B_NKEY(bt, shared, idx + 1)/*out*/,
rt_key_changed/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree")
} else if(type->remove) {
- /*
- * We're at a leaf node but the leaf node points to an object that
- * has a removal method. Pass the removal request to the pointed-to
- * object and let it decide how to progress.
- */
- if((int)(ret_value = (type->remove)(f, bt->child[idx],
+ /*
+ * We're at a leaf node but the leaf node points to an object that
+ * has a removal method. Pass the removal request to the pointed-to
+ * object and let it decide how to progress.
+ */
+ if((int)(ret_value = (type->remove)(f, bt->child[idx],
H5B_NKEY(bt, shared, idx), lt_key_changed, udata,
H5B_NKEY(bt, shared, idx + 1), rt_key_changed)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node")
} else {
- /*
- * We're at a leaf node which points to an object that has no removal
- * method. The best we can do is to leave the object alone but
- * remove the B-tree reference to the object.
- */
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
- ret_value = H5B_INS_REMOVE;
+ /*
+ * We're at a leaf node which points to an object that has no removal
+ * method. The best we can do is to leave the object alone but
+ * remove the B-tree reference to the object.
+ */
+ *lt_key_changed = FALSE;
+ *rt_key_changed = FALSE;
+ ret_value = H5B_INS_REMOVE;
}
/*
@@ -1416,7 +1416,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
bt->nchildren = 0;
/* Delete the node from disk (via the metadata cache) */
- bt_flags |= H5AC__DIRTIED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
+ bt_flags |= H5AC__DIRTIED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t);
if(H5AC_unprotect(f, H5AC_BT, addr, bt, bt_flags | H5AC__DELETED_FLAG) < 0) {
bt = NULL;
@@ -1541,24 +1541,24 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
done:
if(bt && H5AC_unprotect(f, H5AC_BT, addr, bt, bt_flags) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__remove_helper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_remove
+ * Function: H5B_remove
*
- * Purpose: Removes an item from a B-tree.
+ * Purpose: Removes an item from a B-tree.
*
- * Note: The current version does not attempt to rebalance the tree.
+ * Note: The current version does not attempt to rebalance the tree.
* (Read the paper Yao & Lehman paper for details on why)
*
- * Return: Non-negative on success/Negative on failure (failure includes
- * not being able to find the object which is to be removed).
+ * Return: Non-negative on success/Negative on failure (failure includes
+ * not being able to find the object which is to be removed).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, September 16, 1998
*
*-------------------------------------------------------------------------
@@ -1567,11 +1567,11 @@ herr_t
H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
{
/* These are defined this way to satisfy alignment constraints */
- uint64_t _lt_key[128], _rt_key[128];
- uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
- uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
- hbool_t lt_key_changed = FALSE; /*left key changed?*/
- hbool_t rt_key_changed = FALSE; /*right key changed?*/
+ uint64_t _lt_key[128], _rt_key[128];
+ uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
+ uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
+ hbool_t lt_key_changed = FALSE; /*left key changed?*/
+ hbool_t rt_key_changed = FALSE; /*right key changed?*/
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1584,7 +1584,7 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* The actual removal */
if(H5B_INS_ERROR == H5B__remove_helper(f, addr, type, 0, lt_key, &lt_key_changed, udata, rt_key, &rt_key_changed))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree")
#ifdef H5B_DEBUG
H5B__assert(f, addr, type, udata);
@@ -1593,16 +1593,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_delete
+ * Function: H5B_delete
*
- * Purpose: Deletes an entire B-tree from the file, calling the 'remove'
+ * Purpose: Deletes an entire B-tree from the file, calling the 'remove'
* callbacks for each node.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
*-------------------------------------------------------------------------
@@ -1610,8 +1610,8 @@ done:
herr_t
H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
{
- H5B_t *bt = NULL; /* B-tree node being operated on */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL; /* B-tree node being operated on */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned u; /* Local index variable */
@@ -1668,18 +1668,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_shared_new
+ * Function: H5B_shared_new
*
- * Purpose: Allocates & constructs a shared v1 B-tree struct for client.
+ * Purpose: Allocates & constructs a shared v1 B-tree struct for client.
*
- * Return: Success: non-NULL pointer to struct allocated
- * Failure: NULL
+ * Return: Success: non-NULL pointer to struct allocated
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * May 27 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * May 27 2008
*
*-------------------------------------------------------------------------
*/
@@ -1687,7 +1687,7 @@ H5B_shared_t *
H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
{
H5B_shared_t *shared = NULL; /* New shared B-tree struct */
- size_t u; /* Local index variable */
+ size_t u; /* Local index variable */
H5B_shared_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1699,7 +1699,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
/* Allocate space for the shared structure */
if(NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
/* Set up the "global" information for this file's groups */
shared->type = type;
@@ -1709,9 +1709,9 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
shared->sizeof_rkey = sizeof_rkey;
HDassert(shared->sizeof_rkey);
shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;
- shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
- shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
- (shared->two_k + 1) * shared->sizeof_rkey); /*keys */
+ shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
+ shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
+ (shared->two_k + 1) * shared->sizeof_rkey); /*keys */
HDassert(shared->sizeof_rnode);
/* Allocate and clear shared buffers */
@@ -1742,15 +1742,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_shared_new() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_shared_free
+ * Function: H5B_shared_free
*
- * Purpose: Free B-tree shared info
+ * Purpose: Free B-tree shared info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 27, 2008
*
*-------------------------------------------------------------------------
@@ -1774,28 +1774,28 @@ H5B_shared_free(void *_shared)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_shared_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__copy
+ * Function: H5B__copy
*
- * Purpose: Deep copies an existing H5B_t node.
+ * Purpose: Deep copies an existing H5B_t node.
*
- * Return: Success: Pointer to H5B_t object.
+ * Return: Success: Pointer to H5B_t object.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Apr 18 2000
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Apr 18 2000
*
*-------------------------------------------------------------------------
*/
static H5B_t *
H5B__copy(const H5B_t *old_bt)
{
- H5B_t *new_node = NULL;
+ H5B_t *new_node = NULL;
H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_t *ret_value = NULL; /* Return value */
+ H5B_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -1833,26 +1833,26 @@ H5B__copy(const H5B_t *old_bt)
done:
if(NULL == ret_value) {
if(new_node) {
- new_node->native = H5FL_BLK_FREE(native_block, new_node->native);
- new_node->child = H5FL_SEQ_FREE(haddr_t, new_node->child);
- new_node = H5FL_FREE(H5B_t, new_node);
+ new_node->native = H5FL_BLK_FREE(native_block, new_node->native);
+ new_node->child = H5FL_SEQ_FREE(haddr_t, new_node->child);
+ new_node = H5FL_FREE(H5B_t, new_node);
} /* end if */
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__get_info_helper
+ * Function: H5B__get_info_helper
*
- * Purpose: Walks the B-tree nodes, getting information for all of them.
+ * Purpose: Walks the B-tree nodes, getting information for all of them.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jun 3 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jun 3 2008
*
*-------------------------------------------------------------------------
*/
@@ -1864,8 +1864,8 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned level; /* Node level */
- size_t sizeof_rnode; /* Size of raw (disk) node */
+ unsigned level; /* Node level */
+ size_t sizeof_rnode; /* Size of raw (disk) node */
haddr_t next_addr; /* Address of next node to the right */
haddr_t left_child; /* Address of left-most child in node */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1884,7 +1884,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1896,7 +1896,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
if(NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
/* Cache information from this node */
left_child = bt->child[0];
@@ -1937,9 +1937,9 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
/* Check for another "row" of B-tree nodes to iterate over */
if(level > 0) {
- /* Keep following the left-most child until we reach a leaf node. */
- if(H5B__get_info_helper(f, type, left_child, info_udata) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node")
+ /* Keep following the left-most child until we reach a leaf node. */
+ if(H5B__get_info_helper(f, type, left_child, info_udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node")
} /* end if */
done:
@@ -1949,7 +1949,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__get_info_helper() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_get_info
*
@@ -1967,7 +1967,7 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5B_info_t *bt_info, H5B_operator_t op, void *udata)
{
H5B_info_ud_t info_udata; /* User-data for B-tree size iteration */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2001,7 +2001,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_get_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_valid
*
@@ -2021,7 +2021,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- htri_t ret_value = SUCCEED; /* Return value */
+ htri_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2036,7 +2036,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, NULL)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -2047,7 +2047,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
if(NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node")
done:
/* Release the node */
@@ -2057,7 +2057,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_valid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__node_dest
*
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index 5cad81b..f15fe79 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Bdbg.c
- * Dec 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Bdbg.c
+ * Dec 11 2008
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Debugging routines for B-link tree package.
+ * Purpose: Debugging routines for B-link tree package.
*
*-------------------------------------------------------------------------
*/
@@ -32,35 +32,35 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+
-
/*-------------------------------------------------------------------------
- * Function: H5B_debug
+ * Function: H5B_debug
*
- * Purpose: Prints debugging info about a B-tree.
+ * Purpose: Prints debugging info about a B-tree.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 4 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Aug 4 1997
*
*-------------------------------------------------------------------------
*/
herr_t
H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B_class_t *type, void *udata)
+ const H5B_class_t *type, void *udata)
{
- H5B_t *bt = NULL;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -80,7 +80,7 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -91,61 +91,61 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
if(NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
/*
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Tree type ID:",
- ((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" :
+ "Tree type ID:",
+ ((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" :
((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of node:",
- shared->sizeof_rnode);
+ "Size of node:",
+ shared->sizeof_rnode);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of raw (disk) key:",
- shared->sizeof_rkey);
+ "Size of raw (disk) key:",
+ shared->sizeof_rkey);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:",
- bt->cache_info.is_dirty ? "True" : "False");
+ "Dirty flag:",
+ bt->cache_info.is_dirty ? "True" : "False");
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Level:",
- bt->level);
+ "Level:",
+ bt->level);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of left sibling:",
- bt->left);
+ "Address of left sibling:",
+ bt->left);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of right sibling:",
- bt->right);
+ "Address of right sibling:",
+ bt->right);
HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth,
- "Number of children (max):",
- bt->nchildren, shared->two_k);
+ "Number of children (max):",
+ bt->nchildren, shared->two_k);
/*
* Print the child addresses
*/
for(u = 0; u < bt->nchildren; u++) {
- HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:", bt->child[u]);
+ HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
+ HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
- if(type->debug_key) {
+ if(type->debug_key) {
/* Decode the 'left' key & print it */
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
"Left Key:");
HDassert(H5B_NKEY(bt,shared,u));
- (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6),
- H5B_NKEY(bt, shared, u), udata);
+ (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6),
+ H5B_NKEY(bt, shared, u), udata);
/* Decode the 'right' key & print it */
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
"Right Key:");
HDassert(H5B_NKEY(bt, shared, u + 1));
- (void)(type->debug_key)(stream, indent + 6, MAX (0, fwidth - 6),
- H5B_NKEY(bt, shared, u + 1), udata);
- } /* end if */
+ (void)(type->debug_key)(stream, indent + 6, MAX (0, fwidth - 6),
+ H5B_NKEY(bt, shared, u + 1), udata);
+ } /* end if */
} /* end for */
done:
@@ -155,18 +155,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__assert
+ * Function: H5B__assert
*
- * Purpose: Verifies that the tree is structured correctly.
+ * Purpose: Verifies that the tree is structured correctly.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: aborts if something is wrong.
+ * Failure: aborts if something is wrong.
*
- * Programmer: Robb Matzke
- * Tuesday, November 4, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, November 4, 1997
*
*-------------------------------------------------------------------------
*/
@@ -174,32 +174,32 @@ done:
herr_t
H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
{
- H5B_t *bt = NULL;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- int ncell, cmp;
- static int ncalls = 0;
- herr_t status;
+ int ncell, cmp;
+ static int ncalls = 0;
+ herr_t status;
herr_t ret_value = SUCCEED; /* Return value */
/* A queue of child data */
struct child_t {
- haddr_t addr;
- unsigned level;
- struct child_t *next;
+ haddr_t addr;
+ unsigned level;
+ struct child_t *next;
} *head = NULL, *tail = NULL, *prev = NULL, *cur = NULL, *tmp = NULL;
FUNC_ENTER_PACKAGE
if(0 == ncalls++) {
- if(H5DEBUG(B))
- fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
+ if(H5DEBUG(B))
+ HDfprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
} /* end if */
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -228,60 +228,60 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
* test.
*/
for(ncell = 0; cur; ncell++) {
- bt = (H5B_t *)H5AC_protect(f, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG);
- HDassert(bt);
-
- /* Check node header */
- HDassert(bt->level == cur->level);
- if(cur->next && cur->next->level == bt->level)
- HDassert(H5F_addr_eq(bt->right, cur->next->addr));
- else
- HDassert(!H5F_addr_defined(bt->right));
- if(prev && prev->level == bt->level)
- HDassert(H5F_addr_eq(bt->left, prev->addr));
- else
- HDassert(!H5F_addr_defined(bt->left));
-
- if(cur->level > 0) {
+ bt = (H5B_t *)H5AC_protect(f, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG);
+ HDassert(bt);
+
+ /* Check node header */
+ HDassert(bt->level == cur->level);
+ if(cur->next && cur->next->level == bt->level)
+ HDassert(H5F_addr_eq(bt->right, cur->next->addr));
+ else
+ HDassert(!H5F_addr_defined(bt->right));
+ if(prev && prev->level == bt->level)
+ HDassert(H5F_addr_eq(bt->left, prev->addr));
+ else
+ HDassert(!H5F_addr_defined(bt->left));
+
+ if(cur->level > 0) {
unsigned u;
- for(u = 0; u < bt->nchildren; u++) {
- /*
- * Check that child nodes haven't already been seen. If they
- * have then the tree has a cycle.
- */
- for(tmp = head; tmp; tmp = tmp->next)
- HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
-
- /* Add the child node to the end of the queue */
- tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(tmp);
- tmp->addr = bt->child[u];
- tmp->level = bt->level - 1;
- tail->next = tmp;
- tail = tmp;
-
- /* Check that the keys are monotonically increasing */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
- HDassert(cmp < 0);
- } /* end for */
- } /* end if */
-
- /* Release node */
- status = H5AC_unprotect(f, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ for(u = 0; u < bt->nchildren; u++) {
+ /*
+ * Check that child nodes haven't already been seen. If they
+ * have then the tree has a cycle.
+ */
+ for(tmp = head; tmp; tmp = tmp->next)
+ HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
+
+ /* Add the child node to the end of the queue */
+ tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
+ HDassert(tmp);
+ tmp->addr = bt->child[u];
+ tmp->level = bt->level - 1;
+ tail->next = tmp;
+ tail = tmp;
+
+ /* Check that the keys are monotonically increasing */
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
+ HDassert(cmp < 0);
+ } /* end for */
+ } /* end if */
+
+ /* Release node */
+ status = H5AC_unprotect(f, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
+ HDassert(status >= 0);
bt = NULL; /* Make certain future references will be caught */
- /* Advance current location in queue */
- prev = cur;
- cur = cur->next;
+ /* Advance current location in queue */
+ prev = cur;
+ cur = cur->next;
} /* end for */
/* Free all entries from queue */
while(head) {
- tmp = head->next;
- H5MM_xfree(head);
- head = tmp;
+ tmp = head->next;
+ H5MM_xfree(head);
+ head = tmp;
} /* end while */
done:
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index ecaed62..3cae564 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -18,7 +18,7 @@
* Quincey Koziol
*
* Purpose: Functions in this file implement support for parallel I/O for
- * generic cache code.
+ * generic cache code.
*
*-------------------------------------------------------------------------
*/
@@ -28,20 +28,20 @@
/****************/
#include "H5Cmodule.h" /* This source code file is part of the H5C module */
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Cpkg.h" /* Cache */
+#include "H5Cpkg.h" /* Cache */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_PARALLEL
@@ -60,7 +60,7 @@
/* Local Prototypes */
/********************/
static herr_t H5C__collective_write(H5F_t *f);
-static herr_t H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES],
+static herr_t H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES],
unsigned entries_to_clear[H5C_RING_NTYPES]);
static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring,
unsigned entries_to_flush, unsigned entries_to_clear);
@@ -81,80 +81,80 @@ static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring,
/*******************/
-
+
/*-------------------------------------------------------------------------
* Function: H5C_apply_candidate_list
*
* Purpose: Apply the supplied candidate list.
*
- * We used to do this by simply having each process write
- * every mpi_size-th entry in the candidate list, starting
- * at index mpi_rank, and mark all the others clean.
+ * We used to do this by simply having each process write
+ * every mpi_size-th entry in the candidate list, starting
+ * at index mpi_rank, and mark all the others clean.
+ *
+ * However, this can cause unnecessary contention in a file
+ * system by increasing the number of processes writing to
+ * adjacent locations in the HDF5 file.
*
- * However, this can cause unnecessary contention in a file
- * system by increasing the number of processes writing to
- * adjacent locations in the HDF5 file.
+ * To attempt to minimize this, we now arange matters such
+ * that each process writes n adjacent entries in the
+ * candidate list, and marks all others clean. We must do
+ * this in such a fashion as to guarantee that each entry
+ * on the candidate list is written by exactly one process,
+ * and marked clean by all others.
*
- * To attempt to minimize this, we now arange matters such
- * that each process writes n adjacent entries in the
- * candidate list, and marks all others clean. We must do
- * this in such a fashion as to guarantee that each entry
- * on the candidate list is written by exactly one process,
- * and marked clean by all others.
+ * To do this, first construct a table mapping mpi_rank
+ * to the index of the first entry in the candidate list to
+ * be written by the process of that mpi_rank, and then use
+ * the table to control which entries are written and which
+ * are marked as clean as a function of the mpi_rank.
*
- * To do this, first construct a table mapping mpi_rank
- * to the index of the first entry in the candidate list to
- * be written by the process of that mpi_rank, and then use
- * the table to control which entries are written and which
- * are marked as clean as a function of the mpi_rank.
+ * Note that the table must be identical on all processes, as
+ * all see the same candidate list, mpi_size, and mpi_rank --
+ * the inputs used to construct the table.
*
- * Note that the table must be identical on all processes, as
- * all see the same candidate list, mpi_size, and mpi_rank --
- * the inputs used to construct the table.
+ * We construct the table as follows. Let:
*
- * We construct the table as follows. Let:
+ * n = num_candidates / mpi_size;
*
- * n = num_candidates / mpi_size;
+ * m = num_candidates % mpi_size;
*
- * m = num_candidates % mpi_size;
+ * Now allocate an array of integers of length mpi_size + 1,
+ * and call this array candidate_assignment_table.
*
- * Now allocate an array of integers of length mpi_size + 1,
- * and call this array candidate_assignment_table.
+ * Conceptually, if the number of candidates is a multiple
+ * of the mpi_size, we simply pass through the candidate list
+ * and assign n entries to each process to flush, with the
+ * index of the first entry to flush in the location in
+ * the candidate_assignment_table indicated by the mpi_rank
+ * of the process.
*
- * Conceptually, if the number of candidates is a multiple
- * of the mpi_size, we simply pass through the candidate list
- * and assign n entries to each process to flush, with the
- * index of the first entry to flush in the location in
- * the candidate_assignment_table indicated by the mpi_rank
- * of the process.
+ * In the more common case in which the candidate list isn't
+ * isn't a multiple of the mpi_size, we pretend it is, and
+ * give num_candidates % mpi_size processes one extra entry
+ * each to make things work out.
*
- * In the more common case in which the candidate list isn't
- * isn't a multiple of the mpi_size, we pretend it is, and
- * give num_candidates % mpi_size processes one extra entry
- * each to make things work out.
+ * Once the table is constructed, we determine the first and
+ * last entry this process is to flush as follows:
*
- * Once the table is constructed, we determine the first and
- * last entry this process is to flush as follows:
+ * first_entry_to_flush = candidate_assignment_table[mpi_rank]
*
- * first_entry_to_flush = candidate_assignment_table[mpi_rank]
+ * last_entry_to_flush =
+ * candidate_assignment_table[mpi_rank + 1] - 1;
*
- * last_entry_to_flush =
- * candidate_assignment_table[mpi_rank + 1] - 1;
- *
- * With these values determined, we simply scan through the
- * candidate list, marking all entries in the range
- * [first_entry_to_flush, last_entry_to_flush] for flush,
- * and all others to be cleaned.
+ * With these values determined, we simply scan through the
+ * candidate list, marking all entries in the range
+ * [first_entry_to_flush, last_entry_to_flush] for flush,
+ * and all others to be cleaned.
*
- * Finally, we scan the LRU from tail to head, flushing
- * or marking clean the candidate entries as indicated.
- * If necessary, we scan the pinned list as well.
+ * Finally, we scan the LRU from tail to head, flushing
+ * or marking clean the candidate entries as indicated.
+ * If necessary, we scan the pinned list as well.
*
- * Note that this function will fail if any protected or
- * clean entries appear on the candidate list.
+ * Note that this function will fail if any protected or
+ * clean entries appear on the candidate list.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -174,22 +174,22 @@ H5C_apply_candidate_list(H5F_t * f,
int mpi_size)
{
int i;
- int m;
- int n;
- unsigned first_entry_to_flush;
- unsigned last_entry_to_flush;
- unsigned total_entries_to_clear = 0;
- unsigned total_entries_to_flush = 0;
+ int m;
+ int n;
+ unsigned first_entry_to_flush;
+ unsigned last_entry_to_flush;
+ unsigned total_entries_to_clear = 0;
+ unsigned total_entries_to_flush = 0;
int * candidate_assignment_table = NULL;
unsigned entries_to_flush[H5C_RING_NTYPES];
unsigned entries_to_clear[H5C_RING_NTYPES];
- haddr_t addr;
- H5C_cache_entry_t * entry_ptr = NULL;
+ haddr_t addr;
+ H5C_cache_entry_t * entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- haddr_t last_addr;
+ haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- char tbl_buf[1024];
+ char tbl_buf[1024];
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -214,10 +214,10 @@ H5C_apply_candidate_list(H5F_t * f,
HDmemset(tbl_buf, 0, sizeof(tbl_buf));
- sprintf(&(tbl_buf[0]), "candidate list = ");
+ HDsprintf(&(tbl_buf[0]), "candidate list = ");
for(u = 0; u < num_candidates; u++)
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
@@ -245,7 +245,7 @@ H5C_apply_candidate_list(H5F_t * f,
for(i = 1; i < mpi_size; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n;
} /* end if */
- else {
+ else {
for(i = 1; i <= m; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n + 1;
@@ -280,13 +280,13 @@ H5C_apply_candidate_list(H5F_t * f,
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
for ( i = 0; i < 1024; i++ )
tbl_buf[i] = '\0';
- sprintf(&(tbl_buf[0]), "candidate assignment table = ");
+ HDsprintf(&(tbl_buf[0]), "candidate assignment table = ");
for(i = 0; i <= mpi_size; i++)
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]);
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]);
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
- HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n",
+ HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n",
FUNC, mpi_rank, first_entry_to_flush, last_entry_to_flush);
HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank);
@@ -315,7 +315,7 @@ H5C_apply_candidate_list(H5F_t * f,
if(entry_ptr->is_protected)
/* For now at least, we can't deal with protected entries.
* If we encounter one, scream and die. If it becomes an
- * issue, we should be able to work around this.
+ * issue, we should be able to work around this.
*/
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?")
@@ -327,9 +327,9 @@ H5C_apply_candidate_list(H5F_t * f,
HDassert(!entry_ptr->clear_on_unprotect);
/* Determine whether the entry is to be cleared or flushed,
- * and mark it accordingly. We will scan the protected and
+ * and mark it accordingly. We will scan the protected and
* pinned list shortly, and clear or flush according to these
- * markings.
+ * markings.
*/
if(u >= first_entry_to_flush && u <= last_entry_to_flush) {
total_entries_to_flush++;
@@ -346,7 +346,7 @@ H5C_apply_candidate_list(H5F_t * f,
* candidate list to clear from the cache have to be
* removed from the coll list. This is OK since the
* candidate list is collective and uniform across all
- * ranks.
+ * ranks.
*/
if(entry_ptr->coll_access) {
entry_ptr->coll_access = FALSE;
@@ -367,14 +367,14 @@ H5C_apply_candidate_list(H5F_t * f,
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n",
+ HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n",
FUNC, mpi_rank, num_candidates, total_entries_to_clear,
total_entries_to_flush);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- /* We have now marked all the entries on the candidate list for
+ /* We have now marked all the entries on the candidate list for
* either flush or clear -- now scan the LRU and the pinned list
- * for these entries and do the deed. Do this via a call to
+ * for these entries and do the deed. Do this via a call to
* H5C__flush_candidate_entries().
*
* Note that we are doing things in this round about manner so as
@@ -407,15 +407,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_apply_candidate_list() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_construct_candidate_list__clean_cache
*
- * Purpose: Construct the list of entries that should be flushed to
- * clean all entries in the cache.
+ * Purpose: Construct the list of entries that should be flushed to
+ * clean all entries in the cache.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -447,21 +447,21 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
* point, it is possible that some dirty entries may reside on the
* pinned list at this point.
*/
- HDassert( cache_ptr->slist_size <=
+ HDassert( cache_ptr->slist_size <=
(cache_ptr->dLRU_list_size + cache_ptr->pel_size) );
- HDassert( cache_ptr->slist_len <=
+ HDassert( cache_ptr->slist_len <=
(cache_ptr->dLRU_list_len + cache_ptr->pel_len) );
if(space_needed > 0) { /* we have work to do */
H5C_cache_entry_t *entry_ptr;
unsigned nominated_entries_count = 0;
size_t nominated_entries_size = 0;
- haddr_t nominated_addr;
+ haddr_t nominated_addr;
HDassert( cache_ptr->slist_len > 0 );
/* Scan the dirty LRU list from tail forward and nominate sufficient
- * entries to free up the necessary space.
+ * entries to free up the necessary space.
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
while((nominated_entries_size < space_needed) &&
@@ -483,7 +483,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
} /* end while */
HDassert( entry_ptr == NULL );
- /* it is possible that there are some dirty entries on the
+ /* it is possible that there are some dirty entries on the
* protected entry list as well -- scan it too if necessary
*/
entry_ptr = cache_ptr->pel_head_ptr;
@@ -516,15 +516,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_construct_candidate_list__clean_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_construct_candidate_list__min_clean
*
- * Purpose: Construct the list of entries that should be flushed to
- * get the cache back within its min clean constraints.
+ * Purpose: Construct the list of entries that should be flushed to
+ * get the cache back within its min clean constraints.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -546,7 +546,7 @@ H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- /* compute the number of bytes (if any) that must be flushed to get the
+ /* compute the number of bytes (if any) that must be flushed to get the
* cache back within its min clean constraints.
*/
if(cache_ptr->max_cache_size > cache_ptr->index_size) {
@@ -574,14 +574,14 @@ H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
HDassert( cache_ptr->slist_len > 0 );
/* Scan the dirty LRU list from tail forward and nominate sufficient
- * entries to free up the necessary space.
+ * entries to free up the necessary space.
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
while((nominated_entries_size < space_needed) &&
(nominated_entries_count < cache_ptr->slist_len) &&
(entry_ptr != NULL) &&
(!entry_ptr->flush_me_last)) {
- haddr_t nominated_addr;
+ haddr_t nominated_addr;
HDassert( ! (entry_ptr->is_protected) );
HDassert( ! (entry_ptr->is_read_only) );
@@ -605,30 +605,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_construct_candidate_list__min_clean() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_mark_entries_as_clean
*
* Purpose: When the H5C code is used to implement the metadata caches
- * in PHDF5, only the cache with MPI_rank 0 is allowed to
- * actually write entries to disk -- all other caches must
- * retain dirty entries until they are advised that the
- * entries are clean.
+ * in PHDF5, only the cache with MPI_rank 0 is allowed to
+ * actually write entries to disk -- all other caches must
+ * retain dirty entries until they are advised that the
+ * entries are clean.
*
- * This function exists to allow the H5C code to receive these
- * notifications.
+ * This function exists to allow the H5C code to receive these
+ * notifications.
*
- * The function receives a list of entry base addresses
- * which must refer to dirty entries in the cache. If any
- * of the entries are either clean or don't exist, the
- * function flags an error.
+ * The function receives a list of entry base addresses
+ * which must refer to dirty entries in the cache. If any
+ * of the entries are either clean or don't exist, the
+ * function flags an error.
*
- * The function scans the list of entries and flushes all
- * those that are currently unprotected with the
- * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently
- * protected are flagged for clearing when they are
- * unprotected.
+ * The function scans the list of entries and flushes all
+ * those that are currently unprotected with the
+ * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently
+ * protected are flagged for clearing when they are
+ * unprotected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -643,22 +643,22 @@ H5C_mark_entries_as_clean(H5F_t * f,
haddr_t * ce_array_ptr)
{
H5C_t * cache_ptr;
- unsigned entries_cleared;
+ unsigned entries_cleared;
unsigned pinned_entries_cleared;
hbool_t progress;
- unsigned entries_examined;
- unsigned initial_list_len;
- haddr_t addr;
- unsigned pinned_entries_marked = 0;
+ unsigned entries_examined;
+ unsigned initial_list_len;
+ haddr_t addr;
+ unsigned pinned_entries_marked = 0;
#if H5C_DO_SANITY_CHECKS
- unsigned protected_entries_marked = 0;
- unsigned other_entries_marked = 0;
- haddr_t last_addr;
+ unsigned protected_entries_marked = 0;
+ unsigned other_entries_marked = 0;
+ haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_cache_entry_t * clear_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_cache_entry_t * clear_ptr = NULL;
+ H5C_cache_entry_t * entry_ptr = NULL;
unsigned u;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -705,7 +705,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
if(entry_ptr == NULL) {
#if H5C_DO_SANITY_CHECKS
- HDfprintf(stdout,
+ HDfprintf(stdout,
"H5C_mark_entries_as_clean: entry[%u] = %a not in cache.\n",
u,
addr);
@@ -714,7 +714,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
} /* end if */
else if(!entry_ptr->is_dirty) {
#if H5C_DO_SANITY_CHECKS
- HDfprintf(stdout,
+ HDfprintf(stdout,
"H5C_mark_entries_as_clean: entry %a is not dirty!?!\n",
addr);
#endif /* H5C_DO_SANITY_CHECKS */
@@ -734,13 +734,13 @@ H5C_mark_entries_as_clean(H5F_t * f,
} /* end if */
entry_ptr->clear_on_unprotect = TRUE;
- if(entry_ptr->is_pinned)
- pinned_entries_marked++;
+ if(entry_ptr->is_pinned)
+ pinned_entries_marked++;
#if H5C_DO_SANITY_CHECKS
- else if(entry_ptr->is_protected)
- protected_entries_marked++;
- else
- other_entries_marked++;
+ else if(entry_ptr->is_protected)
+ protected_entries_marked++;
+ else
+ other_entries_marked++;
#endif /* H5C_DO_SANITY_CHECKS */
}
}
@@ -750,25 +750,25 @@ H5C_mark_entries_as_clean(H5F_t * f,
* any protected entries will not be on the LRU, and therefore
* will not be flushed at this time.
*
- * Note that unlike H5C_apply_candidate_list(),
- * H5C_mark_entries_as_clean() makes all its calls to
- * H5C__flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG
- * set. As a result, the pre_serialize() and serialize calls are
+ * Note that unlike H5C_apply_candidate_list(),
+ * H5C_mark_entries_as_clean() makes all its calls to
+ * H5C__flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG
+ * set. As a result, the pre_serialize() and serialize calls are
* not made.
*
- * This then implies that (assuming such actions were
- * permitted in the parallel case) no loads, dirties,
- * resizes, or removals of other entries can occur as
+ * This then implies that (assuming such actions were
+ * permitted in the parallel case) no loads, dirties,
+ * resizes, or removals of other entries can occur as
* a side effect of the flush. Hence, there is no need
- * for the checks for entry removal / status change
+ * for the checks for entry removal / status change
* that I ported to H5C_apply_candidate_list().
*
* However, if (in addition to allowing such operations
* in the parallel case), we allow such operations outside
- * of the pre_serialize / serialize routines, this may
- * cease to be the case -- requiring a review of this
+ * of the pre_serialize / serialize routines, this may
+ * cease to be the case -- requiring a review of this
* point.
- * JRM -- 4/7/15
+ * JRM -- 4/7/15
*/
entries_cleared = 0;
entries_examined = 0;
@@ -812,7 +812,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
pinned_entries_cleared++;
progress = TRUE;
- if(H5C__flush_single_entry(f, clear_ptr,
+ if(H5C__flush_single_entry(f, clear_ptr,
(H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__GENERATE_IMAGE_FLAG | H5C__UPDATE_PAGE_BUFFER_FLAG)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry")
} /* end if */
@@ -854,12 +854,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entries_as_clean() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_clear_coll_entries
*
- * Purpose: Clear half or the entire list of collective entries and
+ * Purpose: Clear half or the entire list of collective entries and
* mark them as independent.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
@@ -871,9 +871,9 @@ done:
*/
herr_t
H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
-{
- uint32_t clear_cnt;
- H5C_cache_entry_t * entry_ptr = NULL;
+{
+ uint32_t clear_cnt;
+ H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -901,7 +901,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_clear_coll_entries */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__collective_write
@@ -1041,8 +1041,8 @@ H5C__collective_write(H5F_t *f)
info = *info_p;
- /* just to match up with the 1st MPI_File_set_view from
- * H5FD_mpio_write()
+ /* just to match up with the 1st MPI_File_set_view from
+ * H5FD_mpio_write()
*/
if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
@@ -1052,8 +1052,8 @@ H5C__collective_write(H5F_t *f)
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(mpi_fh, (MPI_Offset)0, NULL, 0, MPI_BYTE, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code)
- /* just to match up with the 2nd MPI_File_set_view (reset) in
- * H5FD_mpio_write()
+ /* just to match up with the 2nd MPI_File_set_view (reset) in
+ * H5FD_mpio_write()
*/
if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
@@ -1079,11 +1079,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5C__collective_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_candidate_entries
*
- * Purpose: Flush or clear (as indicated) the candidate entries that
+ * Purpose: Flush or clear (as indicated) the candidate entries that
* have been marked in the metadata cache. In so doing,
* observe rings and flush dependencies.
*
@@ -1112,9 +1112,9 @@ done:
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer
- * 2/10/17
+ * 2/10/17
*
- * Changes: None.
+ * Changes: None.
*
*-------------------------------------------------------------------------
*/
@@ -1123,17 +1123,17 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
unsigned entries_to_clear[H5C_RING_NTYPES])
{
#if H5C_DO_SANITY_CHECKS
- int i;
- uint32_t index_len = 0;
- size_t index_size = (size_t)0;
- size_t clean_index_size = (size_t)0;
- size_t dirty_index_size = (size_t)0;
- size_t slist_size = (size_t)0;
- uint32_t slist_len = 0;
+ int i;
+ uint32_t index_len = 0;
+ size_t index_size = (size_t)0;
+ size_t clean_index_size = (size_t)0;
+ size_t dirty_index_size = (size_t)0;
+ size_t slist_size = (size_t)0;
+ uint32_t slist_len = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_ring_t ring;
+ H5C_ring_t ring;
H5C_t * cache_ptr;
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -1163,7 +1163,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
clean_index_size += cache_ptr->clean_index_ring_size[i];
dirty_index_size += cache_ptr->dirty_index_ring_size[i];
- slist_len += cache_ptr->slist_ring_len[i];
+ slist_len += cache_ptr->slist_ring_len[i];
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
@@ -1201,11 +1201,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_candidate_entries() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_candidates_in_ring
*
- * Purpose: Flush or clear (as indicated) the candidate entries
+ * Purpose: Flush or clear (as indicated) the candidate entries
* contained in the specified cache and ring. All candidate
* entries in rings outside the specified ring must have been
* flushed (or cleared) on entry.
@@ -1234,7 +1234,7 @@ done:
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer
- * 2/10/17
+ * 2/10/17
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index d24c6d4..5a5f35c 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -11,31 +11,31 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Thursday, April 24, 2008
- *
- * Purpose: Abstract indexed (chunked) I/O functions. The logical
- * multi-dimensional dataspace is regularly partitioned into
- * same-sized "chunks", the first of which is aligned with the
- * logical origin. The chunks are indexed by different methods,
- * that map a chunk index to disk address. Each chunk can be
+/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Thursday, April 24, 2008
+ *
+ * Purpose: Abstract indexed (chunked) I/O functions. The logical
+ * multi-dimensional dataspace is regularly partitioned into
+ * same-sized "chunks", the first of which is aligned with the
+ * logical origin. The chunks are indexed by different methods,
+ * that map a chunk index to disk address. Each chunk can be
* compressed independently and the chunks may move around in the
* file as their storage requirements change.
*
- * Cache: Disk I/O is performed in units of chunks and H5MF_alloc()
- * contains code to optionally align chunks on disk block
- * boundaries for performance.
- *
- * The chunk cache is an extendible hash indexed by a function
- * of storage B-tree address and chunk N-dimensional offset
- * within the dataset. Collisions are not resolved -- one of
- * the two chunks competing for the hash slot must be preempted
- * from the cache. All entries in the hash also participate in
- * a doubly-linked list and entries are penalized by moving them
- * toward the front of the list. When a new chunk is about to
- * be added to the cache the heap is pruned by preempting
- * entries near the front of the list to make room for the new
- * entry which is added to the end of the list.
+ * Cache: Disk I/O is performed in units of chunks and H5MF_alloc()
+ * contains code to optionally align chunks on disk block
+ * boundaries for performance.
+ *
+ * The chunk cache is an extendible hash indexed by a function
+ * of storage B-tree address and chunk N-dimensional offset
+ * within the dataset. Collisions are not resolved -- one of
+ * the two chunks competing for the hash slot must be preempted
+ * from the cache. All entries in the hash also participate in
+ * a doubly-linked list and entries are penalized by moving them
+ * toward the front of the list. When a new chunk is about to
+ * be added to the cache the heap is pruned by preempting
+ * entries near the front of the list to make room for the new
+ * entry which is added to the end of the list.
*/
/****************/
@@ -48,19 +48,19 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#ifdef H5_HAVE_PARALLEL
-#include "H5ACprivate.h" /* Metadata cache */
+#include "H5ACprivate.h" /* Metadata cache */
#endif /* H5_HAVE_PARALLEL */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File functions */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File functions */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vector and array functions */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
@@ -83,26 +83,26 @@
/*
* Feature: If this constant is defined then every cache preemption and load
- * causes a character to be printed on the standard error stream:
+ * causes a character to be printed on the standard error stream:
*
* `.': Entry was preempted because it has been completely read or
- * completely written but not partially read and not partially
- * written. This is often a good reason for preemption because such
- * a chunk will be unlikely to be referenced in the near future.
+ * completely written but not partially read and not partially
+ * written. This is often a good reason for preemption because such
+ * a chunk will be unlikely to be referenced in the near future.
*
* `:': Entry was preempted because it hasn't been used recently.
*
* `#': Entry was preempted because another chunk collided with it. This
- * is usually a relatively bad thing. If there are too many of
- * these then the number of entries in the cache can be increased.
+ * is usually a relatively bad thing. If there are too many of
+ * these then the number of entries in the cache can be increased.
*
* c: Entry was preempted because the file is closing.
*
- * w: A chunk read operation was eliminated because the library is
- * about to write new values to the entire chunk. This is a good
- * thing, especially on files where the chunk size is the same as
- * the disk block size, chunks are aligned on disk block boundaries,
- * and the operating system can also eliminate a read operation.
+ * w: A chunk read operation was eliminated because the library is
+ * about to write new values to the entire chunk. This is a good
+ * thing, especially on files where the chunk size is the same as
+ * the disk block size, chunks are aligned on disk block boundaries,
+ * and the operating system can also eliminate a read operation.
*/
/*#define H5D_CHUNK_DEBUG */
@@ -119,19 +119,19 @@
/* Raw data chunks are cached. Each entry in the cache is: */
typedef struct H5D_rdcc_ent_t {
- hbool_t locked; /*entry is locked in cache */
- hbool_t dirty; /*needs to be written to disk? */
- hbool_t deleted; /*chunk about to be deleted */
+ hbool_t locked; /*entry is locked in cache */
+ hbool_t dirty; /*needs to be written to disk? */
+ hbool_t deleted; /*chunk about to be deleted */
unsigned edge_chunk_state; /*states related to edge chunks (see above) */
- hsize_t scaled[H5O_LAYOUT_NDIMS]; /*scaled chunk 'name' (coordinates) */
- uint32_t rd_count; /*bytes remaining to be read */
- uint32_t wr_count; /*bytes remaining to be written */
+ hsize_t scaled[H5O_LAYOUT_NDIMS]; /*scaled chunk 'name' (coordinates) */
+ uint32_t rd_count; /*bytes remaining to be read */
+ uint32_t wr_count; /*bytes remaining to be written */
H5F_block_t chunk_block; /*offset/length of chunk in file */
- hsize_t chunk_idx; /*index of chunk in dataset */
- uint8_t *chunk; /*the unfiltered chunk data */
- unsigned idx; /*index in hash table */
- struct H5D_rdcc_ent_t *next;/*next item in doubly-linked list */
- struct H5D_rdcc_ent_t *prev;/*previous item in doubly-linked list */
+ hsize_t chunk_idx; /*index of chunk in dataset */
+ uint8_t *chunk; /*the unfiltered chunk data */
+ unsigned idx; /*index in hash table */
+ struct H5D_rdcc_ent_t *next;/*next item in doubly-linked list */
+ struct H5D_rdcc_ent_t *prev;/*previous item in doubly-linked list */
struct H5D_rdcc_ent_t *tmp_next;/*next item in temporary doubly-linked list */
struct H5D_rdcc_ent_t *tmp_prev;/*previous item in temporary doubly-linked list */
} H5D_rdcc_ent_t;
@@ -142,7 +142,7 @@ typedef struct H5D_chunk_it_ud1_t {
H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
const H5D_chk_idx_info_t *idx_info; /* Chunked index info */
const H5D_io_info_t *io_info; /* I/O info for dataset operation */
- const hsize_t *space_dim; /* New dataset dimensions */
+ const hsize_t *space_dim; /* New dataset dimensions */
const hbool_t *shrunk_dim; /* Dimensions which have been shrunk */
H5S_t *chunk_space; /* Dataspace for a chunk */
uint32_t elmts_per_chunk;/* Elements in chunk */
@@ -192,12 +192,12 @@ typedef struct H5D_chunk_it_ud3_t {
/* needed for getting raw data from chunk cache */
hbool_t chunk_in_cache;
- uint8_t *chunk; /* the unfiltered chunk data */
+ uint8_t *chunk; /* the unfiltered chunk data */
} H5D_chunk_it_ud3_t;
/* Callback info for iteration to dump index */
typedef struct H5D_chunk_it_ud4_t {
- FILE *stream; /* Output stream */
+ FILE *stream; /* Output stream */
hbool_t header_displayed; /* Node's header is displayed? */
unsigned ndims; /* Number of dimensions for chunk/dataset */
uint32_t *chunk_dim; /* Chunk dimensions */
@@ -207,7 +207,7 @@ typedef struct H5D_chunk_it_ud4_t {
typedef struct H5D_chunk_it_ud5_t {
H5D_chk_idx_info_t *new_idx_info; /* Dest. chunk index info object */
unsigned dset_ndims; /* Number of dimensions in dataset */
- hsize_t *dset_dims; /* Dataset dimensions */
+ hsize_t *dset_dims; /* Dataset dimensions */
} H5D_chunk_it_ud5_t;
/* Callback info for nonexistent readvv operation */
@@ -315,7 +315,7 @@ static herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info,
static herr_t H5D__chunk_cache_prune(const H5D_t *dset, size_t size);
static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk);
#ifdef H5_HAVE_PARALLEL
-static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
+static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf);
#endif /* H5_HAVE_PARALLEL */
@@ -386,15 +386,15 @@ H5FL_BLK_DEFINE_STATIC(chunk);
/* Declare extern free list to manage the H5S_sel_iter_t struct */
H5FL_EXTERN(H5S_sel_iter_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_direct_write
+ * Function: H5D__chunk_direct_write
*
- * Purpose: Internal routine to write a chunk directly into the file.
+ * Purpose: Internal routine to write a chunk directly into the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 30 July 2012
*
*-------------------------------------------------------------------------
@@ -434,7 +434,7 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set the file block information for the old chunk */
@@ -476,7 +476,7 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset,
/* Evict the (old) entry from the cache if present, but do not flush
* it to disk */
if(UINT_MAX != udata.idx_hint) {
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
if(H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
@@ -499,7 +499,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_direct_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_direct_read
*
@@ -588,7 +588,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t* filters,
/* Read the chunk data into the supplied buffer */
if(H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, udata.chunk_block.offset, udata.chunk_block.length, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
-
+
/* Return the filter mask */
*filters = udata.filter_mask;
@@ -596,7 +596,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_direct_read() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_storage_size
*
@@ -694,15 +694,15 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5D__get_chunk_storage_size */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_set_info_real
+ * Function: H5D__chunk_set_info_real
*
- * Purpose: Internal routine to set the information about chunks for a dataset
+ * Purpose: Internal routine to set the information about chunks for a dataset
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 30, 2009
*
*-------------------------------------------------------------------------
@@ -748,15 +748,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_info_real() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_set_info
+ * Function: H5D__chunk_set_info
*
- * Purpose: Sets the information about chunks for a dataset
+ * Purpose: Sets the information about chunks for a dataset
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 30, 2009
*
*-------------------------------------------------------------------------
@@ -773,7 +773,7 @@ H5D__chunk_set_info(const H5D_t *dset)
/* Set the base layout information */
if(H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, dset->shared->ndims, dset->shared->curr_dims, dset->shared->max_dims) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
/* Call the index's "resize" callback */
if(dset->shared->layout.storage.u.chunk.ops->resize && (dset->shared->layout.storage.u.chunk.ops->resize)(&dset->shared->layout.u.chunk) < 0)
@@ -783,15 +783,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_set_sizes
+ * Function: H5D__chunk_set_sizes
*
* Purpose: Sets chunk and type sizes.
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
+ * Programmer: Dana Robinson
* December 2015
*
*-------------------------------------------------------------------------
@@ -846,15 +846,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_sizes */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_construct
+ * Function: H5D__chunk_construct
*
- * Purpose: Constructs new chunked layout information for dataset
+ * Purpose: Constructs new chunked layout information for dataset
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, May 22, 2008
*
*-------------------------------------------------------------------------
@@ -909,16 +909,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_construct() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_init
+ * Function: H5D__chunk_init
*
- * Purpose: Initialize the raw data chunk cache for a dataset. This is
- * called when the dataset is initialized.
+ * Purpose: Initialize the raw data chunk cache for a dataset. This is
+ * called when the dataset is initialized.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, May 18, 1998
*
*-------------------------------------------------------------------------
@@ -927,7 +927,7 @@ static herr_t
H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
H5P_genplist_t *dapl; /* Data access property list object pointer */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -1004,7 +1004,7 @@ H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
/* Allocate any indexing structures */
if(dset->shared->layout.storage.u.chunk.ops->init && (dset->shared->layout.storage.u.chunk.ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
/* Set the number of chunks in dataset, etc. */
if(H5D__chunk_set_info(dset) < 0)
@@ -1014,15 +1014,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_is_space_alloc
+ * Function: H5D__chunk_is_space_alloc
*
- * Purpose: Query if space is allocated for layout
+ * Purpose: Query if space is allocated for layout
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 15, 2009
*
*-------------------------------------------------------------------------
@@ -1045,7 +1045,7 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_is_space_alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_is_data_cached
*
@@ -1069,15 +1069,15 @@ H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_LEAVE_NOAPI(shared_dset->cache.chunk.nused > 0)
} /* end H5D__chunk_is_data_cached() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_io_init
+ * Function: H5D__chunk_io_init
*
- * Purpose: Performs initialization before any sort of I/O on the raw data
+ * Purpose: Performs initialization before any sort of I/O on the raw data
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2008
*
*-------------------------------------------------------------------------
@@ -1099,7 +1099,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
H5SL_node_t *curr_node; /* Current node in skip list */
char bogus; /* "bogus" buffer to pass to selection iterator */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1307,7 +1307,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid")
if(H5S_select_iter_init(&(fm->mem_iter), mem_space, elmt_size) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
- iter_init = TRUE; /* Selection iteration info has been initialized */
+ iter_init = TRUE; /* Selection iteration info has been initialized */
iter_op.op_type = H5S_SEL_ITER_OP_LIB;
iter_op.u.lib_op = H5D__chunk_mem_cb;
@@ -1367,17 +1367,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_io_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_mem_alloc
+ * Function: H5D__chunk_mem_alloc
*
- * Purpose: Allocate space for a chunk in memory. This routine allocates
+ * Purpose: Allocate space for a chunk in memory. This routine allocates
* memory space for non-filtered chunks from a block free list
* and uses malloc()/free() for filtered chunks.
*
- * Return: Pointer to memory for chunk on success/NULL on failure
+ * Return: Pointer to memory for chunk on success/NULL on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* April 22, 2004
*
*-------------------------------------------------------------------------
@@ -1385,7 +1385,7 @@ done:
static void *
H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
{
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1399,17 +1399,17 @@ H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_mem_alloc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_mem_xfree
+ * Function: H5D__chunk_mem_xfree
*
- * Purpose: Free space for a chunk in memory. This routine allocates
+ * Purpose: Free space for a chunk in memory. This routine allocates
* memory space for non-filtered chunks from a block free list
* and uses malloc()/free() for filtered chunks.
*
- * Return: NULL (never fails)
+ * Return: NULL (never fails)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* April 22, 2004
*
*-------------------------------------------------------------------------
@@ -1429,7 +1429,7 @@ H5D__chunk_mem_xfree(void *chk, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(NULL)
} /* H5D__chunk_mem_xfree() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_mem_realloc
*
@@ -1462,7 +1462,7 @@ H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_mem_realloc() */
-
+
/*--------------------------------------------------------------------------
NAME
H5D__free_chunk_info
@@ -1505,16 +1505,16 @@ H5D__free_chunk_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
FUNC_LEAVE_NOAPI(0)
} /* H5D__free_chunk_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__create_chunk_map_single
+ * Function: H5D__create_chunk_map_single
*
- * Purpose: Create chunk selections when appending a single record
+ * Purpose: Create chunk selections when appending a single record
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Tuesday, November 20, 2007
+ * Programmer: Quincey Koziol
+ * Tuesday, November 20, 2007
*
*-------------------------------------------------------------------------
*/
@@ -1530,7 +1530,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
hsize_t sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1589,16 +1589,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_map_single() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__create_chunk_file_map_hyper
+ * Function: H5D__create_chunk_file_map_hyper
*
- * Purpose: Create all chunk selections in file.
+ * Purpose: Create all chunk selections in file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, May 29, 2003
+ * Programmer: Quincey Koziol
+ * Thursday, May 29, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1617,10 +1617,10 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
hsize_t end[H5O_LAYOUT_NDIMS]; /* Final coordinates of chunk */
hsize_t chunk_index; /* Index of chunk */
hsize_t start_scaled[H5S_MAX_RANK]; /* Starting scaled coordinates of selection */
- hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
+ hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
int curr_dim; /* Current dimension to increment */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1709,11 +1709,11 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
new_chunk_info->mspace_shared = FALSE;
/* Copy the chunk's scaled coordinates */
- HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
+ HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
new_chunk_info->scaled[fm->f_ndims] = 0;
/* Copy the chunk's scaled coordinates */
- HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
+ HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
/* Insert the new chunk into the skip list */
if(H5SL_insert(fm->sel_chunks, new_chunk_info, &new_chunk_info->index) < 0) {
@@ -1772,18 +1772,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_file_map_hyper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__create_chunk_mem_map_hyper
+ * Function: H5D__create_chunk_mem_map_hyper
*
- * Purpose: Create all chunk selections in memory by copying the file
+ * Purpose: Create all chunk selections in memory by copying the file
* chunk selections and adjusting their offsets to be correct
* for the memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, May 29, 2003
+ * Programmer: Quincey Koziol
+ * Thursday, May 29, 2003
*
* Assumptions: That the file and memory selections are the same shape.
*
@@ -1800,7 +1800,7 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
hssize_t adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to all file chunks */
hssize_t chunk_adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to a particular chunk */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1890,17 +1890,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_mem_map_hyper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_file_cb
+ * Function: H5D__chunk_file_cb
*
- * Purpose: Callback routine for file selection iterator. Used when
+ * Purpose: Callback routine for file selection iterator. Used when
* creating selections in file for each point selected.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, July 23, 2003
+ * Programmer: Quincey Koziol
+ * Wednesday, July 23, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1912,9 +1912,9 @@ H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
hsize_t coords_in_chunk[H5O_LAYOUT_NDIMS]; /* Coordinates of element in chunk */
hsize_t chunk_index; /* Chunk index */
- hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
+ hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2007,17 +2007,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_file_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_mem_cb
+ * Function: H5D__chunk_mem_cb
*
- * Purpose: Callback routine for file selection iterator. Used when
+ * Purpose: Callback routine for file selection iterator. Used when
* creating selections in memory for each chunk.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Thursday, April 10, 2003
+ * Programmer: Raymond Lu
+ * Thursday, April 10, 2003
*
*-------------------------------------------------------------------------
*/
@@ -2028,7 +2028,7 @@ H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u
H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
hsize_t coords_in_mem[H5O_LAYOUT_NDIMS]; /* Coordinates of element in memory */
hsize_t chunk_index; /* Chunk index */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2084,17 +2084,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_mem_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cacheable
+ * Function: H5D__chunk_cacheable
*
- * Purpose: A small internal function to if it's possible to load the
+ * Purpose: A small internal function to if it's possible to load the
* chunk into cache.
*
- * Return: TRUE or FALSE
+ * Return: TRUE or FALSE
*
- * Programmer: Raymond Lu
- * 17 July 2007
+ * Programmer: Raymond Lu
+ * 17 July 2007
*
*-------------------------------------------------------------------------
*/
@@ -2176,16 +2176,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cacheable() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_read
+ * Function: H5D__chunk_read
*
- * Purpose: Read from a chunked dataset.
+ * Purpose: Read from a chunked dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Thursday, April 10, 2003
+ * Programmer: Raymond Lu
+ * Thursday, April 10, 2003
*
*-------------------------------------------------------------------------
*/
@@ -2203,7 +2203,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
uint32_t src_accessed_bytes = 0; /* Total accessed size in a chunk */
hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
@@ -2255,7 +2255,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
chunk_node = H5D_CHUNK_GET_FIRST_NODE(fm);
while(chunk_node) {
H5D_chunk_info_t *chunk_info; /* Chunk information */
- H5D_chunk_ud_t udata; /* Chunk index pass-through */
+ H5D_chunk_ud_t udata; /* Chunk index pass-through */
/* Get the actual chunk information from the skip list node */
chunk_info = H5D_CHUNK_GET_NODE_INFO(fm, chunk_node);
@@ -2265,7 +2265,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check for non-existant chunk & skip it if appropriate */
@@ -2328,16 +2328,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_read() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_write
+ * Function: H5D__chunk_write
*
- * Purpose: Writes to a chunked dataset.
+ * Purpose: Writes to a chunked dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Thursday, April 10, 2003
+ * Programmer: Raymond Lu
+ * Thursday, April 10, 2003
*
*-------------------------------------------------------------------------
*/
@@ -2353,7 +2353,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2383,10 +2383,10 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
chunk_node = H5D_CHUNK_GET_FIRST_NODE(fm);
while(chunk_node) {
H5D_chunk_info_t *chunk_info; /* Chunk information */
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */
void *chunk; /* Pointer to locked chunk buffer */
- H5D_chunk_ud_t udata; /* Index pass-through */
+ H5D_chunk_ud_t udata; /* Index pass-through */
htri_t cacheable; /* Whether the chunk is cacheable */
hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
@@ -2398,11 +2398,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
- /* Set chunk's [scaled] coordinates */
- io_info->store->chunk.scaled = chunk_info->scaled;
+ /* Set chunk's [scaled] coordinates */
+ io_info->store->chunk.scaled = chunk_info->scaled;
/* Determine if we should use the chunk cache */
if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, TRUE)) < 0)
@@ -2419,7 +2419,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Determine if we will access all the data in the chunk */
if(dst_accessed_bytes != ctg_store.contig.dset_size ||
(chunk_info->chunk_points * type_info->src_type_size) != ctg_store.contig.dset_size ||
- fm->fsel_type == H5S_SEL_POINTS)
+ fm->fsel_type == H5S_SEL_POINTS)
entire_chunk = FALSE;
/* Lock the chunk into the cache */
@@ -2445,8 +2445,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
udata.chunk_block.length = io_info->dset->shared->layout.u.chunk.size;
/* Allocate the chunk */
- if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
+ if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Make sure the address of the chunk is returned. */
if(!H5F_addr_defined(udata.chunk_block.offset))
@@ -2471,16 +2471,16 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
(hsize_t)chunk_info->chunk_points, chunk_info->fspace, chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed")
- /* Release the cache lock on the chunk, or insert chunk into index. */
- if(chunk) {
- if(H5D__chunk_unlock(io_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
- } /* end if */
- else {
+ /* Release the cache lock on the chunk, or insert chunk into index. */
+ if(chunk) {
+ if(H5D__chunk_unlock(io_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
+ } /* end if */
+ else {
if(need_insert && io_info->dset->shared->layout.storage.u.chunk.ops->insert)
if((io_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
- } /* end else */
+ } /* end else */
/* Advance to next chunk in list */
chunk_node = H5D_CHUNK_GET_NEXT_NODE(fm, chunk_node);
@@ -2490,16 +2490,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_flush
+ * Function: H5D__chunk_flush
*
- * Purpose: Writes all dirty chunks to disk and optionally preempts them
- * from the cache.
+ * Purpose: Writes all dirty chunks to disk and optionally preempts them
+ * from the cache.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -2508,8 +2508,8 @@ static herr_t
H5D__chunk_flush(H5D_t *dset)
{
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- H5D_rdcc_ent_t *ent, *next;
- unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
+ H5D_rdcc_ent_t *ent, *next;
+ unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2519,34 +2519,34 @@ H5D__chunk_flush(H5D_t *dset)
/* Loop over all entries in the chunk cache */
for(ent = rdcc->head; ent; ent = next) {
- next = ent->next;
+ next = ent->next;
if(H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
nerrors++;
} /* end for */
if(nerrors)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_flush() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_io_term
+ * Function: H5D__chunk_io_term
*
- * Purpose: Destroy I/O operation information.
+ * Purpose: Destroy I/O operation information.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Saturday, May 17, 2003
+ * Programmer: Quincey Koziol
+ * Saturday, May 17, 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__chunk_io_term(const H5D_chunk_map_t *fm)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
@@ -2581,16 +2581,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_io_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_dest
+ * Function: H5D__chunk_dest
*
- * Purpose: Destroy the entire chunk cache by flushing dirty entries,
- * preempting all entries, and freeing the cache itself.
+ * Purpose: Destroy the entire chunk cache by flushing dirty entries,
+ * preempting all entries, and freeing the cache itself.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -2599,9 +2599,9 @@ static herr_t
H5D__chunk_dest(H5D_t *dset)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Dataset's chunk cache */
- H5D_rdcc_ent_t *ent = NULL, *next = NULL; /* Pointer to current & next cache entries */
- int nerrors = 0; /* Accumulated count of errors */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Dataset's chunk cache */
+ H5D_rdcc_ent_t *ent = NULL, *next = NULL; /* Pointer to current & next cache entries */
+ int nerrors = 0; /* Accumulated count of errors */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2617,7 +2617,7 @@ H5D__chunk_dest(H5D_t *dset)
if(H5D__chunk_cache_evict(dset, ent, TRUE) < 0)
nerrors++;
} /* end for */
-
+
/* Continue even if there are failures. */
if(nerrors)
HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
@@ -2636,21 +2636,21 @@ H5D__chunk_dest(H5D_t *dset)
/* Free any index structures */
if(dset->shared->layout.storage.u.chunk.ops->dest &&
(dset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_dest() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D_chunk_idx_reset
+ * Function: H5D_chunk_idx_reset
*
- * Purpose: Reset index information
+ * Purpose: Reset index information
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 15, 2009
*
*-------------------------------------------------------------------------
@@ -2669,21 +2669,21 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index structures */
if((storage->ops->reset)(storage, reset_addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_chunk_idx_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cinfo_cache_reset
+ * Function: H5D__chunk_cinfo_cache_reset
*
- * Purpose: Reset the cached chunk info
+ * Purpose: Reset the cached chunk info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 27, 2007
*
*-------------------------------------------------------------------------
@@ -2702,15 +2702,15 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cinfo_cache_update
+ * Function: H5D__chunk_cinfo_cache_update
*
- * Purpose: Update the cached chunk info
+ * Purpose: Update the cached chunk info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 27, 2007
*
*-------------------------------------------------------------------------
@@ -2739,15 +2739,15 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_update() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cinfo_cache_found
+ * Function: H5D__chunk_cinfo_cache_found
*
- * Purpose: Look for chunk info in cache
+ * Purpose: Look for chunk info in cache
*
- * Return: TRUE/FALSE/FAIL
+ * Return: TRUE/FALSE/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 27, 2007
*
*-------------------------------------------------------------------------
@@ -2788,19 +2788,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_cinfo_cache_found() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_create
+ * Function: H5D__chunk_create
*
- * Purpose: Creates a new chunked storage index and initializes the
- * layout information with information about the storage. The
- * layout info should be immediately written to the object header.
+ * Purpose: Creates a new chunked storage index and initializes the
+ * layout information with information about the storage. The
+ * layout info should be immediately written to the object header.
*
- * Return: Non-negative on success (with the layout information initialized
- * and ready to write to an object header). Negative on failure.
+ * Return: Non-negative on success (with the layout information initialized
+ * and ready to write to an object header). Negative on failure.
*
- * Programmer: Quincey Koziol
- * Thursday, May 22, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, May 22, 2008
*
*-------------------------------------------------------------------------
*/
@@ -2824,7 +2824,7 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
unsigned u; /* Local index variable */
for(u = 0; u < dset->shared->layout.u.chunk.ndims; u++)
- HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
+ HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
}
#endif
@@ -2836,22 +2836,22 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
/* Create the index for the chunks */
if((dset->shared->layout.storage.u.chunk.ops->create)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_hash_val
+ * Function: H5D__chunk_hash_val
*
- * Purpose: To calculate an index based on the dataset's scaled coordinates and
- * sizes of the faster dimensions.
+ * Purpose: To calculate an index based on the dataset's scaled coordinates and
+ * sizes of the faster dimensions.
*
- * Return: Hash value index
+ * Return: Hash value index
*
- * Programmer: Vailin Choi; Nov 2014
+ * Programmer: Vailin Choi; Nov 2014
*
*-------------------------------------------------------------------------
*/
@@ -2884,16 +2884,16 @@ H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled)
FUNC_LEAVE_NOAPI(ret)
} /* H5D__chunk_hash_val() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_lookup
+ * Function: H5D__chunk_lookup
*
- * Purpose: Loops up a chunk in cache and on disk, and retrieves
+ * Purpose: Loops up a chunk in cache and on disk, and retrieves
* information about that chunk.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* June 27, 1998
*
*-------------------------------------------------------------------------
@@ -2906,7 +2906,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
unsigned idx; /* Index of chunk in cache, if present */
hbool_t found = FALSE; /* In cache? */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3026,18 +3026,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_lookup() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_flush_entry
+ * Function: H5D__chunk_flush_entry
*
- * Purpose: Writes a chunk to disk. If RESET is non-zero then the
- * entry is cleared -- it's slightly faster to flush a chunk if
- * the RESET flag is turned on because it results in one fewer
- * memory copy.
+ * Purpose: Writes a chunk to disk. If RESET is non-zero then the
+ * entry is cleared -- it's slightly faster to flush a chunk if
+ * the RESET flag is turned on because it results in one fewer
+ * memory copy.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3045,10 +3045,10 @@ done:
static herr_t
H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
{
- void *buf = NULL; /* Temporary buffer */
- hbool_t point_of_no_return = FALSE;
+ void *buf = NULL; /* Temporary buffer */
+ hbool_t point_of_no_return = FALSE;
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC_TAG(dset->oloc.addr)
@@ -3061,7 +3061,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
buf = ent->chunk;
if(ent->dirty) {
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_chunk_ud_t udata; /* pass through B-tree */
+ H5D_chunk_ud_t udata; /* pass through B-tree */
hbool_t must_alloc = FALSE; /* Whether the chunk must be allocated */
hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
@@ -3079,7 +3079,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
&& !(ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS)) {
H5Z_EDC_t err_detect; /* Error detection info */
H5Z_cb_t filter_cb; /* I/O filter callback function */
- size_t alloc = udata.chunk_block.length; /* Bytes allocated for BUF */
+ size_t alloc = udata.chunk_block.length; /* Bytes allocated for BUF */
size_t nbytes; /* Chunk size (in bytes) */
/* Retrieve filter settings from API context */
@@ -3217,7 +3217,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_flush_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cache_evict
*
@@ -3297,17 +3297,17 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cache_evict() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cache_prune
+ * Function: H5D__chunk_cache_prune
*
- * Purpose: Prune the cache by preempting some things until the cache has
- * room for something which is SIZE bytes. Only unlocked
- * entries are considered for preemption.
+ * Purpose: Prune the cache by preempting some things until the cache has
+ * room for something which is SIZE bytes. Only unlocked
+ * entries are considered for preemption.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3315,13 +3315,13 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent,
static herr_t
H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
{
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- size_t total = rdcc->nbytes_max;
- const int nmeth = 2; /*number of methods */
- int w[1]; /*weighting as an interval */
- H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
- H5D_rdcc_ent_t *n[2]; /*list next pointers */
- int nerrors = 0; /* Accumulated error count during preemptions */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ size_t total = rdcc->nbytes_max;
+ const int nmeth = 2; /*number of methods */
+ int w[1]; /*weighting as an interval */
+ H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
+ H5D_rdcc_ent_t *n[2]; /*list next pointers */
+ int nerrors = 0; /* Accumulated error count during preemptions */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -3343,91 +3343,91 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
while((p[0] || p[1]) && (rdcc->nbytes_used + size) > total) {
int i; /* Local index variable */
- /* Introduce new pointers */
- for(i = 0; i < nmeth - 1; i++)
+ /* Introduce new pointers */
+ for(i = 0; i < nmeth - 1; i++)
if(0 == w[i])
p[i + 1] = rdcc->head;
- /* Compute next value for each pointer */
- for(i = 0; i < nmeth; i++)
+ /* Compute next value for each pointer */
+ for(i = 0; i < nmeth; i++)
n[i] = p[i] ? p[i]->next : NULL;
- /* Give each method a chance */
- for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
- if(0 == i && p[0] && !p[0]->locked &&
+ /* Give each method a chance */
+ for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
+ if(0 == i && p[0] && !p[0]->locked &&
((0 == p[0]->rd_count && 0 == p[0]->wr_count) ||
(0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
(dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
- /*
- * Method 0: Preempt entries that have been completely written
- * and/or completely read but not entries that are partially
- * written or partially read.
- */
- cur = p[0];
- } else if(1 == i && p[1] && !p[1]->locked) {
- /*
- * Method 1: Preempt the entry without regard to
- * considerations other than being locked. This is the last
- * resort preemption.
- */
- cur = p[1];
- } else {
- /* Nothing to preempt at this point */
- cur = NULL;
- }
-
- if(cur) {
+ /*
+ * Method 0: Preempt entries that have been completely written
+ * and/or completely read but not entries that are partially
+ * written or partially read.
+ */
+ cur = p[0];
+ } else if(1 == i && p[1] && !p[1]->locked) {
+ /*
+ * Method 1: Preempt the entry without regard to
+ * considerations other than being locked. This is the last
+ * resort preemption.
+ */
+ cur = p[1];
+ } else {
+ /* Nothing to preempt at this point */
+ cur = NULL;
+ }
+
+ if(cur) {
int j; /* Local index variable */
- for(j = 0; j < nmeth; j++) {
- if(p[j] == cur)
+ for(j = 0; j < nmeth; j++) {
+ if(p[j] == cur)
p[j] = NULL;
- if(n[j] == cur)
+ if(n[j] == cur)
n[j] = cur->next;
- } /* end for */
- if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
+ } /* end for */
+ if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
nerrors++;
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
- /* Advance pointers */
- for(i = 0; i < nmeth; i++)
+ /* Advance pointers */
+ for(i = 0; i < nmeth; i++)
p[i] = n[i];
- for(i = 0; i < nmeth - 1; i++)
+ for(i = 0; i < nmeth - 1; i++)
w[i] -= 1;
} /* end while */
if(nerrors)
- HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
+ HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cache_prune() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_lock
+ * Function: H5D__chunk_lock
*
- * Purpose: Return a pointer to a dataset chunk. The pointer points
- * directly into the chunk cache and should not be freed
- * by the caller but will be valid until it is unlocked. The
- * input value IDX_HINT is used to speed up cache lookups and
- * it's output value should be given to H5D__chunk_unlock().
- * IDX_HINT is ignored if it is out of range, and if it points
- * to the wrong entry then we fall back to the normal search
- * method.
+ * Purpose: Return a pointer to a dataset chunk. The pointer points
+ * directly into the chunk cache and should not be freed
+ * by the caller but will be valid until it is unlocked. The
+ * input value IDX_HINT is used to speed up cache lookups and
+ * it's output value should be given to H5D__chunk_unlock().
+ * IDX_HINT is ignored if it is out of range, and if it points
+ * to the wrong entry then we fall back to the normal search
+ * method.
*
- * If RELAX is non-zero and the chunk isn't in the cache then
- * don't try to read it from the file, but just allocate an
- * uninitialized buffer to hold the result. This is intended
- * for output functions that are about to overwrite the entire
- * chunk.
+ * If RELAX is non-zero and the chunk isn't in the cache then
+ * don't try to read it from the file, but just allocate an
+ * uninitialized buffer to hold the result. This is intended
+ * for output functions that are about to overwrite the entire
+ * chunk.
*
- * Return: Success: Ptr to a file chunk.
+ * Return: Success: Ptr to a file chunk.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3443,12 +3443,12 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
- H5D_rdcc_ent_t *ent; /*cache entry */
- size_t chunk_size; /*size of a chunk */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
+ H5D_rdcc_ent_t *ent; /*cache entry */
+ size_t chunk_size; /*size of a chunk */
hbool_t disable_filters = FALSE; /* Whether to disable filters (when adding to cache) */
- void *chunk = NULL; /*the file chunk */
- void *ret_value = NULL; /* Return value */
+ void *chunk = NULL; /*the file chunk */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -3475,7 +3475,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
#ifndef NDEBUG
{
- unsigned u; /*counters */
+ unsigned u; /*counters */
/* Make sure this is the right chunk */
for(u = 0; u < layout->u.chunk.ndims - 1; u++)
@@ -3633,8 +3633,8 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
/* Check if the chunk exists on disk */
if(H5F_addr_defined(chunk_addr)) {
- size_t my_chunk_alloc = chunk_alloc; /* Allocated buffer size */
- size_t buf_alloc = chunk_alloc; /* [Re-]allocated buffer size */
+ size_t my_chunk_alloc = chunk_alloc; /* Allocated buffer size */
+ size_t buf_alloc = chunk_alloc; /* [Re-]allocated buffer size */
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
@@ -3674,7 +3674,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
rdcc->stats.nmisses++;
} /* end if */
else {
- H5D_fill_value_t fill_status;
+ H5D_fill_value_t fill_status;
/* Sanity check */
HDassert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
@@ -3808,25 +3808,25 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_lock() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_unlock
+ * Function: H5D__chunk_unlock
*
- * Purpose: Unlocks a previously locked chunk. The LAYOUT, COMP, and
- * OFFSET arguments should be the same as for H5D__chunk_lock().
- * The DIRTY argument should be set to non-zero if the chunk has
- * been modified since it was locked. The IDX_HINT argument is
- * the returned index hint from the lock operation and BUF is
- * the return value from the lock.
+ * Purpose: Unlocks a previously locked chunk. The LAYOUT, COMP, and
+ * OFFSET arguments should be the same as for H5D__chunk_lock().
+ * The DIRTY argument should be set to non-zero if the chunk has
+ * been modified since it was locked. The IDX_HINT argument is
+ * the returned index hint from the lock operation and BUF is
+ * the return value from the lock.
*
- * The NACCESSED argument should be the number of bytes accessed
- * for reading or writing (depending on the value of DIRTY).
- * It's only purpose is to provide additional information to the
- * preemption policy.
+ * The NACCESSED argument should be the number of bytes accessed
+ * for reading or writing (depending on the value of DIRTY).
+ * It's only purpose is to provide additional information to the
+ * preemption policy.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3836,7 +3836,7 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
hbool_t dirty, void *chunk, uint32_t naccessed)
{
const H5O_layout_t *layout = &(io_info->dset->shared->layout); /* Dataset layout */
- const H5D_rdcc_t *rdcc = &(io_info->dset->shared->cache.chunk);
+ const H5D_rdcc_t *rdcc = &(io_info->dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -3874,9 +3874,9 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
if(udata->new_unfilt_chunk)
fake_ent.edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS;
- HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
+ HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
HDassert(layout->u.chunk.size > 0);
- fake_ent.chunk_idx = udata->chunk_idx;
+ fake_ent.chunk_idx = udata->chunk_idx;
fake_ent.chunk_block.offset = udata->chunk_block.offset;
fake_ent.chunk_block.length = udata->chunk_block.length;
fake_ent.chunk = (uint8_t *)chunk;
@@ -3887,16 +3887,16 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
else {
if(chunk)
chunk = H5D__chunk_mem_xfree(chunk, (is_unfiltered_edge_chunk ? NULL
- : &(io_info->dset->shared->dcpl_cache.pline)));
+ : &(io_info->dset->shared->dcpl_cache.pline)));
} /* end else */
} /* end if */
else {
- H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
+ H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
- HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
+ HDassert(udata->idx_hint < rdcc->nslots);
+ HDassert(rdcc->slot[udata->idx_hint]);
+ HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
/*
* It's in the cache so unlock it.
@@ -3916,16 +3916,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_unlock() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_allocated_cb
+ * Function: H5D__chunk_allocated_cb
*
- * Purpose: Simply counts the number of chunks for a dataset.
+ * Purpose: Simply counts the number of chunks for a dataset.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
*-------------------------------------------------------------------------
@@ -3942,17 +3942,17 @@ H5D__chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_allocated_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_allocated
+ * Function: H5D__chunk_allocated
*
- * Purpose: Return the number of bytes allocated in the file for storage
- * of raw data in the chunked dataset
+ * Purpose: Return the number of bytes allocated in the file for storage
+ * of raw data in the chunked dataset
*
- * Return: Success: Number of bytes stored in all chunks.
- * Failure: 0
+ * Return: Success: Number of bytes stored in all chunks.
+ * Failure: 0
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 20, 2008
*
*-------------------------------------------------------------------------
@@ -3961,7 +3961,7 @@ herr_t
H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Raw data chunk cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Raw data chunk cache */
H5D_rdcc_ent_t *ent; /* Cache entry */
hsize_t chunk_bytes = 0; /* Number of bytes allocated for chunks */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
@@ -3996,18 +3996,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_allocated() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_allocate
+ * Function: H5D__chunk_allocate
*
- * Purpose: Allocate file space for all chunks that are not allocated yet.
- * Return SUCCEED if all needed allocation succeed, otherwise
- * FAIL.
+ * Purpose: Allocate file space for all chunks that are not allocated yet.
+ * Return SUCCEED if all needed allocation succeed, otherwise
+ * FAIL.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Albert Cheng
- * June 26, 1998
+ * Programmer: Albert Cheng
+ * June 26, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4019,8 +4019,8 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
const H5D_chunk_ops_t *ops = dset->shared->layout.storage.u.chunk.ops; /* Chunk operations */
hsize_t min_unalloc[H5O_LAYOUT_NDIMS]; /* First chunk in each dimension that is unallocated (in scaled coordinates) */
hsize_t max_unalloc[H5O_LAYOUT_NDIMS]; /* Last chunk in each dimension that is unallocated (in scaled coordinates) */
- hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Offset of current chunk (in scaled coordinates) */
- size_t orig_chunk_size; /* Original size of chunk in bytes */
+ hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Offset of current chunk (in scaled coordinates) */
+ size_t orig_chunk_size; /* Original size of chunk in bytes */
size_t chunk_size; /* Actual size of chunk in bytes, possibly filtered */
unsigned filter_mask = 0; /* Filter mask for chunks that have them */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
@@ -4036,7 +4036,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
hbool_t using_mpi = FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
H5D_chunk_coll_info_t chunk_info; /* chunk address information for doing I/O */
#endif /* H5_HAVE_PARALLEL */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
unsigned space_ndims; /* Dataset's space rank */
const hsize_t *space_dim; /* Dataset's dataspace dimensions */
const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
@@ -4048,7 +4048,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
hsize_t edge_chunk_scaled[H5O_LAYOUT_NDIMS]; /* Offset of the unfiltered edge chunks at the edge of each dimension */
unsigned nunfilt_edge_chunk_dims = 0; /* Number of dimensions on an edge */
const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
@@ -4251,13 +4251,13 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
while(!carry) {
hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
- /* Look up this chunk */
- if(H5D__chunk_lookup(dset, scaled, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
+ /* Look up this chunk */
+ if(H5D__chunk_lookup(dset, scaled, &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
#ifndef NDEBUG
/* None of the chunks should be allocated */
- if(H5D_CHUNK_IDX_NONE != layout->storage.u.chunk.idx_type)
- HDassert(!H5F_addr_defined(udata.chunk_block.offset));
+ if(H5D_CHUNK_IDX_NONE != layout->storage.u.chunk.idx_type)
+ HDassert(!H5F_addr_defined(udata.chunk_block.offset));
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
@@ -4336,8 +4336,8 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
udata.filter_mask = filter_mask;
/* Allocate the chunk (with all processes) */
- if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
+ if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
HDassert(H5F_addr_defined(udata.chunk_block.offset));
/* Check if fill values should be written to chunks */
@@ -4376,7 +4376,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
} /* end if */
/* Insert the chunk record into the index */
- if(need_insert && ops->insert)
+ if(need_insert && ops->insert)
if((ops->insert)(&idx_info, &udata, dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
@@ -4455,7 +4455,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_allocate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_update_old_edge_chunks
*
@@ -4542,12 +4542,12 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Calculate offset of first previously incomplete chunk in this
* dimension */
- old_edge_chunk_sc[op_dim] = (old_dim[op_dim] / chunk_dim[op_dim]);
+ old_edge_chunk_sc[op_dim] = (old_dim[op_dim] / chunk_dim[op_dim]);
/* Calculate the largest offset of chunks that might need to be
* modified in this dimension */
- max_edge_chunk_sc[op_dim] = MIN((old_dim[op_dim] - 1) / chunk_dim[op_dim],
- MAX((space_dim[op_dim] / chunk_dim[op_dim]), 1) - 1);
+ max_edge_chunk_sc[op_dim] = MIN((old_dim[op_dim] - 1) / chunk_dim[op_dim],
+ MAX((space_dim[op_dim] / chunk_dim[op_dim]), 1) - 1);
/* Check for old_dim aligned with chunk boundary in this dimension, if
* so we do not need to modify chunks along the edge in this dimension
@@ -4557,7 +4557,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Check if the dataspace expanded enough to cause the old edge chunks
* in this dimension to become full */
- if((space_dim[op_dim]/chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1))
+ if((space_dim[op_dim]/chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1))
new_full_dim[op_dim] = TRUE;
} /* end for */
@@ -4605,7 +4605,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
carry = TRUE;
for(i = ((int)space_ndims - 1); i >= 0; --i) {
if((unsigned)i != op_dim) {
- ++chunk_sc[i];
+ ++chunk_sc[i];
if(chunk_sc[i] > (hsize_t) max_edge_chunk_sc[i])
chunk_sc[i] = 0;
else {
@@ -4633,18 +4633,18 @@ done:
} /* end H5D__chunk_update_old_edge_chunks() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_collective_fill
+ * Function: H5D__chunk_collective_fill
*
* Purpose: Use MPIO collective write to fill the chunks (if number of
- * chunks to fill is greater than the number of MPI procs;
+ * chunks to fill is greater than the number of MPI procs;
* otherwise use independent I/O).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
- * July 30, 2014
+ * Programmer: Mohamad Chaarawi
+ * July 30, 2014
*
*-------------------------------------------------------------------------
*/
@@ -4652,7 +4652,7 @@ static herr_t
H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
size_t chunk_size, const void *fill_buf)
{
- MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
+ MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
int mpi_rank = (-1); /* This process's rank */
int mpi_size = (-1); /* MPI Comm size */
int mpi_code; /* MPI return code */
@@ -4720,13 +4720,13 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
distributing. If there are, then round robin the distribution
to processes 0 -> leftover. */
if(leftover && leftover > mpi_rank) {
- chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank];
+ chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank];
block_lens[blocks] = block_len;
blocks++;
}
- /* MSC
- * should use this if MPI_type_create_hindexed block is working
+ /* MSC
+ * should use this if MPI_type_create_hindexed block is working
* mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, &file_type);
*/
mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array, MPI_BYTE, &file_type);
@@ -4782,17 +4782,17 @@ done:
} /* end H5D__chunk_collective_fill() */
#endif /* H5_HAVE_PARALLEL */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_prune_fill
+ * Function: H5D__chunk_prune_fill
*
- * Purpose: Write the fill value to the parts of the chunk that are no
+ * Purpose: Write the fill value to the parts of the chunk that are no
* longer part of the dataspace
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * March 26, 2002
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * March 26, 2002
*
*-------------------------------------------------------------------------
*/
@@ -4809,7 +4809,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
hssize_t sel_nelmts; /* Number of elements in selection */
hsize_t count[H5O_LAYOUT_NDIMS]; /* Element count of hyperslab */
size_t chunk_size; /*size of a chunk */
- void *chunk; /* The file chunk */
+ void *chunk; /* The file chunk */
H5D_chunk_ud_t chk_udata; /* User data for locking chunk */
uint32_t bytes_accessed; /* Bytes accessed in chunk */
unsigned u; /* Local index variable */
@@ -4909,18 +4909,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_prune_fill */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_prune_by_extent
+ * Function: H5D__chunk_prune_by_extent
*
- * Purpose: This function searches for chunks that are no longer necessary
+ * Purpose: This function searches for chunks that are no longer necessary
* both in the raw data cache and in the chunk index.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * Algorithm: Robb Matzke
- * March 27, 2002
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Algorithm: Robb Matzke
+ * March 27, 2002
*
* The algorithm is:
*
@@ -5022,7 +5022,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
H5D_io_info_t chk_io_info; /* Chunked I/O info object */
H5D_storage_t chk_store; /* Chunk storage information */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset's layout */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
unsigned space_ndims; /* Dataset's space rank */
const hsize_t *space_dim; /* Current dataspace dimensions */
unsigned op_dim; /* Current operating dimension */
@@ -5037,7 +5037,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
uint32_t elmts_per_chunk; /* Elements in chunk */
hbool_t disable_edge_filters = FALSE; /* Whether to disable filters on partial edge chunks */
hbool_t new_unfilt_chunk = FALSE; /* Whether the chunk is newly unfiltered */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -5071,13 +5071,13 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
elmts_per_chunk = 1;
for(u = 0; u < space_ndims; u++) {
elmts_per_chunk *= layout->u.chunk.dim[u];
- chunk_dim[u] = layout->u.chunk.dim[u];
- shrunk_dim[u] = (space_dim[u] < old_dim[u]);
+ chunk_dim[u] = layout->u.chunk.dim[u];
+ shrunk_dim[u] = (space_dim[u] < old_dim[u]);
} /* end for */
/* Create a dataspace for a chunk & set the extent */
if(NULL == (chunk_space = H5S_create_simple(space_ndims, chunk_dim, NULL)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
@@ -5200,11 +5200,11 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
} /* end if */
else
dims_outside_fill[u] = FALSE;
- } /* end if */
+ } /* end if */
carry = FALSE;
while(!carry) {
- int i; /* Local index variable */
+ int i; /* Local index variable */
udata.common.scaled = scaled;
@@ -5265,7 +5265,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Remove the chunk from disk, if present */
if(H5F_addr_defined(chk_udata.chunk_block.offset)) {
/* Update the offset in idx_udata */
- idx_udata.scaled = udata.common.scaled;
+ idx_udata.scaled = udata.common.scaled;
/* Remove the chunk from disk */
if((layout->storage.u.chunk.ops->remove)(&idx_info, &idx_udata) < 0)
@@ -5333,16 +5333,16 @@ done:
} /* end H5D__chunk_prune_by_extent() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_addrmap_cb
+ * Function: H5D__chunk_addrmap_cb
*
* Purpose: Callback when obtaining the chunk addresses for all existing chunks
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
+ * Programmer: Kent Yang
* Tuesday, November 15, 2005
*
*-------------------------------------------------------------------------
@@ -5350,7 +5350,7 @@ done:
static int
H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
+ H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
unsigned rank = udata->common.layout->ndims - 1; /* # of dimensions of dataset */
hsize_t chunk_index;
int ret_value = H5_ITER_CONT; /* Return value */
@@ -5367,14 +5367,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_addrmap_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_addrmap
+ * Function: H5D__chunk_addrmap
*
* Purpose: Obtain the chunk addresses for all existing chunks
*
- * Return: Success: Non-negative on succeed.
- * Failure: negative value
+ * Return: Success: Non-negative on succeed.
+ * Failure: negative value
*
* Programmer: Kent Yang
* November 15, 2005
@@ -5386,7 +5386,7 @@ H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
const H5D_t *dset = io_info->dset; /* Local pointer to dataset info */
- H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
+ H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -5418,16 +5418,16 @@ done:
} /* end H5D__chunk_addrmap() */
#endif /* H5_HAVE_PARALLEL */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_delete
+ * Function: H5D__chunk_delete
*
- * Purpose: Delete raw data storage for entire dataset (i.e. all chunks)
+ * Purpose: Delete raw data storage for entire dataset (i.e. all chunks)
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
*-------------------------------------------------------------------------
@@ -5440,7 +5440,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
hbool_t layout_read = FALSE; /* Whether the layout message was read from the file */
H5O_pline_t pline; /* I/O pipeline message */
hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
- htri_t exists; /* Flag if header message of interest exists */
+ htri_t exists; /* Flag if header message of interest exists */
H5O_storage_chunk_t *sc = &(storage->u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -5496,17 +5496,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_update_cache
+ * Function: H5D__chunk_update_cache
*
- * Purpose: Update any cached chunks index values after the dataspace
+ * Purpose: Update any cached chunks index values after the dataspace
* size has changed
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, May 29, 2004
*
*-------------------------------------------------------------------------
@@ -5514,8 +5514,8 @@ done:
herr_t
H5D__chunk_update_cache(H5D_t *dset)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
- H5D_rdcc_ent_t *ent, *next; /*cache entry */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ H5D_rdcc_ent_t *ent, *next; /*cache entry */
H5D_rdcc_ent_t tmp_head; /* Sentinel entry for temporary entry list */
H5D_rdcc_ent_t *tmp_tail; /* Tail pointer for temporary entry list */
herr_t ret_value = SUCCEED; /* Return value */
@@ -5536,7 +5536,7 @@ H5D__chunk_update_cache(H5D_t *dset)
/* Recompute the index for each cached chunk that is in a dataset */
for(ent = rdcc->head; ent; ent = next) {
- unsigned old_idx; /* Previous index number */
+ unsigned old_idx; /* Previous index number */
/* Get the pointer to the next cache entry */
next = ent->next;
@@ -5546,7 +5546,7 @@ H5D__chunk_update_cache(H5D_t *dset)
ent->idx = H5D__chunk_hash_val(dset->shared, ent->scaled);
if(old_idx != ent->idx) {
- H5D_rdcc_ent_t *old_ent; /* Old cache entry */
+ H5D_rdcc_ent_t *old_ent; /* Old cache entry */
/* Check if there is already a chunk at this chunk's new location */
old_ent = rdcc->slot[ent->idx];
@@ -5609,7 +5609,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_update_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_copy_cb
*
@@ -5658,7 +5658,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if(pline && pline->nused) {
must_filter = TRUE;
if( (udata->common.layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
- (H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim,
+ (H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim,
chunk_rec->scaled, udata->dset_dims)) )
must_filter = FALSE;
}
@@ -5823,8 +5823,8 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
udata->chunk_in_cache = FALSE;
- udata_dst.chunk_idx = H5VM_array_offset_pre(udata_dst.common.layout->ndims - 1,
- udata_dst.common.layout->max_down_chunks, udata_dst.common.scaled);
+ udata_dst.chunk_idx = H5VM_array_offset_pre(udata_dst.common.layout->ndims - 1,
+ udata_dst.common.layout->max_down_chunks, udata_dst.common.scaled);
/* Allocate chunk in the file */
if(H5D__chunk_file_alloc(udata->idx_info_dst, NULL, &udata_dst.chunk_block, &need_insert, udata_dst.common.scaled) < 0)
@@ -5850,17 +5850,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_copy_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_copy
+ * Function: H5D__chunk_copy
*
- * Purpose: Copy chunked storage from SRC file to DST file.
+ * Purpose: Copy chunked storage from SRC file to DST file.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
* Programmer: Peter Cao
- * August 20, 2005
+ * August 20, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6134,7 +6134,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_bh_info
*
@@ -6194,18 +6194,18 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout,
/* Allocate any indexing structures */
if(layout->storage.u.chunk.ops->init && (layout->storage.u.chunk.ops->init)(&idx_info, space, loc->addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
idx_info_init = TRUE;
/* Get size of index structure */
if(layout->storage.u.chunk.ops->size && (layout->storage.u.chunk.ops->size)(&idx_info, index_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
done:
/* Free resources, if they've been initialized */
if(idx_info_init && layout->storage.u.chunk.ops->dest &&
(layout->storage.u.chunk.ops->dest)(&idx_info) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
if(pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
if(space && H5S_close(space) < 0)
@@ -6214,18 +6214,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_bh_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_dump_index_cb
+ * Function: H5D__chunk_dump_index_cb
*
- * Purpose: If the UDATA.STREAM member is non-null then debugging
+ * Purpose: If the UDATA.STREAM member is non-null then debugging
* information is written to that stream.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
*-------------------------------------------------------------------------
@@ -6233,7 +6233,7 @@ done:
static int
H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
+ H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
FUNC_ENTER_STATIC_NOERR
@@ -6259,17 +6259,17 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_dump_index_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_dump_index
+ * Function: H5D__chunk_dump_index
*
- * Purpose: Prints information about the storage index to the specified
- * stream.
+ * Purpose: Prints information about the storage index to the specified
+ * stream.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 28, 1999
*
*-------------------------------------------------------------------------
@@ -6317,17 +6317,17 @@ done:
} /* end H5D__chunk_dump_index() */
#ifdef H5D_CHUNK_DEBUG
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_stats
+ * Function: H5D__chunk_stats
*
- * Purpose: Print raw data cache statistics to the debug stream. If
- * HEADERS is non-zero then print table column headers,
- * otherwise assume that the H5AC layer has already printed them.
+ * Purpose: Print raw data cache statistics to the debug stream. If
+ * HEADERS is non-zero then print table column headers,
+ * otherwise assume that the H5AC layer has already printed them.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -6335,9 +6335,9 @@ done:
herr_t
H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- double miss_rate;
- char ascii[32];
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ double miss_rate;
+ char ascii[32];
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -6346,10 +6346,10 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HGOTO_DONE(SUCCEED)
if (headers) {
- fprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
- fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n",
+ HDfprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
+ HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n",
"Layer", "Hits", "Misses", "MissRate", "Inits", "Flushes");
- fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n",
+ HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n",
"-----", "----", "------", "--------", "-----", "-------");
}
@@ -6365,12 +6365,12 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
miss_rate = 0.0;
}
if (miss_rate > 100) {
- sprintf(ascii, "%7d%%", (int) (miss_rate + 0.5));
+ HDsprintf(ascii, "%7d%%", (int) (miss_rate + 0.5));
} else {
- sprintf(ascii, "%7.2f%%", miss_rate);
+ HDsprintf(ascii, "%7.2f%%", miss_rate);
}
- fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n",
+ HDfprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n",
"raw data chunks", rdcc->stats.nhits, rdcc->stats.nmisses, ascii,
rdcc->stats.ninits, (long)(rdcc->stats.nflushes)-(long)(rdcc->stats.ninits));
}
@@ -6380,22 +6380,22 @@ done:
} /* end H5D__chunk_stats() */
#endif /* H5D_CHUNK_DEBUG */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__nonexistent_readvv_cb
+ * Function: H5D__nonexistent_readvv_cb
*
- * Purpose: Callback operation for performing fill value I/O operation
+ * Purpose: Callback operation for performing fill value I/O operation
* on memory buffer.
*
- * Note: This algorithm is pretty inefficient about initializing and
+ * Note: This algorithm is pretty inefficient about initializing and
* terminating the fill buffer info structure and it would be
* faster to refactor this into a "real" initialization routine,
* and a "vectorized fill" routine. -QAK
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * 30 Sep 2010
+ * Programmer: Quincey Koziol
+ * 30 Sep 2010
*
*-------------------------------------------------------------------------
*/
@@ -6429,24 +6429,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__nonexistent_readvv_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__nonexistent_readvv
+ * Function: H5D__nonexistent_readvv
*
- * Purpose: When the chunk doesn't exist on disk and the chunk is bigger
+ * Purpose: When the chunk doesn't exist on disk and the chunk is bigger
* than the cache size, performs fill value I/O operation on
* memory buffer, advancing through two I/O vectors, until one
* runs out.
*
- * Note: This algorithm is pretty inefficient about initializing and
+ * Note: This algorithm is pretty inefficient about initializing and
* terminating the fill buffer info structure and it would be
* faster to refactor this into a "real" initialization routine,
* and a "vectorized fill" routine. -QAK
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * 6 Feb 2009
+ * Programmer: Raymond Lu
+ * 6 Feb 2009
*
*-------------------------------------------------------------------------
*/
@@ -6483,7 +6483,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__nonexistent_readvv() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_is_partial_edge_chunk
*
@@ -6522,14 +6522,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_is_partial_edge_chunk() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_file_alloc()
*
- * Purpose: Chunk allocation:
- * Create the chunk if it doesn't exist, or reallocate the
+ * Purpose: Chunk allocation:
+ * Create the chunk if it doesn't exist, or reallocate the
* chunk if its size changed.
- * The coding is moved and modified from each index structure.
+ * The coding is moved and modified from each index structure.
*
* Return: Non-negative on success/Negative on failure
*
@@ -6541,8 +6541,8 @@ herr_t
H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
H5F_block_t *new_chunk, hbool_t *need_insert, hsize_t scaled[])
{
- hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -6560,7 +6560,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
/* Check for filters on chunks */
if(idx_info->pline->nused > 0) {
/* Sanity/error checking block */
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
+ HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
{
unsigned allow_chunk_size_len; /* Allowed size of encoded chunk size */
unsigned new_chunk_size_len; /* Size of encoded chunk size */
@@ -6582,37 +6582,37 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk size can't be encoded")
} /* end block */
- if(old_chunk && H5F_addr_defined(old_chunk->offset)) {
- /* Sanity check */
+ if(old_chunk && H5F_addr_defined(old_chunk->offset)) {
+ /* Sanity check */
HDassert(!H5F_addr_defined(new_chunk->offset) || H5F_addr_eq(new_chunk->offset, old_chunk->offset));
/* Check for chunk being same size */
- if(new_chunk->length != old_chunk->length) {
- /* Release previous chunk */
- /* Only free the old location if not doing SWMR writes - otherwise
+ if(new_chunk->length != old_chunk->length) {
+ /* Release previous chunk */
+ /* Only free the old location if not doing SWMR writes - otherwise
* we must keep the old chunk around in case a reader has an
* outdated version of the B-tree node
*/
- if(!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE))
- if(H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, old_chunk->offset, old_chunk->length) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk")
- alloc_chunk = TRUE;
- } /* end if */
+ if(!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE))
+ if(H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, old_chunk->offset, old_chunk->length) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk")
+ alloc_chunk = TRUE;
+ } /* end if */
else {
- /* Don't need to reallocate chunk, but send its address back up */
+ /* Don't need to reallocate chunk, but send its address back up */
if(!H5F_addr_defined(new_chunk->offset))
new_chunk->offset = old_chunk->offset;
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else {
HDassert(!H5F_addr_defined(new_chunk->offset));
- alloc_chunk = TRUE;
+ alloc_chunk = TRUE;
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
- HDassert(new_chunk->length == idx_info->layout->size);
- alloc_chunk = TRUE;
+ HDassert(!H5F_addr_defined(new_chunk->offset));
+ HDassert(new_chunk->length == idx_info->layout->size);
+ alloc_chunk = TRUE;
} /* end else */
/* Actually allocate space for the chunk in the file */
@@ -6652,11 +6652,11 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
HDassert(H5F_addr_defined(new_chunk->offset));
-done:
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_file_alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_format_convert_cb
*
@@ -6674,13 +6674,13 @@ done:
static int
H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud5_t *udata = (H5D_chunk_it_ud5_t *)_udata; /* User data */
- H5D_chk_idx_info_t *new_idx_info; /* The new chunk index information */
- H5D_chunk_ud_t insert_udata; /* Chunk information to be inserted */
- haddr_t chunk_addr; /* Chunk address */
- size_t nbytes; /* Chunk size */
- void *buf = NULL; /* Pointer to buffer of chunk data */
- int ret_value = H5_ITER_CONT; /* Return value */
+ H5D_chunk_it_ud5_t *udata = (H5D_chunk_it_ud5_t *)_udata; /* User data */
+ H5D_chk_idx_info_t *new_idx_info; /* The new chunk index information */
+ H5D_chunk_ud_t insert_udata; /* Chunk information to be inserted */
+ haddr_t chunk_addr; /* Chunk address */
+ size_t nbytes; /* Chunk size */
+ void *buf = NULL; /* Pointer to buffer of chunk data */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
@@ -6698,7 +6698,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
unsigned filter_mask = chunk_rec->filter_mask;
H5Z_cb_t filter_cb; /* Filter failure callback struct */
- size_t read_size = nbytes; /* Bytes to read */
+ size_t read_size = nbytes; /* Bytes to read */
HDassert(read_size == new_idx_info->layout->size);
@@ -6753,12 +6753,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_format_convert_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_format_convert
*
* Purpose: Iterate over the chunks for the current chunk index and insert the
- * the chunk addresses into v1 B-tree chunk index via callback.
+ * the chunk addresses into v1 B-tree chunk index via callback.
*
* Return: Non-negative on success/Negative on failure
*
@@ -6770,7 +6770,7 @@ done:
herr_t
H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx_info_t *new_idx_info)
{
- H5D_chunk_it_ud5_t udata; /* User data */
+ H5D_chunk_it_ud5_t udata; /* User data */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -6785,13 +6785,13 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx
/* terate over the chunks in the current index and insert the chunk addresses into version 1 B-tree index */
if((idx_info->storage->ops->iterate)(idx_info, H5D__chunk_format_convert_cb, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
+ HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_format_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_num_chunks_cb
*
@@ -6823,7 +6823,7 @@ H5D__get_num_chunks_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void *_u
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_num_chunks_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_num_chunks
*
@@ -6888,7 +6888,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_num_chunks() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info_cb
*
@@ -6934,7 +6934,7 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_chunk_info_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info
*
@@ -7024,7 +7024,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_chunk_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info_by_coord_cb
*
@@ -7072,7 +7072,7 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_chunk_info_by_coord_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info_by_coord
*
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index a20145a..e77d968 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -11,10 +11,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Tuesday, January 27, 2009
+/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Tuesday, January 27, 2009
*
- * Purpose: Extensible array indexed (chunked) I/O functions. The chunks
+ * Purpose: Extensible array indexed (chunked) I/O functions. The chunks
* are given a single-dimensional index which is used as the
* offset in an extensible array that maps a chunk coordinate to
* a disk address.
@@ -31,13 +31,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5EAprivate.h" /* Extensible arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5EAprivate.h" /* Extensible arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -182,7 +182,7 @@ const H5EA_class_t H5EA_CLS_CHUNK[1]={{
H5D__earray_fill, /* Fill block of missing elements callback */
H5D__earray_encode, /* Element encoding callback */
H5D__earray_decode, /* Element decoding callback */
- H5D__earray_debug, /* Element debugging callback */
+ H5D__earray_debug, /* Element debugging callback */
H5D__earray_crt_dbg_context, /* Create debugging context */
H5D__earray_dst_dbg_context /* Destroy debugging context */
}};
@@ -213,16 +213,16 @@ H5FL_DEFINE_STATIC(H5D_earray_ctx_t);
H5FL_DEFINE_STATIC(H5D_earray_ctx_ud_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_crt_context
+ * Function: H5D__earray_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -262,16 +262,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_crt_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_dst_context
+ * Function: H5D__earray_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -292,16 +292,16 @@ H5D__earray_dst_context(void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_dst_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_fill
+ * Function: H5D__earray_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -322,16 +322,16 @@ H5D__earray_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_encode
+ * Function: H5D__earray_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -366,16 +366,16 @@ H5D__earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_decode
+ * Function: H5D__earray_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -410,16 +410,16 @@ H5D__earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_debug
+ * Function: H5D__earray_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -437,23 +437,23 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str,
*(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_fill
+ * Function: H5D__earray_filt_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -475,16 +475,16 @@ H5D__earray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_encode
+ * Function: H5D__earray_filt_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -522,16 +522,16 @@ H5D__earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_decode
+ * Function: H5D__earray_filt_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -568,16 +568,16 @@ H5D__earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_debug
+ * Function: H5D__earray_filt_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -596,31 +596,31 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str,
elmt->addr, elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_crt_dbg_context
+ * Function: H5D__earray_crt_dbg_context
*
- * Purpose: Create context for debugging callback
- * (get the layout message in the specified object header)
+ * Purpose: Create context for debugging callback
+ * (get the layout message in the specified object header)
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
+ *
+ * Programmer: Vailin Choi; July 2010
*
- * Programmer: Vailin Choi; July 2010
- *
*-------------------------------------------------------------------------
*/
static void *
H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
{
- H5D_earray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
+ H5D_earray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
H5O_loc_t obj_loc; /* Pointer to an object's location */
hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
H5O_layout_t layout; /* Layout message */
@@ -677,24 +677,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_dst_dbg_context
+ * Function: H5D__earray_dst_dbg_context
*
- * Purpose: Destroy context for debugging callback
- * (free the layout message from the specified object header)
+ * Purpose: Destroy context for debugging callback
+ * (free the layout message from the specified object header)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi; July 2010
+ * Programmer: Vailin Choi; July 2010
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__earray_dst_dbg_context(void *_dbg_ctx)
{
- H5D_earray_ctx_ud_t *dbg_ctx = (H5D_earray_ctx_ud_t *)_dbg_ctx; /* Context for extensible array callback */
+ H5D_earray_ctx_ud_t *dbg_ctx = (H5D_earray_ctx_ud_t *)_dbg_ctx; /* Context for extensible array callback */
FUNC_ENTER_STATIC_NOERR
@@ -707,18 +707,18 @@ H5D__earray_dst_dbg_context(void *_dbg_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_dst_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_depend
+ * Function: H5D__earray_idx_depend
*
- * Purpose: Create flush dependency between extensible array and dataset's
+ * Purpose: Create flush dependency between extensible array and dataset's
* object header.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
- * Tuesday, June 2, 2009
+ * Programmer: Quincey Koziol
+ * Tuesday, June 2, 2009
*
*-------------------------------------------------------------------------
*/
@@ -769,22 +769,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_depend() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_open
+ * Function: H5D__earray_idx_open
*
- * Purpose: Opens an existing extensible array.
+ * Purpose: Opens an existing extensible array.
*
- * Note: This information is passively initialized from each index
+ * Note: This information is passively initialized from each index
* operation callback because those abstract chunk index operations
* are designed to work with the v1 B-tree chunk indices also,
* which don't require an 'open' for the data structure.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
- * Thursday, January 29, 2009
+ * Programmer: Quincey Koziol
+ * Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
*/
@@ -813,7 +813,7 @@ H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info)
/* Open the extensible array for the chunk index */
if(NULL == (idx_info->storage->u.earray.ea = H5EA_open(idx_info->f, idx_info->storage->idx_addr, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open extensible array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open extensible array")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -824,15 +824,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_open() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_init
+ * Function: H5D__earray_idx_init
*
- * Purpose: Initialize the indexing information for a dataset.
+ * Purpose: Initialize the indexing information for a dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 27, 2009
*
*-------------------------------------------------------------------------
@@ -861,7 +861,7 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
/* Get the dim info for dataset */
if((sndims = H5S_get_simple_extent_dims(space, NULL, max_dims)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
H5_CHECKED_ASSIGN(ndims, unsigned, sndims, int);
/* Find the rank of the unlimited dimension */
@@ -892,22 +892,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_create
+ * Function: H5D__earray_idx_create
*
- * Purpose: Creates a new indexed-storage extensible array and initializes
+ * Purpose: Creates a new indexed-storage extensible array and initializes
* the layout struct with information about the storage. The
- * struct should be immediately written to the object header.
+ * struct should be immediately written to the object header.
*
- * This function must be called before passing LAYOUT to any of
- * the other indexed storage functions!
+ * This function must be called before passing LAYOUT to any of
+ * the other indexed storage functions!
*
- * Return: Non-negative on success (with the LAYOUT argument initialized
- * and ready to write to an object header). Negative on failure.
+ * Return: Non-negative on success (with the LAYOUT argument initialized
+ * and ready to write to an object header). Negative on failure.
*
- * Programmer: Quincey Koziol
- * Tuesday, January 27, 2009
+ * Programmer: Quincey Koziol
+ * Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
*/
@@ -932,7 +932,7 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* General parameters */
if(idx_info->pline->nused > 0) {
unsigned chunk_size_len; /* Size of encoded chunk size */
-
+
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
@@ -964,11 +964,11 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Create the extensible array for the chunk index */
if(NULL == (idx_info->storage->u.earray.ea = H5EA_create(idx_info->f, &cparam, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create extensible array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create extensible array")
/* Get the address of the extensible array in file */
if(H5EA_get_addr(idx_info->storage->u.earray.ea, &(idx_info->storage->idx_addr)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array address")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array address")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -979,16 +979,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_is_space_alloc
+ * Function: H5D__earray_idx_is_space_alloc
*
- * Purpose: Query if space is allocated for index method
+ * Purpose: Query if space is allocated for index method
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, January 29, 2009
+ * Programmer: Quincey Koziol
+ * Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
*/
@@ -1003,15 +1003,15 @@ H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__earray_idx_is_space_alloc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_insert
+ * Function: H5D__earray_idx_insert
*
- * Purpose: Insert chunk address into the indexing structure.
+ * Purpose: Insert chunk address into the indexing structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi; May 2014
+ * Programmer: Vailin Choi; May 2014
*
*-------------------------------------------------------------------------
*/
@@ -1020,7 +1020,7 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
const H5D_t H5_ATTR_UNUSED *dset)
{
H5EA_t *ea; /* Pointer to extensible array structure */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1045,43 +1045,43 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
ea = idx_info->storage->u.earray.ea;
if(!H5F_addr_defined(udata->chunk_block.offset))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already")
if(udata->chunk_idx != (udata->chunk_idx & 0xffffffff)) /* negative value */
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32")
/* Check for filters on chunks */
if(idx_info->pline->nused > 0) {
- H5D_earray_filt_elmt_t elmt; /* Extensible array element */
+ H5D_earray_filt_elmt_t elmt; /* Extensible array element */
- elmt.addr = udata->chunk_block.offset;
+ elmt.addr = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(elmt.nbytes, uint32_t, udata->chunk_block.length, hsize_t);
- elmt.filter_mask = udata->filter_mask;
+ elmt.filter_mask = udata->filter_mask;
- /* Set the info for the chunk */
- if(H5EA_set(ea, udata->chunk_idx, &elmt) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
+ /* Set the info for the chunk */
+ if(H5EA_set(ea, udata->chunk_idx, &elmt) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
} /* end if */
else {
- /* Set the address for the chunk */
- if(H5EA_set(ea, udata->chunk_idx, &udata->chunk_block.offset) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address")
+ /* Set the address for the chunk */
+ if(H5EA_set(ea, udata->chunk_idx, &udata->chunk_block.offset) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_insert() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_get_addr
+ * Function: H5D__earray_idx_get_addr
*
- * Purpose: Get the file address of a chunk if file space has been
- * assigned. Save the retrieved information in the udata
- * supplied.
+ * Purpose: Get the file address of a chunk if file space has been
+ * assigned. Save the retrieved information in the udata
+ * supplied.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1091,7 +1091,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
{
H5EA_t *ea; /* Pointer to extensible array structure */
hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1117,13 +1117,13 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
/* Check for unlimited dim. not being the slowest-changing dim. */
if(idx_info->layout->u.earray.unlim_dim > 0) {
- hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
+ hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
unsigned ndims = (idx_info->layout->ndims - 1); /* Number of dimensions */
- unsigned u;
+ unsigned u;
- /* Compute coordinate offset from scaled offset */
- for(u = 0; u < ndims; u++)
- swizzled_coords[u] = udata->common.scaled[u] * idx_info->layout->dim[u];
+ /* Compute coordinate offset from scaled offset */
+ for(u = 0; u < ndims; u++)
+ swizzled_coords[u] = udata->common.scaled[u] * idx_info->layout->dim[u];
H5VM_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim);
@@ -1156,27 +1156,27 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Update the other (constant) information for the chunk */
- udata->chunk_block.length = idx_info->layout->size;
+ udata->chunk_block.length = idx_info->layout->size;
udata->filter_mask = 0;
} /* end else */
if(!H5F_addr_defined(udata->chunk_block.offset))
- udata->chunk_block.length = 0;
+ udata->chunk_block.length = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_get_addr() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_resize
+ * Function: H5D__earray_idx_resize
*
- * Purpose: Calculate/setup the swizzled down chunk array, used for chunk
+ * Purpose: Calculate/setup the swizzled down chunk array, used for chunk
* index calculations.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 23, 2009
*
*-------------------------------------------------------------------------
@@ -1221,15 +1221,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_resize() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_iterate_cb
+ * Function: H5D__earray_idx_iterate_cb
*
- * Purpose: Callback routine for extensible array element iteration.
+ * Purpose: Callback routine for extensible array element iteration.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi; Feb 2015
+ * Programmer: Vailin Choi; Feb 2015
*
*-------------------------------------------------------------------------
*/
@@ -1256,8 +1256,8 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Make "generic chunk" callback */
if(H5F_addr_defined(udata->chunk_rec.chunk_addr))
- if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
- HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
+ if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
+ HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
@@ -1280,20 +1280,20 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_iterate_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_iterate
+ * Function: H5D__earray_idx_iterate
*
- * Purpose: Iterate over the chunks in an index, making a callback
+ * Purpose: Iterate over the chunks in an index, making a callback
* for each one.
*
- * Note: This implementation is slow, particularly for sparse
+ * Note: This implementation is slow, particularly for sparse
* extensible arrays, replace it with call to H5EA_iterate()
* when that's available.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1331,42 +1331,42 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info,
/* Get the extensible array statistics */
if(H5EA_get_stats(ea, &ea_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
if(ea_stat.stored.max_idx_set > 0) {
H5D_earray_it_ud_t udata; /* User data for iteration callback */
- /* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = idx_info->layout;
- udata.common.storage = idx_info->storage;
+ /* Initialize userdata */
+ HDmemset(&udata, 0, sizeof udata);
+ udata.common.layout = idx_info->layout;
+ udata.common.storage = idx_info->storage;
HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if(!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
udata.chunk_rec.filter_mask = 0;
} /* end if */
- udata.cb = chunk_cb;
- udata.udata = chunk_udata;
-
+ udata.cb = chunk_cb;
+ udata.udata = chunk_udata;
+
/* Iterate over the extensible array elements */
- if((ret_value = H5EA_iterate(ea, H5D__earray_idx_iterate_cb, &udata)) < 0)
- HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
+ if((ret_value = H5EA_iterate(ea, H5D__earray_idx_iterate_cb, &udata)) < 0)
+ HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_iterate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_remove
+ * Function: H5D__earray_idx_remove
*
- * Purpose: Remove chunk from index.
+ * Purpose: Remove chunk from index.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1376,7 +1376,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
{
H5EA_t *ea; /* Pointer to extensible array structure */
hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1403,13 +1403,13 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
/* Check for unlimited dim. not being the slowest-changing dim. */
if(idx_info->layout->u.earray.unlim_dim > 0) {
- hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
+ hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
unsigned ndims = (idx_info->layout->ndims - 1); /* Number of dimensions */
- unsigned u;
+ unsigned u;
- /* Compute coordinate offset from scaled offset */
- for(u = 0; u < ndims; u++)
- swizzled_coords[u] = udata->scaled[u] * idx_info->layout->dim[u];
+ /* Compute coordinate offset from scaled offset */
+ for(u = 0; u < ndims; u++)
+ swizzled_coords[u] = udata->scaled[u] * idx_info->layout->dim[u];
H5VM_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim);
@@ -1469,16 +1469,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_delete_cb
+ * Function: H5D__earray_idx_delete_cb
*
- * Purpose: Delete space for chunk in file
+ * Purpose: Delete space for chunk in file
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1506,21 +1506,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_delete_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_delete
+ * Function: H5D__earray_idx_delete
*
- * Purpose: Delete index and raw data storage for entire dataset
+ * Purpose: Delete index and raw data storage for entire dataset
* (i.e. all chunks)
*
- * Note: This implementation is slow, particularly for sparse
+ * Note: This implementation is slow, particularly for sparse
* extensible arrays, replace it with call to H5EA_iterate()
* when that's available.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1568,15 +1568,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_copy_setup
+ * Function: H5D__earray_idx_copy_setup
*
- * Purpose: Set up any necessary information for copying chunks
+ * Purpose: Set up any necessary information for copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1623,15 +1623,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_copy_setup() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_copy_shutdown
+ * Function: H5D__earray_idx_copy_shutdown
*
- * Purpose: Shutdown any information from copying chunks
+ * Purpose: Shutdown any information from copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1662,7 +1662,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_copy_shutdown() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__earray_idx_size
*
@@ -1703,7 +1703,7 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
/* Get the extensible array statistics */
if(H5EA_get_stats(ea, &ea_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
/* Set the size of the extensible array */
*index_size = ea_stat.computed.hdr_size + ea_stat.computed.index_blk_size
@@ -1719,15 +1719,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_reset
+ * Function: H5D__earray_idx_reset
*
- * Purpose: Reset indexing information.
+ * Purpose: Reset indexing information.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1742,7 +1742,7 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index info */
if(reset_addr) {
- storage->idx_addr = HADDR_UNDEF;
+ storage->idx_addr = HADDR_UNDEF;
storage->u.earray.dset_ohdr_addr = HADDR_UNDEF;
} /* end if */
storage->u.earray.ea = NULL;
@@ -1750,15 +1750,15 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_dump
+ * Function: H5D__earray_idx_dump
*
- * Purpose: Dump indexing information to a stream.
+ * Purpose: Dump indexing information to a stream.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1777,15 +1777,15 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_dump() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_dest
+ * Function: H5D__earray_idx_dest
*
- * Purpose: Release indexing information in memory.
+ * Purpose: Release indexing information in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1805,7 +1805,7 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
/* Check if the extensible array is open */
if(idx_info->storage->u.earray.ea) {
- /* Patch the top level file pointer contained in ea if needed */
+ /* Patch the top level file pointer contained in ea if needed */
if(H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer")
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 372ae26..5972f10 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -11,12 +11,12 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
- * Thursday, April 30, 2009
+/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
+ * Thursday, April 30, 2009
*
- * Purpose: Fixed array indexed (chunked) I/O functions.
- * The chunk coordinate is mapped as an index into an array of
- * disk addresses for the chunks.
+ * Purpose: Fixed array indexed (chunked) I/O functions.
+ * The chunk coordinate is mapped as an index into an array of
+ * disk addresses for the chunks.
*
*/
@@ -30,13 +30,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FAprivate.h" /* Fixed arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FAprivate.h" /* Fixed arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -210,16 +210,16 @@ H5FL_DEFINE_STATIC(H5D_farray_ctx_t);
/* Declare a free list to manage the H5D_farray_ctx_ud_t struct */
H5FL_DEFINE_STATIC(H5D_farray_ctx_ud_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_crt_context
+ * Function: H5D__farray_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -259,16 +259,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_crt_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_dst_context
+ * Function: H5D__farray_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -289,16 +289,16 @@ H5D__farray_dst_context(void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_dst_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_fill
+ * Function: H5D__farray_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -319,16 +319,16 @@ H5D__farray_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_encode
+ * Function: H5D__farray_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -363,16 +363,16 @@ H5D__farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_decode
+ * Function: H5D__farray_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -407,16 +407,16 @@ H5D__farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_debug
+ * Function: H5D__farray_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -434,32 +434,32 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str,
*(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_crt_dbg_context
+ * Function: H5D__farray_crt_dbg_context
*
- * Purpose: Create context for debugging callback
- * (get the layout message in the specified object header)
+ * Purpose: Create context for debugging callback
+ * (get the layout message in the specified object header)
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
- * 5th August, 2009
+ * Programmer: Vailin Choi
+ * 5th August, 2009
*
*-------------------------------------------------------------------------
*/
static void *
H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
{
- H5D_farray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
+ H5D_farray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
H5O_loc_t obj_loc; /* Pointer to an object's location */
hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
H5O_layout_t layout; /* Layout message */
@@ -516,25 +516,25 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_dst_dbg_context
+ * Function: H5D__farray_dst_dbg_context
*
- * Purpose: Destroy context for debugging callback
- * (free the layout message from the specified object header)
+ * Purpose: Destroy context for debugging callback
+ * (free the layout message from the specified object header)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
- * 24th September, 2009
+ * Programmer: Quincey Koziol
+ * 24th September, 2009
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__farray_dst_dbg_context(void *_dbg_ctx)
{
- H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */
+ H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */
FUNC_ENTER_STATIC_NOERR
@@ -547,16 +547,16 @@ H5D__farray_dst_dbg_context(void *_dbg_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_dst_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_fill
+ * Function: H5D__farray_filt_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -578,16 +578,16 @@ H5D__farray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_encode
+ * Function: H5D__farray_filt_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -612,7 +612,7 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
/* Encode element */
/* (advances 'raw' pointer) */
H5F_addr_encode_len(ctx->file_addr_len, &raw, elmt->addr);
- UINT64ENCODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
+ UINT64ENCODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
UINT32ENCODE(raw, elmt->filter_mask);
/* Advance native element pointer */
@@ -625,16 +625,16 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_decode
+ * Function: H5D__farray_filt_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -658,7 +658,7 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
/* Decode element */
/* (advances 'raw' pointer) */
H5F_addr_decode_len(ctx->file_addr_len, &raw, &elmt->addr);
- UINT64DECODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
+ UINT64DECODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
UINT32DECODE(raw, elmt->filter_mask);
/* Advance native element pointer */
@@ -671,16 +671,16 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_debug
+ * Function: H5D__farray_filt_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -699,24 +699,24 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str,
elmt->addr, elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_depend
+ * Function: H5D__farray_idx_depend
*
- * Purpose: Create flush dependency between fixed array and dataset's
+ * Purpose: Create flush dependency between fixed array and dataset's
* object header.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -768,7 +768,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_depend() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__farray_idx_init
*
@@ -796,17 +796,17 @@ H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_open
+ * Function: H5D__farray_idx_open
*
- * Purpose: Opens an existing fixed array and initializes
+ * Purpose: Opens an existing fixed array and initializes
* the layout struct with information about the storage.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -836,7 +836,7 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info)
/* Open the fixed array for the chunk index */
if(NULL == (idx_info->storage->u.farray.fa = H5FA_open(idx_info->f, idx_info->storage->idx_addr, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -847,21 +847,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_open() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_create
+ * Function: H5D__farray_idx_create
*
- * Purpose: Creates a new indexed-storage fixed array and initializes
+ * Purpose: Creates a new indexed-storage fixed array and initializes
* the layout struct with information about the storage. The
- * struct should be immediately written to the object header.
+ * struct should be immediately written to the object header.
*
- * This function must be called before passing LAYOUT to any of
- * the other indexed storage functions!
+ * This function must be called before passing LAYOUT to any of
+ * the other indexed storage functions!
*
- * Return: Non-negative on success (with the LAYOUT argument initialized
- * and ready to write to an object header). Negative on failure.
+ * Return: Non-negative on success (with the LAYOUT argument initialized
+ * and ready to write to an object header). Negative on failure.
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -869,9 +869,9 @@ done:
static herr_t
H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
{
- H5FA_create_t cparam; /* Fixed array creation parameters */
+ H5FA_create_t cparam; /* Fixed array creation parameters */
H5D_farray_ctx_ud_t udata; /* User data for fixed array create call */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -887,7 +887,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* General parameters */
if(idx_info->pline->nused > 0) {
- unsigned chunk_size_len; /* Size of encoded chunk size */
+ unsigned chunk_size_len; /* Size of encoded chunk size */
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
@@ -910,14 +910,14 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Set up the user data */
udata.f = idx_info->f;
udata.chunk_size = idx_info->layout->size;
-
+
/* Create the fixed array for the chunk index */
if(NULL == (idx_info->storage->u.farray.fa = H5FA_create(idx_info->f, &cparam, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array")
/* Get the address of the fixed array in file */
if(H5FA_get_addr(idx_info->storage->u.farray.fa, &(idx_info->storage->idx_addr)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -928,15 +928,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_is_space_alloc
+ * Function: H5D__farray_idx_is_space_alloc
*
- * Purpose: Query if space is allocated for index method
+ * Purpose: Query if space is allocated for index method
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -952,24 +952,24 @@ H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__farray_idx_is_space_alloc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_insert
+ * Function: H5D__farray_idx_insert
*
- * Purpose: Insert chunk address into the indexing structure.
+ * Purpose: Insert chunk address into the indexing structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; 5 May 2014
*
- * Programmer: Vailin Choi; 5 May 2014
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
const H5D_t H5_ATTR_UNUSED *dset)
{
- H5FA_t *fa; /* Pointer to fixed array structure */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FA_t *fa; /* Pointer to fixed array structure */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -988,7 +988,7 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
+ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
/* Set convenience pointer to fixed array structure */
fa = idx_info->storage->u.farray.fa;
@@ -1002,13 +1002,13 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
if(idx_info->pline->nused > 0) {
H5D_farray_filt_elmt_t elmt; /* Fixed array element */
- elmt.addr = udata->chunk_block.offset;
+ elmt.addr = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(elmt.nbytes, uint32_t, udata->chunk_block.length, hsize_t);
elmt.filter_mask = udata->filter_mask;
/* Set the info for the chunk */
if(H5FA_set(fa, udata->chunk_idx, &elmt) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
} /* end if */
else {
/* Set the address for the chunk */
@@ -1020,17 +1020,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_insert() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_get_addr
+ * Function: H5D__farray_idx_get_addr
*
- * Purpose: Get the file address of a chunk if file space has been
- * assigned. Save the retrieved information in the udata
- * supplied.
+ * Purpose: Get the file address of a chunk if file space has been
+ * assigned. Save the retrieved information in the udata
+ * supplied.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1038,9 +1038,9 @@ done:
static herr_t
H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- H5FA_t *fa; /* Pointer to fixed array structure */
- hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FA_t *fa; /* Pointer to fixed array structure */
+ hsize_t idx; /* Array index of chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1059,7 +1059,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
+ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
/* Set convenience pointer to fixed array structure */
fa = idx_info->storage->u.farray.fa;
@@ -1088,26 +1088,26 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Update the other (constant) information for the chunk */
- udata->chunk_block.length = idx_info->layout->size;
+ udata->chunk_block.length = idx_info->layout->size;
udata->filter_mask = 0;
} /* end else */
if(!H5F_addr_defined(udata->chunk_block.offset))
- udata->chunk_block.length = 0;
+ udata->chunk_block.length = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_get_addr() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_iterate_cb
+ * Function: H5D__farray_idx_iterate_cb
*
- * Purpose: Callback routine for fixed array element iteration.
+ * Purpose: Callback routine for fixed array element iteration.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1135,8 +1135,8 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Make "generic chunk" callback */
if(H5F_addr_defined(udata->chunk_rec.chunk_addr))
- if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
- HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
+ if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
+ HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
@@ -1159,16 +1159,16 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_iterate_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_iterate
+ * Function: H5D__farray_idx_iterate
*
- * Purpose: Iterate over the chunks in an index, making a callback
+ * Purpose: Iterate over the chunks in an index, making a callback
* for each one.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1199,50 +1199,50 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info,
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
+ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
/* Set convenience pointer to fixed array structure */
fa = idx_info->storage->u.farray.fa;
/* Get the fixed array statistics */
if(H5FA_get_stats(fa, &fa_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
/* Check if there are any array elements */
if(fa_stat.nelmts > 0) {
H5D_farray_it_ud_t udata; /* User data for iteration callback */
- /* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = idx_info->layout;
- udata.common.storage = idx_info->storage;
+ /* Initialize userdata */
+ HDmemset(&udata, 0, sizeof udata);
+ udata.common.layout = idx_info->layout;
+ udata.common.storage = idx_info->storage;
HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if(!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
udata.chunk_rec.filter_mask = 0;
} /* end if */
- udata.cb = chunk_cb;
- udata.udata = chunk_udata;
-
+ udata.cb = chunk_cb;
+ udata.udata = chunk_udata;
+
/* Iterate over the fixed array elements */
- if((ret_value = H5FA_iterate(fa, H5D__farray_idx_iterate_cb, &udata)) < 0)
- HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
+ if((ret_value = H5FA_iterate(fa, H5D__farray_idx_iterate_cb, &udata)) < 0)
+ HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_iterate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_remove
+ * Function: H5D__farray_idx_remove
*
- * Purpose: Remove chunk from index.
+ * Purpose: Remove chunk from index.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1250,9 +1250,9 @@ done:
static herr_t
H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
{
- H5FA_t *fa; /* Pointer to fixed array structure */
- hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FA_t *fa; /* Pointer to fixed array structure */
+ hsize_t idx; /* Array index of chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1271,7 +1271,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
+ if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer")
/* Set convenience pointer to fixed array structure */
@@ -1328,16 +1328,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_delete_cb
+ * Function: H5D__farray_idx_delete_cb
*
- * Purpose: Delete space for chunk in file
+ * Purpose: Delete space for chunk in file
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1365,17 +1365,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_delete_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_delete
+ * Function: H5D__farray_idx_delete
*
- * Purpose: Delete index and raw data storage for entire dataset
+ * Purpose: Delete index and raw data storage for entire dataset
* (i.e. all chunks)
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1398,7 +1398,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
if(H5F_addr_defined(idx_info->storage->idx_addr)) {
H5D_farray_ctx_ud_t ctx_udata; /* User data for fixed array open call */
- /* Iterate over the chunk addresses in the fixed array, deleting each chunk */
+ /* Iterate over the chunk addresses in the fixed array, deleting each chunk */
if(H5D__farray_idx_iterate(idx_info, H5D__farray_idx_delete_cb, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses")
@@ -1423,15 +1423,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_copy_setup
+ * Function: H5D__farray_idx_copy_setup
*
- * Purpose: Set up any necessary information for copying chunks
+ * Purpose: Set up any necessary information for copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1478,15 +1478,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_copy_setup() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_copy_shutdown
+ * Function: H5D__farray_idx_copy_shutdown
*
- * Purpose: Shutdown any information from copying chunks
+ * Purpose: Shutdown any information from copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1517,7 +1517,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_copy_shutdown() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__farray_idx_size
*
@@ -1526,7 +1526,7 @@ done:
* Return: Success: Non-negative
* Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1558,7 +1558,7 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
/* Get the fixed array statistics */
if(H5FA_get_stats(fa, &fa_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
*index_size = fa_stat.hdr_size;
*index_size += fa_stat.dblk_size;
@@ -1573,15 +1573,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_reset
+ * Function: H5D__farray_idx_reset
*
- * Purpose: Reset indexing information.
+ * Purpose: Reset indexing information.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1596,21 +1596,21 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index info */
if(reset_addr)
- storage->idx_addr = HADDR_UNDEF;
+ storage->idx_addr = HADDR_UNDEF;
storage->u.farray.fa = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_dump
+ * Function: H5D__farray_idx_dump
*
- * Purpose: Dump indexing information to a stream.
+ * Purpose: Dump indexing information to a stream.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1629,15 +1629,15 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_dump() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_dest
+ * Function: H5D__farray_idx_dest
*
- * Purpose: Release indexing information in memory.
+ * Purpose: Release indexing information in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1657,8 +1657,8 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info)
/* Check if the fixed array is open */
if(idx_info->storage->u.farray.fa) {
- /* Patch the top level file pointer contained in fa if needed */
- if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
+ /* Patch the top level file pointer contained in fa if needed */
+ if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer")
/* Close fixed array */
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index 1a2b973..46e87c5 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5EAdbg.c
- * Sep 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5EAdbg.c
+ * Sep 11 2008
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Dump debugging information about an extensible array.
+ * Purpose: Dump debugging information about an extensible array.
*
*-------------------------------------------------------------------------
*/
@@ -37,9 +37,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5EApkg.h" /* Extensible Arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5EApkg.h" /* Extensible Arrays */
/****************/
@@ -77,17 +77,17 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__hdr_debug
+ * Function: H5EA__hdr_debug
*
- * Purpose: Prints debugging info about a extensible array header.
+ * Purpose: Prints debugging info about a extensible array header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 11 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 11 2008
*
*-------------------------------------------------------------------------
*/
@@ -97,7 +97,7 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
int fwidth, const H5EA_class_t *cls, haddr_t obj_addr))
/* Local variables */
- H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
+ H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
void *dbg_ctx = NULL; /* Extensible array debugging context */
/* Check arguments */
@@ -117,73 +117,73 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Print opening message */
HDfprintf(stream, "%*sExtensible Array Header...\n", indent, "");
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Header size:",
- hdr->size);
+ "Header size:",
+ hdr->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:",
- (unsigned)hdr->cparam.raw_elmt_size);
+ "Raw Element Size:",
+ (unsigned)hdr->cparam.raw_elmt_size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):",
- hdr->cparam.cls->nat_elmt_size);
+ "Native Element Size (on this platform):",
+ hdr->cparam.cls->nat_elmt_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Log2(Max. # of elements in array):",
- (unsigned)hdr->cparam.max_nelmts_bits);
+ "Log2(Max. # of elements in array):",
+ (unsigned)hdr->cparam.max_nelmts_bits);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of elements in index block:",
- (unsigned)hdr->cparam.idx_blk_elmts);
+ "# of elements in index block:",
+ (unsigned)hdr->cparam.idx_blk_elmts);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. # of elements per data block:",
- (unsigned)hdr->cparam.data_blk_min_elmts);
+ "Min. # of elements per data block:",
+ (unsigned)hdr->cparam.data_blk_min_elmts);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. # of data block pointers for a super block:",
- (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
+ "Min. # of data block pointers for a super block:",
+ (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Log2(Max. # of elements in data block page):",
- (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
+ "Log2(Max. # of elements in data block page):",
+ (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Highest element index stored (+1):",
- hdr->stats.stored.max_idx_set);
+ "Highest element index stored (+1):",
+ hdr->stats.stored.max_idx_set);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of super blocks created:",
- hdr->stats.stored.nsuper_blks);
+ "Number of super blocks created:",
+ hdr->stats.stored.nsuper_blks);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of data blocks created:",
- hdr->stats.stored.ndata_blks);
+ "Number of data blocks created:",
+ hdr->stats.stored.ndata_blks);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of elements 'realized':",
- hdr->stats.stored.nelmts);
+ "Number of elements 'realized':",
+ hdr->stats.stored.nelmts);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Index Block Address:",
- hdr->idx_blk_addr);
+ "Index Block Address:",
+ hdr->idx_blk_addr);
CATCH
if(dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
H5E_THROW(H5E_CANTRELEASE, "unable to release extensible array debugging context")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__hdr_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__iblock_debug
+ * Function: H5EA__iblock_debug
*
- * Purpose: Prints debugging info about a extensible array index block.
+ * Purpose: Prints debugging info about a extensible array index block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 11 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 11 2008
*
*-------------------------------------------------------------------------
*/
@@ -215,7 +215,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Sanity check */
HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr));
@@ -229,16 +229,16 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Index Block size:",
- iblock->size);
+ "Index Block size:",
+ iblock->size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of data block addresses in index block:",
- iblock->ndblk_addrs);
+ "# of data block addresses in index block:",
+ iblock->ndblk_addrs);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of super block addresses in index block:",
- iblock->nsblk_addrs);
+ "# of super block addresses in index block:",
+ iblock->nsblk_addrs);
/* Check if there are any elements in index block */
if(hdr->cparam.idx_blk_elmts > 0) {
@@ -264,7 +264,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
HDfprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
for(u = 0; u < iblock->ndblk_addrs; u++) {
/* Print address */
- sprintf(temp_str, "Address #%u:", u);
+ HDsprintf(temp_str, "Address #%u:", u);
HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
iblock->dblk_addrs[u]);
@@ -280,7 +280,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
HDfprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
for(u = 0; u < iblock->nsblk_addrs; u++) {
/* Print address */
- sprintf(temp_str, "Address #%u:", u);
+ HDsprintf(temp_str, "Address #%u:", u);
HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
iblock->sblk_addrs[u]);
@@ -293,21 +293,21 @@ CATCH
if(iblock && H5EA__iblock_unprotect(iblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array index block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__iblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__sblock_debug
+ * Function: H5EA__sblock_debug
*
- * Purpose: Prints debugging info about a extensible array super block.
+ * Purpose: Prints debugging info about a extensible array super block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 30 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 30 2008
*
*-------------------------------------------------------------------------
*/
@@ -339,7 +339,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect super block */
/* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */
@@ -351,16 +351,16 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Super Block size:",
- sblock->size);
+ "Super Block size:",
+ sblock->size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of data block addresses in super block:",
- sblock->ndblks);
+ "# of data block addresses in super block:",
+ sblock->ndblks);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of elements in data blocks from this super block:",
- sblock->dblk_nelmts);
+ "# of elements in data blocks from this super block:",
+ sblock->dblk_nelmts);
/* Check if there are any data block addresses in super block */
if(sblock->ndblks > 0) {
@@ -371,7 +371,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
HDfprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
for(u = 0; u < sblock->ndblks; u++) {
/* Print address */
- sprintf(temp_str, "Address #%u:", u);
+ HDsprintf(temp_str, "Address #%u:", u);
HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
sblock->dblk_addrs[u]);
@@ -384,21 +384,21 @@ CATCH
if(sblock && H5EA__sblock_unprotect(sblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array super block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__sblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__dblock_debug
+ * Function: H5EA__dblock_debug
*
- * Purpose: Prints debugging info about a extensible array data block.
+ * Purpose: Prints debugging info about a extensible array data block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 22 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 22 2008
*
*-------------------------------------------------------------------------
*/
@@ -432,7 +432,7 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect data block */
/* (Note: setting parent of data block to 'hdr' for this operation should be OK -QAK) */
@@ -444,10 +444,10 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Data Block size:",
- dblock->size);
+ "Data Block size:",
+ dblock->size);
/* Print the elements in the index block */
@@ -466,7 +466,7 @@ CATCH
if(dblock && H5EA__dblock_unprotect(dblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array data block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__dblock_debug() */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 3da7996..dccc007 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -14,7 +14,7 @@
/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Thursday, August 28, 2008
*
- * Purpose: Extensible array testing functions.
+ * Purpose: Extensible array testing functions.
*
*/
@@ -34,11 +34,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5EApkg.h" /* Extensible Arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5EApkg.h" /* Extensible Arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -115,16 +115,16 @@ H5FL_DEFINE_STATIC(H5EA__test_ctx_t);
H5FL_DEFINE_STATIC(H5EA__ctx_cb_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_crt_context
+ * Function: H5EA__test_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -141,7 +141,7 @@ H5EA__test_crt_context(void *_udata))
/* Allocate new context structure */
if(NULL == (ctx = H5FL_MALLOC(H5EA__test_ctx_t)))
- H5E_THROW(H5E_CANTALLOC, "can't allocate extensible array client callback context")
+ H5E_THROW(H5E_CANTALLOC, "can't allocate extensible array client callback context")
/* Initialize the context */
ctx->bogus = H5EA__TEST_BOGUS_VAL;
@@ -154,16 +154,16 @@ CATCH
END_FUNC(STATIC) /* end H5EA__test_crt_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_dst_context
+ * Function: H5EA__test_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -183,16 +183,16 @@ H5EA__test_dst_context(void *_ctx))
END_FUNC(STATIC) /* end H5EA__test_dst_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_fill
+ * Function: H5EA__test_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -212,16 +212,16 @@ H5EA__test_fill(void *nat_blk, size_t nelmts))
END_FUNC(STATIC) /* end H5EA__test_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_encode
+ * Function: H5EA__test_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -263,16 +263,16 @@ CATCH
END_FUNC(STATIC) /* end H5EA__test_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_decode
+ * Function: H5EA__test_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -309,16 +309,16 @@ H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx))
END_FUNC(STATIC) /* end H5EA__test_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_debug
+ * Function: H5EA__test_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -336,7 +336,7 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
(unsigned long long)*(const uint64_t *)elmt);
@@ -346,21 +346,21 @@ END_FUNC(STATIC) /* end H5EA__test_debug() */
* Function: H5EA__test_crt_dbg_context
*
* Purpose: Create context for debugging callback
- *
+ *
* Return: Success: non-NULL
* Failure: NULL
- *
- * Programmer: Vailin Choi; August 2010
+ *
+ * Programmer: Vailin Choi; August 2010
*
*-------------------------------------------------------------------------
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
H5EA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_addr))
-
+
/* Local variables */
H5EA__ctx_cb_t *ctx; /* Context for callbacks */
-
+
/* Allocate new context structure */
if(NULL == (ctx = H5FL_MALLOC(H5EA__ctx_cb_t)))
H5E_THROW(H5E_CANTALLOC, "can't allocate extensible array client callback context")
@@ -372,16 +372,16 @@ CATCH
END_FUNC(STATIC) /* end H5EA__test_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_dst_dbg_context
+ * Function: H5EA__test_dst_dbg_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi; August 2010
+ * Programmer: Vailin Choi; August 2010
*
*-------------------------------------------------------------------------
*/
@@ -399,16 +399,16 @@ H5EA__test_dst_dbg_context(void *_ctx))
END_FUNC(STATIC) /* end H5EA__test_dst_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA_get_cparam_test
+ * Function: H5EA_get_cparam_test
*
- * Purpose: Retrieve the parameters used to create the extensible array
+ * Purpose: Retrieve the parameters used to create the extensible array
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -431,16 +431,16 @@ H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
END_FUNC(PRIV) /* end H5EA_get_cparam_test() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA_cmp_cparam_test
+ * Function: H5EA_cmp_cparam_test
*
- * Purpose: Compare the parameters used to create the extensible array
+ * Purpose: Compare the parameters used to create the extensible array
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Eint.c b/src/H5Eint.c
index ff2a860..166803b 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Eint.c
- * April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Eint.c
+ * April 11 2007
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: General use, "internal" routines for error handling.
+ * Purpose: General use, "internal" routines for error handling.
*
*-------------------------------------------------------------------------
*/
@@ -32,11 +32,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Epkg.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Epkg.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
/****************/
@@ -107,21 +107,21 @@ hid_t H5E_ERR_CLS_g = FAIL;
/*
* variables used for MPI error reporting
*/
-char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
-int H5E_mpi_error_str_len;
+char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
+int H5E_mpi_error_str_len;
#endif /* H5_HAVE_PARALLEL */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_get_msg
+ * Function: H5E_get_msg
*
- * Purpose: Private function to retrieve an error message.
+ * Purpose: Private function to retrieve an error message.
*
* Return: Non-negative for name length if succeeds(zero means no name);
* otherwise returns negative value.
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 14, 2003
*
*-------------------------------------------------------------------------
@@ -155,37 +155,37 @@ H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
} /* end H5E_get_msg() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk1_cb
+ * Function: H5E_walk1_cb
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* This is a default error stack traversal callback function
- * that prints error messages to the specified output stream.
- * This function is for backward compatibility with v1.6.
- * It is not meant to be called directly but rather as an
- * argument to the H5Ewalk() function. This function is called
- * also by H5Eprint(). Application writers are encouraged to
- * use this function as a model for their own error stack
- * walking functions.
+ * that prints error messages to the specified output stream.
+ * This function is for backward compatibility with v1.6.
+ * It is not meant to be called directly but rather as an
+ * argument to the H5Ewalk() function. This function is called
+ * also by H5Eprint(). Application writers are encouraged to
+ * use this function as a model for their own error stack
+ * walking functions.
*
- * N is a counter for how many times this function has been
- * called for this particular traversal of the stack. It always
- * begins at zero for the first error on the stack (either the
- * top or bottom error, or even both, depending on the traversal
- * direction and the size of the stack).
+ * N is a counter for how many times this function has been
+ * called for this particular traversal of the stack. It always
+ * begins at zero for the first error on the stack (either the
+ * top or bottom error, or even both, depending on the traversal
+ * direction and the size of the stack).
*
- * ERR_DESC is an error description. It contains all the
- * information about a particular error.
+ * ERR_DESC is an error description. It contains all the
+ * information about a particular error.
*
- * CLIENT_DATA is the same pointer that was passed as the
- * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
- * file pointer (or stderr if null).
+ * CLIENT_DATA is the same pointer that was passed as the
+ * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
+ * file pointer (or stderr if null).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
- * Thursday, May 11, 2006
+ * Thursday, May 11, 2006
*
*-------------------------------------------------------------------------
*/
@@ -193,12 +193,12 @@ static herr_t
H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
{
H5E_print_t *eprint = (H5E_print_t *)client_data;
- FILE *stream; /* I/O stream to print output to */
+ FILE *stream; /* I/O stream to print output to */
H5E_cls_t *cls_ptr; /* Pointer to error class */
H5E_msg_t *maj_ptr; /* Pointer to major error info */
H5E_msg_t *min_ptr; /* Pointer to minor error info */
- const char *maj_str = "No major description"; /* Major error description */
- const char *min_str = "No minor description"; /* Minor error description */
+ const char *maj_str = "No major description"; /* Major error description */
+ const char *min_str = "No minor description"; /* Minor error description */
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
@@ -239,7 +239,7 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
if(cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
(cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
(cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
(cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
@@ -249,22 +249,22 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
{
int mpi_rank, mpi_initialized, mpi_finalized;
- MPI_Initialized(&mpi_initialized);
+ MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
if(mpi_initialized && !mpi_finalized) {
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- fprintf(stream, "MPI-process %d", mpi_rank);
- } /* end if */
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ HDfprintf(stream, "MPI-process %d", mpi_rank);
+ } /* end if */
else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
} /* end block */
#elif defined(H5_HAVE_THREADSAFE)
- fprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
+ HDfprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
#endif
- fprintf(stream, ":\n");
+ HDfprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -272,47 +272,47 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
have_desc=0;
/* Print error message */
- fprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n",
- H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
- err_desc->func_name, (have_desc ? ": " : ""),
+ HDfprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n",
+ H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
+ err_desc->func_name, (have_desc ? ": " : ""),
(have_desc ? err_desc->desc : ""));
- fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk1_cb() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk2_cb
+ * Function: H5E_walk2_cb
*
- * Purpose: This is a default error stack traversal callback function
- * that prints error messages to the specified output stream.
- * It is not meant to be called directly but rather as an
- * argument to the H5Ewalk2() function. This function is
- * called also by H5Eprint2(). Application writers are
- * encouraged to use this function as a model for their own
- * error stack walking functions.
+ * Purpose: This is a default error stack traversal callback function
+ * that prints error messages to the specified output stream.
+ * It is not meant to be called directly but rather as an
+ * argument to the H5Ewalk2() function. This function is
+ * called also by H5Eprint2(). Application writers are
+ * encouraged to use this function as a model for their own
+ * error stack walking functions.
*
- * N is a counter for how many times this function has been
- * called for this particular traversal of the stack. It always
- * begins at zero for the first error on the stack (either the
- * top or bottom error, or even both, depending on the traversal
- * direction and the size of the stack).
+ * N is a counter for how many times this function has been
+ * called for this particular traversal of the stack. It always
+ * begins at zero for the first error on the stack (either the
+ * top or bottom error, or even both, depending on the traversal
+ * direction and the size of the stack).
*
- * ERR_DESC is an error description. It contains all the
- * information about a particular error.
+ * ERR_DESC is an error description. It contains all the
+ * information about a particular error.
*
- * CLIENT_DATA is the same pointer that was passed as the
- * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
- * file pointer (or stderr if null).
+ * CLIENT_DATA is the same pointer that was passed as the
+ * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
+ * file pointer (or stderr if null).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, December 12, 1997
+ * Programmer: Robb Matzke
+ * Friday, December 12, 1997
*
*-------------------------------------------------------------------------
*/
@@ -320,12 +320,12 @@ static herr_t
H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
{
H5E_print_t *eprint = (H5E_print_t *)client_data;
- FILE *stream; /* I/O stream to print output to */
+ FILE *stream; /* I/O stream to print output to */
H5E_cls_t *cls_ptr; /* Pointer to error class */
H5E_msg_t *maj_ptr; /* Pointer to major error info */
H5E_msg_t *min_ptr; /* Pointer to minor error info */
- const char *maj_str = "No major description"; /* Major error description */
- const char *min_str = "No minor description"; /* Minor error description */
+ const char *maj_str = "No major description"; /* Major error description */
+ const char *min_str = "No minor description"; /* Minor error description */
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
@@ -371,7 +371,7 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if(cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
(cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
(cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
(cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
@@ -381,22 +381,22 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
{
int mpi_rank, mpi_initialized, mpi_finalized;
- MPI_Initialized(&mpi_initialized);
+ MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
if(mpi_initialized && !mpi_finalized) {
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- fprintf(stream, "MPI-process %d", mpi_rank);
- } /* end if */
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ HDfprintf(stream, "MPI-process %d", mpi_rank);
+ } /* end if */
else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
} /* end block */
#elif defined(H5_HAVE_THREADSAFE)
- fprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
+ HDfprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
#endif
- fprintf(stream, ":\n");
+ HDfprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -404,20 +404,20 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
have_desc = 0;
/* Print error message */
- fprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n",
- H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
- err_desc->func_name, (have_desc ? ": " : ""),
+ HDfprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n",
+ H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
+ err_desc->func_name, (have_desc ? ": " : ""),
(have_desc ? err_desc->desc : ""));
- fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk2_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_print
+ * Function: H5E_print
*
* Purpose: Private function to print the error stack in some default
* way. This is just a convenience function for H5Ewalk() and
@@ -427,7 +427,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -475,34 +475,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk
+ * Function: H5E_walk
*
- * Purpose: Private function for H5Ewalk.
+ * Purpose: Private function for H5Ewalk.
* Walks the error stack, calling the specified function for
- * each error on the stack. The DIRECTION argument determines
- * whether the stack is walked from the inside out or the
- * outside in. The value H5E_WALK_UPWARD means begin with the
- * most specific error and end at the API; H5E_WALK_DOWNWARD
- * means to start at the API and end at the inner-most function
- * where the error was first detected.
+ * each error on the stack. The DIRECTION argument determines
+ * whether the stack is walked from the inside out or the
+ * outside in. The value H5E_WALK_UPWARD means begin with the
+ * most specific error and end at the API; H5E_WALK_DOWNWARD
+ * means to start at the API and end at the inner-most function
+ * where the error was first detected.
*
- * The function pointed to by STACK_FUNC will be called for
- * each error record in the error stack. It's arguments will
- * include an index number (beginning at zero regardless of
- * stack traversal direction), an error stack entry, and the
- * CLIENT_DATA pointer passed to H5E_print.
+ * The function pointed to by STACK_FUNC will be called for
+ * each error record in the error stack. It's arguments will
+ * include an index number (beginning at zero regardless of
+ * stack traversal direction), an error stack entry, and the
+ * CLIENT_DATA pointer passed to H5E_print.
*
- * The function FUNC is also provided for backward compatibility.
- * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
- * compatible with older library. If BK_COMPATIBLE is FALSE,
- * STACK_FUNC is used.
+ * The function FUNC is also provided for backward compatibility.
+ * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
+ * compatible with older library. If BK_COMPATIBLE is FALSE,
+ * STACK_FUNC is used.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, December 12, 1997
+ * Programmer: Robb Matzke
+ * Friday, December 12, 1997
*
*-------------------------------------------------------------------------
*/
@@ -510,7 +510,7 @@ herr_t
H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op,
void *client_data)
{
- int i; /* Local index variable */
+ int i; /* Local index variable */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -521,7 +521,7 @@ H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op
/* check args, but rather than failing use some default value */
if(direction != H5E_WALK_UPWARD && direction != H5E_WALK_DOWNWARD)
- direction = H5E_WALK_UPWARD;
+ direction = H5E_WALK_UPWARD;
/* Walk the stack if a callback function was given */
if(op->vers == 1) {
@@ -586,18 +586,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_get_auto
+ * Function: H5E_get_auto
*
- * Purpose: Private function to return the current settings for the
+ * Purpose: Private function to return the current settings for the
* automatic error stack traversal function and its data
* for specific error stack. Either (or both) arguments may
* be null in which case the value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* July 18, 2003
*
*-------------------------------------------------------------------------
@@ -618,26 +618,26 @@ H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_get_auto2() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_set_auto
+ * Function: H5E_set_auto
*
- * Purpose: Private function to turn on or off automatic printing of
+ * Purpose: Private function to turn on or off automatic printing of
* errors for certain error stack. When turned on (non-null
* FUNC pointer) any API function which returns an error
* indication will first call FUNC passing it CLIENT_DATA
* as an argument.
*
- * The default values before this function is called are
- * H5Eprint2() with client data being the standard error stream,
- * stderr.
+ * The default values before this function is called are
+ * H5Eprint2() with client data being the standard error stream,
+ * stderr.
*
- * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
- * direction.
+ * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
+ * direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -656,16 +656,16 @@ H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_set_auto() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_printf_stack
+ * Function: H5E_printf_stack
*
- * Purpose: Printf-like wrapper around H5E__push_stack.
+ * Purpose: Printf-like wrapper around H5E__push_stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Tuesday, August 12, 2008
+ * Programmer: Quincey Koziol
+ * Tuesday, August 12, 2008
*
*-------------------------------------------------------------------------
*/
@@ -680,14 +680,14 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
#endif /* H5_HAVE_VASPRINTF */
char *tmp = NULL; /* Buffer to place formatted description in */
hbool_t va_started = FALSE; /* Whether the variable argument list is open */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/*
* WARNING: We cannot call HERROR() from within this function or else we
- * could enter infinite recursion. Furthermore, we also cannot
- * call any other HDF5 macro or function which might call
- * HERROR(). HERROR() is called by HRETURN_ERROR() which could
- * be called by FUNC_ENTER().
+ * could enter infinite recursion. Furthermore, we also cannot
+ * call any other HDF5 macro or function which might call
+ * HERROR(). HERROR() is called by HRETURN_ERROR() which could
+ * be called by FUNC_ENTER().
*/
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -753,24 +753,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E__push_stack
+ * Function: H5E__push_stack
*
- * Purpose: Pushes a new error record onto error stack for the current
- * thread. The error has major and minor IDs MAJ_ID and
- * MIN_ID, the name of a function where the error was detected,
- * the name of the file where the error was detected, the
- * line within that file, and an error description string. The
- * function name, file name, and error description strings must
- * be statically allocated (the FUNC_ENTER() macro takes care of
- * the function name and file name automatically, but the
- * programmer is responsible for the description string).
+ * Purpose: Pushes a new error record onto error stack for the current
+ * thread. The error has major and minor IDs MAJ_ID and
+ * MIN_ID, the name of a function where the error was detected,
+ * the name of the file where the error was detected, the
+ * line within that file, and an error description string. The
+ * function name, file name, and error description strings must
+ * be statically allocated (the FUNC_ENTER() macro takes care of
+ * the function name and file name automatically, but the
+ * programmer is responsible for the description string).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, December 12, 1997
+ * Programmer: Robb Matzke
+ * Friday, December 12, 1997
*
*-------------------------------------------------------------------------
*/
@@ -778,14 +778,14 @@ herr_t
H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
hid_t cls_id, hid_t maj_id, hid_t min_id, const char *desc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/*
* WARNING: We cannot call HERROR() from within this function or else we
- * could enter infinite recursion. Furthermore, we also cannot
- * call any other HDF5 macro or function which might call
- * HERROR(). HERROR() is called by HRETURN_ERROR() which could
- * be called by FUNC_ENTER().
+ * could enter infinite recursion. Furthermore, we also cannot
+ * call any other HDF5 macro or function which might call
+ * HERROR(). HERROR() is called by HRETURN_ERROR() which could
+ * be called by FUNC_ENTER().
*/
FUNC_ENTER_PACKAGE_NOERR
@@ -796,7 +796,7 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
/* Check for 'default' error stack */
if(estack == NULL)
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_DONE(FAIL)
/*
@@ -819,37 +819,37 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
/* Increment the IDs to indicate that they are used in this stack */
if(H5I_inc_ref(cls_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].cls_id = cls_id;
+ estack->slot[estack->nused].cls_id = cls_id;
if(H5I_inc_ref(maj_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].maj_num = maj_id;
+ estack->slot[estack->nused].maj_num = maj_id;
if(H5I_inc_ref(min_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].min_num = min_id;
- if(NULL == (estack->slot[estack->nused].func_name = H5MM_xstrdup(func)))
+ estack->slot[estack->nused].min_num = min_id;
+ if(NULL == (estack->slot[estack->nused].func_name = H5MM_xstrdup(func)))
HGOTO_DONE(FAIL)
- if(NULL == (estack->slot[estack->nused].file_name = H5MM_xstrdup(file)))
+ if(NULL == (estack->slot[estack->nused].file_name = H5MM_xstrdup(file)))
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].line = line;
- if(NULL == (estack->slot[estack->nused].desc = H5MM_xstrdup(desc)))
+ estack->slot[estack->nused].line = line;
+ if(NULL == (estack->slot[estack->nused].desc = H5MM_xstrdup(desc)))
HGOTO_DONE(FAIL)
- estack->nused++;
+ estack->nused++;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E__push_stack() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_clear_entries
+ * Function: H5E_clear_entries
*
- * Purpose: Private function to clear the error stack entries for the
+ * Purpose: Private function to clear the error stack entries for the
* specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, August 6, 2003
*
*-------------------------------------------------------------------------
@@ -896,16 +896,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_clear_entries() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_clear_stack
+ * Function: H5E_clear_stack
*
- * Purpose: Private function to clear the error stack for the
+ * Purpose: Private function to clear the error stack for the
* specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, July 16, 2003
*
*-------------------------------------------------------------------------
@@ -919,7 +919,7 @@ H5E_clear_stack(H5E_t *estack)
/* Check for 'default' error stack */
if(estack == NULL)
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Empty the error stack */
@@ -932,16 +932,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_clear_stack() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_pop
+ * Function: H5E_pop
*
- * Purpose: Private function to delete some error messages from the top
+ * Purpose: Private function to delete some error messages from the top
* of error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 16, 2003
*
*-------------------------------------------------------------------------
@@ -965,17 +965,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_pop() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_dump_api_stack
+ * Function: H5E_dump_api_stack
*
- * Purpose: Private function to dump the error stack during an error in
+ * Purpose: Private function to dump the error stack during an error in
* an API function if a callback function is defined for the
* current error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, August 6, 2003
*
*-------------------------------------------------------------------------
@@ -996,7 +996,7 @@ H5E_dump_api_stack(hbool_t is_api)
#ifdef H5_NO_DEPRECATED_SYMBOLS
if(estack->auto_op.func2)
(void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+#else /* H5_NO_DEPRECATED_SYMBOLS */
if(estack->auto_op.vers == 1) {
if(estack->auto_op.func1)
(void)((estack->auto_op.func1)(estack->auto_data));
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index 4b03036..1531fa3 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -32,11 +32,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -112,7 +112,7 @@ const H5FA_class_t H5FA_CLS_TEST[1]={{
H5FL_DEFINE_STATIC(H5FA__test_ctx_t);
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_crt_context
*
@@ -147,7 +147,7 @@ CATCH
END_FUNC(STATIC) /* end H5FA__test_crt_context() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_dst_context
*
@@ -175,7 +175,7 @@ H5FA__test_dst_context(void *_ctx))
END_FUNC(STATIC) /* end H5FA__test_dst_context() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_fill
*
@@ -203,7 +203,7 @@ H5FA__test_fill(void *nat_blk, size_t nelmts))
END_FUNC(STATIC) /* end H5FA__test_fill() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_encode
*
@@ -247,7 +247,7 @@ H5FA__test_encode(void *raw, const void *_elmt, size_t nelmts, void H5_ATTR_UNUS
END_FUNC(STATIC) /* end H5FA__test_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_decode
*
@@ -292,7 +292,7 @@ H5FA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_UNU
END_FUNC(STATIC) /* end H5FA__test_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_debug
*
@@ -318,13 +318,13 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
(unsigned long long)*(const uint64_t *)elmt);
END_FUNC(STATIC) /* end H5FA__test_debug() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_crt_dbg_context
*
@@ -359,7 +359,7 @@ CATCH
END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA_get_cparam_test
*
@@ -386,7 +386,7 @@ H5FA_get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA_cmp_cparam_test
*
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index efbdafe..8878c25 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -15,22 +15,22 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Thursday, July 29, 1999
*
- * Purpose: This is the MPI-2 I/O driver.
+ * Purpose: This is the MPI-2 I/O driver.
*
*/
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Dprivate.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_PARALLEL
@@ -58,16 +58,16 @@ static char H5FD_mpi_native_g[] = "native";
* driver doesn't bother to keep it updated since it's an expensive operation.
*/
typedef struct H5FD_mpio_t {
- H5FD_t pub; /*public stuff, must be first */
- MPI_File f; /*MPIO file handle */
- MPI_Comm comm; /*communicator */
- MPI_Info info; /*file information */
+ H5FD_t pub; /*public stuff, must be first */
+ MPI_File f; /*MPIO file handle */
+ MPI_Comm comm; /*communicator */
+ MPI_Info info; /*file information */
int mpi_rank; /* This process's rank */
int mpi_size; /* Total number of processes */
- haddr_t eof; /*end-of-file marker */
- haddr_t eoa; /*end-of-address marker */
- haddr_t last_eoa; /* Last known end-of-address marker */
- haddr_t local_eof; /* Local end-of-file address for each process */
+ haddr_t eof; /*end-of-file marker */
+ haddr_t eoa; /*end-of-address marker */
+ haddr_t last_eoa; /* Last known end-of-address marker */
+ haddr_t local_eof; /* Local end-of-file address for each process */
} H5FD_mpio_t;
/* Private Prototypes */
@@ -78,7 +78,7 @@ static void *H5FD_mpio_fapl_get(H5FD_t *_file);
static void *H5FD_mpio_fapl_copy(const void *_old_fa);
static herr_t H5FD_mpio_fapl_free(void *_fa);
static H5FD_t *H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_mpio_close(H5FD_t *_file);
static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
@@ -99,35 +99,35 @@ static herr_t H5FD_mpio_get_info(H5FD_t *_file, void** mpi_info);
/* The MPIO file driver information */
static const H5FD_class_mpi_t H5FD_mpio_g = {
{ /* Start of superclass information */
- "mpio", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_SEMI, /* fc_degree */
+ "mpio", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_SEMI, /* fc_degree */
H5FD_mpio_term, /*terminate */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_mpio_fapl_t), /*fapl_size */
- H5FD_mpio_fapl_get, /*fapl_get */
- H5FD_mpio_fapl_copy, /*fapl_copy */
- H5FD_mpio_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_mpio_open, /*open */
- H5FD_mpio_close, /*close */
- NULL, /*cmp */
- H5FD_mpio_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_mpio_get_eoa, /*get_eoa */
- H5FD_mpio_set_eoa, /*set_eoa */
- H5FD_mpio_get_eof, /*get_eof */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_mpio_fapl_t), /*fapl_size */
+ H5FD_mpio_fapl_get, /*fapl_get */
+ H5FD_mpio_fapl_copy, /*fapl_copy */
+ H5FD_mpio_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_mpio_open, /*open */
+ H5FD_mpio_close, /*close */
+ NULL, /*cmp */
+ H5FD_mpio_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_mpio_get_eoa, /*get_eoa */
+ H5FD_mpio_set_eoa, /*set_eoa */
+ H5FD_mpio_get_eof, /*get_eof */
H5FD_mpio_get_handle, /*get_handle */
- H5FD_mpio_read, /*read */
- H5FD_mpio_write, /*write */
- H5FD_mpio_flush, /*flush */
- H5FD_mpio_truncate, /*truncate */
+ H5FD_mpio_read, /*read */
+ H5FD_mpio_write, /*write */
+ H5FD_mpio_flush, /*flush */
+ H5FD_mpio_truncate, /*truncate */
NULL, /*lock */
NULL, /*unlock */
H5FD_FLMAP_DICHOTOMY /*fl_map */
@@ -158,7 +158,7 @@ static int H5FD_mpio_Debug[256] =
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
#endif
-
+
/*--------------------------------------------------------------------------
NAME
H5FD__init_package -- Initialize interface-specific information
@@ -185,17 +185,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD__init_package() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_init
+ * Function: H5FD_mpio_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the mpio driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the mpio driver.
+ * Failure: Negative.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 5, 1999
*
*-------------------------------------------------------------------------
@@ -207,7 +207,7 @@ H5FD_mpio_init(void)
static int H5FD_mpio_Debug_inited = 0;
#endif /* H5FDmpio_DEBUG */
const char *s; /* String for environment variables */
- hid_t ret_value; /* Return value */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -226,12 +226,12 @@ H5FD_mpio_init(void)
s = HDgetenv("H5FD_mpio_Debug");
if(s) {
/* Set debug mask */
- while(*s) {
- H5FD_mpio_Debug[(int)*s]++;
- s++;
- } /* end while */
+ while(*s) {
+ H5FD_mpio_Debug[(int)*s]++;
+ s++;
+ } /* end while */
} /* end if */
- H5FD_mpio_Debug_inited++;
+ H5FD_mpio_Debug_inited++;
} /* end if */
#endif /* H5FDmpio_DEBUG */
@@ -242,11 +242,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_init() */
-
+
/*---------------------------------------------------------------------------
- * Function: H5FD_mpio_term
+ * Function: H5FD_mpio_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Returns: Non-negative on success or negative on failure
*
@@ -266,43 +266,43 @@ H5FD_mpio_term(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpio_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_mpio
+ * Function: H5Pset_fapl_mpio
*
- * Purpose: Store the user supplied MPIO communicator comm and info in
- * the file access property list FAPL_ID which can then be used
- * to create and/or open the file. This function is available
- * only in the parallel HDF5 library and is not collective.
+ * Purpose: Store the user supplied MPIO communicator comm and info in
+ * the file access property list FAPL_ID which can then be used
+ * to create and/or open the file. This function is available
+ * only in the parallel HDF5 library and is not collective.
*
- * comm is the MPI communicator to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of comm. Any modification to comm after this function
- * call returns has no effect on the access property list.
+ * comm is the MPI communicator to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of comm. Any modification to comm after this function
+ * call returns has no effect on the access property list.
*
- * info is the MPI Info object to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of info. Any modification to info after this
- * function call returns has no effect on the access property
- * list.
+ * info is the MPI Info object to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of info. Any modification to info after this
+ * function call returns has no effect on the access property
+ * list.
*
* If fapl_id has previously set comm and info values, they
* will be replaced and the old communicator and Info object
* are freed.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Albert Cheng
- * Feb 3, 1998
+ * Programmer: Albert Cheng
+ * Feb 3, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
{
- H5FD_mpio_fapl_t fa;
+ H5FD_mpio_fapl_t fa;
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
@@ -316,7 +316,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
if(MPI_COMM_NULL == comm)
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
/* Initialize driver specific properties */
fa.comm = comm;
@@ -329,28 +329,28 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Pset_fapl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_mpio
+ * Function: H5Pget_fapl_mpio
*
- * Purpose: If the file access property list is set to the H5FD_MPIO
- * driver then this function returns duplicates of the MPI
- * communicator and Info object stored through the comm and
- * info pointers. It is the responsibility of the application
- * to free the returned communicator and Info object.
+ * Purpose: If the file access property list is set to the H5FD_MPIO
+ * driver then this function returns duplicates of the MPI
+ * communicator and Info object stored through the comm and
+ * info pointers. It is the responsibility of the application
+ * to free the returned communicator and Info object.
*
- * Return: Success: Non-negative with the communicator and
- * Info object returned through the comm and
- * info arguments if non-null. Since they are
- * duplicates of the stored objects, future
- * modifications to the access property list do
- * not affect them and it is the responsibility
- * of the application to free them.
+ * Return: Success: Non-negative with the communicator and
+ * Info object returned through the comm and
+ * info arguments if non-null. Since they are
+ * duplicates of the stored objects, future
+ * modifications to the access property list do
+ * not affect them and it is the responsibility
+ * of the application to free them.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
+ * Programmer: Robb Matzke
+ * Thursday, February 26, 1998
*
*-------------------------------------------------------------------------
*/
@@ -359,9 +359,9 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
const H5FD_mpio_fapl_t *fa; /* MPIO fapl info */
- MPI_Comm comm_tmp = MPI_COMM_NULL;
+ MPI_Comm comm_tmp = MPI_COMM_NULL;
hbool_t comm_copied = FALSE; /* MPI Comm has been duplicated */
- int mpi_code; /* MPI return code */
+ int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -377,19 +377,19 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
/* Store the duplicated communicator in a temporary variable for error */
/* recovery in case the INFO duplication fails. */
if(comm) {
- if(MPI_SUCCESS != (mpi_code = MPI_Comm_dup(fa->comm, &comm_tmp)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
+ if(MPI_SUCCESS != (mpi_code = MPI_Comm_dup(fa->comm, &comm_tmp)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
comm_copied = TRUE;
} /* end if */
if(info) {
- if(MPI_INFO_NULL != fa->info) {
- if(MPI_SUCCESS != (mpi_code = MPI_Info_dup(fa->info, info)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
- } /* end if */
+ if(MPI_INFO_NULL != fa->info) {
+ if(MPI_SUCCESS != (mpi_code = MPI_Info_dup(fa->info, info)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
+ } /* end if */
else
- /* do not dup it */
- *info = MPI_INFO_NULL;
+ /* do not dup it */
+ *info = MPI_INFO_NULL;
} /* end if */
/* Store the copied communicator, now that the Info object has been
@@ -400,33 +400,33 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
done:
if(ret_value < 0)
- /* need to free anything created here */
- if(comm_copied)
- MPI_Comm_free(&comm_tmp);
+ /* need to free anything created here */
+ if(comm_copied)
+ MPI_Comm_free(&comm_tmp);
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_fapl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio
+ * Function: H5Pset_dxpl_mpio
*
- * Purpose: Set the data transfer property list DXPL_ID to use transfer
- * mode XFER_MODE. The property list can then be used to control
- * the I/O transfer mode during data I/O operations. The valid
- * transfer modes are:
+ * Purpose: Set the data transfer property list DXPL_ID to use transfer
+ * mode XFER_MODE. The property list can then be used to control
+ * the I/O transfer mode during data I/O operations. The valid
+ * transfer modes are:
*
- * H5FD_MPIO_INDEPENDENT:
- * Use independent I/O access (the default).
+ * H5FD_MPIO_INDEPENDENT:
+ * Use independent I/O access (the default).
*
- * H5FD_MPIO_COLLECTIVE:
- * Use collective I/O access.
+ * H5FD_MPIO_COLLECTIVE:
+ * Use collective I/O access.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Albert Cheng
- * April 2, 1998
+ * Programmer: Albert Cheng
+ * April 2, 1998
*
*-------------------------------------------------------------------------
*/
@@ -456,21 +456,21 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_dxpl_mpio
+ * Function: H5Pget_dxpl_mpio
*
- * Purpose: Queries the transfer mode current set in the data transfer
- * property list DXPL_ID. This is not collective.
+ * Purpose: Queries the transfer mode current set in the data transfer
+ * property list DXPL_ID. This is not collective.
*
- * Return: Success: Non-negative, with the transfer mode returned
- * through the XFER_MODE argument if it is
- * non-null.
+ * Return: Success: Non-negative, with the transfer mode returned
+ * through the XFER_MODE argument if it is
+ * non-null.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Albert Cheng
- * April 2, 1998
+ * Programmer: Albert Cheng
+ * April 2, 1998
*
*-------------------------------------------------------------------------
*/
@@ -495,23 +495,23 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_dxpl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_collective_opt
+ * Function: H5Pset_dxpl_mpio_collective_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
+ * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
+ * without involving decision-making inside HDF5
*
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Note: The library will do linked chunk I/O or multi-chunk I/O without
+ * involving communications for decision-making process.
+ * The library won't behave as it asks for only when we find
+ * that the low-level MPI-IO package doesn't support this.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -541,21 +541,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt
+ * Function: H5Pset_dxpl_mpio_chunk_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
+ * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
+ * without involving decision-making inside HDF5
*
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Note: The library will do linked chunk I/O or multi-chunk I/O without
+ * involving communications for decision-making process.
+ * The library won't behave as it asks for only when we find
+ * that the low-level MPI-IO package doesn't support this.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -583,21 +583,21 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt_num
+ * Function: H5Pset_dxpl_mpio_chunk_opt_num
*
- * Purpose: To set a threshold for doing linked chunk IO
+ * Purpose: To set a threshold for doing linked chunk IO
*
- * Note: If the number is greater than the threshold set by the user,
- * the library will do linked chunk I/O; otherwise, I/O will be
- * done for every chunk.
+ * Note: If the number is greater than the threshold set by the user,
+ * the library will do linked chunk I/O; otherwise, I/O will be
+ * done for every chunk.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -625,24 +625,24 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt_num() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt_ratio
+ * Function: H5Pset_dxpl_mpio_chunk_opt_ratio
*
- * Purpose: To set a threshold for doing collective I/O for each chunk
+ * Purpose: To set a threshold for doing collective I/O for each chunk
*
- * Note: The library will calculate the percentage of the number of
- * process holding selections at each chunk. If that percentage
- * of number of process in the individual chunk is greater than
- * the threshold set by the user, the library will do collective
- * chunk I/O for this chunk; otherwise, independent I/O will be
- * done for this chunk.
+ * Note: The library will calculate the percentage of the number of
+ * process holding selections at each chunk. If that percentage
+ * of number of process in the individual chunk is greater than
+ * the threshold set by the user, the library will do collective
+ * chunk I/O for this chunk; otherwise, independent I/O will be
+ * done for this chunk.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -670,19 +670,19 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt_ratio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_get
+ * Function: H5FD_mpio_fapl_get
*
- * Purpose: Returns a file access property list which could be used to
- * create another file the same as this one.
+ * Purpose: Returns a file access property list which could be used to
+ * create another file the same as this one.
*
- * Return: Success: Ptr to new file access property list with all
- * fields copied from the file pointer.
+ * Return: Success: Ptr to new file access property list with all
+ * fields copied from the file pointer.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -690,8 +690,8 @@ done:
static void *
H5FD_mpio_fapl_get(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- H5FD_mpio_fapl_t *fa = NULL;
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_fapl_t *fa = NULL;
void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -704,7 +704,7 @@ H5FD_mpio_fapl_get(H5FD_t *_file)
/* Duplicate communicator and Info object. */
if(FAIL == H5FD_mpi_comm_info_dup(file->comm, file->info, &fa->comm, &fa->info))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
/* Set return value */
ret_value = fa;
@@ -713,17 +713,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_copy
+ * Function: H5FD_mpio_fapl_copy
*
- * Purpose: Copies the mpio-specific file access properties.
+ * Purpose: Copies the mpio-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Jan 8, 2003
*
*-------------------------------------------------------------------------
@@ -731,14 +731,14 @@ done:
static void *
H5FD_mpio_fapl_copy(const void *_old_fa)
{
- void *ret_value = NULL;
+ void *ret_value = NULL;
const H5FD_mpio_fapl_t *old_fa = (const H5FD_mpio_fapl_t*)_old_fa;
- H5FD_mpio_fapl_t *new_fa = NULL;
+ H5FD_mpio_fapl_t *new_fa = NULL;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
+HDfprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
#endif
if(NULL == (new_fa = (H5FD_mpio_fapl_t *)H5MM_malloc(sizeof(H5FD_mpio_fapl_t))))
@@ -749,34 +749,34 @@ fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
/* Duplicate communicator and Info object. */
if(FAIL == H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info, &new_fa->comm, &new_fa->info))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
ret_value = new_fa;
done:
if (NULL == ret_value){
- /* cleanup */
- if (new_fa)
- H5MM_xfree(new_fa);
+ /* cleanup */
+ if (new_fa)
+ H5MM_xfree(new_fa);
}
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
+HDfprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_fapl_copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_free
+ * Function: H5FD_mpio_fapl_free
*
- * Purpose: Frees the mpio-specific file access properties.
+ * Purpose: Frees the mpio-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Jan 8, 2003
*
* Modifications:
@@ -786,13 +786,13 @@ fprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
static herr_t
H5FD_mpio_fapl_free(void *_fa)
{
- herr_t ret_value = SUCCEED;
- H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t*)_fa;
+ herr_t ret_value = SUCCEED;
+ H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t*)_fa;
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "in H5FD_mpio_fapl_free\n");
+HDfprintf(stderr, "in H5FD_mpio_fapl_free\n");
#endif
HDassert(fa);
@@ -803,23 +803,23 @@ fprintf(stderr, "in H5FD_mpio_fapl_free\n");
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
+HDfprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_fapl_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_set_mpio_atomicity
+ * Function: H5FD_set_mpio_atomicity
*
- * Purpose: Sets the atomicity mode
+ * Purpose: Sets the atomicity mode
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
@@ -835,7 +835,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_set_mpio_atomicity\n");
+ HDfprintf(stdout, "Entering H5FD_set_mpio_atomicity\n");
#endif
if (FALSE == flag)
@@ -850,23 +850,23 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_set_mpio_atomicity\n");
+ HDfprintf(stdout, "Leaving H5FD_set_mpio_atomicity\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_get_mpio_atomicity
+ * Function: H5FD_get_mpio_atomicity
*
- * Purpose: Returns the atomicity mode
+ * Purpose: Returns the atomicity mode
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
@@ -882,7 +882,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_get_mpio_atomicity\n");
+ HDfprintf(stdout, "Entering H5FD_get_mpio_atomicity\n");
#endif
/* get atomicity value */
@@ -897,21 +897,21 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_get_mpio_atomicity\n");
+ HDfprintf(stdout, "Leaving H5FD_get_mpio_atomicity\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_open
*
* Purpose: Opens a file with name NAME. The FLAGS are a bit field with
- * purpose similar to the second argument of open(2) and which
- * are defined in H5Fpublic.h. The file access property list
- * FAPL_ID contains the properties driver properties and MAXADDR
- * is the largest address which this file will be expected to
- * access. This is collective.
+ * purpose similar to the second argument of open(2) and which
+ * are defined in H5Fpublic.h. The file access property list
+ * FAPL_ID contains the properties driver properties and MAXADDR
+ * is the largest address which this file will be expected to
+ * access. This is collective.
*
* Return: Success: A new file pointer.
*
@@ -924,29 +924,29 @@ done:
*/
static H5FD_t *
H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t H5_ATTR_UNUSED maxaddr)
+ haddr_t H5_ATTR_UNUSED maxaddr)
{
- H5FD_mpio_t *file=NULL;
- MPI_File fh;
+ H5FD_mpio_t *file=NULL;
+ MPI_File fh;
unsigned file_opened=0; /* Flag to indicate that the file was successfully opened */
- int mpi_amode;
- int mpi_rank; /* MPI rank of this process */
- int mpi_size; /* Total number of MPI processes */
- int mpi_code; /* mpi return code */
- MPI_Offset size;
- const H5FD_mpio_fapl_t *fa = NULL;
- H5FD_mpio_fapl_t _fa;
+ int mpi_amode;
+ int mpi_rank; /* MPI rank of this process */
+ int mpi_size; /* Total number of MPI processes */
+ int mpi_code; /* mpi return code */
+ MPI_Offset size;
+ const H5FD_mpio_fapl_t *fa = NULL;
+ H5FD_mpio_fapl_t _fa;
H5P_genplist_t *plist; /* Property list pointer */
MPI_Comm comm_dup = MPI_COMM_NULL;
MPI_Info info_dup = MPI_INFO_NULL;
- H5FD_t *ret_value; /* Return value */
+ H5FD_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t']) {
- fprintf(stdout, "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
- "fapl_id=%d, maxaddr=%lu)\n", name, flags, (int)fapl_id, (unsigned long)maxaddr);
+ HDfprintf(stdout, "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
+ "fapl_id=%d, maxaddr=%lu)\n", name, flags, (int)fapl_id, (unsigned long)maxaddr);
}
#endif
@@ -954,18 +954,18 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
if(H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MPIO != H5P_peek_driver(plist)) {
- _fa.comm = MPI_COMM_SELF; /*default*/
- _fa.info = MPI_INFO_NULL; /*default*/
- fa = &_fa;
+ _fa.comm = MPI_COMM_SELF; /*default*/
+ _fa.info = MPI_INFO_NULL; /*default*/
+ fa = &_fa;
} /* end if */
else {
if(NULL == (fa = (const H5FD_mpio_fapl_t *)H5P_peek_driver_info(plist)))
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
} /* end else */
/* Duplicate communicator and Info object for use by this file. */
if(FAIL == H5FD_mpi_comm_info_dup(fa->comm, fa->info, &comm_dup, &info_dup))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
/* convert HDF5 flags to MPI-IO flags */
/* some combinations are illegal; let MPI-IO figure it out */
@@ -986,7 +986,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
if(flag) {
int i;
- fprintf(stdout, "H5FD_mpio debug flags = '%s'\n", debug_str);
+ HDfprintf(stdout, "H5FD_mpio debug flags = '%s'\n", debug_str);
for(i = 0; debug_str[i]/*end of string*/ && i < 128/*just in case*/; ++i)
H5FD_mpio_Debug[(int)debug_str[i]] = 1;
}
@@ -1047,57 +1047,57 @@ done:
if(ret_value==NULL) {
if(file_opened)
MPI_File_close(&fh);
- if (MPI_COMM_NULL != comm_dup)
- MPI_Comm_free(&comm_dup);
- if (MPI_INFO_NULL != info_dup)
- MPI_Info_free(&info_dup);
- if (file)
- H5MM_xfree(file);
+ if (MPI_COMM_NULL != comm_dup)
+ MPI_Comm_free(&comm_dup);
+ if (MPI_INFO_NULL != info_dup)
+ MPI_Info_free(&info_dup);
+ if (file)
+ H5MM_xfree(file);
} /* end if */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_open\n" );
+ HDfprintf(stdout, "Leaving H5FD_mpio_open\n" );
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_open() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_close
*
* Purpose: Closes a file. This is collective.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
* Programmer: Unknown
* January 30, 1998
*
* Modifications:
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
+ * Robb Matzke, 1998-02-18
+ * Added the ACCESS_PARMS argument.
*
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
+ * Robb Matzke, 1999-08-06
+ * Modified to work with the virtual file layer.
*
- * Albert Cheng, 2003-04-17
- * Free the communicator stored.
+ * Albert Cheng, 2003-04-17
+ * Free the communicator stored.
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpio_close(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ int mpi_code; /* MPI return code */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_close\n");
+ HDfprintf(stdout, "Entering H5FD_mpio_close\n");
#endif
HDassert(file);
HDassert(H5FD_MPIO==file->pub.driver_id);
@@ -1113,33 +1113,33 @@ H5FD_mpio_close(H5FD_t *_file)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_close\n");
+ HDfprintf(stdout, "Leaving H5FD_mpio_close\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_query
+ * Function: H5FD_mpio_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
* Modifications:
*
- * John Mainzer -- 9/21/05
- * Modified code to turn off the
- * H5FD_FEAT_ACCUMULATE_METADATA_WRITE flag.
+ * John Mainzer -- 9/21/05
+ * Modified code to turn off the
+ * H5FD_FEAT_ACCUMULATE_METADATA_WRITE flag.
* With the movement of
- * all cache writes to process 0, this flag has become
- * problematic in PHDF5.
+ * all cache writes to process 0, this flag has become
+ * problematic in PHDF5.
*
*-------------------------------------------------------------------------
*/
@@ -1161,19 +1161,19 @@ H5FD_mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_get_eoa
+ * Function: H5FD_mpio_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
+ * Return: Success: The end-of-address marker.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 6, 1999
*
* Modifications:
@@ -1186,7 +1186,7 @@ H5FD_mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out
static haddr_t
H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1196,19 +1196,19 @@ H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_LEAVE_NOAPI(file->eoa)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_set_eoa
+ * Function: H5FD_mpio_set_eoa
*
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 6, 1999
*
* Modifications:
@@ -1221,7 +1221,7 @@ H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
static herr_t
H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1233,30 +1233,30 @@ H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_get_eof
+ * Function: H5FD_mpio_get_eof
*
- * Purpose: Gets the end-of-file marker for the file. The EOF marker
- * is the real size of the file.
+ * Purpose: Gets the end-of-file marker for the file. The EOF marker
+ * is the real size of the file.
*
- * The MPIO driver doesn't bother keeping this field updated
- * since that's a relatively expensive operation. Fortunately
- * the library only needs the EOF just after the file is opened
- * in order to determine whether the file is empty, truncated,
- * or okay. Therefore, any MPIO I/O function will set its value
- * to HADDR_UNDEF which is the error return value of this
- * function.
+ * The MPIO driver doesn't bother keeping this field updated
+ * since that's a relatively expensive operation. Fortunately
+ * the library only needs the EOF just after the file is opened
+ * in order to determine whether the file is empty, truncated,
+ * or okay. Therefore, any MPIO I/O function will set its value
+ * to HADDR_UNDEF which is the error return value of this
+ * function.
*
* Keeping the EOF updated (during write calls) is expensive
* because any process may extend the physical end of the
* file. -QAK
*
- * Return: Success: The end-of-address marker.
+ * Return: Success: The end-of-address marker.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 6, 1999
*
* Modifications:
@@ -1266,7 +1266,7 @@ H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
static haddr_t
H5FD_mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1276,7 +1276,7 @@ H5FD_mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_LEAVE_NOAPI(file->eof)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_get_handle
*
@@ -1308,7 +1308,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_get_info
*
@@ -1341,55 +1341,55 @@ done:
} /* H5FD_mpio_get_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_read
+ * Function: H5FD_mpio_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * Reading past the end of the MPI file returns zeros instead of
- * failing. MPI is able to coalesce requests from different
- * processes (collective or independent).
+ * Reading past the end of the MPI file returns zeros instead of
+ * failing. MPI is able to coalesce requests from different
+ * processes (collective or independent).
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, Contents of buffer BUF are undefined.
+ * Failure: -1, Contents of buffer BUF are undefined.
*
- * Programmer: rky, 1998-01-30
+ * Programmer: rky, 1998-01-30
*
* Modifications:
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
+ * Robb Matzke, 1998-02-18
+ * Added the ACCESS_PARMS argument.
*
- * rky, 1998-04-10
- * Call independent or collective MPI read, based on
- * ACCESS_PARMS.
+ * rky, 1998-04-10
+ * Call independent or collective MPI read, based on
+ * ACCESS_PARMS.
*
- * Albert Cheng, 1998-06-01
- * Added XFER_MODE to control independent or collective MPI
- * read.
+ * Albert Cheng, 1998-06-01
+ * Added XFER_MODE to control independent or collective MPI
+ * read.
*
- * rky, 1998-08-16
- * Use BTYPE, FTYPE, and DISP from access parms. The guts of
- * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
- * single dual-purpose routine.
+ * rky, 1998-08-16
+ * Use BTYPE, FTYPE, and DISP from access parms. The guts of
+ * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
+ * single dual-purpose routine.
*
- * Robb Matzke, 1999-04-21
- * Changed XFER_MODE to XFER_PARMS for all H5F_*_read()
- * callbacks.
+ * Robb Matzke, 1999-04-21
+ * Changed XFER_MODE to XFER_PARMS for all H5F_*_read()
+ * callbacks.
*
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
+ * Robb Matzke, 1999-07-28
+ * The ADDR argument is passed by value.
*
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
+ * Robb Matzke, 1999-08-06
+ * Modified to work with the virtual file layer.
*
- * Quincey Koziol, 2002-05-14
- * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
+ * Quincey Koziol, 2002-05-14
+ * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
* for the I/O transfer. Someday we might include code to decode
* the MPI type used for more complicated transfers and call
* MPI_Get_count all the time.
@@ -1566,7 +1566,7 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type,
#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
} /* end if */
-
+
/* If the rank0-bcast feature was used, broadcast the # of bytes read to
* other ranks, which didn't perform any I/O.
*/
@@ -1607,102 +1607,102 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_write
+ * Function: H5FD_mpio_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * MPI is able to coalesce requests from different processes
- * (collective and independent).
+ * MPI is able to coalesce requests from different processes
+ * (collective and independent).
*
- * Return: Success: Zero. USE_TYPES and OLD_USE_TYPES in the
- * access params are altered.
+ * Return: Success: Zero. USE_TYPES and OLD_USE_TYPES in the
+ * access params are altered.
*
- * Failure: -1, USE_TYPES and OLD_USE_TYPES in the
- * access params may be altered.
+ * Failure: -1, USE_TYPES and OLD_USE_TYPES in the
+ * access params may be altered.
*
- * Programmer: Unknown
+ * Programmer: Unknown
* January 30, 1998
*
* Modifications:
- * rky, 1998-08-28
- * If the file->allsame flag is set, we assume that all the
- * procs in the relevant MPI communicator will write identical
- * data at identical offsets in the file, so only proc 0 will
- * write, and all other procs will wait for p0 to finish. This
- * is useful for writing metadata, for example. Note that we
- * don't _check_ that the data is identical. Also, the mechanism
- * we use to eliminate the redundant writes is by requiring a
- * call to H5FD_mpio_tas_allsame before the write, which is
- * rather klugey. Would it be better to pass a parameter to
- * low-level writes like H5F_block_write and H5F_low_write,
- * instead? Or...??? Also, when I created this mechanism I
- * wanted to minimize the difference in behavior between the old
- * way of doing things (i.e., all procs write) and the new way,
- * so the writes are eliminated at the very lowest level, here
- * in H5FD_mpio_write. It may be better to rethink that, and
- * short-circuit the writes at a higher level (e.g., at the
- * points in the code where H5FD_mpio_tas_allsame is called).
- *
- *
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
- *
- * rky, 1998-04-10
- * Call independent or collective MPI write, based on
- * ACCESS_PARMS.
- *
- * rky, 1998-04-24
- * Removed redundant write from H5FD_mpio_write.
- *
- * Albert Cheng, 1998-06-01
- * Added XFER_MODE to control independent or collective MPI
- * write.
- *
- * rky, 1998-08-16
- * Use BTYPE, FTYPE, and DISP from access parms. The guts of
- * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
- * single dual-purpose routine.
- *
- * rky, 1998-08-28
- * Added ALLSAME parameter to make all but proc 0 skip the
- * actual write.
- *
- * Robb Matzke, 1999-04-21
- * Changed XFER_MODE to XFER_PARMS for all H5FD_*_write()
- * callbacks.
- *
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
- *
- * Albert Cheng, 1999-12-19
- * When only-p0-write-allsame-data, p0 Bcasts the
- * ret_value to other processes. This prevents
- * a racing condition (that other processes try to
- * read the file before p0 finishes writing) and also
- * allows all processes to report the same ret_value.
- *
- * Kim Yates, Pat Weidhaas, 2000-09-26
- * Move block of coding where only p0 writes after the
+ * rky, 1998-08-28
+ * If the file->allsame flag is set, we assume that all the
+ * procs in the relevant MPI communicator will write identical
+ * data at identical offsets in the file, so only proc 0 will
+ * write, and all other procs will wait for p0 to finish. This
+ * is useful for writing metadata, for example. Note that we
+ * don't _check_ that the data is identical. Also, the mechanism
+ * we use to eliminate the redundant writes is by requiring a
+ * call to H5FD_mpio_tas_allsame before the write, which is
+ * rather klugey. Would it be better to pass a parameter to
+ * low-level writes like H5F_block_write and H5F_low_write,
+ * instead? Or...??? Also, when I created this mechanism I
+ * wanted to minimize the difference in behavior between the old
+ * way of doing things (i.e., all procs write) and the new way,
+ * so the writes are eliminated at the very lowest level, here
+ * in H5FD_mpio_write. It may be better to rethink that, and
+ * short-circuit the writes at a higher level (e.g., at the
+ * points in the code where H5FD_mpio_tas_allsame is called).
+ *
+ *
+ * Robb Matzke, 1998-02-18
+ * Added the ACCESS_PARMS argument.
+ *
+ * rky, 1998-04-10
+ * Call independent or collective MPI write, based on
+ * ACCESS_PARMS.
+ *
+ * rky, 1998-04-24
+ * Removed redundant write from H5FD_mpio_write.
+ *
+ * Albert Cheng, 1998-06-01
+ * Added XFER_MODE to control independent or collective MPI
+ * write.
+ *
+ * rky, 1998-08-16
+ * Use BTYPE, FTYPE, and DISP from access parms. The guts of
+ * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
+ * single dual-purpose routine.
+ *
+ * rky, 1998-08-28
+ * Added ALLSAME parameter to make all but proc 0 skip the
+ * actual write.
+ *
+ * Robb Matzke, 1999-04-21
+ * Changed XFER_MODE to XFER_PARMS for all H5FD_*_write()
+ * callbacks.
+ *
+ * Robb Matzke, 1999-07-28
+ * The ADDR argument is passed by value.
+ *
+ * Robb Matzke, 1999-08-06
+ * Modified to work with the virtual file layer.
+ *
+ * Albert Cheng, 1999-12-19
+ * When only-p0-write-allsame-data, p0 Bcasts the
+ * ret_value to other processes. This prevents
+ * a racing condition (that other processes try to
+ * read the file before p0 finishes writing) and also
+ * allows all processes to report the same ret_value.
+ *
+ * Kim Yates, Pat Weidhaas, 2000-09-26
+ * Move block of coding where only p0 writes after the
* MPI_File_set_view call.
*
- * Quincey Koziol, 2002-05-10
- * Instead of always writing metadata from process 0, spread the
+ * Quincey Koziol, 2002-05-10
+ * Instead of always writing metadata from process 0, spread the
* burden among all the processes by using a round-robin rotation
* scheme.
*
- * Quincey Koziol, 2002-05-10
- * Removed allsame code, keying off the type parameter instead.
+ * Quincey Koziol, 2002-05-10
+ * Removed allsame code, keying off the type parameter instead.
*
- * Quincey Koziol, 2002-05-14
- * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
+ * Quincey Koziol, 2002-05-14
+ * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
* for the I/O transfer. Someday we might include code to decode
* the MPI type used for more complicated transfers and call
* MPI_Get_count all the time.
@@ -1733,13 +1733,13 @@ static herr_t
H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr, size_t size, const void *buf)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- MPI_Offset mpi_off;
- MPI_Status mpi_stat; /* Status from I/O operation */
- MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ MPI_Offset mpi_off;
+ MPI_Status mpi_stat; /* Status from I/O operation */
+ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
+ int mpi_code; /* MPI return code */
#if MPI_VERSION >= 3
- MPI_Count bytes_written;
+ MPI_Count bytes_written;
MPI_Count type_size; /* MPI datatype used for I/O's size */
MPI_Count io_size; /* Actual number of bytes requested */
#else
@@ -1748,15 +1748,15 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
int io_size; /* Actual number of bytes requested */
#endif
int size_i;
- hbool_t use_view_this_time = FALSE;
+ hbool_t use_view_this_time = FALSE;
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_write\n" );
+ HDfprintf(stdout, "Entering H5FD_mpio_write\n" );
#endif
HDassert(file);
HDassert(H5FD_MPIO==file->pub.driver_id);
@@ -1777,7 +1777,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'w'])
- fprintf(stdout, "in H5FD_mpio_write mpi_off=%ld size_i=%d\n", (long)mpi_off, size_i);
+ HDfprintf(stdout, "in H5FD_mpio_write mpi_off=%ld size_i=%d\n", (long)mpi_off, size_i);
#endif
/* Get the transfer mode from the API context */
@@ -1791,7 +1791,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
* could mean "use MPI_BYTE" by convention).
*/
if(xfer_mode == H5FD_MPIO_COLLECTIVE) {
- MPI_Datatype file_type;
+ MPI_Datatype file_type;
/* Remember that views are used */
use_view_this_time = TRUE;
@@ -1818,7 +1818,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
+ HDfprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
@@ -1828,7 +1828,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
if(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n");
+ HDfprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n");
#endif
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code)
@@ -1838,7 +1838,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "Metadata Coll opt property should be collective at this point")
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n");
+ HDfprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n");
#endif
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code)
@@ -1889,21 +1889,21 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
done:
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "proc %d: Leaving H5FD_mpio_write with ret_value=%d\n",
- file->mpi_rank, ret_value );
+ HDfprintf(stdout, "proc %d: Leaving H5FD_mpio_write with ret_value=%d\n",
+ file->mpi_rank, ret_value );
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_flush
*
* Purpose: Makes sure that all data is on disk. This is collective.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
* Programmer: Robb Matzke
* January 30, 1998
@@ -1913,15 +1913,15 @@ done:
static herr_t
H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* mpi return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ int mpi_code; /* mpi return code */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Entering %s\n", FUNC);
+ HDfprintf(stdout, "Entering %s\n", FUNC);
#endif
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
@@ -1934,41 +1934,41 @@ H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Leaving %s\n", FUNC);
+ HDfprintf(stdout, "Leaving %s\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_flush() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_truncate
*
* Purpose: Make certain the file's size matches it's allocated size
*
- * This is a little sticky in the mpio case, as it is not
+ * This is a little sticky in the mpio case, as it is not
* easy for us to track the current EOF by extracting it from
- * write calls.
+ * write calls.
*
* Instead, we first check to see if the eoa has changed since
- * the last call to this function. If it has, we call
- * MPI_File_get_size() to determine the current EOF, and
- * only call MPI_File_set_size() if this value disagrees
+ * the last call to this function. If it has, we call
+ * MPI_File_get_size() to determine the current EOF, and
+ * only call MPI_File_set_size() if this value disagrees
* with the current eoa.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* January 31, 2008
*
* Changes: Heavily reworked to avoid unnecessary MPI_File_set_size()
* calls. The hope is that these calls are superfluous in the
- * typical case, allowing us to avoid truncates most of the
+ * typical case, allowing us to avoid truncates most of the
* time.
*
- * The basic idea is to query the file system to get the
- * current eof, and only truncate if the file systems
+ * The basic idea is to query the file system to get the
+ * current eof, and only truncate if the file systems
* conception of the eof disagrees with our eoa.
*
* JRM -- 10/27/17
@@ -1978,14 +1978,14 @@ done:
static herr_t
H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Entering %s\n", FUNC);
+ HDfprintf(stdout, "Entering %s\n", FUNC);
#endif
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
@@ -1995,13 +1995,13 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
MPI_Offset size;
MPI_Offset needed_eof;
- /* In principle, it is possible for the size returned by the
- * call to MPI_File_get_size() to depend on whether writes from
+ /* In principle, it is possible for the size returned by the
+ * call to MPI_File_get_size() to depend on whether writes from
* all proceeses have completed at the time process 0 makes the
- * call.
+ * call.
*
* In practice, most (all?) truncate calls will come after a barrier
- * and with no interviening writes to the file (with the possible
+ * and with no interviening writes to the file (with the possible
* exception of sueprblock / superblock extension message updates).
*
* Check the "MPI file closing" flag in the API context to determine
@@ -2032,13 +2032,13 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
if(MPI_SUCCESS != (mpi_code = MPI_File_set_size(file->f, needed_eof)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_size failed", mpi_code)
- /* In general, we must wait until all processes have finished
- * the truncate before any process can continue, since it is
- * possible that a process would write at the end of the
+ /* In general, we must wait until all processes have finished
+ * the truncate before any process can continue, since it is
+ * possible that a process would write at the end of the
* file, and this write would be discarded by the truncate.
*
- * While this is an issue for a user initiated flush, it may
- * not be an issue at file close. If so, we may be able to
+ * While this is an issue for a user initiated flush, it may
+ * not be an issue at file close. If so, we may be able to
* optimize out the following barrier in that case.
*/
if(MPI_SUCCESS != (mpi_code = MPI_Barrier(file->comm)))
@@ -2052,22 +2052,22 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
done:
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Leaving %s\n", FUNC);
+ HDfprintf(stdout, "Leaving %s\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_truncate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_mpi_rank
+ * Function: H5FD_mpio_mpi_rank
*
- * Purpose: Returns the MPI rank for a process
+ * Purpose: Returns the MPI rank for a process
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, May 16, 2002
*
* Modifications:
@@ -2077,7 +2077,7 @@ done:
static int
H5FD_mpio_mpi_rank(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2087,16 +2087,16 @@ H5FD_mpio_mpi_rank(const H5FD_t *_file)
FUNC_LEAVE_NOAPI(file->mpi_rank)
} /* end H5FD_mpio_mpi_rank() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_mpi_size
+ * Function: H5FD_mpio_mpi_size
*
- * Purpose: Returns the number of MPI processes
+ * Purpose: Returns the number of MPI processes
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, May 16, 2002
*
* Modifications:
@@ -2106,7 +2106,7 @@ H5FD_mpio_mpi_rank(const H5FD_t *_file)
static int
H5FD_mpio_mpi_size(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2116,17 +2116,17 @@ H5FD_mpio_mpi_size(const H5FD_t *_file)
FUNC_LEAVE_NOAPI(file->mpi_size)
} /* end H5FD_mpio_mpi_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_communicator
+ * Function: H5FD_mpio_communicator
*
- * Purpose: Returns the MPI communicator for the file.
+ * Purpose: Returns the MPI communicator for the file.
*
- * Return: Success: The communicator
+ * Return: Success: The communicator
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 9, 1999
*
* Modifications:
@@ -2136,7 +2136,7 @@ H5FD_mpio_mpi_size(const H5FD_t *_file)
static MPI_Comm
H5FD_mpio_communicator(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5FL.c b/src/H5FL.c
index 89a580a..21bbf02 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -642,7 +642,7 @@ H5FL__reg_term(void)
tmp = H5FL_reg_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_reg_gc_head.first->list->name, (int)H5FL_reg_gc_head.first->list->allocated);
+HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_reg_gc_head.first->list->name, (int)H5FL_reg_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
if(H5FL_reg_gc_head.first->list->allocated > 0) {
@@ -1312,7 +1312,7 @@ H5FL__blk_term(void)
tmp = H5FL_blk_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_blk_gc_head.first->pq->name, (int)H5FL_blk_gc_head.first->pq->allocated);
+HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_blk_gc_head.first->pq->name, (int)H5FL_blk_gc_head.first->pq->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
@@ -1780,7 +1780,7 @@ H5FL__arr_term(void)
/* Check if the list has allocations outstanding */
#ifdef H5FL_DEBUG
-printf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_arr_gc_head.first->list->name, (int)H5FL_arr_gc_head.first->list->allocated);
+HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_arr_gc_head.first->list->name, (int)H5FL_arr_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
if(H5FL_arr_gc_head.first->list->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
@@ -2408,7 +2408,7 @@ H5FL__fac_term_all(void)
tmp = H5FL_fac_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("%s: head->size = %d, head->allocated = %d\n", FUNC, (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
+HDprintf("%s: head->size = %d, head->allocated = %d\n", FUNC, (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* The list cannot have any allocations outstanding */
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 70dfeed..50b77f5 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5HFdbg.c
- * Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5HFdbg.c
+ * Feb 24 2006
+ * Quincey Koziol <koziol@ncsa.uiuc.edu>
*
- * Purpose: Dump debugging information about a fractal heap
+ * Purpose: Dump debugging information about a fractal heap
*
*-------------------------------------------------------------------------
*/
@@ -32,12 +32,12 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
@@ -96,17 +96,17 @@ static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
/* Local Variables */
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_id_print
+ * Function: H5HF_id_print
*
- * Purpose: Prints a fractal heap ID.
+ * Purpose: Prints a fractal heap ID.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 20 2015
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 20 2015
*
*-------------------------------------------------------------------------
*/
@@ -163,24 +163,24 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
/* Display the heap ID */
HDfprintf(stream, "%*s%-*s (%c, %Hu, %Zu)\n", indent, "", fwidth,
- "Heap ID info: (type, offset, length)",
+ "Heap ID info: (type, offset, length)",
id_type, obj_off, obj_len);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_id_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_debug
+ * Function: H5HF_dtable_debug
*
- * Purpose: Prints debugging info about a doubling table
+ * Purpose: Prints debugging info about a doubling table
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Feb 28 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 28 2006
*
*-------------------------------------------------------------------------
*/
@@ -202,57 +202,57 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
*/
/* Creation parameter values */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Doubling table width:",
- dtable->cparam.width);
+ "Doubling table width:",
+ dtable->cparam.width);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Starting block size:",
- dtable->cparam.start_block_size);
+ "Starting block size:",
+ dtable->cparam.start_block_size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Max. direct block size:",
- dtable->cparam.max_direct_size);
+ "Max. direct block size:",
+ dtable->cparam.max_direct_size);
HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth,
- "Max. index size:",
- dtable->cparam.max_index);
+ "Max. index size:",
+ dtable->cparam.max_index);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Starting # of rows in root indirect block:",
- dtable->cparam.start_root_rows);
+ "Starting # of rows in root indirect block:",
+ dtable->cparam.start_root_rows);
/* Run-time varying parameter values */
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Table's root address:",
- dtable->table_addr);
+ "Table's root address:",
+ dtable->table_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows in root indirect block:",
- dtable->curr_root_rows);
+ "Current # of rows in root indirect block:",
+ dtable->curr_root_rows);
/* Computed values */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows in root indirect block:",
- dtable->max_root_rows);
+ "Max. # of rows in root indirect block:",
+ dtable->max_root_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of direct rows in any indirect block:",
- dtable->max_direct_rows);
+ "Max. # of direct rows in any indirect block:",
+ dtable->max_direct_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for IDs in first row:",
- dtable->first_row_bits);
+ "# of bits for IDs in first row:",
+ dtable->first_row_bits);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "# of IDs in first row:",
- dtable->num_id_first_row);
+ "# of IDs in first row:",
+ dtable->num_id_first_row);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_print
+ * Function: H5HF_hdr_print
*
- * Purpose: Prints info about a fractal heap header.
+ * Purpose: Prints info about a fractal heap header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 23 2012
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Feb 23 2012
*
*-------------------------------------------------------------------------
*/
@@ -276,56 +276,56 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Heap is:",
- hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
+ "Heap is:",
+ hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Objects stored in 'debugging' format:",
- hdr->debug_objs);
+ "Objects stored in 'debugging' format:",
+ hdr->debug_objs);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "'Write once' flag:",
- hdr->write_once);
+ "'Write once' flag:",
+ hdr->write_once);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "'Huge' object IDs have wrapped:",
- hdr->huge_ids_wrapped);
+ "'Huge' object IDs have wrapped:",
+ hdr->huge_ids_wrapped);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Free space in managed blocks:",
- hdr->total_man_free);
+ "Free space in managed blocks:",
+ hdr->total_man_free);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Managed space data block size:",
- hdr->man_size);
+ "Managed space data block size:",
+ hdr->man_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total managed space allocated:",
- hdr->man_alloc_size);
+ "Total managed space allocated:",
+ hdr->man_alloc_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of managed space iterator:",
- hdr->man_iter_off);
+ "Offset of managed space iterator:",
+ hdr->man_iter_off);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of managed objects in heap:",
- hdr->man_nobjs);
+ "Number of managed objects in heap:",
+ hdr->man_nobjs);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of free space manager for managed blocks:",
- hdr->fs_addr);
+ "Address of free space manager for managed blocks:",
+ hdr->fs_addr);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Max. size of managed object:",
- (unsigned long)hdr->max_man_size);
+ "Max. size of managed object:",
+ (unsigned long)hdr->max_man_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "'Huge' object space used:",
- hdr->huge_size);
+ "'Huge' object space used:",
+ hdr->huge_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of 'huge' objects in heap:",
- hdr->huge_nobjs);
+ "Number of 'huge' objects in heap:",
+ hdr->huge_nobjs);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "ID of next 'huge' object:",
- hdr->huge_next_id);
+ "ID of next 'huge' object:",
+ hdr->huge_next_id);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of v2 B-tree for 'huge' objects:",
- hdr->huge_bt2_addr);
+ "Address of v2 B-tree for 'huge' objects:",
+ hdr->huge_bt2_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "'Tiny' object space used:",
- hdr->tiny_size);
+ "'Tiny' object space used:",
+ hdr->tiny_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of 'tiny' objects in heap:",
- hdr->tiny_nobjs);
+ "Number of 'tiny' objects in heap:",
+ hdr->tiny_nobjs);
HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
H5HF_dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
@@ -362,24 +362,24 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
FUNC_LEAVE_NOAPI_VOID
} /* end H5HF_hdr_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_debug
+ * Function: H5HF_hdr_debug
*
- * Purpose: Prints debugging info about a fractal heap header.
+ * Purpose: Prints debugging info about a fractal heap header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Feb 24 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -395,7 +395,7 @@ H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Print the information about the heap's header */
H5HF_hdr_print(hdr, FALSE, stream, indent, fwidth);
@@ -407,17 +407,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_dblock_debug_cb
+ * Function: H5HF_dblock_debug_cb
*
- * Purpose: Detect free space within a direct block
+ * Purpose: Detect free space within a direct block
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 13 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * May 13 2006
*
*-------------------------------------------------------------------------
*/
@@ -468,9 +468,9 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
len = end - start;
HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
- HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
- temp_str,
- start, len);
+ HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
+ temp_str,
+ start, len);
udata->sect_count++;
/* Mark this node's free space & check for overlaps w/other sections */
@@ -483,7 +483,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Flag overlaps */
if (overlap)
- fprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ HDfprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
udata->amount_free += len;
} /* end if */
@@ -491,17 +491,17 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dblock_debug_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_dblock_debug
+ * Function: H5HF_dblock_debug
*
- * Purpose: Prints debugging info about a fractal heap direct block.
+ * Purpose: Prints debugging info about a fractal heap direct block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Feb 28 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 28 2006
*
*-------------------------------------------------------------------------
*/
@@ -509,11 +509,11 @@ herr_t
H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
haddr_t hdr_addr, size_t block_size)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
H5HF_direct_t *dblock = NULL; /* Fractal heap direct block info */
- size_t blk_prefix_size; /* Size of prefix for block */
- size_t amount_free; /* Amount of free space in block */
- uint8_t *marker = NULL; /* Track free space for block */
+ size_t blk_prefix_size; /* Size of prefix for block */
+ size_t amount_free; /* Amount of free space in block */
+ uint8_t *marker = NULL; /* Track free space for block */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -531,13 +531,13 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/*
* Load the heap direct block
*/
if(NULL == (dblock = H5HF__man_dblock_protect(hdr, addr, block_size, NULL, 0, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
/* Print opening message */
HDfprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
@@ -546,19 +546,19 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:",
- hdr->heap_addr);
+ "Address of fractal heap that owns this block:",
+ hdr->heap_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of direct block in heap:",
- dblock->block_off);
+ "Offset of direct block in heap:",
+ dblock->block_off);
blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of block header:",
+ "Size of block header:",
blk_prefix_size);
/* Allocate space for the free space markers */
if(NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the free space information for the heap */
if(H5HF__space_start(hdr, FALSE) < 0)
@@ -618,17 +618,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_dblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_iblock_print
+ * Function: H5HF_iblock_print
*
- * Purpose: Prints debugging info about a fractal heap indirect block.
+ * Purpose: Prints debugging info about a fractal heap indirect block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 23 2012
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Feb 23 2012
*
*-------------------------------------------------------------------------
*/
@@ -638,7 +638,7 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
{
const H5HF_hdr_t *hdr; /* Pointer to heap's header */
char temp_str[64]; /* Temporary string, for formatting */
- size_t u, v; /* Local index variable */
+ size_t u, v; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -661,23 +661,23 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:",
- hdr->heap_addr);
+ "Address of fractal heap that owns this block:",
+ hdr->heap_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of indirect block in heap:",
- iblock->block_off);
+ "Offset of indirect block in heap:",
+ iblock->block_off);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of indirect block:",
- iblock->size);
+ "Size of indirect block:",
+ iblock->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows:",
- iblock->nrows);
+ "Current # of rows:",
+ iblock->nrows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows:",
- iblock->max_rows);
+ "Max. # of rows:",
+ iblock->max_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max direct block rows:",
- hdr->man_dtable.max_direct_rows);
+ "Max direct block rows:",
+ hdr->man_dtable.max_direct_rows);
/* Print the entry tables */
if(hdr->filter_len > 0)
@@ -750,17 +750,17 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
FUNC_LEAVE_NOAPI_VOID
} /* end H5HF_iblock_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_iblock_debug
+ * Function: H5HF_iblock_debug
*
- * Purpose: Prints debugging info about a fractal heap indirect block.
+ * Purpose: Prints debugging info about a fractal heap indirect block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 7 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Mar 7 2006
*
*-------------------------------------------------------------------------
*/
@@ -768,7 +768,7 @@ herr_t
H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
haddr_t hdr_addr, unsigned nrows)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
@@ -788,13 +788,13 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/*
* Load the heap indirect block
*/
if(NULL == (iblock = H5HF__man_iblock_protect(hdr, addr, nrows, NULL, 0, FALSE, H5AC__READ_ONLY_FLAG, &did_protect)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
/* Print the information about the heap's indirect block */
H5HF_iblock_print(iblock, FALSE, stream, indent, fwidth);
@@ -808,17 +808,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_sects_debug_cb
+ * Function: H5HF_sects_debug_cb
*
- * Purpose: Prints debugging info about a free space section for a fractal heap.
+ * Purpose: Prints debugging info about a free space section for a fractal heap.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 13 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * May 13 2006
*
*-------------------------------------------------------------------------
*/
@@ -839,20 +839,20 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Print generic section information */
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section type:",
- (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE ? "single" :
+ "Section type:",
+ (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE ? "single" :
(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ? "first row" :
(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
- "Section address:",
- sect->sect_info.addr);
+ "Section address:",
+ sect->sect_info.addr);
HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
- "Section size:",
- sect->sect_info.size);
+ "Section size:",
+ sect->sect_info.size);
#ifdef QAK
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:",
- (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
+ "Section state:",
+ (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
#endif /* QAK */
/* Dump section-specific debugging information */
@@ -863,17 +863,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sects_debug_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_sects_debug
+ * Function: H5HF_sects_debug
*
- * Purpose: Prints debugging info about free space sections for a fractal heap.
+ * Purpose: Prints debugging info about free space sections for a fractal heap.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 9 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * May 9 2006
*
*-------------------------------------------------------------------------
*/
@@ -881,7 +881,7 @@ herr_t
H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent,
int fwidth)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -897,7 +897,7 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent,
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Initialize the free space information for the heap */
if(H5HF__space_start(hdr, FALSE) < 0)
diff --git a/src/H5I.c b/src/H5I.c
index 097aad3..6c24d5a 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -33,8 +33,8 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Gprivate.h" /* Groups */
#include "H5Ipkg.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -46,25 +46,25 @@
/* Local Macros */
/* Combine a Type number and an atom index into an atom */
-#define H5I_MAKE(g,i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | \
- ((hid_t)(i) & ID_MASK))
+#define H5I_MAKE(g,i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | \
+ ((hid_t)(i) & ID_MASK))
/* Local typedefs */
/* Atom information structure used */
typedef struct H5I_id_info_t {
- hid_t id; /* ID for this info */
- unsigned count; /* ref. count for this atom */
+ hid_t id; /* ID for this info */
+ unsigned count; /* ref. count for this atom */
unsigned app_count; /* ref. count of application visible atoms */
- const void *obj_ptr; /* pointer associated with the atom */
+ const void *obj_ptr; /* pointer associated with the atom */
} H5I_id_info_t;
/* ID type structure used */
typedef struct {
const H5I_class_t *cls; /* Pointer to ID class */
- unsigned init_count; /* # of times this type has been initialized*/
- uint64_t id_count; /* Current number of IDs held */
- uint64_t nextid; /* ID to use for the next atom */
+ unsigned init_count; /* # of times this type has been initialized*/
+ uint64_t id_count; /* Current number of IDs held */
+ uint64_t nextid; /* ID to use for the next atom */
H5SL_t *ids; /* Pointer to skip list that stores IDs */
} H5I_id_type_t;
@@ -125,7 +125,7 @@ static H5I_id_info_t *H5I__find_id(hid_t id);
static int H5I__debug_cb(void *_item, void *_key, void *_udata);
static int H5I__id_dump_cb(void *_item, void *_key, void *_udata);
-
+
/*-------------------------------------------------------------------------
* Function: H5I_term_package
*
@@ -136,14 +136,14 @@ static int H5I__id_dump_cb(void *_item, void *_key, void *_udata);
* Return: Success: Positive if any action was taken that might
* affect some other interface; zero otherwise.
*
- * Failure: Negative.
+ * Failure: Negative.
*
*-------------------------------------------------------------------------
*/
int
H5I_term_package(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -177,7 +177,7 @@ H5I_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5I_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iregister_type
*
@@ -257,7 +257,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_type
*
@@ -272,7 +272,7 @@ done:
herr_t
H5I_register_type(const H5I_class_t *cls)
{
- H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/
+ H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -306,7 +306,7 @@ H5I_register_type(const H5I_class_t *cls)
type_ptr->init_count++;
done:
- if(ret_value < 0) { /* Clean up on error */
+ if(ret_value < 0) { /* Clean up on error */
if(type_ptr) {
if(type_ptr->ids)
H5SL_close(type_ptr->ids);
@@ -317,7 +317,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Itype_exists
*
@@ -346,7 +346,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Itype_exists() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Inmembers
*
@@ -357,8 +357,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
* Friday, April 23, 2004
*
*-------------------------------------------------------------------------
@@ -396,7 +396,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Inmembers() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_nmembers
*
@@ -407,7 +407,7 @@ done:
*
* Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 24, 1999
*
*-------------------------------------------------------------------------
@@ -432,7 +432,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_nmembers() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iclear_type
*
@@ -442,8 +442,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
* Friday, April 23, 2004
*
*-------------------------------------------------------------------------
@@ -465,7 +465,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iclear_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_clear_type
*
@@ -474,7 +474,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 24, 1999
*
*-------------------------------------------------------------------------
@@ -506,7 +506,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_clear_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__clear_type_cb
*
@@ -543,7 +543,7 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
if(udata->force) {
#ifdef H5I_DEBUG
if(H5DEBUG(I)) {
- fprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx "
+ HDfprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx "
"failure ignored\n",
(int)udata->type_ptr->cls->type_id,
(unsigned long)(id->obj_ptr));
@@ -572,7 +572,7 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__clear_type_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idestroy_type
*
@@ -584,8 +584,8 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
*
* Return: SUCCEED/FAIL
*
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Programmer: Nathaniel Furrer
+ * James Laird
*
*-------------------------------------------------------------------------
*/
@@ -606,7 +606,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idestroy_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__destroy_type
*
@@ -617,15 +617,15 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Programmer: Nathaniel Furrer
+ * James Laird
*
*-------------------------------------------------------------------------
*/
static herr_t
H5I__destroy_type(H5I_type_t type)
{
- H5I_id_type_t *type_ptr; /* ptr to the atomic type */
+ H5I_id_type_t *type_ptr; /* ptr to the atomic type */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -657,7 +657,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__destroy_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iregister
*
@@ -685,7 +685,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register
*
@@ -744,13 +744,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_with_id
*
* Purpose: Registers an OBJECT in a TYPE with the supplied ID for it.
* This routine will check to ensure the supplied ID is not already
- * in use, and ensure that it is a valid ID for the given type,
+ * in use, and ensure that it is a valid ID for the given type,
* but will NOT check to ensure the OBJECT is not already
* registered (thus, it is possible to register one object under
* multiple IDs).
@@ -808,7 +808,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_with_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_subst
*
@@ -818,8 +818,8 @@ done:
* with the specified ID.
* Failure: NULL
*
- * Programmer: Quincey Koziol
- * Saturday, February 27, 2010
+ * Programmer: Quincey Koziol
+ * Saturday, February 27, 2010
*
*-------------------------------------------------------------------------
*/
@@ -827,7 +827,7 @@ void *
H5I_subst(hid_t id, const void *new_object)
{
H5I_id_info_t *id_ptr; /* Pointer to the atom */
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -846,7 +846,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_subst() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_object
*
@@ -862,8 +862,8 @@ done:
void *
H5I_object(hid_t id)
{
- H5I_id_info_t *id_ptr; /* Pointer to the new atom */
- void *ret_value = NULL; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the new atom */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -876,7 +876,7 @@ H5I_object(hid_t id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_object() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iobject_verify
*
@@ -910,7 +910,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iobject_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_object_verify
*
@@ -921,8 +921,8 @@ done:
* specified ID.
* Failure: NULL
*
- * Programmer: Quincey Koziol
- * Wednesday, July 31, 2002
+ * Programmer: Quincey Koziol
+ * Wednesday, July 31, 2002
*
*-------------------------------------------------------------------------
*/
@@ -945,7 +945,7 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5I_object_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_type
*
@@ -959,8 +959,8 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
* ID types).
* Failure: H5I_BADID
*
- * Programmer: Robb Matzke
- * Friday, February 19, 1999
+ * Programmer: Robb Matzke
+ * Friday, February 19, 1999
*
*-------------------------------------------------------------------------
*/
@@ -979,7 +979,7 @@ H5I_get_type(hid_t id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type
*
@@ -1006,13 +1006,13 @@ H5Iget_type(hid_t id)
ret_value = H5I_get_type(id);
if(ret_value <= H5I_BADID || ret_value >= H5I_next_type || NULL == H5I_object(id))
- HGOTO_DONE(H5I_BADID);
+ HGOTO_DONE(H5I_BADID);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iremove_verify
*
@@ -1025,8 +1025,8 @@ done:
* calling H5I_object().
* Failure: NULL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
*
*-------------------------------------------------------------------------
*/
@@ -1048,7 +1048,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iremove_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__remove_verify
*
@@ -1060,15 +1060,15 @@ done:
* calling H5I_object().
* Failure: NULL
*
- * Programmer: James Laird
- * Nat Furrer
+ * Programmer: James Laird
+ * Nat Furrer
*
*-------------------------------------------------------------------------
*/
void *
H5I__remove_verify(hid_t id, H5I_type_t id_type)
{
- void * ret_value = NULL; /*return value */
+ void * ret_value = NULL; /*return value */
FUNC_ENTER_STATIC_NOERR
@@ -1081,7 +1081,7 @@ H5I__remove_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__remove_common
*
@@ -1100,8 +1100,8 @@ H5I__remove_verify(hid_t id, H5I_type_t id_type)
static void *
H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id)
{
- H5I_id_info_t *curr_id; /* Pointer to the current atom */
- void *ret_value = NULL; /* Return value */
+ H5I_id_info_t *curr_id; /* Pointer to the current atom */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -1123,7 +1123,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_common() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_remove
*
@@ -1134,16 +1134,16 @@ done:
* calling H5I_object().
* Failure: NULL
*
- * Programmer: Unknown
+ * Programmer: Unknown
*
*-------------------------------------------------------------------------
*/
void *
H5I_remove(hid_t id)
{
- H5I_id_type_t *type_ptr; /* Pointer to the atomic type */
- H5I_type_t type; /* Atom's atomic type */
- void * ret_value = NULL; /* Return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the atomic type */
+ H5I_type_t type; /* Atom's atomic type */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1163,7 +1163,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_remove() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_ref
*
@@ -1199,7 +1199,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_ref
*
@@ -1238,14 +1238,14 @@ H5I_dec_ref(hid_t id)
* reference count without calling the free method.
*
* Beware: the free method may call other H5I functions.
- *
- * If an object is closing, we can remove the ID even though the free
+ *
+ * If an object is closing, we can remove the ID even though the free
* method might fail. This can happen when a mandatory filter fails to
- * write when a dataset is closed and the chunk cache is flushed to the
+ * write when a dataset is closed and the chunk cache is flushed to the
* file. We have to close the dataset anyway. (SLU - 2010/9/7)
*/
if(1 == id_ptr->count) {
- H5I_id_type_t *type_ptr; /*ptr to the type */
+ H5I_id_type_t *type_ptr; /*ptr to the type */
/* Get the ID's type */
type_ptr = H5I_id_type_list_g[H5I_TYPE(id)];
@@ -1269,7 +1269,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_app_ref
*
@@ -1317,7 +1317,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_app_ref_always_close
*
@@ -1345,9 +1345,9 @@ H5I_dec_app_ref_always_close(hid_t id)
/* Check for failure */
if (ret_value < 0) {
/*
- * If an object is closing, we can remove the ID even though the free
+ * If an object is closing, we can remove the ID even though the free
* method might fail. This can happen when a mandatory filter fails to
- * write when a dataset is closed and the chunk cache is flushed to the
+ * write when a dataset is closed and the chunk cache is flushed to the
* file. We have to close the dataset anyway. (SLU - 2010/9/7)
*/
H5I_remove(id);
@@ -1359,7 +1359,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref_always_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_ref
*
@@ -1390,7 +1390,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_inc_ref
*
@@ -1428,7 +1428,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_inc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_ref
*
@@ -1459,7 +1459,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_ref
*
@@ -1492,7 +1492,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_type_ref
*
@@ -1526,7 +1526,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__inc_type_ref
*
@@ -1560,14 +1560,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__inc_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_type_ref
*
* Purpose: Decrements the reference count on an entire type of IDs.
* If the type reference count becomes zero then the type is
* destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
+ * their reference counts. Destroying IDs involves calling
* the free-func for each ID's object and then adding the ID
* struct to the ID free list. Public interface to
* H5I_dec_type_ref.
@@ -1602,14 +1602,14 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_type_ref
*
* Purpose: Decrements the reference count on an entire type of IDs.
* If the type reference count becomes zero then the type is
* destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
+ * their reference counts. Destroying IDs involves calling
* the free-func for each ID's object and then adding the ID
* struct to the ID free list.
* Returns the number of references to the type on success; a
@@ -1655,7 +1655,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type_ref
*
@@ -1689,7 +1689,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__get_type_ref
*
@@ -1724,7 +1724,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__get_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iis_valid
*
@@ -1754,7 +1754,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iis_valid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__search_cb
*
@@ -1780,7 +1780,7 @@ H5I__search_cb(void *obj, hid_t id, void *_udata)
/* Set the return value based on the callback's return value */
if(cb_ret_val > 0) {
- ret_value = H5_ITER_STOP; /* terminate iteration early */
+ ret_value = H5_ITER_STOP; /* terminate iteration early */
udata->ret_obj = obj; /* also set out parameter */
}
else if(cb_ret_val < 0)
@@ -1789,7 +1789,7 @@ H5I__search_cb(void *obj, hid_t id, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__search_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Isearch
*
@@ -1828,7 +1828,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
udata.app_key = key;
udata.ret_obj = NULL;
- /* Note that H5I_iterate returns an error code. We ignore it
+ /* Note that H5I_iterate returns an error code. We ignore it
* here, as we can't do anything with it without revising the API.
*/
(void)H5I_iterate(type, H5I__search_cb, &udata, TRUE);
@@ -1840,7 +1840,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Isearch() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__iterate_cb
*
@@ -1873,7 +1873,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
/* Set the return value based on the callback's return value */
if(cb_ret_val > 0)
- ret_value = H5_ITER_STOP; /* terminate iteration early */
+ ret_value = H5_ITER_STOP; /* terminate iteration early */
else if(cb_ret_val < 0)
ret_value = H5_ITER_ERROR; /* indicate failure (which terminates iteration) */
}
@@ -1881,26 +1881,26 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__iterate_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5I_iterate
+ * Function: H5I_iterate
*
- * Purpose: Apply function FUNC to each member of type TYPE (with
- * non-zero application reference count if app_ref is TRUE).
- * Stop if FUNC returns a non zero value (i.e. anything
- * other than H5_ITER_CONT).
+ * Purpose: Apply function FUNC to each member of type TYPE (with
+ * non-zero application reference count if app_ref is TRUE).
+ * Stop if FUNC returns a non zero value (i.e. anything
+ * other than H5_ITER_CONT).
*
- * If FUNC returns a positive value (i.e. H5_ITER_STOP),
+ * If FUNC returns a positive value (i.e. H5_ITER_STOP),
* return SUCCEED.
*
- * If FUNC returns a negative value (i.e. H5_ITER_ERROR),
+ * If FUNC returns a negative value (i.e. H5_ITER_ERROR),
* return FAIL.
- *
- * The FUNC should take a pointer to the object and the
- * udata as arguments and return non-zero to terminate
+ *
+ * The FUNC should take a pointer to the object and the
+ * udata as arguments and return non-zero to terminate
* siteration, and zero to continue.
*
- * Limitation: Currently there is no way to start the iteration from
+ * Limitation: Currently there is no way to start the iteration from
* where a previous iteration left off.
*
* Return: SUCCEED/FAIL
@@ -1911,7 +1911,7 @@ herr_t
H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref)
{
H5I_id_type_t *type_ptr; /* Pointer to the type */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1939,7 +1939,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_iterate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__find_id
*
@@ -1955,9 +1955,9 @@ done:
static H5I_id_info_t *
H5I__find_id(hid_t id)
{
- H5I_type_t type; /*ID's type */
- H5I_id_type_t *type_ptr; /*ptr to the type */
- H5I_id_info_t *ret_value = NULL; /* Return value */
+ H5I_type_t type; /*ID's type */
+ H5I_id_type_t *type_ptr; /*ptr to the type */
+ H5I_id_info_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1977,7 +1977,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__find_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_name
*
@@ -2020,7 +2020,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_file_id
*
@@ -2057,7 +2057,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_file_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_file_id
*
@@ -2065,7 +2065,7 @@ done:
* ID given an object ID.
*
* Return: Success: The file ID associated with the object
- * Failure: H5I_INVALID_HID
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
@@ -2101,7 +2101,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_file_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__id_dump_cb
*
@@ -2120,9 +2120,9 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
- HDfprintf(stderr, " count = %u\n", item->count);
- HDfprintf(stderr, " obj = 0x%08lx\n", (unsigned long)(item->obj_ptr));
+ HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
+ HDfprintf(stderr, " count = %u\n", item->count);
+ HDfprintf(stderr, " obj = 0x%08lx\n", (unsigned long)(item->obj_ptr));
/* Get the group location, so we get get the name */
switch(type) {
@@ -2168,7 +2168,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* end H5I__id_dump_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dump_ids_for_type
*
@@ -2191,14 +2191,14 @@ H5I_dump_ids_for_type(H5I_type_t type)
if(type_ptr) {
/* Header */
- HDfprintf(stderr, " init_count = %u\n", type_ptr->init_count);
- HDfprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
- HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_ptr->id_count);
- HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_ptr->nextid);
+ HDfprintf(stderr, " init_count = %u\n", type_ptr->init_count);
+ HDfprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
+ HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_ptr->id_count);
+ HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_ptr->nextid);
/* List */
if(type_ptr->id_count > 0) {
- HDfprintf(stderr, " List:\n");
+ HDfprintf(stderr, " List:\n");
H5SL_iterate(type_ptr->ids, H5I__id_dump_cb, &type);
}
}
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index dd3f531..64d75f4 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -14,15 +14,15 @@
/* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, September 30, 1998
*
- * Purpose: The fill message indicates a bit pattern to use for
- * uninitialized data points of a dataset.
+ * Purpose: The fill message indicates a bit pattern to use for
+ * uninitialized data points of a dataset.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
+#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
@@ -49,61 +49,61 @@ static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_FILL
-#define H5O_SHARED_DECODE H5O_fill_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
-#define H5O_SHARED_ENCODE H5O_fill_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
-#define H5O_SHARED_SIZE H5O_fill_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
-#define H5O_SHARED_DELETE H5O__fill_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_FILL
+#define H5O_SHARED_DECODE H5O_fill_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
+#define H5O_SHARED_ENCODE H5O_fill_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
+#define H5O_SHARED_SIZE H5O_fill_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
+#define H5O_SHARED_DELETE H5O__fill_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O__fill_shared_link
+#define H5O_SHARED_LINK H5O__fill_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_fill_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#define H5O_SHARED_DEBUG H5O_fill_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Set up & include shared message "interface" info */
/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */
#undef H5O_SHARED_TYPE
-#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
+#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
#undef H5O_SHARED_DECODE
-#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
+#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
#undef H5O_SHARED_DECODE_REAL
-#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
+#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
#undef H5O_SHARED_ENCODE
-#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
+#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
#undef H5O_SHARED_ENCODE_REAL
-#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
+#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
#undef H5O_SHARED_SIZE
-#define H5O_SHARED_SIZE H5O_fill_new_shared_size
+#define H5O_SHARED_SIZE H5O_fill_new_shared_size
#undef H5O_SHARED_SIZE_REAL
-#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
+#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
#undef H5O_SHARED_DELETE
-#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
+#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
#undef H5O_SHARED_DELETE_REAL
#undef H5O_SHARED_LINK
-#define H5O_SHARED_LINK H5O__fill_new_shared_link
+#define H5O_SHARED_LINK H5O__fill_new_shared_link
#undef H5O_SHARED_LINK_REAL
#undef H5O_SHARED_COPY_FILE
-#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#undef H5O_SHARED_DEBUG
-#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
+#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
#undef H5O_SHARED_DEBUG_REAL
-#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#undef H5Oshared_H
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class, for old fill value before version 1.5 */
const H5O_msg_class_t H5O_MSG_FILL[1] = {{
@@ -150,7 +150,7 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_fill_new_shared_debug /*debug the message */
+ H5O_fill_new_shared_debug /*debug the message */
}};
/* Format version bounds for fill value */
@@ -175,15 +175,15 @@ H5FL_DEFINE(H5O_fill_t);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_decode
+ * Function: H5O_fill_new_decode
*
- * Purpose: Decode a new fill value message. The new fill value
+ * Purpose: Decode a new fill value message. The new fill value
* message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
* Failure: NULL
*
* Programmer: Raymond Lu
@@ -196,7 +196,7 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
- H5O_fill_t *fill = NULL;
+ H5O_fill_t *fill = NULL;
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -294,7 +294,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_decode
*
@@ -313,7 +313,7 @@ H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
- H5O_fill_t *fill = NULL; /* Decoded fill value message */
+ H5O_fill_t *fill = NULL; /* Decoded fill value message */
htri_t exists = FALSE;
H5T_t *dt = NULL;
void *ret_value = NULL; /* Return value */
@@ -375,15 +375,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_old_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_encode
+ * Function: H5O_fill_new_encode
*
- * Purpose: Encode a new fill value message. The new fill value
+ * Purpose: Encode a new fill value message. The new fill value
* message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -393,7 +393,7 @@ done:
static herr_t
H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
- const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
+ const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -473,7 +473,7 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_new_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_encode
*
@@ -504,17 +504,17 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_old_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_copy
+ * Function: H5O_fill_copy
*
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary. The new fill value message is fill value plus
- * space allocation time and fill value writing time and
- * whether fill value is defined.
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary. The new fill value message is fill value plus
+ * space allocation time and fill value writing time and
+ * whether fill value is defined.
*
- * Return: Success: Ptr to _DEST
- * Failure: NULL
+ * Return: Success: Ptr to _DEST
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -621,18 +621,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_size
+ * Function: H5O_fill_new_size
*
- * Purpose: Returns the size of the raw message in bytes not counting the
+ * Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields. This
* function doesn't take into account alignment. The new fill
* value message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
- * Return: Success: Message data size in bytes w/o alignment.
- * Failure: 0
+ * Return: Success: Message data size in bytes w/o alignment.
+ * Failure: 0
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -652,26 +652,26 @@ H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
/* Determine size for different versions */
if(fill->version < H5O_FILL_VERSION_3) {
- ret_value = 1 + /* Version number */
- 1 + /* Space allocation time */
- 1 + /* Fill value write time */
- 1; /* Fill value defined */
+ ret_value = 1 + /* Version number */
+ 1 + /* Space allocation time */
+ 1 + /* Fill value write time */
+ 1; /* Fill value defined */
if(fill->fill_defined)
- ret_value += 4 + /* Fill value size */
- (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
+ ret_value += 4 + /* Fill value size */
+ (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
} /* end if */
else {
- ret_value = 1 + /* Version number */
- 1; /* Status flags */
+ ret_value = 1 + /* Version number */
+ 1; /* Status flags */
if(fill->size > 0)
- ret_value += 4 + /* Fill value size */
- (size_t)fill->size; /* Size of fill value */
+ ret_value += 4 + /* Fill value size */
+ (size_t)fill->size; /* Size of fill value */
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_size
*
@@ -699,15 +699,15 @@ H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
} /* end H5O_fill_old_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_reset_dyn
+ * Function: H5O_fill_reset_dyn
*
- * Purpose: Resets dynamic fill value fields
+ * Purpose: Resets dynamic fill value fields
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, January 22, 2007
*
*-------------------------------------------------------------------------
@@ -754,8 +754,8 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
} /* end if */
fill->size = 0;
if(fill->type) {
- (void)H5T_close_real(fill->type);
- fill->type = NULL;
+ (void)H5T_close_real(fill->type);
+ fill->type = NULL;
} /* end if */
done:
@@ -765,15 +765,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_reset_dyn() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__fill_reset
+ * Function: H5O__fill_reset
*
- * Purpose: Resets a message to an initial state.
+ * Purpose: Resets a message to an initial state.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -781,7 +781,7 @@ done:
static herr_t
H5O__fill_reset(void *_fill)
{
- H5O_fill_t *fill = (H5O_fill_t *)_fill;
+ H5O_fill_t *fill = (H5O_fill_t *)_fill;
FUNC_ENTER_STATIC_NOERR
@@ -798,15 +798,15 @@ H5O__fill_reset(void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__fill_free
+ * Function: H5O__fill_free
*
- * Purpose: Frees the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, December 5, 2002
*
*-------------------------------------------------------------------------
@@ -823,7 +823,7 @@ H5O__fill_free(void *fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__fill_pre_copy_file
*
@@ -841,7 +841,7 @@ static herr_t
H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
- const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
+ const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -859,15 +859,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__fill_pre_copy_file() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__fill_debug
+ * Function: H5O__fill_debug
*
- * Purpose: Prints debugging info for the message.
+ * Purpose: Prints debugging info for the message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -890,40 +890,40 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
switch(fill->alloc_time) {
case H5D_ALLOC_TIME_EARLY:
- fprintf(stream,"Early\n");
+ HDfprintf(stream,"Early\n");
break;
case H5D_ALLOC_TIME_LATE:
- fprintf(stream,"Late\n");
+ HDfprintf(stream,"Late\n");
break;
case H5D_ALLOC_TIME_INCR:
- fprintf(stream,"Incremental\n");
+ HDfprintf(stream,"Incremental\n");
break;
case H5D_ALLOC_TIME_DEFAULT:
case H5D_ALLOC_TIME_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream,"Unknown!\n");
break;
} /* end switch */
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
switch(fill->fill_time) {
case H5D_FILL_TIME_ALLOC:
- fprintf(stream,"On Allocation\n");
+ HDfprintf(stream,"On Allocation\n");
break;
case H5D_FILL_TIME_NEVER:
- fprintf(stream,"Never\n");
+ HDfprintf(stream,"Never\n");
break;
case H5D_FILL_TIME_IFSET:
- fprintf(stream,"If Set\n");
+ HDfprintf(stream,"If Set\n");
break;
case H5D_FILL_TIME_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream,"Unknown!\n");
break;
} /* end switch */
@@ -931,25 +931,25 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status);
switch(fill_status) {
case H5D_FILL_VALUE_UNDEFINED:
- fprintf(stream,"Undefined\n");
+ HDfprintf(stream,"Undefined\n");
break;
case H5D_FILL_VALUE_DEFAULT:
- fprintf(stream,"Default\n");
+ HDfprintf(stream,"Default\n");
break;
case H5D_FILL_VALUE_USER_DEFINED:
- fprintf(stream,"User Defined\n");
+ HDfprintf(stream,"User Defined\n");
break;
case H5D_FILL_VALUE_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream,"Unknown!\n");
break;
} /* end switch */
HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth,
- "Size:", fill->size);
+ "Size:", fill->size);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
if(fill->type) {
H5T_debug(fill->type, stream);
@@ -961,18 +961,18 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_convert
+ * Function: H5O_fill_convert
*
- * Purpose: Convert a fill value from whatever data type it currently has
+ * Purpose: Convert a fill value from whatever data type it currently has
* to the specified dataset type. The `type' field of the fill
* value struct will be set to NULL to indicate that it has the
* same type as the dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -980,10 +980,10 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
herr_t
H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
{
- H5T_path_t *tpath; /* Type conversion info */
- void *buf = NULL, *bkg = NULL; /* Conversion buffers */
- hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5T_path_t *tpath; /* Type conversion info */
+ void *buf = NULL, *bkg = NULL; /* Conversion buffers */
+ hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1008,7 +1008,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
* Can we convert between source and destination data types?
*/
if(NULL == (tpath = H5T_path_find(fill->type, dset_type)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
/* Don't bother doing anything if there will be no actual conversion */
if(!H5T_path_noop(tpath)) {
@@ -1064,7 +1064,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_set_version
*
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index db1d8d7..69f73e5 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -11,20 +11,20 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, July 24, 1998
+/* Programmer: Robb Matzke <matzke@llnl.gov>
+ * Friday, July 24, 1998
*
- * Purpose: The object modification time message.
+ * Purpose: The object modification time message.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
@@ -43,62 +43,62 @@ static herr_t H5O__mtime_debug(H5F_t *f, const void *_mesg, FILE *stream,
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
- H5O_MTIME_ID, /*message id number */
- "mtime", /*message name for debugging */
- sizeof(time_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__mtime_decode, /*decode message */
- H5O_mtime_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_size, /*raw message size */
- NULL, /* reset method */
- H5O__mtime_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__mtime_debug /*debug the message */
+ H5O_MTIME_ID, /*message id number */
+ "mtime", /*message name for debugging */
+ sizeof(time_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__mtime_decode, /*decode message */
+ H5O_mtime_encode, /*encode message */
+ H5O_mtime_copy, /*copy the native value */
+ H5O_mtime_size, /*raw message size */
+ NULL, /* reset method */
+ H5O__mtime_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__mtime_debug /*debug the message */
}};
/* This message derives from H5O message class */
/* (Only encode, decode & size routines are different from old mtime routines) */
const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{
- H5O_MTIME_NEW_ID, /*message id number */
- "mtime_new", /*message name for debugging */
- sizeof(time_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__mtime_new_decode, /*decode message */
- H5O_mtime_new_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_new_size, /*raw message size */
- NULL, /* reset method */
- H5O__mtime_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__mtime_debug /*debug the message */
+ H5O_MTIME_NEW_ID, /*message id number */
+ "mtime_new", /*message name for debugging */
+ sizeof(time_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__mtime_new_decode, /*decode message */
+ H5O_mtime_new_encode, /*encode message */
+ H5O_mtime_copy, /*copy the native value */
+ H5O_mtime_new_size, /*raw message size */
+ NULL, /* reset method */
+ H5O__mtime_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__mtime_debug /*debug the message */
}};
/* Current version of new mtime information */
-#define H5O_MTIME_VERSION 1
+#define H5O_MTIME_VERSION 1
/* Declare a free list to manage the time_t struct */
H5FL_DEFINE(time_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_new_decode
+ * Function: H5O__mtime_new_decode
*
* Purpose: Decode a new modification time message and return a pointer to
* a new time_t value.
@@ -106,13 +106,13 @@ H5FL_DEFINE(time_t);
* The new modification time message format was added due to the
* performance overhead of the old format.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
@@ -121,7 +121,7 @@ H5O__mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- time_t *mesg;
+ time_t *mesg;
uint32_t tmp_time; /* Temporary copy of the time */
void *ret_value = NULL; /* Return value */
@@ -153,9 +153,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__mtime_new_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_decode
+ * Function: H5O__mtime_decode
*
* Purpose: Decode a modification time message and return a pointer to a
* new time_t value.
@@ -163,13 +163,13 @@ done:
* The new modification time message format was added due to the
* performance overhead of the old format.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
@@ -178,9 +178,9 @@ H5O__mtime_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- time_t *mesg, the_time;
- struct tm tm;
- int i; /* Local index variable */
+ time_t *mesg, the_time;
+ struct tm tm;
+ int i; /* Local index variable */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -218,24 +218,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__mtime_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_encode
+ * Function: H5O_mtime_new_encode
*
- * Purpose: Encodes a new modification time message.
+ * Purpose: Encodes a new modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
static herr_t
H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const time_t *mesg = (const time_t *) _mesg;
+ const time_t *mesg = (const time_t *) _mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -258,17 +258,17 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_mtime_new_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_encode
+ * Function: H5O_mtime_encode
*
- * Purpose: Encodes a modification time message.
+ * Purpose: Encodes a modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
* Modifications:
*
@@ -277,8 +277,8 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
static herr_t
H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const time_t *mesg = (const time_t *) _mesg;
- struct tm *tm;
+ const time_t *mesg = (const time_t *) _mesg;
+ struct tm *tm;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -289,27 +289,27 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
/* encode */
tm = HDgmtime(mesg);
- sprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
+ HDsprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_copy
+ * Function: H5O_mtime_copy
*
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary.
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary.
*
- * Return: Success: Ptr to _DEST
+ * Return: Success: Ptr to _DEST
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
* Modifications:
*
@@ -318,8 +318,8 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
static void *
H5O_mtime_copy(const void *_mesg, void *_dest)
{
- const time_t *mesg = (const time_t *) _mesg;
- time_t *dest = (time_t *) _dest;
+ const time_t *mesg = (const time_t *) _mesg;
+ time_t *dest = (time_t *) _dest;
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -339,22 +339,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_size
+ * Function: H5O_mtime_new_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 3 2002
*
* Modifications:
*
@@ -372,22 +372,22 @@ H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disabl
FUNC_LEAVE_NOAPI(8)
} /* end H5O_mtime_new_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_size
+ * Function: H5O_mtime_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 14 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 14 1998
*
* Modifications:
*
@@ -405,15 +405,15 @@ H5O_mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_sh
FUNC_LEAVE_NOAPI(16)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_free
+ * Function: H5O__mtime_free
*
- * Purpose: Frees the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 30, 2000
*
*-------------------------------------------------------------------------
@@ -430,17 +430,17 @@ H5O__mtime_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mtime_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_debug
+ * Function: H5O__mtime_debug
*
- * Purpose: Prints debugging info for the message.
+ * Purpose: Prints debugging info for the message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
* Modifications:
*
@@ -450,9 +450,9 @@ static herr_t
H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
- const time_t *mesg = (const time_t *)_mesg;
- struct tm *tm;
- char buf[128];
+ const time_t *mesg = (const time_t *)_mesg;
+ struct tm *tm;
+ char buf[128];
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Oname.c b/src/H5Oname.c
index a710944..dbfa710 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -25,10 +25,10 @@
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
@@ -43,29 +43,29 @@ static herr_t H5O__name_debug(H5F_t *f, const void *_mesg, FILE * stream,
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_NAME[1] = {{
- H5O_NAME_ID, /*message id number */
- "name", /*message name for debugging */
- sizeof(H5O_name_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__name_decode, /*decode message */
- H5O_name_encode, /*encode message */
- H5O_name_copy, /*copy the native value */
- H5O_name_size, /*raw message size */
- H5O__name_reset, /*free internal memory */
- NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__name_debug /*debug the message */
+ H5O_NAME_ID, /*message id number */
+ "name", /*message name for debugging */
+ sizeof(H5O_name_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__name_decode, /*decode message */
+ H5O_name_encode, /*encode message */
+ H5O_name_copy, /*copy the native value */
+ H5O_name_size, /*raw message size */
+ H5O__name_reset, /*free internal memory */
+ NULL, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__name_debug /*debug the message */
}};
-
+
/*-------------------------------------------------------------------------
* Function: H5O__name_decode
*
@@ -98,9 +98,9 @@ H5O__name_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* decode */
if(NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(NULL == (mesg->s = (char *)H5MM_strdup((const char *)p)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set return value */
ret_value = mesg;
@@ -113,7 +113,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__name_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_name_encode
*
@@ -147,7 +147,7 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5O_name_copy
*
@@ -179,7 +179,7 @@ H5O_name_copy(const void *_mesg, void *_dest)
HDassert(mesg);
if(!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *mesg;
@@ -197,7 +197,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_name_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_name_size
*
@@ -235,7 +235,7 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5O__name_reset
*
@@ -266,7 +266,7 @@ H5O__name_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__name_reset() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__name_debug
*
@@ -286,7 +286,7 @@ static herr_t
H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
- const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
+ const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -297,7 +297,7 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth,
"Name:",
mesg->s);
diff --git a/src/H5PB.c b/src/H5PB.c
index a325ad1..8d29951 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -24,20 +24,20 @@
/* Module Setup */
/****************/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "H5PBmodule.h" /* This source code file is part of the H5PB module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5PBpkg.h" /* File access */
-#include "H5SLprivate.h" /* Skip List */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5PBpkg.h" /* File access */
+#include "H5SLprivate.h" /* Skip List */
/****************/
@@ -150,9 +150,9 @@ H5FL_DEFINE_STATIC(H5PB_t);
H5FL_DEFINE_STATIC(H5PB_entry_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_reset_stats
+ * Function: H5PB_reset_stats
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
@@ -161,11 +161,11 @@ H5FL_DEFINE_STATIC(H5PB_entry_t);
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_reset_stats(H5PB_t *page_buf)
{
FUNC_ENTER_NOAPI_NOERR
@@ -187,9 +187,9 @@ H5PB_reset_stats(H5PB_t *page_buf)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_reset_stats() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_get_stats
+ * Function: H5PB_get_stats
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
@@ -201,13 +201,13 @@ H5PB_reset_stats(H5PB_t *page_buf)
* --evictions: the number of metadata and raw data evictions from the page buffer layer
* --bypasses: the number of metadata and raw data accesses that bypass the page buffer layer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2],
unsigned misses[2], unsigned evictions[2], unsigned bypasses[2])
{
@@ -230,18 +230,18 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2],
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_get_stats */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_print_stats()
+ * Function: H5PB_print_stats()
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
* Print out statistics collected for the page buffer layer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -252,7 +252,7 @@ H5PB_print_stats(const H5PB_t *page_buf)
HDassert(page_buf);
- printf("PAGE BUFFER STATISTICS:\n");
+ HDprintf("PAGE BUFFER STATISTICS:\n");
HDprintf("******* METADATA\n");
HDprintf("\t Total Accesses: %u\n", page_buf->accesses[0]);
@@ -275,15 +275,15 @@ H5PB_print_stats(const H5PB_t *page_buf)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_print_stats */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_create
+ * Function: H5PB_create
*
- * Purpose: Create and setup the PB on the file.
+ * Purpose: Create and setup the PB on the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -314,7 +314,7 @@ H5PB_create(H5F_t *f, size_t size, unsigned page_buf_min_meta_perc, unsigned pag
/* Allocate the new page buffering structure */
if(NULL == (page_buf = H5FL_CALLOC(H5PB_t)))
- HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
page_buf->max_size = size;
H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f->shared->fs_page_size, hsize_t);
@@ -322,7 +322,7 @@ H5PB_create(H5F_t *f, size_t size, unsigned page_buf_min_meta_perc, unsigned pag
page_buf->min_raw_perc = page_buf_min_raw_perc;
/* Calculate the minimum page count for metadata and raw data
- * based on the fractions provided
+ * based on the fractions provided
*/
page_buf->min_meta_count = (unsigned)((size * page_buf_min_meta_perc) / (f->shared->fs_page_size * 100));
page_buf->min_raw_count = (unsigned)((size * page_buf_min_raw_perc) / (f->shared->fs_page_size * 100));
@@ -353,15 +353,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_create */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__flush_cb
+ * Function: H5PB__flush_cb
*
- * Purpose: Callback to flush PB skiplist entries.
+ * Purpose: Callback to flush PB skiplist entries.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -387,15 +387,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB__flush_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_flush
+ * Function: H5PB_flush
*
- * Purpose: Flush/Free all the PB entries to the file.
+ * Purpose: Flush/Free all the PB entries to the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -422,15 +422,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_flush */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__dest_cb
+ * Function: H5PB__dest_cb
*
- * Purpose: Callback to free PB skiplist entries.
+ * Purpose: Callback to free PB skiplist entries.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -459,15 +459,15 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB__dest_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_dest
+ * Function: H5PB_dest
*
- * Purpose: Flush and destroy the PB on the file if it exists.
+ * Purpose: Flush and destroy the PB on the file if it exists.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -513,22 +513,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_dest */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_add_new_page
+ * Function: H5PB_add_new_page
*
- * Purpose: Add a new page to the new page skip list. This is called
- * from the MF layer when a new page is allocated to
- * indicate to the page buffer layer that a read of the page
+ * Purpose: Add a new page to the new page skip list. This is called
+ * from the MF layer when a new page is allocated to
+ * indicate to the page buffer layer that a read of the page
* from the file is not necessary since it's an empty page.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_add_new_page(H5F_t *f, H5FD_mem_t type, haddr_t page_addr)
{
H5PB_t *page_buf = f->shared->page_buf;
@@ -571,22 +571,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_add_new_page */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_update_entry
+ * Function: H5PB_update_entry
*
- * Purpose: In PHDF5, entries that are written by other processes and just
- * marked clean by this process have to have their corresponding
- * pages updated if they exist in the page buffer.
+ * Purpose: In PHDF5, entries that are written by other processes and just
+ * marked clean by this process have to have their corresponding
+ * pages updated if they exist in the page buffer.
* This routine checks and update the pages.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
{
H5PB_entry_t *page_entry; /* Pointer to the corresponding page entry */
@@ -618,12 +618,12 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_update_entry */
-
+
/*-------------------------------------------------------------------------
* Function: H5PB_remove_entry
*
* Purpose: Remove possible metadata entry with ADDR from the PB cache.
- * This is in response to the data corruption bug from fheap.c
+ * This is in response to the data corruption bug from fheap.c
* with page buffering + page strategy.
* Note: Large metadata page bypasses the PB cache.
* Note: Update of raw data page (large or small sized) is handled by the PB cache.
@@ -669,16 +669,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_remove_entry */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_read
+ * Function: H5PB_read
*
- * Purpose: Reads in the data from the page containing it if it exists
+ * Purpose: Reads in the data from the page containing it if it exists
* in the PB cache; otherwise reads in the page through the VFD.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -739,7 +739,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
page_buf->bypasses[0] ++;
} /* end if */
- /* If page buffering is disabled, or if this is a large metadata access,
+ /* If page buffering is disabled, or if this is a large metadata access,
* or if this is parallel raw data access, we are done here
*/
if(NULL == page_buf || (size >= page_buf->page_size && H5FD_MEM_DRAW != type) ||
@@ -765,7 +765,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
last_page_addr = ((addr + size - 1) / page_buf->page_size) * page_buf->page_size;
/* How many pages does this write span */
- num_touched_pages = (last_page_addr / page_buf->page_size + 1) -
+ num_touched_pages = (last_page_addr / page_buf->page_size + 1) -
(first_page_addr / page_buf->page_size);
if(first_page_addr == last_page_addr) {
HDassert(1 == num_touched_pages);
@@ -818,7 +818,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
offset = addr - first_page_addr;
HDassert(page_buf->page_size > offset);
- HDmemcpy(buf, (uint8_t *)page_entry->page_buf_ptr + offset,
+ HDmemcpy(buf, (uint8_t *)page_entry->page_buf_ptr + offset,
page_buf->page_size - (size_t)offset);
/* move to top of LRU list */
@@ -826,7 +826,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
} /* end if */
/* special handling for the last page if it is not a full page access */
else if(num_touched_pages > 1 && i == num_touched_pages-1 && search_addr < addr+size) {
- offset = (num_touched_pages-2)*page_buf->page_size +
+ offset = (num_touched_pages-2)*page_buf->page_size +
(page_buf->page_size - (addr - first_page_addr));
HDmemcpy((uint8_t *)buf + offset, page_entry->page_buf_ptr,
@@ -839,7 +839,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
else {
offset = i*page_buf->page_size;
- HDmemcpy((uint8_t *)buf+(i*page_buf->page_size) , page_entry->page_buf_ptr,
+ HDmemcpy((uint8_t *)buf+(i*page_buf->page_size) , page_entry->page_buf_ptr,
page_buf->page_size);
} /* end else */
} /* end if */
@@ -883,7 +883,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
else
page_buf->hits[0]++;
} /* end if */
- /* if not found */
+ /* if not found */
else {
void *new_page_buf = NULL;
size_t page_size = page_buf->page_size;
@@ -965,17 +965,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB_read() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_write
+ * Function: H5PB_write
*
* Purpose: Write data into the Page Buffer. If the page exists in the
* cache, update it; otherwise read it from disk, update it, and
* insert into cache.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -1035,7 +1035,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
page_buf->bypasses[0]++;
} /* end if */
- /* If page buffering is disabled, or if this is a large metadata access,
+ /* If page buffering is disabled, or if this is a large metadata access,
* or if this is a parallel raw data access, we are done here
*/
if(NULL == page_buf || (size >= page_buf->page_size && H5FD_MEM_DRAW != type) ||
@@ -1069,7 +1069,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
last_page_addr = (addr + size - 1) / page_buf->page_size * page_buf->page_size;
/* how many pages does this write span */
- num_touched_pages = (last_page_addr/page_buf->page_size + 1) -
+ num_touched_pages = (last_page_addr/page_buf->page_size + 1) -
(first_page_addr / page_buf->page_size);
if(first_page_addr == last_page_addr) {
HDassert(1 == num_touched_pages);
@@ -1110,18 +1110,18 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
} /* end if */
} /* end if */
/* Special handling for the last page if it is not a full page update */
- else if(num_touched_pages > 1 && i == (num_touched_pages - 1) &&
+ else if(num_touched_pages > 1 && i == (num_touched_pages - 1) &&
(search_addr + page_buf->page_size) != (addr + size)) {
HDassert(search_addr+page_buf->page_size > addr+size);
/* Lookup the page in the skip list */
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&search_addr));
if(page_entry) {
- offset = (num_touched_pages - 2) * page_buf->page_size +
+ offset = (num_touched_pages - 2) * page_buf->page_size +
(page_buf->page_size - (addr - first_page_addr));
/* Update page's data */
- HDmemcpy(page_entry->page_buf_ptr, (const uint8_t *)buf + offset,
+ HDmemcpy(page_entry->page_buf_ptr, (const uint8_t *)buf + offset,
(size_t)((addr + size) - last_page_addr));
/* Mark page dirty and push to top of LRU */
@@ -1185,7 +1185,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
else
page_buf->hits[0]++;
} /* end if */
- /* If not found */
+ /* If not found */
else {
void *new_page_buf;
size_t page_size = page_buf->page_size;
@@ -1207,7 +1207,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
/* Write to VFD and return */
if(H5FD_write(file, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "driver write request failed")
-
+
/* Break out of loop */
break;
} /* end if */
@@ -1305,16 +1305,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__insert_entry()
+ * Function: H5PB__insert_entry()
*
- * Purpose: ???
+ * Purpose: ???
*
* This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
- * Insert the supplied page into the page buffer, both the
+ * Insert the supplied page into the page buffer, both the
* skip list and the LRU.
*
* As best I can tell, this function imposes no limit on the
@@ -1324,13 +1324,13 @@ done:
* JRM -- 12/22/16
*
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
H5PB__insert_entry(H5PB_t *page_buf, H5PB_entry_t *page_entry)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1355,29 +1355,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB__insert_entry() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__make_space()
+ * Function: H5PB__make_space()
*
- * Purpose: ???
+ * Purpose: ???
*
* This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
- * If necessary and if possible, evict a page from the page
- * buffer to make space for the supplied page. Depending on
- * the page buffer configuration and contents, and the page
+ * If necessary and if possible, evict a page from the page
+ * buffer to make space for the supplied page. Depending on
+ * the page buffer configuration and contents, and the page
* supplied this may or may not be possible.
*
* JRM -- 12/22/16
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-static htri_t
+static htri_t
H5PB__make_space(H5F_t *f, H5PB_t *page_buf, H5FD_mem_t inserted_type)
{
H5PB_entry_t *page_entry; /* Pointer to page eviction candidate */
@@ -1402,7 +1402,7 @@ H5PB__make_space(H5F_t *f, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* check the metadata threshold before evicting metadata items */
while(1) {
- if(page_entry->prev && H5F_MEM_PAGE_META == page_entry->type &&
+ if(page_entry->prev && H5F_MEM_PAGE_META == page_entry->type &&
page_buf->min_meta_count >= page_buf->meta_count)
page_entry = page_entry->prev;
else
@@ -1419,7 +1419,7 @@ H5PB__make_space(H5F_t *f, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* check the raw data threshold before evicting raw data items */
while(1) {
- if(page_entry->prev && (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type) &&
+ if(page_entry->prev && (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type) &&
page_buf->min_raw_count >= page_buf->raw_count)
page_entry = page_entry->prev;
else
@@ -1460,19 +1460,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB__make_space() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__write_entry()
+ * Function: H5PB__write_entry()
*
- * Purpose: ???
+ * Purpose: ???
*
* This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5ST.c b/src/H5ST.c
index dd5b63c..3a1020b 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -743,19 +743,19 @@ H5ST__dump_internal(H5ST_ptr_t p)
FUNC_ENTER_STATIC_NOERR
if(p) {
- printf("p=%p\n", (void *)p);
- printf("\tp->up=%p\n", (void *)p->up);
- printf("\tp->parent=%p\n", (void *)p->parent);
- printf("\tp->lokid=%p\n", (void *)p->lokid);
- printf("\tp->hikid=%p\n", (void *)p->hikid);
- printf("\tp->eqkid=%p\n", (void *)p->eqkid);
- printf("\tp->splitchar=%c\n", p->splitchar);
+ HDprintf("p=%p\n", (void *)p);
+ HDprintf("\tp->up=%p\n", (void *)p->up);
+ HDprintf("\tp->parent=%p\n", (void *)p->parent);
+ HDprintf("\tp->lokid=%p\n", (void *)p->lokid);
+ HDprintf("\tp->hikid=%p\n", (void *)p->hikid);
+ HDprintf("\tp->eqkid=%p\n", (void *)p->eqkid);
+ HDprintf("\tp->splitchar=%c\n", p->splitchar);
H5ST__dump_internal(p->lokid);
if(p->splitchar)
H5ST__dump_internal(p->eqkid);
else
- printf("%s\n", (char *)p->eqkid);
+ HDprintf("%s\n", (char *)p->eqkid);
H5ST__dump_internal(p->hikid);
} /* end if */
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index ebd05ce..6ffa2a9 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Sdbg.c
- * Jul 24 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Sdbg.c
+ * Jul 24 2007
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Dump debugging information about a dataspace
+ * Purpose: Dump debugging information about a dataspace
*
*-------------------------------------------------------------------------
*/
@@ -32,9 +32,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Spkg.h" /* Dataspaces */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Spkg.h" /* Dataspaces */
/****************/
@@ -72,15 +72,15 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5S_debug
+ * Function: H5S_debug
*
- * Purpose: Prints debugging information about a dataspace.
+ * Purpose: Prints debugging information about a dataspace.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, July 21, 1998
*
*-------------------------------------------------------------------------
@@ -88,30 +88,30 @@
herr_t
H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
{
- const H5S_t *mesg = (const H5S_t*)_mesg;
+ const H5S_t *mesg = (const H5S_t*)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
switch(H5S_GET_EXTENT_TYPE(mesg)) {
case H5S_NULL:
- fprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth,
"Space class:");
break;
case H5S_SCALAR:
- fprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth,
"Space class:");
break;
case H5S_SIMPLE:
- fprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth,
"Space class:");
H5O_debug_id(H5O_SDSPACE_ID, f, &(mesg->extent), stream, indent + 3, MAX(0, fwidth - 3));
break;
case H5S_NO_CLASS:
default:
- fprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
"Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg)));
break;
} /* end switch */
diff --git a/src/H5T.c b/src/H5T.c
index fe2c5b1..6148754 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -556,7 +556,7 @@ static const H5I_class_t H5I_DATATYPE_CLS[1] = {{
static hbool_t H5T_top_package_initialize_s = FALSE;
-
+
/*-------------------------------------------------------------------------
* Function: H5T_init
*
@@ -582,7 +582,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_init() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__init_inf
*
@@ -695,7 +695,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__init_inf() */
-
+
/*--------------------------------------------------------------------------
NAME
H5T__init_package -- Initialize interface-specific information
@@ -1319,7 +1319,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__unlock_cb
*
@@ -1352,7 +1352,7 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__unlock_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_top_term_package
*
@@ -1391,7 +1391,7 @@ H5T_top_term_package(void)
if((path->conv.u.app_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- fprintf(H5DEBUG(T), "H5T: conversion function "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function "
"0x%08lx failed to free private data for "
"%s (ignored)\n",
(unsigned long)(path->conv.u.app_func), path->name);
@@ -1404,7 +1404,7 @@ H5T_top_term_package(void)
if((path->conv.u.lib_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- fprintf(H5DEBUG(T), "H5T: conversion function "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function "
"0x%08lx failed to free private data for "
"%s (ignored)\n",
(unsigned long)(path->conv.u.lib_func), path->name);
@@ -1553,7 +1553,7 @@ H5T_top_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5T_top_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_term_package
*
@@ -1595,7 +1595,7 @@ H5T_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5T_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcreate
*
@@ -1640,7 +1640,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcreate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcopy
*
@@ -1728,7 +1728,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcopy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tclose
*
@@ -1763,7 +1763,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tclose() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tequal
*
@@ -1800,7 +1800,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tequal() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tlock
*
@@ -1847,7 +1847,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tlock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_class
*
@@ -1882,7 +1882,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_get_class
*
@@ -1924,7 +1924,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tdetect_class
*
@@ -1960,7 +1960,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tdetect_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_detect_class
*
@@ -2045,7 +2045,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_detect_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tis_variable_str
*
@@ -2079,7 +2079,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tis_variable_str() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_variable_str
*
@@ -2100,7 +2100,7 @@ H5T_is_variable_str(const H5T_t *dt)
FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared))
} /* end H5T_is_variable_str() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_size
*
@@ -2137,7 +2137,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tset_size
*
@@ -2193,7 +2193,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tset_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_super
*
@@ -2233,7 +2233,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_super() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_get_super
*
@@ -2267,7 +2267,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T__register_int
*
@@ -2307,7 +2307,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__register_int() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__register
*
@@ -2445,7 +2445,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((old_path->conv.u.app_func)(tmp_sid, tmp_did, &(old_path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
+ HDfprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
"failed to free private data for %s (ignored)\n",
(unsigned long)(old_path->conv.u.app_func), old_path->name);
#endif
@@ -2455,7 +2455,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((old_path->conv.u.lib_func)(tmp_sid, tmp_did, &(old_path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
+ HDfprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
"failed to free private data for %s (ignored)\n",
(unsigned long)(old_path->conv.u.lib_func), old_path->name);
#endif
@@ -2492,7 +2492,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__register() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tregister
*
@@ -2548,7 +2548,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__unregister
*
@@ -2627,7 +2627,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((path->conv.u.app_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
"to free private data for %s (ignored)\n",
(unsigned long)(path->conv.u.app_func), path->name);
#endif
@@ -2637,7 +2637,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((path->conv.u.lib_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
"to free private data for %s (ignored)\n",
(unsigned long)(path->conv.u.lib_func), path->name);
#endif
@@ -2652,7 +2652,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__unregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tunregister
*
@@ -2692,7 +2692,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tunregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tfind
*
@@ -2742,7 +2742,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tfind() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcompiler_conv
*
@@ -2782,7 +2782,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcompiler_conv() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tconvert
*
@@ -2841,7 +2841,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tconvert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tencode
*
@@ -2880,7 +2880,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tencode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tdecode
*
@@ -2935,7 +2935,7 @@ done:
*-------------------------------------------------------------------------
*/
-
+
/*-------------------------------------------------------------------------
* Function: H5T_encode
*
@@ -2991,7 +2991,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_decode
*
@@ -3043,7 +3043,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__create
*
@@ -3172,7 +3172,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_copy
*
@@ -3480,7 +3480,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_lock
*
@@ -3526,7 +3526,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T__alloc
*
@@ -3573,7 +3573,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__free
*
@@ -3655,7 +3655,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_close_real
*
@@ -3698,7 +3698,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_close_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__close_cb
*
@@ -3727,7 +3727,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__close_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_close
*
@@ -3812,7 +3812,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__set_size
*
@@ -4012,7 +4012,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__set_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_get_size
*
@@ -4040,7 +4040,7 @@ H5T_get_size(const H5T_t *dt)
FUNC_LEAVE_NOAPI(dt->shared->size)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T_cmp
*
@@ -4502,7 +4502,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_cmp() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_find
*
@@ -4549,7 +4549,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_find() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__path_find_real
*
@@ -4615,7 +4615,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
+ HDfprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
#endif
H5E_clear_stack(NULL); /*ignore the error*/
} /* end if */
@@ -4793,7 +4793,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if((table->conv.u.app_func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
(unsigned long)(path->conv.u.app_func), path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
@@ -4803,7 +4803,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if((table->conv.u.lib_func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
(unsigned long)(path->conv.u.lib_func), path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
@@ -4859,7 +4859,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__path_find_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_noop
*
@@ -4884,7 +4884,7 @@ H5T_path_noop(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0==H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_compound_subset
*
@@ -4928,7 +4928,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_compound_subset */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_bkg
*
@@ -4950,7 +4950,7 @@ H5T_path_bkg(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__compiler_conv
*
@@ -4984,7 +4984,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__compiler_conv() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_convert
*
@@ -5035,7 +5035,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_oloc
*
@@ -5076,7 +5076,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_oloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_nameof
*
@@ -5116,7 +5116,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_nameof() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_immutable
*
@@ -5146,7 +5146,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_named
*
@@ -5219,7 +5219,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_convert_committed_datatype() */
-
+
/*--------------------------------------------------------------------------
* Function: H5T_get_ref_type
*
@@ -5248,7 +5248,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_ref_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_sensible
*
@@ -5310,7 +5310,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*--------------------------------------------------------------------------
NAME
H5T_set_loc
@@ -5476,7 +5476,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_loc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_relocatable
*
@@ -5515,7 +5515,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_relocatable() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_detect_reg_ref
*
@@ -5523,7 +5523,7 @@ done:
* datatype.
*
* Return: TRUE (1) or FALSE (0) on success
- * (Can't fail)
+ * (Can't fail)
*
* Programmer: Quincey Koziol
* Saturday, January 5, 2019
@@ -5578,7 +5578,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__detect_reg_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_vl_storage
*
@@ -5620,7 +5620,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_vl_storage() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_upgrade_version_cb
*
@@ -5678,7 +5678,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T_upgrade_version_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__upgrade_version
*
@@ -5711,12 +5711,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__upgrade_version() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_set_version
*
* Purpose: Set the encoding for a datatype to the version indicated by
- * the file's low bound if that is higher than the datatype's
+ * the file's low bound if that is higher than the datatype's
* version.
*
* Return: Non-negative on success/Negative on failure
@@ -5743,7 +5743,7 @@ H5T_set_version(H5F_t *f, H5T_t *dt)
if(H5T__upgrade_version(dt, vers) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding")
}
-
+
/* Version bounds check */
if(dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)])
HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds")
@@ -5752,7 +5752,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_version() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_patch_file
*
@@ -5788,7 +5788,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_patch_file() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_patch_vlen_file
*
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 803a6da..c76ca3c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Module Info: Datatype conversions for the H5T interface.
+ * Module Info: Datatype conversions for the H5T interface.
*/
/****************/
@@ -25,16 +25,16 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HGprivate.h" /* Global Heaps */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Tpkg.h" /* Datatypes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HGprivate.h" /* Global Heaps */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Tpkg.h" /* Datatypes */
/****************/
@@ -57,57 +57,57 @@
* source value has a magnitude that cannot be represented by the destination
* type.
*
- * Suffix Description
- * ------ -----------
- * sS: Signed integers to signed integers where the destination is
- * at least as wide as the source. This case cannot generate
- * overflows.
+ * Suffix Description
+ * ------ -----------
+ * sS: Signed integers to signed integers where the destination is
+ * at least as wide as the source. This case cannot generate
+ * overflows.
*
- * sU: Signed integers to unsigned integers where the destination is
- * at least as wide as the source. This case experiences
- * overflows when the source value is negative.
+ * sU: Signed integers to unsigned integers where the destination is
+ * at least as wide as the source. This case experiences
+ * overflows when the source value is negative.
*
- * uS: Unsigned integers to signed integers where the destination is
- * at least as wide as the source. This case can experience
- * overflows when the source and destination are the same size.
+ * uS: Unsigned integers to signed integers where the destination is
+ * at least as wide as the source. This case can experience
+ * overflows when the source and destination are the same size.
*
- * uU: Unsigned integers to unsigned integers where the destination
- * is at least as wide as the source. Overflows are not
- * possible in this case.
+ * uU: Unsigned integers to unsigned integers where the destination
+ * is at least as wide as the source. Overflows are not
+ * possible in this case.
*
- * Ss: Signed integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ss: Signed integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
- * Su: Signed integers to unsigned integers where the source is at
- * least as large as the destination. Overflows occur when the
- * source value is negative and can also occur if the
- * destination is narrower than the source.
+ * Su: Signed integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows occur when the
+ * source value is negative and can also occur if the
+ * destination is narrower than the source.
*
- * Us: Unsigned integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur for
- * all sizes.
+ * Us: Unsigned integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur for
+ * all sizes.
*
- * Uu: Unsigned integers to unsigned integers where the source is at
- * least as large as the destination. Overflows can occur if the
- * destination is narrower than the source.
+ * Uu: Unsigned integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows can occur if the
+ * destination is narrower than the source.
*
- * su: Conversion from signed integers to unsigned integers where
- * the source and destination are the same size. Overflow occurs
- * when the source value is negative.
+ * su: Conversion from signed integers to unsigned integers where
+ * the source and destination are the same size. Overflow occurs
+ * when the source value is negative.
*
- * us: Conversion from unsigned integers to signed integers where
- * the source and destination are the same size. Overflow
- * occurs when the source magnitude is too large for the
- * destination.
+ * us: Conversion from unsigned integers to signed integers where
+ * the source and destination are the same size. Overflow
+ * occurs when the source magnitude is too large for the
+ * destination.
*
- * fF: Floating-point values to floating-point values where the
- * destination is at least as wide as the source. This case
+ * fF: Floating-point values to floating-point values where the
+ * destination is at least as wide as the source. This case
* cannot generate overflows.
*
- * Ff: Floating-point values to floating-point values the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ff: Floating-point values to floating-point values the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
* xF: Integers to float-point(float or double) values where the destination
* is at least as wide as the source. This case cannot generate
@@ -119,29 +119,29 @@
*
* The macros take a subset of these arguments in the order listed here:
*
- * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
- * conversion function.
+ * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
+ * conversion function.
*
- * STYPE: The hid_t value for the source datatype.
+ * STYPE: The hid_t value for the source datatype.
*
- * DTYPE: The hid_t value for the destination datatype.
+ * DTYPE: The hid_t value for the destination datatype.
*
- * BUF: A pointer to the conversion buffer.
+ * BUF: A pointer to the conversion buffer.
*
- * NELMTS: The number of values to be converted.
+ * NELMTS: The number of values to be converted.
*
- * ST: The C name for source datatype (e.g., int)
+ * ST: The C name for source datatype (e.g., int)
*
- * DT: The C name for the destination datatype (e.g., signed char)
+ * DT: The C name for the destination datatype (e.g., signed char)
*
- * D_MIN: The minimum possible destination value. For unsigned
- * destination types this should be zero. For signed
- * destination types it's a negative value with a magnitude that
- * is usually one greater than D_MAX. Source values which are
- * smaller than D_MIN generate overflows.
+ * D_MIN: The minimum possible destination value. For unsigned
+ * destination types this should be zero. For signed
+ * destination types it's a negative value with a magnitude that
+ * is usually one greater than D_MAX. Source values which are
+ * smaller than D_MIN generate overflows.
*
- * D_MAX: The maximum possible destination value. Source values which
- * are larger than D_MAX generate overflows.
+ * D_MAX: The maximum possible destination value. Source values which
+ * are larger than D_MAX generate overflows.
*
* The macros are implemented with a generic programming technique, similar
* to templates in C++. The macro which defines the "core" part of the
@@ -156,25 +156,25 @@
*
* The generic "core" macros are: (others are specific to particular conversion)
*
- * Suffix Description
- * ------ -----------
- * xX: Generic Conversion where the destination is at least as
+ * Suffix Description
+ * ------ -----------
+ * xX: Generic Conversion where the destination is at least as
* wide as the source. This case cannot generate overflows.
*
- * Xx: Generic signed conversion where the source is at least as large
+ * Xx: Generic signed conversion where the source is at least as large
* as the destination. Overflows can occur when the destination is
* narrower than the source.
*
- * Ux: Generic conversion for the `Us', `Uu' & `us' cases
- * Overflow occurs when the source magnitude is too large for the
- * destination.
+ * Ux: Generic conversion for the `Us', `Uu' & `us' cases
+ * Overflow occurs when the source magnitude is too large for the
+ * destination.
*
*/
-#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
/* Added a condition branch(else if (*(S) == (DT)(D_MAX))) which seems redundant.
@@ -184,13 +184,13 @@
* equal. In this case, do not return exception but make sure the maximum is assigned
* to the destination. SLU - 2005/06/29
*/
-#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -199,69 +199,69 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
} else if (*(S) < (ST)(D_MIN)) { \
- *(D) = (DT)(D_MIN); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MIN); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_sU, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -349,23 +349,23 @@
H5T_CONV(H5T_CONV_uS, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Xx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -374,106 +374,106 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
+ *(D) = 0; \
else if (sizeof(ST)>sizeof(DT) && *(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_us, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
/* Same as H5T_CONV_Xx_CORE, except that instead of using D_MAX and D_MIN
* when an overflow occurs, use the 'float' infinity values.
*/
-#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -482,24 +482,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if (*(S) < (ST)(D_MIN)) \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ff, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -562,35 +562,35 @@
LO = count; \
}
-#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- if (sprec > dprec) { \
+#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ if (sprec > dprec) { \
unsigned low_bit_pos, high_bit_pos; \
\
/* Detect high & low bits set in source */ \
H5T_HI_LO_BIT_SET(ST, *(S), low_bit_pos, high_bit_pos) \
\
/* Check for more bits of precision in src than available in dst */ \
- if((high_bit_pos - low_bit_pos) >= dprec) { \
+ if((high_bit_pos - low_bit_pos) >= dprec) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
- } \
+ *(D) = (DT)(*(S)); \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_xF, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -602,13 +602,13 @@
* (ST)(D_MAX))) is for some compilers like Sun, HP, IBM, and SGI where under
* the same situation the "int" doesn't overflow. SLU - 2005/9/12
*/
-#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX) || (sprec < dprec && *(S) == (ST)(D_MAX))) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -617,7 +617,7 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -626,24 +626,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(*(S) < (ST)(D_MIN)) \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_Fx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -652,146 +652,146 @@
* to do them all.
*/
#ifndef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
#endif /* H5_WANT_DCONV_EXCEPTION */
/* The main part of every integer hardware conversion macro */
-#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
+#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
{ \
herr_t ret_value=SUCCEED; /* Return value */ \
\
FUNC_ENTER_PACKAGE \
\
{ \
- size_t elmtno; /*element number */ \
+ size_t elmtno; /*element number */ \
H5T_CONV_DECL_PREC(PREC) /*declare precision variables, or not */ \
- uint8_t *src_buf; /*'raw' source buffer */ \
- uint8_t *dst_buf; /*'raw' destination buffer */ \
- ST *src, *s; /*source buffer */ \
- DT *dst, *d; /*destination buffer */ \
- H5T_t *st, *dt; /*datatype descriptors */ \
- ST src_aligned; /*source aligned type */ \
- DT dst_aligned; /*destination aligned type */ \
- hbool_t s_mv, d_mv; /*move data to align it? */ \
- ssize_t s_stride, d_stride; /*src and dst strides */ \
+ uint8_t *src_buf; /*'raw' source buffer */ \
+ uint8_t *dst_buf; /*'raw' destination buffer */ \
+ ST *src, *s; /*source buffer */ \
+ DT *dst, *d; /*destination buffer */ \
+ H5T_t *st, *dt; /*datatype descriptors */ \
+ ST src_aligned; /*source aligned type */ \
+ DT dst_aligned; /*destination aligned type */ \
+ hbool_t s_mv, d_mv; /*move data to align it? */ \
+ ssize_t s_stride, d_stride; /*src and dst strides */ \
size_t safe; /*how many elements are safe to process in each pass */ \
H5T_conv_cb_t cb_struct; /*conversion callback structure */ \
\
- switch (cdata->command) { \
- case H5T_CONV_INIT: \
- /* Sanity check and initialize statistics */ \
- cdata->need_bkg = H5T_BKG_NO; \
+ switch (cdata->command) { \
+ case H5T_CONV_INIT: \
+ /* Sanity check and initialize statistics */ \
+ cdata->need_bkg = H5T_BKG_NO; \
if (NULL==(st=(H5T_t*)H5I_object(src_id)) || NULL==(dt=(H5T_t*)H5I_object(dst_id))) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "unable to dereference datatype object ID") \
- if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "disagreement about datatype size") \
- CI_ALLOC_PRIV \
- break; \
- \
- case H5T_CONV_FREE: \
- /* Print and free statistics */ \
- CI_PRINT_STATS(STYPE,DTYPE); \
- CI_FREE_PRIV \
- break; \
- \
- case H5T_CONV_CONV: \
- /* Initialize source & destination strides */ \
- if (buf_stride) { \
- HDassert(buf_stride >= sizeof(ST)); \
- HDassert(buf_stride >= sizeof(DT)); \
- s_stride = d_stride = (ssize_t)buf_stride; \
- } else { \
- s_stride = sizeof(ST); \
- d_stride = sizeof(DT); \
- } \
- \
- /* Is alignment required for source or dest? */ \
- s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
- (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
- d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
- (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
- CI_INC_SRC(s_mv) \
- CI_INC_DST(d_mv) \
- \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "unable to dereference datatype object ID") \
+ if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "disagreement about datatype size") \
+ CI_ALLOC_PRIV \
+ break; \
+ \
+ case H5T_CONV_FREE: \
+ /* Print and free statistics */ \
+ CI_PRINT_STATS(STYPE,DTYPE); \
+ CI_FREE_PRIV \
+ break; \
+ \
+ case H5T_CONV_CONV: \
+ /* Initialize source & destination strides */ \
+ if (buf_stride) { \
+ HDassert(buf_stride >= sizeof(ST)); \
+ HDassert(buf_stride >= sizeof(DT)); \
+ s_stride = d_stride = (ssize_t)buf_stride; \
+ } else { \
+ s_stride = sizeof(ST); \
+ d_stride = sizeof(DT); \
+ } \
+ \
+ /* Is alignment required for source or dest? */ \
+ s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
+ (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
+ d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
+ (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ CI_INC_SRC(s_mv) \
+ CI_INC_DST(d_mv) \
+ \
/* Get conversion exception callback property */ \
if(H5CX_get_dt_conv_cb(&cb_struct) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") \
\
- /* Get source and destination datatypes */ \
+ /* Get source and destination datatypes */ \
if(NULL == (st = (H5T_t *)H5I_object(src_id)) || NULL == (dt = (H5T_t *)H5I_object(dst_id))) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to dereference datatype object ID") \
- \
+ \
H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \
\
/* The outer loop of the type conversion macro, controlling which */ \
- /* direction the buffer is walked */ \
- while (nelmts>0) { \
- /* Check if we need to go backwards through the buffer */ \
- if(d_stride>s_stride) { \
+ /* direction the buffer is walked */ \
+ while (nelmts>0) { \
+ /* Check if we need to go backwards through the buffer */ \
+ if(d_stride>s_stride) { \
/* Compute the number of "safe" destination elements at */ \
/* the end of the buffer (Those which don't overlap with */ \
/* any source elements at the beginning of the buffer) */ \
safe = nelmts - (((nelmts * (size_t)s_stride) + (size_t)(d_stride - 1)) / (size_t)d_stride); \
- \
+ \
/* If we're down to the last few elements, just wrap up */ \
- /* with a "real" reverse copy */ \
- if(safe<2) { \
+ /* with a "real" reverse copy */ \
+ if(safe<2) { \
src = (ST *)(src_buf = (uint8_t *)buf + (nelmts - 1) * (size_t)s_stride); \
dst = (DT *)(dst_buf = (uint8_t *)buf + (nelmts - 1) * (size_t)d_stride); \
- s_stride = -s_stride; \
- d_stride = -d_stride; \
- \
- safe=nelmts; \
- } /* end if */ \
- else { \
+ s_stride = -s_stride; \
+ d_stride = -d_stride; \
+ \
+ safe=nelmts; \
+ } /* end if */ \
+ else { \
src = (ST *)(src_buf = (uint8_t *)buf + (nelmts - safe) * (size_t)s_stride); \
dst = (DT *)(dst_buf = (uint8_t *)buf + (nelmts - safe) * (size_t)d_stride); \
- } /* end else */ \
- } /* end if */ \
- else { \
- /* Single forward pass over all data */ \
- src = (ST *)(src_buf = (uint8_t*)buf); \
- dst = (DT *)(dst_buf = (uint8_t*)buf); \
- safe=nelmts; \
- } /* end else */ \
+ } /* end else */ \
+ } /* end if */ \
+ else { \
+ /* Single forward pass over all data */ \
+ src = (ST *)(src_buf = (uint8_t*)buf); \
+ dst = (DT *)(dst_buf = (uint8_t*)buf); \
+ safe=nelmts; \
+ } /* end else */ \
\
- /* Perform loop over elements to convert */ \
- if (s_mv && d_mv) { \
- /* Alignment is required for both source and dest */ \
- s = &src_aligned; \
+ /* Perform loop over elements to convert */ \
+ if (s_mv && d_mv) { \
+ /* Alignment is required for both source and dest */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DALIGN,POST_SALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,s,d,ST,DT,D_MIN,D_MAX) \
- } else if(s_mv) { \
- /* Alignment is required only for source */ \
- s = &src_aligned; \
+ } else if(s_mv) { \
+ /* Alignment is required only for source */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DNOALIGN,POST_SALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,s,dst,ST,DT,D_MIN,D_MAX) \
- } else if(d_mv) { \
- /* Alignment is required only for destination */ \
+ } else if(d_mv) { \
+ /* Alignment is required only for destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DALIGN,POST_SNOALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,src,d,ST,DT,D_MIN,D_MAX) \
- } else { \
+ } else { \
/* Alignment is not required for both source and destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DNOALIGN,POST_SNOALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,src,dst,ST,DT,D_MIN,D_MAX) \
- } \
- \
- /* Decrement number of elements left to convert */ \
- nelmts-=safe; \
- } /* end while */ \
- break; \
- \
- default: \
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
- "unknown conversion command"); \
- } \
+ } \
+ \
+ /* Decrement number of elements left to convert */ \
+ nelmts-=safe; \
+ } /* end while */ \
+ break; \
+ \
+ default: \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
} \
- \
+ \
done: \
FUNC_LEAVE_NOAPI(ret_value) \
}
@@ -800,9 +800,9 @@ done: \
#define H5T_CONV_DECL_PREC(PREC) H5_GLUE(H5T_CONV_DECL_PREC_, PREC)
#define H5T_CONV_DECL_PREC_Y \
- size_t sprec; /*source precision */ \
- size_t dprec; /*destination precision */ \
- H5T_class_t tclass; /*datatype's class */
+ size_t sprec; /*source precision */ \
+ size_t dprec; /*destination precision */ \
+ H5T_class_t tclass; /*datatype's class */
#define H5T_CONV_DECL_PREC_N /*no precision variables */
@@ -810,60 +810,60 @@ done: \
#define H5T_CONV_SET_PREC(PREC) H5_GLUE(H5T_CONV_SET_PREC_, PREC)
#define H5T_CONV_SET_PREC_Y \
- /* Get source & destination precisions into a variable */ \
- tclass = st->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- sprec = st->shared->u.atomic.prec; \
- else \
- sprec = 1 + st->shared->u.atomic.u.f.msize; \
- tclass = dt->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- dprec = dt->shared->u.atomic.prec; \
- else \
+ /* Get source & destination precisions into a variable */ \
+ tclass = st->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ sprec = st->shared->u.atomic.prec; \
+ else \
+ sprec = 1 + st->shared->u.atomic.u.f.msize; \
+ tclass = dt->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ dprec = dt->shared->u.atomic.prec; \
+ else \
dprec = 1 + dt->shared->u.atomic.u.f.msize;
#define H5T_CONV_SET_PREC_N /*don't init precision variables */
/* Macro defining action on source data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
- HDmemcpy(&src_aligned, src, sizeof(ST)); \
+#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
+ HDmemcpy(&src_aligned, src, sizeof(ST)); \
}
/* Macro defining action on source data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
- d = &dst_aligned; \
+#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
+ d = &dst_aligned; \
}
/* Macro defining action on destination data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
}
/* Macro defining action on source data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
}
/* Macro defining action on source data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
- HDmemcpy(dst, &dst_aligned, sizeof(DT)); \
+#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
+ HDmemcpy(dst, &dst_aligned, sizeof(DT)); \
}
/* Macro defining action on destination data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
}
/* The outer wrapper for the type conversion loop, to check for an exception handling routine */
#define H5T_CONV_LOOP_OUTER(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- if(cb_struct.func) { \
+ if(cb_struct.func) { \
H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
} \
else { \
@@ -872,36 +872,36 @@ done: \
/* The inner loop of the type conversion macro, actually converting the elements */
#define H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- for (elmtno=0; elmtno<safe; elmtno++) { \
- /* Handle source pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
+ for (elmtno=0; elmtno<safe; elmtno++) { \
+ /* Handle source pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
\
- /* Handle destination pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
+ /* Handle destination pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
\
- /* ... user-defined stuff here -- the conversion ... */ \
- H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
+ H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
\
- /* Handle source post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
+ /* Handle source post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
\
- /* Handle destination post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
+ /* Handle destination post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
\
- /* Advance pointers */ \
- src_buf += s_stride; \
- src = (ST *)src_buf; \
- dst_buf += d_stride; \
- dst = (DT *)dst_buf; \
+ /* Advance pointers */ \
+ src_buf += s_stride; \
+ src = (ST *)src_buf; \
+ dst_buf += d_stride; \
+ dst = (DT *)dst_buf; \
}
/* Macro to call the actual "guts" of the type conversion, or call the "no exception" guts */
#ifdef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- /* ... user-defined stuff here -- the conversion ... */ \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
H5_GLUE(GUTS,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#else /* H5_WANT_DCONV_EXCEPTION */
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
H5_GLUE(H5T_CONV_NO_EXCEPT,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#endif /* H5_WANT_DCONV_EXCEPTION */
@@ -909,27 +909,27 @@ done: \
#ifdef H5T_DEBUG
/* Print alignment statistics */
-# define CI_PRINT_STATS(STYPE,DTYPE) { \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu src elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
- (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
- } \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu dst elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
- (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
- } \
+# define CI_PRINT_STATS(STYPE,DTYPE) { \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu src elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
+ (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
+ } \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu dst elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
+ (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ } \
}
/* Allocate private alignment structure for atomic types */
# define CI_ALLOC_PRIV \
- if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed"); \
- }
+ if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
+ "memory allocation failed"); \
+ }
/* Free private alignment structure for atomic types */
# define CI_FREE_PRIV \
@@ -961,25 +961,25 @@ done: \
/* Conversion data for H5T__conv_struct() */
typedef struct H5T_conv_struct_t {
- int *src2dst; /*mapping from src to dst member num */
- hid_t *src_memb_id; /*source member type ID's */
- hid_t *dst_memb_id; /*destination member type ID's */
- H5T_path_t **memb_path; /*conversion path for each member */
+ int *src2dst; /*mapping from src to dst member num */
+ hid_t *src_memb_id; /*source member type ID's */
+ hid_t *dst_memb_id; /*destination member type ID's */
+ H5T_path_t **memb_path; /*conversion path for each member */
H5T_subset_info_t subset_info; /*info related to compound subsets */
unsigned src_nmembs; /*needed by free function */
} H5T_conv_struct_t;
/* Conversion data for H5T__conv_enum() */
typedef struct H5T_enum_struct_t {
- int base; /*lowest `in' value */
- unsigned length; /*num elements in arrays */
- int *src2dst; /*map from src to dst index */
+ int base; /*lowest `in' value */
+ unsigned length; /*num elements in arrays */
+ int *src2dst; /*map from src to dst index */
} H5T_enum_struct_t;
/* Conversion data for the hardware conversion functions */
typedef struct H5T_conv_hw_t {
- size_t s_aligned; /*number source elements aligned */
- size_t d_aligned; /*number destination elements aligned*/
+ size_t s_aligned; /*number source elements aligned */
+ size_t d_aligned; /*number destination elements aligned*/
} H5T_conv_hw_t;
/********************/
@@ -993,7 +993,7 @@ typedef struct H5T_conv_hw_t {
static herr_t H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
-
+
/*********************/
/* Public Variables */
/*********************/
@@ -1019,17 +1019,17 @@ H5FL_BLK_DEFINE_STATIC(vlen_seq);
/* Declare a free list to manage pieces of array data */
H5FL_BLK_DEFINE_STATIC(array_seq);
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_noop
+ * Function: H5T__conv_noop
*
- * Purpose: The no-op conversion. The library knows about this
- * conversion without it being registered.
+ * Purpose: The no-op conversion. The library knows about this
+ * conversion without it being registered.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, January 14, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, January 14, 1998
*
*-------------------------------------------------------------------------
*/
@@ -1063,20 +1063,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_noop() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order_opt
+ * Function: H5T__conv_order_opt
*
- * Purpose: Convert one type to another when byte order is the only
- * difference. This is the optimized version of H5T__conv_order()
+ * Purpose: Convert one type to another when byte order is the only
+ * difference. This is the optimized version of H5T__conv_order()
* for a handful of different sizes.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, January 25, 2002
+ * Programmer: Robb Matzke
+ * Friday, January 25, 2002
*
*-------------------------------------------------------------------------
*/
@@ -1086,9 +1086,9 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1478,30 +1478,30 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order
+ * Function: H5T__conv_order
*
- * Purpose: Convert one type to another when byte order is the only
- * difference.
+ * Purpose: Convert one type to another when byte order is the only
+ * difference.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, January 13, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, January 13, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
- size_t i;
- size_t j, md;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
+ size_t i;
+ size_t j, md;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1578,34 +1578,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_order() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_b_b
+ * Function: H5T__conv_b_b
*
- * Purpose: Convert from one bitfield to any other bitfield.
+ * Purpose: Convert from one bitfield to any other bitfield.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, May 20, 1999
+ * Programmer: Robb Matzke
+ * Thursday, May 20, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
- ssize_t direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t half_size; /*1/2 of total size for swapping*/
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t dbuf[256]; /*temp destination buffer */
- size_t msb_pad_offset; /*offset for dest MSB padding */
- size_t i;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
+ ssize_t direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t half_size; /*1/2 of total size for swapping*/
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[256]; /*temp destination buffer */
+ size_t msb_pad_offset; /*offset for dest MSB padding */
+ size_t i;
uint8_t *src_rev=NULL; /*order-reversed source buffer */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -1820,17 +1820,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_b_b() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_free
+ * Function: H5T_conv_struct_free
*
- * Purpose: Free the private data structure used by the compound
+ * Purpose: Free the private data structure used by the compound
* conversion functions.
*
- * Return: The result of H5MM_xfree(priv) (NULL)
+ * Return: The result of H5MM_xfree(priv) (NULL)
*
- * Programmer: Neil Fortner
- * Wednesday, October 1, 2008
+ * Programmer: Neil Fortner
+ * Wednesday, October 1, 2008
*
*-------------------------------------------------------------------------
*/
@@ -1862,24 +1862,24 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv))
} /* end H5T_conv_struct_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_init
+ * Function: H5T_conv_struct_init
*
- * Purpose: Initialize the `priv' field of `cdata' with conversion
- * information that is relatively constant. If `priv' is
- * already initialized then the member conversion functions
- * are recalculated.
+ * Purpose: Initialize the `priv' field of `cdata' with conversion
+ * information that is relatively constant. If `priv' is
+ * already initialized then the member conversion functions
+ * are recalculated.
*
- * Priv fields are indexed by source member number or
- * destination member number depending on whether the field
- * contains information about the source datatype or the
- * destination datatype (fields that contains the same
- * information for both source and destination are indexed by
- * source member number). The src2dst[] priv array maps source
- * member numbers to destination member numbers, but if the
- * source member doesn't have a corresponding destination member
- * then the src2dst[i]=-1.
+ * Priv fields are indexed by source member number or
+ * destination member number depending on whether the field
+ * contains information about the source datatype or the
+ * destination datatype (fields that contains the same
+ * information for both source and destination are indexed by
+ * source member number). The src2dst[] priv array maps source
+ * member numbers to destination member numbers, but if the
+ * source member doesn't have a corresponding destination member
+ * then the src2dst[i]=-1.
*
* Special optimization case when the source and destination
* members are a subset of each other, and the order is the same,
@@ -1902,20 +1902,20 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 26, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 26, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
- int *src2dst = NULL;
+ H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
+ int *src2dst = NULL;
unsigned src_nmembs, dst_nmembs;
- unsigned i, j;
+ unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1962,8 +1962,8 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
} /* end if */
} /* end for */
if(src2dst[i] >= 0) {
- hid_t tid;
- H5T_t *type;
+ hid_t tid;
+ H5T_t *type;
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
@@ -2053,9 +2053,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_conv_struct_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_subset
+ * Function: H5T__conv_struct_subset
*
* Purpose: A quick way to return a field in a struct private in this
* file. The flag SMEMBS_SUBSET indicates whether the source
@@ -2073,15 +2073,15 @@ done:
* Return: A pointer to the subset info struct in p. Points directly
* into the structure.
*
- * Programmer: Raymond Lu
- * 8 June 2007
+ * Programmer: Raymond Lu
+ * 8 June 2007
*
*-------------------------------------------------------------------------
*/
H5T_subset_info_t *
H5T__conv_struct_subset(const H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = NULL;
+ H5T_conv_struct_t *priv = NULL;
FUNC_ENTER_PACKAGE_NOERR
@@ -2093,30 +2093,30 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
FUNC_LEAVE_NOAPI((H5T_subset_info_t *) &priv->subset_info)
} /* end H5T__conv_struct_subset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct
+ * Function: H5T__conv_struct
*
- * Purpose: Converts between compound datatypes. This is a soft
- * conversion function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes. This is a soft
+ * conversion function. The algorithm is basically:
*
- * For each element do
- * For I=1..NELMTS do
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type;
- * Move member as far left as possible;
+ * For each element do
+ * For I=1..NELMTS do
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type;
+ * Move member as far left as possible;
*
- * For I=NELMTS..1 do
- * If not destination type then
- * Convert member to destination type;
- * Move member to correct position in BKG
+ * For I=NELMTS..1 do
+ * If not destination type then
+ * Convert member to destination type;
+ * Move member to correct position in BKG
*
- * Copy BKG to BUF
+ * Copy BKG to BUF
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2124,20 +2124,20 @@ herr_t
H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
uint8_t *xbuf = buf, *xbkg = bkg; /*temp pointers into buf and bkg*/
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- ssize_t src_delta; /*source stride */
- ssize_t bkg_delta; /*background stride */
- size_t elmtno;
- unsigned u; /*counters */
- int i; /*counters */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ ssize_t src_delta; /*source stride */
+ ssize_t bkg_delta; /*background stride */
+ size_t elmtno;
+ unsigned u; /*counters */
+ int i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2155,7 +2155,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_COMPOUND != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
- if(H5T_COMPOUND != dst->shared->type)
+ if(H5T_COMPOUND != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
if(H5T_conv_struct_init(src, dst, cdata) < 0)
@@ -2303,29 +2303,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_opt
+ * Function: H5T__conv_struct_opt
*
- * Purpose: Converts between compound datatypes in a manner more
- * efficient than the general-purpose H5T__conv_struct()
- * function. This function isn't applicable if the destination
- * is larger than the source type. This is a soft conversion
- * function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes in a manner more
+ * efficient than the general-purpose H5T__conv_struct()
+ * function. This function isn't applicable if the destination
+ * is larger than the source type. This is a soft conversion
+ * function. The algorithm is basically:
*
- * For each member of the struct
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type for all elements
- * Move memb to BKG buffer for all elements
- * Else
- * Move member as far left as possible for all elements
+ * For each member of the struct
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type for all elements
+ * Move memb to BKG buffer for all elements
+ * Else
+ * Move member as far left as possible for all elements
*
- * For each member of the struct (in reverse order)
- * If not destination type then
- * Convert member to destination type for all elements
- * Move member to correct position in BKG for all elements
+ * For each member of the struct (in reverse order)
+ * If not destination type then
+ * Convert member to destination type for all elements
+ * Move member to correct position in BKG for all elements
*
- * Copy BKG to BUF for all elements
+ * Copy BKG to BUF for all elements
*
* Special case when the source and destination members
* are a subset of each other, and the order is the same, and no
@@ -2340,10 +2340,10 @@ done:
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2351,22 +2351,22 @@ herr_t
H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
- uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
- uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- size_t elmtno; /*element counter */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
+ uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ size_t elmtno; /*element counter */
size_t copy_size; /*size of element for copying */
- H5T_conv_struct_t *priv = NULL; /*private data */
+ H5T_conv_struct_t *priv = NULL; /*private data */
hbool_t no_stride = FALSE; /*flag to indicate no stride */
- unsigned u; /*counters */
- int i; /*counters */
+ unsigned u; /*counters */
+ int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2383,7 +2383,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_COMPOUND != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
- if(H5T_COMPOUND != dst->shared->type)
+ if(H5T_COMPOUND != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
/* Initialize data which is relatively constant */
@@ -2575,17 +2575,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct_opt() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_conv_enum_init
+ * Function: H5T_conv_enum_init
*
- * Purpose: Initialize information for H5T__conv_enum().
+ * Purpose: Initialize information for H5T__conv_enum().
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*
*-------------------------------------------------------------------------
@@ -2593,21 +2593,21 @@ done:
static herr_t
H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_enum_struct_t *priv = NULL; /*private conversion data */
- int n; /*src value cast as native int */
- int domain[2] = {0, 0}; /*min and max source values */
- int *map = NULL; /*map from src value to dst idx */
- unsigned length; /*nelmts in map array */
- unsigned i, j; /*counters */
+ H5T_enum_struct_t *priv = NULL; /*private conversion data */
+ int n; /*src value cast as native int */
+ int domain[2] = {0, 0}; /*min and max source values */
+ int *map = NULL; /*map from src value to dst idx */
+ unsigned length; /*nelmts in map array */
+ unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
cdata->need_bkg = H5T_BKG_NO;
if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
if(0 == src->shared->u.enumer.nmembs)
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED);
/*
* Check that the source symbol names are a subset of the destination
@@ -2617,16 +2617,16 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
H5T__sort_name(src, NULL);
H5T__sort_name(dst, NULL);
if(NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
for(i = 0, j = 0;
i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs;
i++, j++) {
- while(j < dst->shared->u.enumer.nmembs &&
- HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
+ while(j < dst->shared->u.enumer.nmembs &&
+ HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
j++;
- if(j >= dst->shared->u.enumer.nmembs)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
- priv->src2dst[i] = (int)j;
+ if(j >= dst->shared->u.enumer.nmembs)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
+ priv->src2dst[i] = (int)j;
} /* end for */
/*
@@ -2634,75 +2634,75 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* value converted. However, if all of the following constraints are met
* then we can build a perfect hash table and use an O(1) lookup method.
*
- * A: The source datatype size matches one of our native datatype
- * sizes.
+ * A: The source datatype size matches one of our native datatype
+ * sizes.
*
- * B: After casting the source value bit pattern to a native type
- * the size of the range of values is less than 20% larger than
- * the number of values.
+ * B: After casting the source value bit pattern to a native type
+ * the size of the range of values is less than 20% larger than
+ * the number of values.
*
* If this special case is met then we use the source bit pattern cast as
* a native integer type as an index into the `val2dst'. The values of
* that array are the index numbers in the destination type or negative
* if the entry is unused.
*
- * (This optimized algorithm doesn't work when the byte orders are different.
+ * (This optimized algorithm doesn't work when the byte orders are different.
* The code such as "n = *((int*)(src->shared->u.enumer.value+i*src->shared->size));"
* can change the value significantly. i.g. if the source value is big-endian 0x0000000f,
* executing the casting on little-endian machine will get a big number 0x0f000000.
- * Then it can't meet the condition
+ * Then it can't meet the condition
* "if(src->shared->u.enumer.nmembs<2 || (double)length/src->shared->u.enumer.nmembs<1.2)"
- * Because this is the optimized code, we won't fix it. It should still work in some
- * situations. SLU - 2011/5/24)
+ * Because this is the optimized code, we won't fix it. It should still work in some
+ * situations. SLU - 2011/5/24)
*/
if(1 == src->shared->size || sizeof(short) == src->shared->size || sizeof(int) == src->shared->size) {
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)(src->shared->u.enumer.value + i));
- else if (sizeof(short) == src->shared->size)
- n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
- else
- n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
- if(0 == i) {
- domain[0] = domain[1] = n;
- } else {
- domain[0] = MIN(domain[0], n);
- domain[1] = MAX(domain[1], n);
- }
- } /* end for */
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)(src->shared->u.enumer.value + i));
+ else if (sizeof(short) == src->shared->size)
+ n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
+ else
+ n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
+ if(0 == i) {
+ domain[0] = domain[1] = n;
+ } else {
+ domain[0] = MIN(domain[0], n);
+ domain[1] = MAX(domain[1], n);
+ }
+ } /* end for */
HDassert(domain[1] >= domain[0]);
- length = (unsigned)(domain[1] - domain[0]) + 1;
- if(src->shared->u.enumer.nmembs < 2 ||
+ length = (unsigned)(domain[1] - domain[0]) + 1;
+ if(src->shared->u.enumer.nmembs < 2 ||
(double)length / src->shared->u.enumer.nmembs < (double)(1.2f)) {
- priv->base = domain[0];
- priv->length = length;
- if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- for(i = 0; i < length; i++)
+ priv->base = domain[0];
+ priv->length = length;
+ if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ for(i = 0; i < length; i++)
map[i] = -1; /*entry unused*/
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)(src->shared->u.enumer.value + i));
- else if(sizeof(short) == src->shared->size)
- n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
- else
- n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
- n -= priv->base;
- HDassert(n >= 0 && (unsigned)n < priv->length);
- HDassert(map[n] < 0);
- map[n] = priv->src2dst[i];
- } /* end for */
-
- /*
- * Replace original src2dst array with our new one. The original
- * was indexed by source member number while the new one is
- * indexed by source values.
- */
- H5MM_xfree(priv->src2dst);
- priv->src2dst = map;
- HGOTO_DONE(SUCCEED);
- }
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)(src->shared->u.enumer.value + i));
+ else if(sizeof(short) == src->shared->size)
+ n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
+ else
+ n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
+ n -= priv->base;
+ HDassert(n >= 0 && (unsigned)n < priv->length);
+ HDassert(map[n] < 0);
+ map[n] = priv->src2dst[i];
+ } /* end for */
+
+ /*
+ * Replace original src2dst array with our new one. The original
+ * was indexed by source member number while the new one is
+ * indexed by source values.
+ */
+ H5MM_xfree(priv->src2dst);
+ priv->src2dst = map;
+ HGOTO_DONE(SUCCEED);
+ }
}
/* Sort source type by value and adjust src2dst[] appropriately */
@@ -2710,24 +2710,24 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
done:
if (ret_value<0 && priv) {
- H5MM_xfree(priv->src2dst);
- H5MM_xfree(priv);
- cdata->priv = NULL;
+ H5MM_xfree(priv->src2dst);
+ H5MM_xfree(priv);
+ cdata->priv = NULL;
}
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum
+ * Function: H5T__conv_enum
*
- * Purpose: Converts one type of enumerated data to another.
+ * Purpose: Converts one type of enumerated data to another.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*-------------------------------------------------------------------------
*/
@@ -2736,15 +2736,15 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
- H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
- uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
- ssize_t src_delta, dst_delta; /*conversion strides */
- int n; /*src value cast as native int */
+ uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
+ H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
+ uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
+ ssize_t src_delta, dst_delta; /*conversion strides */
+ int n; /*src value cast as native int */
H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv);
H5T_conv_cb_t cb_struct; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- size_t i; /*counters */
+ size_t i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2761,7 +2761,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_ENUM != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
- if(H5T_ENUM != dst->shared->type)
+ if(H5T_ENUM != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
if(H5T_conv_enum_init(src, dst, cdata) < 0)
@@ -2771,7 +2771,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
case H5T_CONV_FREE:
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- fprintf(H5DEBUG(T), " Using %s mapping function%s\n",
+ HDfprintf(H5DEBUG(T), " Using %s mapping function%s\n",
priv->length?"O(1)":"O(log N)",
priv->length?"":", where N is the number of enum members");
}
@@ -2788,7 +2788,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_ENUM != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
- if(H5T_ENUM != dst->shared->type)
+ if(H5T_ENUM != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
/* priv->src2dst map was computed for certain sort keys. Make sure those same
@@ -2828,10 +2828,10 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Use O(1) lookup */
/* (The casting won't work when the byte orders are different. i.g. if the source value
* is big-endian 0x0000000f, the direct casting "n = *((int*)s);" will make it a big
- * number 0x0f000000 on little-endian machine. But we won't fix it because it's an
+ * number 0x0f000000 on little-endian machine. But we won't fix it because it's an
* optimization code. Please also see the comment in the H5T_conv_enum_init() function.
* SLU - 2011/5/24)
- */
+ */
if(1 == src->shared->size)
n = *((signed char*)s);
else if(sizeof(short) == src->shared->size)
@@ -2906,30 +2906,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_numeric
+ * Function: H5T__conv_enum_numeric
*
- * Purpose: Converts enumerated data to a numeric type (integer or
- * floating-point number). This function is registered into
- * the conversion table twice in H5T_init_interface in H5T.c.
+ * Purpose: Converts enumerated data to a numeric type (integer or
+ * floating-point number). This function is registered into
+ * the conversion table twice in H5T_init_interface in H5T.c.
* Once for enum-integer conversion. Once for enum-float conversion.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 12 October 2012
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src, *dst; /*src and dst datatypes */
- H5T_t *src_parent; /*parent type for src */
+ H5T_t *src, *dst; /*src and dst datatypes */
+ H5T_t *src_parent; /*parent type for src */
hid_t src_parent_id = -1; /*ID for parent of the source */
H5T_path_t *tpath; /* Conversion information */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2962,9 +2962,9 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
src_parent = src->shared->parent;
if(NULL == (tpath = H5T_path_find(src_parent, dst))) {
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
} else if(!H5T_path_noop(tpath)) {
- if((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) < 0)
+ if((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
/* Convert the data */
@@ -2986,28 +2986,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum_numeric() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_vlen
+ * Function: H5T__conv_vlen
*
- * Purpose: Converts between VL datatypes in memory and on disk.
- * This is a soft conversion function. The algorithm is
- * basically:
+ * Purpose: Converts between VL datatypes in memory and on disk.
+ * This is a soft conversion function. The algorithm is
+ * basically:
*
- * For every VL struct in the main buffer:
- * 1. Allocate space for temporary dst VL data (reuse buffer
- * if possible)
+ * For every VL struct in the main buffer:
+ * 1. Allocate space for temporary dst VL data (reuse buffer
+ * if possible)
* 2. Copy VL data from src buffer into dst buffer
* 3. Convert VL data into dst representation
* 4. Allocate buffer in dst heap
- * 5. Free heap objects storing old data
+ * 5. Free heap objects storing old data
* 6. Write dst VL data into dst heap
* 7. Store (heap ID or pointer) and length in main dst buffer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, May 26, 1999
+ * Programmer: Quincey Koziol
+ * Wednesday, May 26, 1999
*
*-------------------------------------------------------------------------
*/
@@ -3016,28 +3016,28 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *buf, void *bkg)
{
H5T_vlen_alloc_info_t vl_alloc_info;/* VL allocation info */
- H5T_path_t *tpath = NULL; /* Type conversion path */
+ H5T_path_t *tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- H5HG_t bg_hobjid, parent_hobjid;
- uint8_t *s = NULL; /*source buffer */
- uint8_t *d = NULL; /*destination buffer */
- uint8_t *b = NULL; /*background buffer */
- ssize_t s_stride, d_stride; /*src and dst strides */
- ssize_t b_stride; /*bkg stride */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ H5HG_t bg_hobjid, parent_hobjid;
+ uint8_t *s = NULL; /*source buffer */
+ uint8_t *d = NULL; /*destination buffer */
+ uint8_t *b = NULL; /*background buffer */
+ ssize_t s_stride, d_stride; /*src and dst strides */
+ ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
- size_t bg_seq_len = 0;
- size_t src_base_size, dst_base_size;/*source & destination base size*/
- void *conv_buf = NULL; /*temporary conversion buffer */
- size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
- void *tmp_buf = NULL; /*temporary background buffer */
- size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
+ size_t bg_seq_len = 0;
+ size_t src_base_size, dst_base_size;/*source & destination base size*/
+ void *conv_buf = NULL; /*temporary conversion buffer */
+ size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
+ void *tmp_buf = NULL; /*temporary background buffer */
+ size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
hbool_t nested = FALSE; /*flag of nested VL case */
- size_t elmtno; /*element number counter */
+ size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3055,10 +3055,10 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_VLEN != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype")
- if(H5T_VLEN != dst->shared->type)
+ if(H5T_VLEN != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype")
if(H5T_VLEN_STRING == src->shared->u.vlen.type && H5T_VLEN_STRING == dst->shared->u.vlen.type) {
- if((H5T_CSET_ASCII == src->shared->u.vlen.cset && H5T_CSET_UTF8 == dst->shared->u.vlen.cset)
+ if((H5T_CSET_ASCII == src->shared->u.vlen.cset && H5T_CSET_UTF8 == dst->shared->u.vlen.cset)
|| (H5T_CSET_ASCII == dst->shared->u.vlen.cset && H5T_CSET_UTF8 == src->shared->u.vlen.cset))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The library doesn't convert between strings of ASCII and UTF")
}
@@ -3187,7 +3187,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end if */
else {
ssize_t sseq_len; /* (signed) The number of elements in the current sequence*/
- size_t seq_len; /* The number of elements in the current sequence*/
+ size_t seq_len; /* The number of elements in the current sequence*/
/* Get length of element sequences */
if((sseq_len = (*(src->shared->u.vlen.getlen))(s)) < 0)
@@ -3201,7 +3201,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer")
} /* end if */
else {
- size_t src_size, dst_size; /*source & destination total size in bytes*/
+ size_t src_size, dst_size; /*source & destination total size in bytes*/
src_size = seq_len * src_base_size;
dst_size = seq_len * dst_base_size;
@@ -3209,11 +3209,11 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if conversion buffer is large enough, resize if
* necessary. If the SEQ_LEN is 0, allocate a minimal size buffer.
*/
- if(!seq_len && !conv_buf) {
+ if(!seq_len && !conv_buf) {
conv_buf_size = ((1 / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
- }
+ }
else if(conv_buf_size < MAX(src_size, dst_size)) {
/* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */
conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
@@ -3328,17 +3328,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_vlen() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_array
+ * Function: H5T__conv_array
*
- * Purpose: Converts between array datatypes in memory and on disk.
- * This is a soft conversion function.
+ * Purpose: Converts between array datatypes in memory and on disk.
+ * This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Monday, November 6, 2000
+ * Programmer: Quincey Koziol
+ * Monday, November 6, 2000
*
*-------------------------------------------------------------------------
*/
@@ -3346,16 +3346,16 @@ herr_t
H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg)
{
- H5T_path_t *tpath; /* Type conversion path */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- uint8_t *sp, *dp; /*source and dest traversal ptrs */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number counter */
+ H5T_path_t *tpath; /* Type conversion path */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ uint8_t *sp, *dp; /*source and dest traversal ptrs */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number counter */
unsigned u; /* local index variable */
- void *bkg_buf = NULL; /*temporary background buffer */
+ void *bkg_buf = NULL; /*temporary background buffer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3433,7 +3433,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if we need a background buffer for this conversion */
if(tpath->cdata.need_bkg) {
- size_t bkg_buf_size; /*size of background buffer in bytes */
+ size_t bkg_buf_size; /*size of background buffer in bytes */
/* Allocate background buffer */
bkg_buf_size = src->shared->u.array.nelem * MAX(src->shared->size, dst->shared->size);
@@ -3474,18 +3474,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_array() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_i
+ * Function: H5T__conv_i_i
*
- * Purpose: Convert one integer type to another. This is the catch-all
- * function for integer conversions and is probably not
- * particularly fast.
+ * Purpose: Convert one integer type to another. This is the catch-all
+ * function for integer conversions and is probably not
+ * particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, June 10, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, June 10, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3493,19 +3493,19 @@ herr_t
H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
- size_t first;
- ssize_t sfirst; /*a signed version of `first' */
- size_t i; /*Local index variables */
+ uint8_t dbuf[64]; /*temp destination buffer */
+ size_t first;
+ ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*Local index variables */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -3865,18 +3865,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_f
+ * Function: H5T__conv_f_f
*
- * Purpose: Convert one floating point type to another. This is a catch
- * all for floating point conversions and is probably not
- * particularly fast!
+ * Purpose: Convert one floating point type to another. This is a catch
+ * all for floating point conversions and is probably not
+ * particularly fast!
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3885,32 +3885,32 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- ssize_t bitno = 0; /*bit number */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ ssize_t bitno = 0; /*bit number */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- int64_t expo; /*exponent */
- hssize_t expo_max; /*maximum possible dst exponent */
- size_t msize = 0; /*useful size of mantissa in src*/
- size_t mpos; /*offset to useful mant is src */
+ int64_t expo; /*exponent */
+ hssize_t expo_max; /*maximum possible dst exponent */
+ size_t msize = 0; /*useful size of mantissa in src*/
+ size_t mpos; /*offset to useful mant is src */
uint64_t sign; /*source sign bit value */
- size_t mrsh; /*amount to right shift mantissa*/
- hbool_t carry = FALSE; /*carry after rounding mantissa */
- size_t i; /*miscellaneous counters */
- size_t implied; /*destination implied bits */
+ size_t mrsh; /*amount to right shift mantissa*/
+ hbool_t carry = FALSE; /*carry after rounding mantissa */
+ size_t i; /*miscellaneous counters */
+ size_t implied; /*destination implied bits */
hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -4174,7 +4174,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Get the exponent as an unsigned quantity from the section of
- * the source bit field where it's located. Don't worry about
+ * the source bit field where it's located. Don't worry about
* the exponent bias yet.
*/
expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize);
@@ -4260,7 +4260,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
else if (expo>=expo_max) {
/*
* The exponent is too large to fit in the available region
- * or it results in the maximum possible value. Use positive
+ * or it results in the maximum possible value. Use positive
* or negative infinity instead unless the application
* specifies something else. Before calling the overflow
* handler make sure the source buffer we hand it is in the
@@ -4452,16 +4452,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_s_s
+ * Function: H5T__conv_s_s
*
- * Purpose: Convert one fixed-length string type to another.
+ * Purpose: Convert one fixed-length string type to another.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, August 7, 1998
+ * Programmer: Robb Matzke
+ * Friday, August 7, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4470,15 +4470,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src=NULL; /*source datatype */
- H5T_t *dst=NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t nchars=0; /*number of characters copied */
- uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
+ H5T_t *src=NULL; /*source datatype */
+ H5T_t *dst=NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t nchars=0; /*number of characters copied */
+ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
+ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4495,7 +4495,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad source character set")
if(H5T_CSET_ASCII != dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != dst->shared->u.atomic.u.s.cset)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad destination character set")
- if((H5T_CSET_ASCII == src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == dst->shared->u.atomic.u.s.cset)
+ if((H5T_CSET_ASCII == src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == dst->shared->u.atomic.u.s.cset)
|| (H5T_CSET_ASCII == dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == src->shared->u.atomic.u.s.cset))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The library doesn't convert between strings of ASCII and UTF")
if(src->shared->u.atomic.u.s.pad < 0 || src->shared->u.atomic.u.s.pad >= H5T_NSTR ||
@@ -4684,18 +4684,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_s_s() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uchar
+ * Function: H5T__conv_schar_uchar
*
- * Purpose: Converts `signed char' to `unsigned char'
+ * Purpose: Converts `signed char' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4707,18 +4707,18 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_schar
+ * Function: H5T__conv_uchar_schar
*
- * Purpose: Converts `unsigned char' to `signed char'
+ * Purpose: Converts `unsigned char' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4730,18 +4730,18 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_short
+ * Function: H5T__conv_schar_short
*
- * Purpose: Converts `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4753,18 +4753,18 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ushort
+ * Function: H5T__conv_schar_ushort
*
- * Purpose: Converts `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4776,18 +4776,18 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_short
+ * Function: H5T__conv_uchar_short
*
- * Purpose: Converts `unsigned char' to `short'
+ * Purpose: Converts `unsigned char' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4799,18 +4799,18 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ushort
+ * Function: H5T__conv_uchar_ushort
*
- * Purpose: Converts `unsigned char' to `unsigned short'
+ * Purpose: Converts `unsigned char' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4822,18 +4822,18 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_int
+ * Function: H5T__conv_schar_int
*
- * Purpose: Converts `signed char' to `int'
+ * Purpose: Converts `signed char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4845,18 +4845,18 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, INT, signed char, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uint
+ * Function: H5T__conv_schar_uint
*
- * Purpose: Converts `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4868,18 +4868,18 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_int
+ * Function: H5T__conv_uchar_int
*
- * Purpose: Converts `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4891,18 +4891,18 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_uint
+ * Function: H5T__conv_uchar_uint
*
- * Purpose: Converts `unsigned char' to `unsigned int'
+ * Purpose: Converts `unsigned char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4914,18 +4914,18 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_long
+ * Function: H5T__conv_schar_long
*
- * Purpose: Converts `signed char' to `long'
+ * Purpose: Converts `signed char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4937,18 +4937,18 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ulong
+ * Function: H5T__conv_schar_ulong
*
- * Purpose: Converts `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4960,18 +4960,18 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_long
+ * Function: H5T__conv_uchar_long
*
- * Purpose: Converts `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4983,18 +4983,18 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ulong
+ * Function: H5T__conv_uchar_ulong
*
- * Purpose: Converts `unsigned char' to `unsigned long'
+ * Purpose: Converts `unsigned char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5006,18 +5006,18 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_llong
+ * Function: H5T__conv_schar_llong
*
- * Purpose: Converts `signed char' to `long long'
+ * Purpose: Converts `signed char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5029,18 +5029,18 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ullong
+ * Function: H5T__conv_schar_ullong
*
- * Purpose: Converts `signed char' to `unsigned long long'
+ * Purpose: Converts `signed char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5052,18 +5052,18 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_llong
+ * Function: H5T__conv_uchar_llong
*
- * Purpose: Converts `unsigned char' to `long long'
+ * Purpose: Converts `unsigned char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5075,18 +5075,18 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ullong
+ * Function: H5T__conv_uchar_ullong
*
- * Purpose: Converts `unsigned char' to `unsigned long long'
+ * Purpose: Converts `unsigned char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5098,18 +5098,18 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_schar
+ * Function: H5T__conv_short_schar
*
- * Purpose: Converts `short' to `signed char'
+ * Purpose: Converts `short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5121,18 +5121,18 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uchar
+ * Function: H5T__conv_short_uchar
*
- * Purpose: Converts `short' to `unsigned char'
+ * Purpose: Converts `short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5144,18 +5144,18 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_schar
+ * Function: H5T__conv_ushort_schar
*
- * Purpose: Converts `unsigned short' to `signed char'
+ * Purpose: Converts `unsigned short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5167,18 +5167,18 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uchar
+ * Function: H5T__conv_ushort_uchar
*
- * Purpose: Converts `unsigned short' to `unsigned char'
+ * Purpose: Converts `unsigned short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5190,18 +5190,18 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ushort
+ * Function: H5T__conv_short_ushort
*
- * Purpose: Converts `short' to `unsigned short'
+ * Purpose: Converts `short' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5213,18 +5213,18 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_short
+ * Function: H5T__conv_ushort_short
*
- * Purpose: Converts `unsigned short' to `short'
+ * Purpose: Converts `unsigned short' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5236,18 +5236,18 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_int
+ * Function: H5T__conv_short_int
*
- * Purpose: Converts `short' to `int'
+ * Purpose: Converts `short' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5259,18 +5259,18 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, INT, short, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uint
+ * Function: H5T__conv_short_uint
*
- * Purpose: Converts `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5282,18 +5282,18 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_int
+ * Function: H5T__conv_ushort_int
*
- * Purpose: Converts `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5305,18 +5305,18 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uint
+ * Function: H5T__conv_ushort_uint
*
- * Purpose: Converts `unsigned short' to `unsigned int'
+ * Purpose: Converts `unsigned short' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5328,18 +5328,18 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_long
+ * Function: H5T__conv_short_long
*
- * Purpose: Converts `short' to `long'
+ * Purpose: Converts `short' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5351,18 +5351,18 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LONG, short, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ulong
+ * Function: H5T__conv_short_ulong
*
- * Purpose: Converts `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5374,18 +5374,18 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_long
+ * Function: H5T__conv_ushort_long
*
- * Purpose: Converts `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5397,18 +5397,18 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ulong
+ * Function: H5T__conv_ushort_ulong
*
- * Purpose: Converts `unsigned short' to `unsigned long'
+ * Purpose: Converts `unsigned short' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5420,18 +5420,18 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_llong
+ * Function: H5T__conv_short_llong
*
- * Purpose: Converts `short' to `long long'
+ * Purpose: Converts `short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5443,18 +5443,18 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LLONG, short, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ullong
+ * Function: H5T__conv_short_ullong
*
- * Purpose: Converts `short' to `unsigned long long'
+ * Purpose: Converts `short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5466,18 +5466,18 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_llong
+ * Function: H5T__conv_ushort_llong
*
- * Purpose: Converts `unsigned short' to `long long'
+ * Purpose: Converts `unsigned short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5489,18 +5489,18 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ullong
+ * Function: H5T__conv_ushort_ullong
*
- * Purpose: Converts `unsigned short' to `unsigned long long'
+ * Purpose: Converts `unsigned short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5512,18 +5512,18 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_schar
+ * Function: H5T__conv_int_schar
*
- * Purpose: Converts `int' to `signed char'
+ * Purpose: Converts `int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5535,18 +5535,18 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uchar
+ * Function: H5T__conv_int_uchar
*
- * Purpose: Converts `int' to `unsigned char'
+ * Purpose: Converts `int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5558,18 +5558,18 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_schar
+ * Function: H5T__conv_uint_schar
*
- * Purpose: Converts `unsigned int' to `signed char'
+ * Purpose: Converts `unsigned int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5581,18 +5581,18 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_uchar
+ * Function: H5T__conv_uint_uchar
*
- * Purpose: Converts `unsigned int' to `unsigned char'
+ * Purpose: Converts `unsigned int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5604,18 +5604,18 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_short
+ * Function: H5T__conv_int_short
*
- * Purpose: Converts `int' to `short'
+ * Purpose: Converts `int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5627,18 +5627,18 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ushort
+ * Function: H5T__conv_int_ushort
*
- * Purpose: Converts `int' to `unsigned short'
+ * Purpose: Converts `int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5650,18 +5650,18 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_short
+ * Function: H5T__conv_uint_short
*
- * Purpose: Converts `unsigned int' to `short'
+ * Purpose: Converts `unsigned int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5673,18 +5673,18 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ushort
+ * Function: H5T__conv_uint_ushort
*
- * Purpose: Converts `unsigned int' to `unsigned short'
+ * Purpose: Converts `unsigned int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5696,18 +5696,18 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uint
+ * Function: H5T__conv_int_uint
*
- * Purpose: Converts `int' to `unsigned int'
+ * Purpose: Converts `int' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5719,18 +5719,18 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(INT, UINT, int, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_int
+ * Function: H5T__conv_uint_int
*
- * Purpose: Converts `unsigned int' to `int'
+ * Purpose: Converts `unsigned int' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5742,18 +5742,18 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_long
+ * Function: H5T__conv_int_long
*
- * Purpose: Converts `int' to `long'
+ * Purpose: Converts `int' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5765,18 +5765,18 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LONG, int, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ulong
+ * Function: H5T__conv_int_ulong
*
- * Purpose: Converts `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5788,18 +5788,18 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, LONG, int, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_long
+ * Function: H5T__conv_uint_long
*
- * Purpose: Converts `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5811,18 +5811,18 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ulong
+ * Function: H5T__conv_uint_ulong
*
- * Purpose: Converts `unsigned int' to `unsigned long'
+ * Purpose: Converts `unsigned int' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5834,18 +5834,18 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_llong
+ * Function: H5T__conv_int_llong
*
- * Purpose: Converts `int' to `long long'
+ * Purpose: Converts `int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5857,18 +5857,18 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LLONG, int, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ullong
+ * Function: H5T__conv_int_ullong
*
- * Purpose: Converts `int' to `unsigned long long'
+ * Purpose: Converts `int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5880,18 +5880,18 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_llong
+ * Function: H5T__conv_uint_llong
*
- * Purpose: Converts `unsigned int' to `long long'
+ * Purpose: Converts `unsigned int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5903,18 +5903,18 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ullong
+ * Function: H5T__conv_uint_ullong
*
- * Purpose: Converts `unsigned int' to `unsigned long long'
+ * Purpose: Converts `unsigned int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5926,18 +5926,18 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_schar
+ * Function: H5T__conv_long_schar
*
- * Purpose: Converts `long' to `signed char'
+ * Purpose: Converts `long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5949,18 +5949,18 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uchar
+ * Function: H5T__conv_long_uchar
*
- * Purpose: Converts `long' to `unsigned char'
+ * Purpose: Converts `long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5972,18 +5972,18 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_schar
+ * Function: H5T__conv_ulong_schar
*
- * Purpose: Converts `unsigned long' to `signed char'
+ * Purpose: Converts `unsigned long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5995,18 +5995,18 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uchar
+ * Function: H5T__conv_ulong_uchar
*
- * Purpose: Converts `unsigned long' to `unsigned char'
+ * Purpose: Converts `unsigned long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6018,18 +6018,18 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_short
+ * Function: H5T__conv_long_short
*
- * Purpose: Converts `long' to `short'
+ * Purpose: Converts `long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6041,18 +6041,18 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ushort
+ * Function: H5T__conv_long_ushort
*
- * Purpose: Converts `long' to `unsigned short'
+ * Purpose: Converts `long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6064,18 +6064,18 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_short
+ * Function: H5T__conv_ulong_short
*
- * Purpose: Converts `unsigned long' to `short'
+ * Purpose: Converts `unsigned long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6087,18 +6087,18 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ushort
+ * Function: H5T__conv_ulong_ushort
*
- * Purpose: Converts `unsigned long' to `unsigned short'
+ * Purpose: Converts `unsigned long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6110,18 +6110,18 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_int
+ * Function: H5T__conv_long_int
*
- * Purpose: Converts `long' to `int'
+ * Purpose: Converts `long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6133,18 +6133,18 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uint
+ * Function: H5T__conv_long_uint
*
- * Purpose: Converts `long' to `unsigned int'
+ * Purpose: Converts `long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6156,18 +6156,18 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_int
+ * Function: H5T__conv_ulong_int
*
- * Purpose: Converts `unsigned long' to `int'
+ * Purpose: Converts `unsigned long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6179,18 +6179,18 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uint
+ * Function: H5T__conv_ulong_uint
*
- * Purpose: Converts `unsigned long' to `unsigned int'
+ * Purpose: Converts `unsigned long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6202,18 +6202,18 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ulong
+ * Function: H5T__conv_long_ulong
*
- * Purpose: Converts `long' to `unsigned long'
+ * Purpose: Converts `long' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6225,18 +6225,18 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_long
+ * Function: H5T__conv_ulong_long
*
- * Purpose: Converts `unsigned long' to `long'
+ * Purpose: Converts `unsigned long' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6248,18 +6248,18 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_llong
+ * Function: H5T__conv_long_llong
*
- * Purpose: Converts `long' to `long long'
+ * Purpose: Converts `long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6271,18 +6271,18 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(LONG, LLONG, long, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ullong
+ * Function: H5T__conv_long_ullong
*
- * Purpose: Converts `long' to `unsigned long long'
+ * Purpose: Converts `long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6294,18 +6294,18 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_llong
+ * Function: H5T__conv_ulong_llong
*
- * Purpose: Converts `unsigned long' to `long long'
+ * Purpose: Converts `unsigned long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6317,18 +6317,18 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ullong
+ * Function: H5T__conv_ulong_ullong
*
- * Purpose: Converts `unsigned long' to `unsigned long long'
+ * Purpose: Converts `unsigned long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6340,18 +6340,18 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_schar
+ * Function: H5T__conv_llong_schar
*
- * Purpose: Converts `long long' to `signed char'
+ * Purpose: Converts `long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6363,18 +6363,18 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uchar
+ * Function: H5T__conv_llong_uchar
*
- * Purpose: Converts `long long' to `unsigned char'
+ * Purpose: Converts `long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6386,18 +6386,18 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_schar
+ * Function: H5T__conv_ullong_schar
*
- * Purpose: Converts `unsigned long long' to `signed char'
+ * Purpose: Converts `unsigned long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6409,18 +6409,18 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uchar
+ * Function: H5T__conv_ullong_uchar
*
- * Purpose: Converts `unsigned long long' to `unsigned char'
+ * Purpose: Converts `unsigned long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6432,18 +6432,18 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_short
+ * Function: H5T__conv_llong_short
*
- * Purpose: Converts `long long' to `short'
+ * Purpose: Converts `long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6455,18 +6455,18 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ushort
+ * Function: H5T__conv_llong_ushort
*
- * Purpose: Converts `long long' to `unsigned short'
+ * Purpose: Converts `long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6478,18 +6478,18 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_short
+ * Function: H5T__conv_ullong_short
*
- * Purpose: Converts `unsigned long long' to `short'
+ * Purpose: Converts `unsigned long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6501,18 +6501,18 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ushort
+ * Function: H5T__conv_ullong_ushort
*
- * Purpose: Converts `unsigned long long' to `unsigned short'
+ * Purpose: Converts `unsigned long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6524,18 +6524,18 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_int
+ * Function: H5T__conv_llong_int
*
- * Purpose: Converts `long long' to `int'
+ * Purpose: Converts `long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6547,18 +6547,18 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uint
+ * Function: H5T__conv_llong_uint
*
- * Purpose: Converts `long long' to `unsigned int'
+ * Purpose: Converts `long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6570,18 +6570,18 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_int
+ * Function: H5T__conv_ullong_int
*
- * Purpose: Converts `unsigned long long' to `int'
+ * Purpose: Converts `unsigned long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6593,18 +6593,18 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uint
+ * Function: H5T__conv_ullong_uint
*
- * Purpose: Converts `unsigned long long' to `unsigned int'
+ * Purpose: Converts `unsigned long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6616,18 +6616,18 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_long
+ * Function: H5T__conv_llong_long
*
- * Purpose: Converts `long long' to `long'
+ * Purpose: Converts `long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6639,18 +6639,18 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ulong
+ * Function: H5T__conv_llong_ulong
*
- * Purpose: Converts `long long' to `unsigned long'
+ * Purpose: Converts `long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6662,18 +6662,18 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_long
+ * Function: H5T__conv_ullong_long
*
- * Purpose: Converts `unsigned long long' to `long'
+ * Purpose: Converts `unsigned long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6685,18 +6685,18 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ulong
+ * Function: H5T__conv_ullong_ulong
*
- * Purpose: Converts `unsigned long long' to `unsigned long'
+ * Purpose: Converts `unsigned long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6708,18 +6708,18 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ullong
+ * Function: H5T__conv_llong_ullong
*
- * Purpose: Converts `long long' to `unsigned long long'
+ * Purpose: Converts `long long' to `unsigned long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6731,18 +6731,18 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_llong
+ * Function: H5T__conv_ullong_llong
*
- * Purpose: Converts `unsigned long long' to `long long'
+ * Purpose: Converts `unsigned long long' to `long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6754,17 +6754,17 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_double
+ * Function: H5T__conv_float_double
*
- * Purpose: Convert native `float' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6776,17 +6776,17 @@ H5T__conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ldouble
+ * Function: H5T__conv_float_ldouble
*
- * Purpose: Convert native `float' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6800,17 +6800,17 @@ H5T__conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_float
+ * Function: H5T__conv_double_float
*
- * Purpose: Convert native `double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6822,17 +6822,17 @@ H5T__conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ldouble
+ * Function: H5T__conv_double_ldouble
*
- * Purpose: Convert native `double' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6846,17 +6846,17 @@ H5T__conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_float
+ * Function: H5T__conv_ldouble_float
*
- * Purpose: Convert native `long double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6870,17 +6870,17 @@ H5T__conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_double
+ * Function: H5T__conv_ldouble_double
*
- * Purpose: Convert native `long double' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6894,17 +6894,17 @@ H5T__conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_float
+ * Function: H5T__conv_schar_float
*
- * Purpose: Convert native signed char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -6916,17 +6916,17 @@ H5T__conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_double
+ * Function: H5T__conv_schar_double
*
- * Purpose: Convert native signed char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -6938,17 +6938,17 @@ H5T__conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ldouble
+ * Function: H5T__conv_schar_ldouble
*
- * Purpose: Convert native signed char to native long double using
+ * Purpose: Convert native signed char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6960,17 +6960,17 @@ H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_float
+ * Function: H5T__conv_uchar_float
*
- * Purpose: Convert native unsigned char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -6982,17 +6982,17 @@ H5T__conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_double
+ * Function: H5T__conv_uchar_double
*
- * Purpose: Convert native unsigned char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7004,17 +7004,17 @@ H5T__conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ldouble
+ * Function: H5T__conv_uchar_ldouble
*
- * Purpose: Convert native unsigned char to native long double using
+ * Purpose: Convert native unsigned char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7026,17 +7026,17 @@ H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_float
+ * Function: H5T__conv_short_float
*
- * Purpose: Convert native short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7048,17 +7048,17 @@ H5T__conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, FLOAT, short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_double
+ * Function: H5T__conv_short_double
*
- * Purpose: Convert native short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7070,17 +7070,17 @@ H5T__conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ldouble
+ * Function: H5T__conv_short_ldouble
*
- * Purpose: Convert native short to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7092,17 +7092,17 @@ H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_float
+ * Function: H5T__conv_ushort_float
*
- * Purpose: Convert native unsigned short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7114,17 +7114,17 @@ H5T__conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_double
+ * Function: H5T__conv_ushort_double
*
- * Purpose: Convert native unsigned short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7136,17 +7136,17 @@ H5T__conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ldouble
+ * Function: H5T__conv_ushort_ldouble
*
- * Purpose: Convert native unsigned short to native long double using
+ * Purpose: Convert native unsigned short to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7158,17 +7158,17 @@ H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_float
+ * Function: H5T__conv_int_float
*
- * Purpose: Convert native integer to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7180,17 +7180,17 @@ H5T__conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, FLOAT, int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_double
+ * Function: H5T__conv_int_double
*
- * Purpose: Convert native integer to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7202,17 +7202,17 @@ H5T__conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, DOUBLE, int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ldouble
+ * Function: H5T__conv_int_ldouble
*
- * Purpose: Convert native integer to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7224,17 +7224,17 @@ H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_float
+ * Function: H5T__conv_uint_float
*
- * Purpose: Convert native unsigned integer to native float using
+ * Purpose: Convert native unsigned integer to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7246,17 +7246,17 @@ H5T__conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_double
+ * Function: H5T__conv_uint_double
*
- * Purpose: Convert native unsigned integer to native double using
+ * Purpose: Convert native unsigned integer to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7268,17 +7268,17 @@ H5T__conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ldouble
+ * Function: H5T__conv_uint_ldouble
*
- * Purpose: Convert native unsigned integer to native long double using
+ * Purpose: Convert native unsigned integer to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7290,17 +7290,17 @@ H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_float
+ * Function: H5T__conv_long_float
*
- * Purpose: Convert native long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7312,17 +7312,17 @@ H5T__conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, FLOAT, long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_double
+ * Function: H5T__conv_long_double
*
- * Purpose: Convert native long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7334,17 +7334,17 @@ H5T__conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, DOUBLE, long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ldouble
+ * Function: H5T__conv_long_ldouble
*
- * Purpose: Convert native long to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7356,17 +7356,17 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_float
+ * Function: H5T__conv_ulong_float
*
- * Purpose: Convert native unsigned long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7378,17 +7378,17 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_double
+ * Function: H5T__conv_ulong_double
*
- * Purpose: Convert native unsigned long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7400,17 +7400,17 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ldouble
+ * Function: H5T__conv_ulong_ldouble
*
- * Purpose: Convert native unsigned long to native long double using
+ * Purpose: Convert native unsigned long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7422,17 +7422,17 @@ H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_float
+ * Function: H5T__conv_llong_float
*
- * Purpose: Convert native long long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7444,17 +7444,17 @@ H5T__conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_double
+ * Function: H5T__conv_llong_double
*
- * Purpose: Convert native long long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7466,17 +7466,17 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ldouble
+ * Function: H5T__conv_llong_ldouble
*
- * Purpose: Convert native long long to native long double using
+ * Purpose: Convert native long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7490,17 +7490,17 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_float
+ * Function: H5T__conv_ullong_float
*
- * Purpose: Convert native unsigned long long to native float using
+ * Purpose: Convert native unsigned long long to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7512,17 +7512,17 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_double
+ * Function: H5T__conv_ullong_double
*
- * Purpose: Convert native unsigned long long to native double using
+ * Purpose: Convert native unsigned long long to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7534,17 +7534,17 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ldouble
+ * Function: H5T__conv_ullong_ldouble
*
- * Purpose: Convert native unsigned long long to native long double using
+ * Purpose: Convert native unsigned long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7558,17 +7558,17 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_schar
+ * Function: H5T__conv_float_schar
*
- * Purpose: Convert native float to native signed char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7582,17 +7582,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uchar
+ * Function: H5T__conv_float_uchar
*
- * Purpose: Convert native float to native unsigned char using
+ * Purpose: Convert native float to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7606,17 +7606,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_schar
+ * Function: H5T__conv_double_schar
*
- * Purpose: Convert native double to native signed char using
+ * Purpose: Convert native double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7630,17 +7630,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uchar
+ * Function: H5T__conv_double_uchar
*
- * Purpose: Convert native double to native unsigned char using
+ * Purpose: Convert native double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7654,17 +7654,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_schar
+ * Function: H5T__conv_ldouble_schar
*
- * Purpose: Convert native long double to native signed char using
+ * Purpose: Convert native long double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7678,17 +7678,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uchar
+ * Function: H5T__conv_ldouble_uchar
*
- * Purpose: Convert native long double to native unsigned char using
+ * Purpose: Convert native long double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7702,17 +7702,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_short
+ * Function: H5T__conv_float_short
*
- * Purpose: Convert native float to native short using
+ * Purpose: Convert native float to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7726,17 +7726,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ushort
+ * Function: H5T__conv_float_ushort
*
- * Purpose: Convert native float to native unsigned short using
+ * Purpose: Convert native float to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7750,17 +7750,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_short
+ * Function: H5T__conv_double_short
*
- * Purpose: Convert native double to native short using
+ * Purpose: Convert native double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7774,17 +7774,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ushort
+ * Function: H5T__conv_double_ushort
*
- * Purpose: Convert native double to native unsigned short using
+ * Purpose: Convert native double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7798,17 +7798,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_short
+ * Function: H5T__conv_ldouble_short
*
- * Purpose: Convert native long double to native short using
+ * Purpose: Convert native long double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7822,17 +7822,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ushort
+ * Function: H5T__conv_ldouble_ushort
*
- * Purpose: Convert native long double to native unsigned short using
+ * Purpose: Convert native long double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7846,17 +7846,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_int
+ * Function: H5T__conv_float_int
*
- * Purpose: Convert native float to native int using
+ * Purpose: Convert native float to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7870,17 +7870,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uint
+ * Function: H5T__conv_float_uint
*
- * Purpose: Convert native float to native unsigned int using
+ * Purpose: Convert native float to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7894,17 +7894,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_int
+ * Function: H5T__conv_double_int
*
- * Purpose: Convert native double to native int using
+ * Purpose: Convert native double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7918,17 +7918,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uint
+ * Function: H5T__conv_double_uint
*
- * Purpose: Convert native double to native unsigned int using
+ * Purpose: Convert native double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7942,17 +7942,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_int
+ * Function: H5T__conv_ldouble_int
*
- * Purpose: Convert native long double to native int using
+ * Purpose: Convert native long double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7966,17 +7966,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uint
+ * Function: H5T__conv_ldouble_uint
*
- * Purpose: Convert native long double to native unsigned int using
+ * Purpose: Convert native long double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7990,17 +7990,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_long
+ * Function: H5T__conv_float_long
*
- * Purpose: Convert native float to native long using
+ * Purpose: Convert native float to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8014,17 +8014,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ulong
+ * Function: H5T__conv_float_ulong
*
- * Purpose: Convert native float to native unsigned long using
+ * Purpose: Convert native float to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8038,17 +8038,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_long
+ * Function: H5T__conv_double_long
*
- * Purpose: Convert native double to native long using
+ * Purpose: Convert native double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8062,17 +8062,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ulong
+ * Function: H5T__conv_double_ulong
*
- * Purpose: Convert native double to native unsigned long using
+ * Purpose: Convert native double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8086,17 +8086,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_long
+ * Function: H5T__conv_ldouble_long
*
- * Purpose: Convert native long double to native long using
+ * Purpose: Convert native long double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8110,17 +8110,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ulong
+ * Function: H5T__conv_ldouble_ulong
*
- * Purpose: Convert native long double to native unsigned long using
+ * Purpose: Convert native long double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8134,17 +8134,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_llong
+ * Function: H5T__conv_float_llong
*
- * Purpose: Convert native float to native long long using
+ * Purpose: Convert native float to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8158,17 +8158,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ullong
+ * Function: H5T__conv_float_ullong
*
- * Purpose: Convert native float to native unsigned long long using
+ * Purpose: Convert native float to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8182,17 +8182,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_llong
+ * Function: H5T__conv_double_llong
*
- * Purpose: Convert native double to native long long using
+ * Purpose: Convert native double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8206,17 +8206,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ullong
+ * Function: H5T__conv_double_ullong
*
- * Purpose: Convert native double to native unsigned long long using
+ * Purpose: Convert native double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8230,17 +8230,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_llong
+ * Function: H5T__conv_ldouble_llong
*
- * Purpose: Convert native long double to native long long using
+ * Purpose: Convert native long double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8256,17 +8256,17 @@ H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ullong
+ * Function: H5T__conv_ldouble_ullong
*
- * Purpose: Convert native long double to native unsigned long long using
+ * Purpose: Convert native long double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8282,18 +8282,18 @@ H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_i
+ * Function: H5T__conv_f_i
*
- * Purpose: Convert one floating-point type to an integer. This is
+ * Purpose: Convert one floating-point type to an integer. This is
* the catch-all function for float-integer conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, Jan 21, 2004
+ * Programmer: Raymond Lu
+ * Wednesday, Jan 21, 2004
*
* Raymond Lu
* Wednesday, April 21, 2004
@@ -8310,28 +8310,28 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hssize_t expo; /*source exponent */
+ hssize_t expo; /*source exponent */
hssize_t sign; /*source sign bit value */
uint8_t *int_buf=NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
hbool_t truncated; /*if fraction value is dropped */
hbool_t reverse; /*if reverse order of destination at the end */
@@ -8860,18 +8860,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_f
+ * Function: H5T__conv_i_f
*
- * Purpose: Convert one integer type to a floating-point type. This is
+ * Purpose: Convert one integer type to a floating-point type. This is
* the catch-all function for integer-float conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 6, 2004
+ * Programmer: Raymond Lu
+ * Friday, Feb 6, 2004
*
*-------------------------------------------------------------------------
*/
@@ -8880,31 +8880,31 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hsize_t expo; /*destination exponent */
- hsize_t expo_max; /*maximal possible exponent value */
+ hsize_t expo; /*destination exponent */
+ hsize_t expo_max; /*maximal possible exponent value */
size_t sign; /*source sign bit value */
hbool_t is_max_neg; /*source is maximal negative value*/
hbool_t do_round; /*whether there is roundup */
uint8_t *int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -9036,12 +9036,12 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* What is the bit position(starting from 0 as first one) for the most significant
- * bit(MSB) of S which is set?
+ * bit(MSB) of S which is set?
*/
if(H5T_SGN_2 == src.u.i.sign) {
sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, TRUE);
if(sign && sfirst < 0)
- /* The case 0x80...00, which is negative with maximal value */
+ /* The case 0x80...00, which is negative with maximal value */
is_max_neg = 1;
} else if(H5T_SGN_NONE == src.u.i.sign)
sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec, H5T_BIT_MSB, TRUE);
@@ -9060,10 +9060,10 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T__bit_neg(int_buf, (size_t)0, buf_size * 8);
sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, TRUE);
} else {
- /* If it's maximal negative number 0x80...000, treat it as if it overflowed
- * (create a carry) to help conversion. i.e. a character type number 0x80
- * is treated as 0x100.
- */
+ /* If it's maximal negative number 0x80...000, treat it as if it overflowed
+ * (create a carry) to help conversion. i.e. a character type number 0x80
+ * is treated as 0x100.
+ */
sfirst = (ssize_t)(src.prec - 1);
is_max_neg = 0;
}
@@ -9072,7 +9072,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Sign bit has been negated if bit vector isn't 0x80...00. Set all bits in front of
* sign bit to 0 in the temporary buffer because they're all negated from the previous
- * step. */
+ * step. */
H5T__bit_set(int_buf, src.prec, (buf_size * 8) - src.prec, 0);
/* Set sign bit in destination */
@@ -9096,13 +9096,13 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_NORM_IMPLIED==dst.u.f.norm) {
/* Imply first bit */
H5T__bit_set(int_buf, first, (size_t)1, 0);
- } else if (H5T_NORM_NONE==dst.u.f.norm) {
- first++;
- }
+ } else if (H5T_NORM_NONE==dst.u.f.norm) {
+ first++;
+ }
/* Roundup for mantissa */
if(first > dst.u.f.msize) {
- /* If the bit sequence is bigger than the mantissa part, there'll be some
+ /* If the bit sequence is bigger than the mantissa part, there'll be some
* precision loss. Let user's handler deal with the case if it's present
*/
if(cb_struct.func) {
@@ -9117,15 +9117,15 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else if(except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
- /* If user's exception handler does deal with it, we do it by dropping off the
- * extra bits at the end and do rounding. If we have .50...0(decimal) after radix
- * point, we do roundup when the least significant digit before radix is odd, we do
- * rounddown if it's even.
- */
+ /* If user's exception handler does deal with it, we do it by dropping off the
+ * extra bits at the end and do rounding. If we have .50...0(decimal) after radix
+ * point, we do roundup when the least significant digit before radix is odd, we do
+ * rounddown if it's even.
+ */
/* Check 1st dropoff bit, see if it's set. */
if(H5T__bit_get_d(int_buf, ((first - dst.u.f.msize) - 1), (size_t)1)) {
- /* Check all bits after 1st dropoff bit, see if any of them is set. */
+ /* Check all bits after 1st dropoff bit, see if any of them is set. */
if(((first - dst.u.f.msize) - 1) > 0 && H5T__bit_get_d(int_buf, (size_t)0, ((first - dst.u.f.msize) - 1)))
do_round = 1;
else { /* The .50...0 case */
@@ -9133,7 +9133,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(H5T__bit_get_d(int_buf, (first - dst.u.f.msize), (size_t)1))
do_round = 1;
}
- }
+ }
/* Right shift to drop off extra bits */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, buf_size * 8);
@@ -9142,28 +9142,28 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T__bit_inc(int_buf, (size_t)0, buf_size * 8);
do_round = 0;
- /* If integer is like 0x0ff...fff and we need to round up the
- * last f, we get 0x100...000. Treat this special case here.
- */
- if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
- if (H5T_NORM_IMPLIED==dst.u.f.norm) {
- /* The bit at this 1's position was impled already, so this
- * number should be 0x200...000. We need to increment the
- * exponent in this case.
- */
- expo++;
- } else if (H5T_NORM_NONE==dst.u.f.norm) {
- /* Right shift 1 bit to let the carried 1 fit in the mantissa,
- * and increment exponent by 1.
- */
+ /* If integer is like 0x0ff...fff and we need to round up the
+ * last f, we get 0x100...000. Treat this special case here.
+ */
+ if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
+ if (H5T_NORM_IMPLIED==dst.u.f.norm) {
+ /* The bit at this 1's position was impled already, so this
+ * number should be 0x200...000. We need to increment the
+ * exponent in this case.
+ */
+ expo++;
+ } else if (H5T_NORM_NONE==dst.u.f.norm) {
+ /* Right shift 1 bit to let the carried 1 fit in the mantissa,
+ * and increment exponent by 1.
+ */
H5T__bit_shift(int_buf, (ssize_t)-1, (size_t)0, buf_size * 8);
- expo++;
- }
- }
+ expo++;
+ }
+ }
}
} else {
/* The bit sequence can fit mantissa part. Left shift to fit in from high-order of
- * bit position. */
+ * bit position. */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, dst.u.f.msize);
}
@@ -9273,11 +9273,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_reverse_order
+ * Function: H5T_reverse_order
*
- * Purpose: Internal assisting function to reverse the order of
+ * Purpose: Internal assisting function to reverse the order of
* a sequence of byte when it's big endian or VAX order.
* The byte sequence simulates the endian order.
*
@@ -9285,8 +9285,8 @@ done:
*
* Failure: Null
*
- * Programmer: Raymond Lu
- * April 26, 2004
+ * Programmer: Raymond Lu
+ * April 26, 2004
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5dbg.c b/src/H5dbg.c
index dd50034..214d865 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5dbg.c
- * Mar 4 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5dbg.c
+ * Mar 4 2006
+ * Quincey Koziol <koziol@ncsa.uiuc.edu>
*
- * Purpose: Generic debugging routines
+ * Purpose: Generic debugging routines
*
*-------------------------------------------------------------------------
*/
@@ -29,7 +29,7 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
/****************/
/* Local Macros */
@@ -61,17 +61,17 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5_buffer_dump
+ * Function: H5_buffer_dump
*
- * Purpose: Dumps a buffer of memory in an octal dump form
+ * Purpose: Dumps a buffer of memory in an octal dump form
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 4 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Mar 4 2006
*
*-------------------------------------------------------------------------
*/
@@ -79,7 +79,7 @@ herr_t
H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
const uint8_t *marker, size_t buf_offset, size_t buf_size)
{
- size_t u, v; /* Local index variable */
+ size_t u, v; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -96,47 +96,47 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
* Print the buffer in a VMS-style octal dump.
*/
HDfprintf(stream, "%*sData follows (`__' indicates free region)...\n",
- indent, "");
+ indent, "");
for(u = 0; u < buf_size; u += 16) {
- uint8_t c;
+ uint8_t c;
- HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset);
+ HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset);
/* Print the hex values */
- for(v = 0; v < 16; v++) {
- if(u + v < buf_size) {
- if(marker[u + v])
- HDfprintf(stream, "__ ");
- else {
- c = buf[buf_offset + u + v];
- HDfprintf(stream, "%02x ", c);
- } /* end else */
- } /* end if */
+ for(v = 0; v < 16; v++) {
+ if(u + v < buf_size) {
+ if(marker[u + v])
+ HDfprintf(stream, "__ ");
+ else {
+ c = buf[buf_offset + u + v];
+ HDfprintf(stream, "%02x ", c);
+ } /* end else */
+ } /* end if */
else
- fprintf(stream, " ");
- if(7 == v)
- HDfputc(' ', stream);
- } /* end for */
+ HDfprintf(stream, " ");
+ if(7 == v)
+ HDfputc(' ', stream);
+ } /* end for */
HDfputc(' ', stream);
/* Print the character values */
- for(v = 0; v < 16; v++) {
- if(u + v < buf_size) {
- if(marker[u + v])
- HDfputc(' ', stream);
- else {
- c = buf[buf_offset + u + v];
- if(HDisprint(c))
- HDfputc(c, stream);
- else
- HDfputc('.', stream);
- } /* end else */
- } /* end if */
- if(7 == v)
- HDfputc(' ', stream);
- } /* end for */
-
- HDfputc('\n', stream);
+ for(v = 0; v < 16; v++) {
+ if(u + v < buf_size) {
+ if(marker[u + v])
+ HDfputc(' ', stream);
+ else {
+ c = buf[buf_offset + u + v];
+ if(HDisprint(c))
+ HDfputc(c, stream);
+ else
+ HDfputc('.', stream);
+ } /* end else */
+ } /* end if */
+ if(7 == v)
+ HDfputc(' ', stream);
+ } /* end for */
+
+ HDfputc('\n', stream);
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5detect.c b/src/H5detect.c
index 4424009..c744c39 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -43,6 +43,9 @@ static const char *FileHeader = "\n\
*/
#undef NDEBUG
#include "H5private.h"
+/* Do NOT use HDfprintf in this file as it is not linked with the library,
+ * which contains the H5system.c file in which the function is defined.
+ */
#include "H5Tpublic.h"
#include "H5Rpublic.h"
@@ -150,7 +153,7 @@ static H5JMP_BUF jbuf_g;
#endif
-
+
/*-------------------------------------------------------------------------
* Function: precision
*
@@ -203,7 +206,7 @@ precision (detected_t *d)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_I/DETECT_BYTE
*
@@ -277,7 +280,7 @@ precision (detected_t *d)
DETECT_I_BYTE_CORE(TYPE,VAR,INFO,TYPE) \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_F
*
@@ -374,7 +377,7 @@ precision (detected_t *d)
} \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_M
*
@@ -450,7 +453,7 @@ precision (detected_t *d)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigsegv_handler
*
@@ -483,7 +486,7 @@ sigsegv_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigbus_handler
*
@@ -516,7 +519,7 @@ sigbus_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigill_handler
*
@@ -547,7 +550,7 @@ sigill_handler(int H5_ATTR_UNUSED signo)
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: print_results
*
@@ -826,7 +829,7 @@ done:\n\
fprintf(rawoutstream, "/* sigill_handler called: %d times */\n", sigill_handler_called_g);
} /* end print_results() */
-
+
/*-------------------------------------------------------------------------
* Function: iprint
*
@@ -916,7 +919,7 @@ iprint(detected_t *d)
}
-
+
/*-------------------------------------------------------------------------
* Function: byte_cmp
*
@@ -943,7 +946,7 @@ byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask)
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: bit_cmp
*
@@ -984,7 +987,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b,
return 0;
}
-
+
/*-------------------------------------------------------------------------
* Function: fix_order
*
@@ -1052,7 +1055,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: imp_bit
*
@@ -1106,7 +1109,7 @@ imp_bit(unsigned int n, int *perm, void *_a, void *_b, const unsigned char *pad_
return (a[perm[major]] >> minor) & 0x01 ? 0 : 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: find_bias
*
@@ -1137,7 +1140,7 @@ find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a)
return bias;
}
-
+
/*-------------------------------------------------------------------------
* Function: print_header
*
@@ -1278,7 +1281,7 @@ bit.\n";
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_integers
*
@@ -1300,7 +1303,7 @@ detect_C89_integers(void)
DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_floats
*
@@ -1316,7 +1319,7 @@ detect_C89_floats(void)
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers8
*
@@ -1372,7 +1375,7 @@ detect_C99_integers8(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers16
*
@@ -1404,7 +1407,7 @@ detect_C99_integers16(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers32
*
@@ -1436,7 +1439,7 @@ detect_C99_integers32(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers64
*
@@ -1482,7 +1485,7 @@ detect_C99_integers64(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers
*
@@ -1502,7 +1505,7 @@ detect_C99_integers(void)
detect_C99_integers64();
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_floats
*
@@ -1527,7 +1530,7 @@ detect_C99_floats(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_alignments
*
@@ -1604,7 +1607,7 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c
index da7c8d9..fd67184 100644
--- a/src/H5make_libsettings.c
+++ b/src/H5make_libsettings.c
@@ -35,12 +35,15 @@ static const char *FileHeader = "\n\
#include <stdio.h>
#include <time.h>
#include "H5private.h"
+/* Do NOT use HDfprintf in this file as it is not linked with the library,
+ * which contains the H5system.c file in which the function is defined.
+ */
#define LIBSETTINGSFNAME "libhdf5.settings"
FILE *rawoutstream = NULL;
-
+
/*-------------------------------------------------------------------------
* Function: insert_libhdf5_settings
*
@@ -105,7 +108,7 @@ insert_libhdf5_settings(FILE *flibinfo)
#endif
} /* insert_libhdf5_settings() */
-
+
/*-------------------------------------------------------------------------
* Function: make_libinfo
*
@@ -123,7 +126,7 @@ make_libinfo(void)
insert_libhdf5_settings(rawoutstream);
}
-
+
/*-------------------------------------------------------------------------
* Function: print_header
*
@@ -229,7 +232,7 @@ information about the library build configuration\n";
fprintf(rawoutstream, "\n */\n\n");
}
-
+
/*-------------------------------------------------------------------------
* Function: print_footer
*
@@ -244,7 +247,7 @@ print_footer(void)
/* nothing */
}
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/src/H5timer.c b/src/H5timer.c
index 0ba8bd1..a9ad519 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5timer.c
- * Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5timer.c
+ * Aug 21 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Internal 'timer' routines & support routines.
+ * Purpose: Internal 'timer' routines & support routines.
*
*-------------------------------------------------------------------------
*/
@@ -30,7 +30,7 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
/* We need this for the struct rusage declaration */
#if defined(H5_HAVE_GETRUSAGE) && defined(H5_HAVE_SYS_RESOURCE_H)
@@ -76,16 +76,16 @@
/* Local Variables */
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5_timer_reset
+ * Function: H5_timer_reset
*
- * Purpose: Resets the timer struct to zero. Use this to reset a timer
- * that's being used as an accumulator for summing times.
+ * Purpose: Resets the timer struct to zero. Use this to reset a timer
+ * that's being used as an accumulator for summing times.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 16, 1998
*
*-------------------------------------------------------------------------
@@ -97,15 +97,15 @@ H5_timer_reset (H5_timer_t *timer)
HDmemset(timer, 0, sizeof *timer);
} /* end H5_timer_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_timer_begin
+ * Function: H5_timer_begin
*
- * Purpose: Initialize a timer to time something.
+ * Purpose: Initialize a timer to time something.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 16, 1998
*
*-------------------------------------------------------------------------
@@ -114,10 +114,10 @@ void
H5_timer_begin (H5_timer_t *timer)
{
#ifdef H5_HAVE_GETRUSAGE
- struct rusage rusage;
+ struct rusage rusage;
#endif
#ifdef H5_HAVE_GETTIMEOFDAY
- struct timeval etime;
+ struct timeval etime;
#endif
HDassert(timer);
@@ -140,18 +140,18 @@ H5_timer_begin (H5_timer_t *timer)
#endif
} /* end H5_timer_begin() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_timer_end
+ * Function: H5_timer_end
*
- * Purpose: This function should be called at the end of a timed region.
- * The SUM is an optional pointer which will accumulate times.
- * TMS is the same struct that was passed to H5_timer_start().
- * On return, TMS will contain total times for the timed region.
+ * Purpose: This function should be called at the end of a timed region.
+ * The SUM is an optional pointer which will accumulate times.
+ * TMS is the same struct that was passed to H5_timer_start().
+ * On return, TMS will contain total times for the timed region.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 16, 1998
*
*-------------------------------------------------------------------------
@@ -159,7 +159,7 @@ H5_timer_begin (H5_timer_t *timer)
void
H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
{
- H5_timer_t now;
+ H5_timer_t now;
HDassert(timer);
H5_timer_begin(&now);
@@ -175,28 +175,28 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
}
} /* end H5_timer_end() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_bandwidth
+ * Function: H5_bandwidth
*
- * Purpose: Prints the bandwidth (bytes per second) in a field 10
- * characters wide widh four digits of precision like this:
+ * Purpose: Prints the bandwidth (bytes per second) in a field 10
+ * characters wide widh four digits of precision like this:
*
- * NaN If <=0 seconds
- * 1234. TB/s
- * 123.4 TB/s
- * 12.34 GB/s
- * 1.234 MB/s
- * 4.000 kB/s
- * 1.000 B/s
- * 0.000 B/s If NBYTES==0
- * 1.2345e-10 For bandwidth less than 1
- * 6.7893e+94 For exceptionally large values
- * 6.678e+106 For really big values
+ * NaN If <=0 seconds
+ * 1234. TB/s
+ * 123.4 TB/s
+ * 12.34 GB/s
+ * 1.234 MB/s
+ * 4.000 kB/s
+ * 1.000 B/s
+ * 0.000 B/s If NBYTES==0
+ * 1.2345e-10 For bandwidth less than 1
+ * 6.7893e+94 For exceptionally large values
+ * 6.678e+106 For really big values
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 5, 1998
*
*-------------------------------------------------------------------------
@@ -204,7 +204,7 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
void
H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
{
- double bw;
+ double bw;
if(nseconds <= (double)0.0F)
HDstrcpy(buf, " NaN");
@@ -213,39 +213,39 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
if(H5_DBL_ABS_EQUAL(bw, (double)0.0F))
HDstrcpy(buf, "0.000 B/s");
else if(bw < (double)1.0F)
- sprintf(buf, "%10.4e", bw);
+ HDsprintf(buf, "%10.4e", bw);
else if(bw < (double)H5_KB) {
- sprintf(buf, "%05.4f", bw);
+ HDsprintf(buf, "%05.4f", bw);
HDstrcpy(buf+5, " B/s");
} else if(bw < (double)H5_MB) {
- sprintf(buf, "%05.4f", bw / (double)H5_KB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_KB);
HDstrcpy(buf+5, " kB/s");
} else if(bw < (double)H5_GB) {
- sprintf(buf, "%05.4f", bw / (double)H5_MB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_MB);
HDstrcpy(buf+5, " MB/s");
} else if(bw < (double)H5_TB) {
- sprintf(buf, "%05.4f", bw / (double)H5_GB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_GB);
HDstrcpy(buf+5, " GB/s");
} else if(bw < (double)H5_PB) {
- sprintf(buf, "%05.4f", bw / (double)H5_TB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_TB);
HDstrcpy(buf+5, " TB/s");
} else {
- sprintf(buf, "%10.4e", bw);
+ HDsprintf(buf, "%10.4e", bw);
if(HDstrlen(buf) > 10)
- sprintf(buf, "%10.3e", bw);
+ HDsprintf(buf, "%10.3e", bw);
}
}
} /* end H5_bandwidth() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_now
+ * Function: H5_now
*
- * Purpose: Retrieves the current time, as seconds after the UNIX epoch.
+ * Purpose: Retrieves the current time, as seconds after the UNIX epoch.
*
- * Return: # of seconds from the epoch (can't fail)
+ * Return: # of seconds from the epoch (can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, November 28, 2006
*
*-------------------------------------------------------------------------
@@ -253,7 +253,7 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
time_t
H5_now(void)
{
- time_t now; /* Current time */
+ time_t now; /* Current time */
#ifdef H5_HAVE_GETTIMEOFDAY
{
diff --git a/test/atomic_reader.c b/test/atomic_reader.c
index 3e3a20a..5c1241f 100644
--- a/test/atomic_reader.c
+++ b/test/atomic_reader.c
@@ -55,7 +55,7 @@ int verify(int fd, unsigned int k);
void print_info(int *info, unsigned int lastr, unsigned iteration);
-
+
/*-------------------------------------------------------------------------
* Function: usage
*
@@ -63,7 +63,7 @@ void print_info(int *info, unsigned int lastr, unsigned iteration);
*
* Parameters: None
*
- * Return: void
+ * Return: void
*
*-------------------------------------------------------------------------
*/
@@ -78,13 +78,13 @@ usage(void)
printf("\n");
} /* usage() */
-
+
/*-------------------------------------------------------------------------
* Function: verify
*
* Purpose: To verify that the data read is the pattern expected.
* Each integer read should be the same as the index.
- * When a difference is encountered, the remaining integers
+ * When a difference is encountered, the remaining integers
* read should be the same as the previous index.
* For example, the pattern expected should be either:
* a) 01234567....n-1
@@ -93,11 +93,11 @@ usage(void)
* the remaining integers should be all "3"s as:
* 012333333333333
*
- * Parameters:
+ * Parameters:
* fd -- the file descriptor
* k -- the number of integers to read
*
- * Return:
+ * Return:
* positive on success
* negative on failure
*
@@ -106,9 +106,9 @@ usage(void)
int
verify(int fd, unsigned int k)
{
- unsigned int i; /* local index variable */
- ssize_t bytes_read; /* the number of bytes read */
- unsigned int *buf = NULL; /* buffer to hold data read */
+ unsigned int i; /* local index variable */
+ ssize_t bytes_read; /* the number of bytes read */
+ unsigned int *buf = NULL; /* buffer to hold data read */
/* Allocate buffer for data read */
if((buf = (unsigned int *)malloc(k * sizeof(unsigned int))) == NULL) {
@@ -165,13 +165,13 @@ error:
} /* end verify() */
-
+
/*-------------------------------------------------------------------------
* Function: print_info
*
* Purpose: To print the statistics gathered for re-reads
*
- * Parameters:
+ * Parameters:
* info -- the array storing the statistics for re-reads
* lastr -- the last read completed
* iteration -- the current iteration
@@ -183,7 +183,7 @@ error:
void
print_info(int *info, unsigned int lastr, unsigned iteration)
{
- unsigned j; /* local index variable */
+ unsigned j; /* local index variable */
printf("--------statistics for %u reads (iteration %u)--------\n", lastr, iteration);
@@ -193,13 +193,13 @@ print_info(int *info, unsigned int lastr, unsigned iteration)
printf("--------end statistics for %u reads (iteration %u)--------\n", lastr, iteration);
} /* print_info() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: To verify that the data read is the pattern expected.
- * (1) Make sure the file opens successfully and the # of bytes read is as expected
- * (2) Iterate the reader with i iterations
+ * (1) Make sure the file opens successfully and the # of bytes read is as expected
+ * (2) Iterate the reader with i iterations
* (3) Read and verify n integers for each iteration
* (4) On verification error, re-read the data at most READ_TRIES
* times to see if correct data can be obtained
diff --git a/test/atomic_writer.c b/test/atomic_writer.c
index 218d4da..b9ea03a 100644
--- a/test/atomic_writer.c
+++ b/test/atomic_writer.c
@@ -14,7 +14,7 @@
*
* Created: atomic_writer.c
*
- * Purpose: This is the "writer" part of the standalone test to check
+ * Purpose: This is the "writer" part of the standalone test to check
* atomic read-write operation on a system.
* a) atomic_writer.c--the writer (this file)
* b) atomic_reader.c--the reader
@@ -53,7 +53,7 @@
static void usage(void);
-
+
/*-------------------------------------------------------------------------
* Function: usage
*
@@ -77,12 +77,12 @@ usage(void)
} /* usage() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: To write a series of integers to a file for the reader to verify the data.
- * A write is atomic if the whole amount written in one operation is not interleaved
+ * A write is atomic if the whole amount written in one operation is not interleaved
* with data from any other process.
* (1) Iterate with i iterations
* (2) Write a series of integers (0 to n-1) to the file with this pattern:
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
printf("WRITER: error from lseek\n");
goto error;
} /* end if */
-
+
/* Write the data */
if((bytes_wrote = write(fd, buf, ((num-n) * sizeof(unsigned int)))) < 0) {
printf("WRITER: error from write\n");
diff --git a/test/cache_image.c b/test/cache_image.c
index d043dcd..d5d3d95 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -14,8 +14,8 @@
/* Programmer: John Mainzer
* 7/13/15
*
- * This file contains tests specific to the cache image
- * feature implemented in H5C.c
+ * This file contains tests specific to the cache image
+ * feature implemented in H5C.c
*/
#include "cache_common.h"
#include "genall5.h"
@@ -33,7 +33,7 @@ static void create_datasets(hid_t file_id, int min_dset, int max_dset);
static void delete_datasets(hid_t file_id, int min_dset, int max_dset);
static void open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
hbool_t read_only, hbool_t set_mdci_fapl, hbool_t config_fsm,
- hbool_t set_eoc, const char *hdf_file_name, unsigned cache_image_flags,
+ hbool_t set_eoc, const char *hdf_file_name, unsigned cache_image_flags,
hid_t *file_id_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr);
static void attempt_swmr_open_hdf5_file(hbool_t create_file,
hbool_t set_mdci_fapl, const char *hdf_file_name);
@@ -62,7 +62,6 @@ static unsigned cache_image_api_error_check_4(void);
static unsigned get_free_sections_test(void);
static unsigned evict_on_close_test(void);
-
/****************************************************************************/
/***************************** Utility Functions ****************************/
/****************************************************************************/
@@ -71,10 +70,10 @@ static unsigned evict_on_close_test(void);
* Function: create_datasets()
*
* Purpose: If pass is TRUE on entry, create the specified datasets
- * in the indicated file.
+ * in the indicated file.
*
- * Datasets and their contents must be well known, as we
- * will verify that they contain the expected data later.
+ * Datasets and their contents must be well known, as we
+ * will verify that they contain the expected data later.
*
* On failure, set pass to FALSE, and set failure_mssg
* to point to an appropriate failure message.
@@ -93,7 +92,7 @@ static unsigned evict_on_close_test(void);
#define DSET_SIZE (40 * CHUNK_SIZE)
#define MAX_NUM_DSETS 256
-static void
+static void
create_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char * fcn_name = "create_datasets()";
@@ -315,8 +314,8 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/* read the chunk from file */
if ( pass ) {
- status = H5Dread(dataset_ids[m], H5T_NATIVE_INT,
- memspace_id, filespace_ids[m],
+ status = H5Dread(dataset_ids[m], H5T_NATIVE_INT,
+ memspace_id, filespace_ids[m],
H5P_DEFAULT, data_chunk);
if ( status < 0 ) {
@@ -341,7 +340,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
valid_chunk = FALSE;
- if ( verbose ) {
+ if ( verbose ) {
HDfprintf(stdout,
"data_chunk[%0d][%0d] = %0d, expect %0d.\n",
@@ -351,7 +350,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
HDfprintf(stdout,
"m = %d, i = %d, j = %d, k = %d, l = %d\n",
m, i, j, k, l);
- }
+ }
}
}
}
@@ -361,12 +360,12 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
pass = FALSE;
failure_mssg = "slab validation failed.";
- if ( verbose ) {
+ if ( verbose ) {
HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, m);
- }
+ }
}
}
m++;
@@ -417,16 +416,16 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
} /* create_datasets() */
-
+
/*-------------------------------------------------------------------------
* Function: delete_datasets()
*
- * Purpose: If pass is TRUE on entry, verify and then delete the
- * dataset(s) indicated by min_dset and max_dset in the
- * indicated file.
+ * Purpose: If pass is TRUE on entry, verify and then delete the
+ * dataset(s) indicated by min_dset and max_dset in the
+ * indicated file.
*
- * Datasets and their contents must be well know, as we
- * will verify that they contain the expected data later.
+ * Datasets and their contents must be well know, as we
+ * will verify that they contain the expected data later.
*
* On failure, set pass to FALSE, and set failure_mssg
* to point to an appropriate failure message.
@@ -441,7 +440,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
*-------------------------------------------------------------------------
*/
-static void
+static void
delete_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char * fcn_name = "delete_datasets()";
@@ -472,11 +471,11 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
{
HDsprintf(dset_name, "/dset%03d", i);
- if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
+ if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
pass = FALSE;
failure_mssg = "H5Ldelete() failed.";
- }
+ }
i++;
}
@@ -488,32 +487,32 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
} /* delete_datasets() */
-
+
/*-------------------------------------------------------------------------
* Function: open_hdf5_file()
*
- * Purpose: If pass is true on entry, create or open the specified HDF5
- * and test to see if it has a metadata cache image superblock
- * extension message.
+ * Purpose: If pass is true on entry, create or open the specified HDF5
+ * and test to see if it has a metadata cache image superblock
+ * extension message.
*
- * Set pass to FALSE and issue a suitable failure
- * message if either the file contains a metadata cache image
- * superblock extension and mdci_sbem_expected is TRUE, or
- * vise versa.
+ * Set pass to FALSE and issue a suitable failure
+ * message if either the file contains a metadata cache image
+ * superblock extension and mdci_sbem_expected is TRUE, or
+ * vise versa.
*
- * If mdci_sbem_expected is TRUE, also verify that the metadata
- * cache has been advised of this.
+ * If mdci_sbem_expected is TRUE, also verify that the metadata
+ * cache has been advised of this.
*
- * If read_only is TRUE, open the file read only. Otherwise
- * open the file read/write.
+ * If read_only is TRUE, open the file read only. Otherwise
+ * open the file read/write.
*
- * If set_mdci_fapl is TRUE, set the metadata cache image
- * FAPL entry when opening the file, and verify that the
- * metadata cache is notified.
+ * If set_mdci_fapl is TRUE, set the metadata cache image
+ * FAPL entry when opening the file, and verify that the
+ * metadata cache is notified.
*
- * If config_fsm is TRUE, setup the persistent free space
- * manager. Note that this flag may only be set if
- * create_file is also TRUE.
+ * If config_fsm is TRUE, setup the persistent free space
+ * manager. Note that this flag may only be set if
+ * create_file is also TRUE.
*
* Return pointers to the cache data structure and file data
* structures.
@@ -556,8 +555,8 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
if ( pass )
{
- /* opening the file both read only and with a cache image
- * requested is a contradiction. We resolve it by ignoring
+ /* opening the file both read only and with a cache image
+ * requested is a contradiction. We resolve it by ignoring
* the cache image request silently.
*/
if ( ( create_file && mdci_sbem_expected ) ||
@@ -600,7 +599,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
/* call H5Pset_libver_bounds() on the fapl_id */
if ( pass ) {
- if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST,
+ if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST,
H5F_LIBVER_LATEST) < 0 ) {
pass = FALSE;
@@ -625,7 +624,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) ||
( cache_image_config.generate_image != FALSE ) ||
( cache_image_config.save_resize_status != FALSE ) ||
- ( cache_image_config.entry_ageout !=
+ ( cache_image_config.entry_ageout !=
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) ) {
pass = FALSE;
@@ -657,17 +656,17 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
/* setup the persistent free space manager if indicated */
if ( ( pass ) && ( config_fsm ) ) {
- fcpl_id = H5Pcreate(H5P_FILE_CREATE);
+ fcpl_id = H5Pcreate(H5P_FILE_CREATE);
- if ( fcpl_id <= 0 ) {
+ if ( fcpl_id <= 0 ) {
- pass = FALSE;
- failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.";
- }
+ pass = FALSE;
+ failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.";
+ }
}
if ( ( pass ) && ( config_fsm ) ) {
- if(H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE,
+ if(H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE,
TRUE, (hsize_t)1) < 0) {
pass = FALSE;
failure_mssg = "H5Pset_file_space_strategy() failed.";
@@ -693,13 +692,13 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
if ( create_file ) {
- if ( fcpl_id != -1 )
+ if ( fcpl_id != -1 )
- file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC,
+ file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC,
fcpl_id, fapl_id);
- else
+ else
- file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC,
+ file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC,
H5P_DEFAULT, fapl_id);
} else {
@@ -779,26 +778,26 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
if ( set_mdci_fapl ) {
- if ( read_only ) {
+ if ( read_only ) {
- if ( ( image_ctl.version !=
+ if ( ( image_ctl.version !=
H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) ||
( image_ctl.generate_image != FALSE ) ||
( image_ctl.save_resize_status != FALSE ) ||
- ( image_ctl.entry_ageout !=
+ ( image_ctl.entry_ageout !=
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) ||
( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) {
pass = FALSE;
failure_mssg = "Unexpected image_ctl values(1).\n";
}
- } else {
+ } else {
- if ( ( image_ctl.version !=
+ if ( ( image_ctl.version !=
H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) ||
( image_ctl.generate_image != TRUE ) ||
( image_ctl.save_resize_status != FALSE ) ||
- ( image_ctl.entry_ageout !=
+ ( image_ctl.entry_ageout !=
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) ||
( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) {
@@ -808,11 +807,11 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
}
} else {
- if ( ( image_ctl.version !=
+ if ( ( image_ctl.version !=
H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) ||
( image_ctl.generate_image != FALSE ) ||
( image_ctl.save_resize_status != FALSE ) ||
- ( image_ctl.entry_ageout !=
+ ( image_ctl.entry_ageout !=
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) ||
( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) {
@@ -863,15 +862,15 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
pass = FALSE;
failure_mssg = "mdci sb extension message not present?\n";
}
- }
+ }
} else {
- if ( ( cache_ptr->load_image == TRUE ) ||
+ if ( ( cache_ptr->load_image == TRUE ) ||
( cache_ptr->delete_image == TRUE ) ) {
pass = FALSE;
failure_mssg = "mdci sb extension message present?\n";
- }
+ }
}
}
@@ -891,12 +890,12 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
} /* open_hdf5_file() */
-
+
/*-------------------------------------------------------------------------
* Function: attempt_swmr_open_hdf5_file()
*
- * Purpose: If pass is true on entry, attempt to create or open the
- * specified HDF5 file with SWMR, and also with cache image
+ * Purpose: If pass is true on entry, attempt to create or open the
+ * specified HDF5 file with SWMR, and also with cache image
* creation if requested.
*
* In all cases, the attempted open or create should fail.
@@ -913,8 +912,8 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
static void
attempt_swmr_open_hdf5_file(const hbool_t create_file,
- const hbool_t set_mdci_fapl,
- const char * hdf_file_name)
+ const hbool_t set_mdci_fapl,
+ const char * hdf_file_name)
{
const char * fcn_name = "attempt_swmr_open_hdf5_file()";
hbool_t show_progress = FALSE;
@@ -945,7 +944,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file,
/* call H5Pset_libver_bounds() on the fapl_id */
if ( pass ) {
- if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST)
+ if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST)
< 0 ) {
pass = FALSE;
@@ -980,8 +979,8 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file,
if ( create_file ) {
H5E_BEGIN_TRY {
- file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE,
- H5P_DEFAULT, fapl_id);
+ file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE,
+ H5P_DEFAULT, fapl_id);
} H5E_END_TRY;
} else {
@@ -995,7 +994,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file,
pass = FALSE;
failure_mssg = "SWMR H5Fcreate() or H5Fopen() succeeded.\n";
- }
+ }
}
if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
@@ -1004,17 +1003,17 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file,
} /* attempt_swmr_open_hdf5_file() */
-
+
/*-------------------------------------------------------------------------
* Function: verify_datasets()
*
- * Purpose: If pass is TRUE on entry, verify that the datasets in the
- * file exist and contain the expected data.
+ * Purpose: If pass is TRUE on entry, verify that the datasets in the
+ * file exist and contain the expected data.
*
- * Note that these datasets were created by
- * create_datasets() above. Thus any changes in that
- * function must be reflected in this function, and
- * vise-versa.
+ * Note that these datasets were created by
+ * create_datasets() above. Thus any changes in that
+ * function must be reflected in this function, and
+ * vise-versa.
*
* On failure, set pass to FALSE, and set failure_mssg
* to point to an appropriate failure message.
@@ -1029,7 +1028,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file,
*-------------------------------------------------------------------------
*/
-static void
+static void
verify_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char * fcn_name = "verify_datasets()";
@@ -1157,8 +1156,8 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
/* read the chunk from file */
if ( pass ) {
- status = H5Dread(dataset_ids[m], H5T_NATIVE_INT,
- memspace_id, filespace_ids[m],
+ status = H5Dread(dataset_ids[m], H5T_NATIVE_INT,
+ memspace_id, filespace_ids[m],
H5P_DEFAULT, data_chunk);
if ( status < 0 ) {
@@ -1183,8 +1182,8 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
valid_chunk = FALSE;
- if ( verbose ) {
-
+ if ( verbose ) {
+
HDfprintf(stdout,
"data_chunk[%0d][%0d] = %0d, expect %0d.\n",
k, l, data_chunk[k][l],
@@ -1193,7 +1192,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
HDfprintf(stdout,
"m = %d, i = %d, j = %d, k = %d, l = %d\n",
m, i, j, k, l);
- }
+ }
}
}
}
@@ -1203,12 +1202,12 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
pass = FALSE;
failure_mssg = "slab validation failed.";
- if ( verbose ) {
+ if ( verbose ) {
HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, m);
- }
+ }
}
}
m++;
@@ -1259,7 +1258,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
} /* verify_datasets() */
-
+
/****************************************************************************/
/******************************* Test Functions *****************************/
/****************************************************************************/
@@ -1268,60 +1267,60 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
* Function: check_cache_image_ctl_flow_1()
*
* Purpose: This test is one of a sequence of control flow tests intended
- * to verify that control flow for the cache image feature works
- * as expected.
+ * to verify that control flow for the cache image feature works
+ * as expected.
*
- * This test is an initial smoke check, so the sequence of
- * operations is relatively simple. In particular, we are
- * testing:
+ * This test is an initial smoke check, so the sequence of
+ * operations is relatively simple. In particular, we are
+ * testing:
*
- * i) Creation of file with cache image FAPL entry set
- * and insertion of metadata cache image superblock
- * message on file close.
+ * i) Creation of file with cache image FAPL entry set
+ * and insertion of metadata cache image superblock
+ * message on file close.
*
- * ii) Open of file with metadata cache image superblock
- * message, transmission of message to metadata cache,
- * and deletion of superblock message prior to close.
+ * ii) Open of file with metadata cache image superblock
+ * message, transmission of message to metadata cache,
+ * and deletion of superblock message prior to close.
*
- * Note that in all cases we are performing operations on the
- * file. While this is the typical case, we must repeat this
- * test without operations on the file.
+ * Note that in all cases we are performing operations on the
+ * file. While this is the typical case, we must repeat this
+ * test without operations on the file.
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 2) Create some datasets in the file.
+ * 2) Create some datasets in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file.
+ * 4) Open the file.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 5) Open a dataset.
+ * 5) Open a dataset.
*
- * Verify that the metadata cache image superblock
- * extension message has been deleted.
+ * Verify that the metadata cache image superblock
+ * extension message has been deleted.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file.
+ * 7) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 8) Close the file.
+ * 8) Close the file.
*
- * 9) Delete the file.
+ * 9) Delete the file.
*
* Return: void
*
@@ -1346,7 +1345,7 @@ check_cache_image_ctl_flow_1(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1361,16 +1360,16 @@ check_cache_image_ctl_flow_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
- * Set flags forcing creation of metadata cache image super block
- * extension message only.
+ * Set flags forcing creation of metadata cache image super block
+ * extension message only.
*/
if ( pass ) {
@@ -1379,8 +1378,8 @@ check_cache_image_ctl_flow_1(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1388,10 +1387,10 @@ check_cache_image_ctl_flow_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets in the file. */
if ( pass ) {
@@ -1399,10 +1398,10 @@ check_cache_image_ctl_flow_1(void)
create_datasets(file_id, 0, 5);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -1415,26 +1414,26 @@ check_cache_image_ctl_flow_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 4) Open the file.
+
+
+ /* 4) Open the file.
*
- * Verify that the metadata cache is instructed to load the
- * metadata cache image, and that the supplied address and length
- * are HADDR_UNDEF and zero respectively. Note that these values
+ * Verify that the metadata cache is instructed to load the
+ * metadata cache image, and that the supplied address and length
+ * are HADDR_UNDEF and zero respectively. Note that these values
* indicate that the metadata image block doesn't exist.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1442,13 +1441,13 @@ check_cache_image_ctl_flow_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -1464,9 +1463,9 @@ check_cache_image_ctl_flow_1(void)
*/
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
@@ -1479,24 +1478,24 @@ check_cache_image_ctl_flow_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 7) Open the file.
+
+
+ /* 7) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1504,9 +1503,9 @@ check_cache_image_ctl_flow_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 8) Close the file. */
@@ -1519,9 +1518,9 @@ check_cache_image_ctl_flow_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 9) Delete the file */
@@ -1544,63 +1543,63 @@ check_cache_image_ctl_flow_1(void)
} /* check_cache_image_ctl_flow_1() */
-
+
/*-------------------------------------------------------------------------
* Function: check_cache_image_ctl_flow_2()
*
* Purpose: This test is one of a sequence of control flow tests intended
- * to verify that control flow for the cache image feature works
- * as expected.
+ * to verify that control flow for the cache image feature works
+ * as expected.
*
- * This test is an initial smoke check, so the sequence of
- * operations is relatively simple. In particular, we are
- * testing:
+ * This test is an initial smoke check, so the sequence of
+ * operations is relatively simple. In particular, we are
+ * testing:
*
- * i) Creation of file with cache image FAPL entry set
- * and insertion of metadata cache image superblock
- * message on file close.
+ * i) Creation of file with cache image FAPL entry set
+ * and insertion of metadata cache image superblock
+ * message on file close.
*
- * ii) Open of file with metadata cache image superblock
- * message, transmission of message to metadata cache,
- * and deletion of superblock message prior to close.
+ * ii) Open of file with metadata cache image superblock
+ * message, transmission of message to metadata cache,
+ * and deletion of superblock message prior to close.
*
- * Note that unlike the previous test, no operations are performed
- * on the file. As a result of this, the metadata cache image
- * message is not processed until the metadata cache receives
- * the file close warning. (Under normal circumstances, it is
- * processed as part of the first protect operation after the
- * superblock is loaded.)
+ * Note that unlike the previous test, no operations are performed
+ * on the file. As a result of this, the metadata cache image
+ * message is not processed until the metadata cache receives
+ * the file close warning. (Under normal circumstances, it is
+ * processed as part of the first protect operation after the
+ * superblock is loaded.)
*
- * In this particular test, we preform the following operations:
+ * In this particular test, we preform the following operations:
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 2) Close the file.
+ * 2) Close the file.
*
- * 3) Open the file.
+ * 3) Open the file.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file.
+ * 7) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 8) Close the file.
+ * 8) Close the file.
*
- * 9) Delete the file.
+ * 9) Delete the file.
*
* Return: void
*
@@ -1625,7 +1624,7 @@ check_cache_image_ctl_flow_2(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
@@ -1639,16 +1638,16 @@ check_cache_image_ctl_flow_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
- * Set flags forcing creation of metadata cache image super block
- * extension message only.
+ * Set flags forcing creation of metadata cache image super block
+ * extension message only.
*/
if ( pass ) {
@@ -1657,8 +1656,8 @@ check_cache_image_ctl_flow_2(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1666,10 +1665,10 @@ check_cache_image_ctl_flow_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Close the file. */
if ( pass ) {
@@ -1682,26 +1681,26 @@ check_cache_image_ctl_flow_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 3) Open the file.
+
+
+ /* 3) Open the file.
*
- * Verify that the metadata cache is instructed to load the
- * metadata cache image, and that the supplied address and length
- * are HADDR_UNDEF and zero respectively. Note that these values
+ * Verify that the metadata cache is instructed to load the
+ * metadata cache image, and that the supplied address and length
+ * are HADDR_UNDEF and zero respectively. Note that these values
* indicate that the metadata image block doesn't exist.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1709,10 +1708,10 @@ check_cache_image_ctl_flow_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 4) Close the file. */
if ( pass ) {
@@ -1724,24 +1723,24 @@ check_cache_image_ctl_flow_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 5) Open the file.
+
+
+ /* 5) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1749,9 +1748,9 @@ check_cache_image_ctl_flow_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
@@ -1764,9 +1763,9 @@ check_cache_image_ctl_flow_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Delete the file */
@@ -1789,81 +1788,81 @@ check_cache_image_ctl_flow_2(void)
} /* check_cache_image_ctl_flow_2() */
-
+
/*-------------------------------------------------------------------------
* Function: check_cache_image_ctl_flow_3()
*
* Purpose: This test is one of a sequence of control flow tests intended
- * to verify that control flow for the cache image feature works
- * as expected.
+ * to verify that control flow for the cache image feature works
+ * as expected.
*
- * The objectives of this test are to:
+ * The objectives of this test are to:
*
- * i) Test operation of the metadata cache image FAPL
- * entry set on open of an existing file. This
- * should result in the insertion of a metadata
- * cache image superblock message on file close.
+ * i) Test operation of the metadata cache image FAPL
+ * entry set on open of an existing file. This
+ * should result in the insertion of a metadata
+ * cache image superblock message on file close.
*
- * ii) Test operation of the metadata cache image super
- * block extension message when it appears in a file
- * that is opened READ ONLY.
+ * ii) Test operation of the metadata cache image super
+ * block extension message when it appears in a file
+ * that is opened READ ONLY.
*
- * Note that in all cases we are performing operations on the
- * file between file open and close. While this is the
- * typical case, we must repeat this test without operations
- * on the file.
+ * Note that in all cases we are performing operations on the
+ * file between file open and close. While this is the
+ * typical case, we must repeat this test without operations
+ * on the file.
*
- * 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
+ * 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
*
- * Verify that the cache is NOT informed of the cache image
- * FAPL entry.
+ * Verify that the cache is NOT informed of the cache image
+ * FAPL entry.
*
- * 2) Close the file.
+ * 2) Close the file.
*
- * 3) Open the file WITH the cache image FAPL entry.
+ * 3) Open the file WITH the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 4) Create some datasets.
+ * 4) Create some datasets.
*
- * 5) Close the file.
+ * 5) Close the file.
*
- * 6) Open the file READ ONLY.
+ * 6) Open the file READ ONLY.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 7) Verify the contents of the datasets.
+ * 7) Verify the contents of the datasets.
*
- * 8) Close the file.
+ * 8) Close the file.
*
- * 9) Open the file READ/WRITE.
+ * 9) Open the file READ/WRITE.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 10) Verify the contents of the datasets.
+ * 10) Verify the contents of the datasets.
*
- * 11) Close the file.
+ * 11) Close the file.
*
- * 12) Open the file
+ * 12) Open the file
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 13) Close the file.
+ * 13) Close the file.
*
- * 14) Delete the file.
+ * 14) Delete the file.
*
* Return: void
*
@@ -1904,10 +1903,10 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 1 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
+
+ /* 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
*
- * Verify that the cache is NOT informed of the cache image
+ * Verify that the cache is NOT informed of the cache image
* FAPL entry.
*/
@@ -1917,8 +1916,8 @@ check_cache_image_ctl_flow_3(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1929,7 +1928,7 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 2 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Close the file. */
if ( pass ) {
@@ -1943,13 +1942,13 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 3) Open the file WITH the cache image FAPL entry.
+
+
+ /* 3) Open the file WITH the cache image FAPL entry.
*
* Verify that the cache is informed of the cache image FAPL entry.
*
- * Set flags forcing creation of metadata cache image super block
+ * Set flags forcing creation of metadata cache image super block
* extension message only.
*/
@@ -1959,8 +1958,8 @@ check_cache_image_ctl_flow_3(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1996,13 +1995,13 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 6 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Open the file READ ONLY.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*/
@@ -2010,11 +2009,11 @@ check_cache_image_ctl_flow_3(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2024,7 +2023,7 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 7 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Verify the contents of the datasets. */
@@ -2050,13 +2049,13 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 9 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 9) Open the file READ/WRITE.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*/
@@ -2064,11 +2063,11 @@ check_cache_image_ctl_flow_3(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2090,7 +2089,7 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 11) Close the file. */
if ( pass ) {
@@ -2105,21 +2104,21 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 12 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 12) Open the file
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2145,7 +2144,7 @@ check_cache_image_ctl_flow_3(void)
if ( show_progress ) /* 14 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 14) Delete the file. */
if ( pass ) {
@@ -2168,73 +2167,73 @@ check_cache_image_ctl_flow_3(void)
} /* check_cache_image_ctl_flow_3() */
-
+
/*-------------------------------------------------------------------------
* Function: check_cache_image_ctl_flow_4()
*
* Purpose: This test is one of a sequence of control flow tests intended
- * to verify that control flow for the cache image feature works
- * as expected.
+ * to verify that control flow for the cache image feature works
+ * as expected.
*
- * The objectives of this test are to:
+ * The objectives of this test are to:
*
- * i) Test operation of the metadata cache image FAPL
- * entry set on open of an existing file. This
- * should result in the insertion of a metadata
- * cache image superblock message on file close.
+ * i) Test operation of the metadata cache image FAPL
+ * entry set on open of an existing file. This
+ * should result in the insertion of a metadata
+ * cache image superblock message on file close.
*
- * ii) Test operation of the metadata cache image super
- * block extension message when it appears in a file
- * that is opened READ ONLY.
+ * ii) Test operation of the metadata cache image super
+ * block extension message when it appears in a file
+ * that is opened READ ONLY.
*
- * In this test we avoid all file access beyond file open
- * and close.
+ * In this test we avoid all file access beyond file open
+ * and close.
*
- * 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
+ * 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
*
- * Verify that the cache is NOT informed of the cache image
- * FAPL entry.
+ * Verify that the cache is NOT informed of the cache image
+ * FAPL entry.
*
- * 2) Close the file.
+ * 2) Close the file.
*
- * 3) Open the file WITH the cache image FAPL entry.
+ * 3) Open the file WITH the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 4) Close the file.
+ * 4) Close the file.
*
- * 5) Open the file READ ONLY.
+ * 5) Open the file READ ONLY.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file READ/WRITE.
+ * 7) Open the file READ/WRITE.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 8) Close the file.
+ * 8) Close the file.
*
- * 9) Open the file
+ * 9) Open the file
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 10) Close the file.
+ * 10) Close the file.
*
- * 11) Delete the file.
+ * 11) Delete the file.
*
* Return: void
*
@@ -2275,10 +2274,10 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 1 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
+
+ /* 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
*
- * Verify that the cache is NOT informed of the cache image
+ * Verify that the cache is NOT informed of the cache image
* FAPL entry.
*/
@@ -2288,8 +2287,8 @@ check_cache_image_ctl_flow_4(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2300,7 +2299,7 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 2 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Close the file. */
if ( pass ) {
@@ -2314,13 +2313,13 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 3) Open the file WITH the cache image FAPL entry.
+
+
+ /* 3) Open the file WITH the cache image FAPL entry.
*
* Verify that the cache is informed of the cache image FAPL entry.
*
- * Set flags forcing creation of metadata cache image super block
+ * Set flags forcing creation of metadata cache image super block
* extension message only.
*/
@@ -2330,8 +2329,8 @@ check_cache_image_ctl_flow_4(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2356,13 +2355,13 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 5 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 5) Open the file READ ONLY.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*/
@@ -2370,11 +2369,11 @@ check_cache_image_ctl_flow_4(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2384,7 +2383,7 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 6 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
@@ -2399,13 +2398,13 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 7 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Open the file READ/WRITE.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*/
@@ -2413,11 +2412,11 @@ check_cache_image_ctl_flow_4(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2443,21 +2442,21 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 9 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 9) Open the file
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2483,7 +2482,7 @@ check_cache_image_ctl_flow_4(void)
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 11) Delete the file. */
if ( pass ) {
@@ -2506,66 +2505,66 @@ check_cache_image_ctl_flow_4(void)
} /* check_cache_image_ctl_flow_4() */
-
+
/*-------------------------------------------------------------------------
* Function: check_cache_image_ctl_flow_5()
*
* Purpose: This test is one of a sequence of control flow tests intended
- * to verify that control flow for the cache image feature works
- * as expected.
+ * to verify that control flow for the cache image feature works
+ * as expected.
*
- * The objective of this test is verify correct control flow
- * when a file with a metadata cache image superblock extension
- * message is opened with the metadata cache image FAPL entry.
+ * The objective of this test is verify correct control flow
+ * when a file with a metadata cache image superblock extension
+ * message is opened with the metadata cache image FAPL entry.
*
- * Note that in all cases we are performing operations on the
- * file between file open and close. While this is the
- * typical case, we must repeat this test without operations
- * on the file.
+ * Note that in all cases we are performing operations on the
+ * file between file open and close. While this is the
+ * typical case, we must repeat this test without operations
+ * on the file.
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 2) Create some datasets.
+ * 2) Create some datasets.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file WITH the cache image FAPL entry.
+ * 4) Open the file WITH the cache image FAPL entry.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 5) Verify the contents of the datasets.
+ * 5) Verify the contents of the datasets.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file.
+ * 7) Open the file.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 8) Verify the contents of the datasets.
+ * 8) Verify the contents of the datasets.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Delete the file.
+ * 10) Delete the file.
*
* Return: void
*
@@ -2607,12 +2606,12 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 1 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
* Verify that the cache is informed of the cache image FAPL entry.
*
- * Set flags forcing creation of metadata cache image
+ * Set flags forcing creation of metadata cache image
* super block extension message only.
*/
@@ -2622,8 +2621,8 @@ check_cache_image_ctl_flow_5(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2633,7 +2632,7 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 2 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets. */
@@ -2645,7 +2644,7 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 3) Close the file. */
if ( pass ) {
@@ -2660,30 +2659,30 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 4 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 4) Open the file WITH the cache image FAPL entry.
+
+ /* 4) Open the file WITH the cache image FAPL entry.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*
- * Verify that the cache is informed of the cache image
+ * Verify that the cache is informed of the cache image
* FAPL entry.
*
- * Set flags forcing creation of metadata cache image
+ * Set flags forcing creation of metadata cache image
* super block extension message only.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2704,7 +2703,7 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 6 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
if ( pass ) {
@@ -2719,12 +2718,12 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 7 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 7) Open the file.
+
+ /* 7) Open the file.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*/
@@ -2732,11 +2731,11 @@ check_cache_image_ctl_flow_5(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2756,8 +2755,8 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 9 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 9) Close the file. */
if ( pass ) {
@@ -2772,7 +2771,7 @@ check_cache_image_ctl_flow_5(void)
if ( show_progress ) /* 10 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Delete the file. */
if ( pass ) {
@@ -2795,58 +2794,58 @@ check_cache_image_ctl_flow_5(void)
} /* check_cache_image_ctl_flow_5() */
-
+
/*-------------------------------------------------------------------------
* Function: check_cache_image_ctl_flow_6()
*
* Purpose: This test is one of a sequence of control flow tests intended
- * to verify that control flow for the cache image feature works
- * as expected.
+ * to verify that control flow for the cache image feature works
+ * as expected.
*
- * The objective of this test is verify correct control flow
- * when a file with a metadata cache image superblock extension
- * message is opened with the metadata cache image FAPL entry.
+ * The objective of this test is verify correct control flow
+ * when a file with a metadata cache image superblock extension
+ * message is opened with the metadata cache image FAPL entry.
*
- * In this test we avoid all file activity other than open
- * and close.
+ * In this test we avoid all file activity other than open
+ * and close.
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 2) Close the file.
+ * 2) Close the file.
*
- * 3) Open the file WITH the cache image FAPL entry.
+ * 3) Open the file WITH the cache image FAPL entry.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set flags forcing creation of metadata cache image
- * super block extension message only.
+ * Set flags forcing creation of metadata cache image
+ * super block extension message only.
*
- * 4) Close the file.
+ * 4) Close the file.
*
- * 5) Open the file.
+ * 5) Open the file.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
- * zero respectively. Note that these values indicate
- * that the metadata image block doesn't exist.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
+ * zero respectively. Note that these values indicate
+ * that the metadata image block doesn't exist.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Delete the file.
+ * 7) Delete the file.
*
* Return: void
*
@@ -2888,12 +2887,12 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 1 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
* Verify that the cache is informed of the cache image FAPL entry.
*
- * Set flags forcing creation of metadata cache image
+ * Set flags forcing creation of metadata cache image
* super block extension message only.
*/
@@ -2903,8 +2902,8 @@ check_cache_image_ctl_flow_6(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2914,7 +2913,7 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 2 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Close the file. */
@@ -2930,30 +2929,30 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 4) Open the file WITH the cache image FAPL entry.
+
+ /* 4) Open the file WITH the cache image FAPL entry.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*
- * Verify that the cache is informed of the cache image
+ * Verify that the cache is informed of the cache image
* FAPL entry.
*
- * Set flags forcing creation of metadata cache image
+ * Set flags forcing creation of metadata cache image
* super block extension message only.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2964,7 +2963,7 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 4 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 5) Close the file. */
if ( pass ) {
@@ -2979,12 +2978,12 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 5 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 5) Open the file.
+
+ /* 5) Open the file.
*
* Verify that the metadata cache is instructed
- * to load the metadata cache image, and that the
- * supplied address and length are HADDR_UNDEF and
+ * to load the metadata cache image, and that the
+ * supplied address and length are HADDR_UNDEF and
* zero respectively. Note that these values indicate
* that the metadata image block doesn't exist.
*/
@@ -2992,11 +2991,11 @@ check_cache_image_ctl_flow_6(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3007,7 +3006,7 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 6 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
if ( pass ) {
@@ -3022,7 +3021,7 @@ check_cache_image_ctl_flow_6(void)
if ( show_progress ) /* 7 */
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Delete the file. */
if ( pass ) {
@@ -3045,93 +3044,93 @@ check_cache_image_ctl_flow_6(void)
} /* check_cache_image_ctl_flow_6() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_smoke_check_1()
*
* Purpose: This test is one of a sequence of tests intended
- * to exercise the cache image feature verifying that it
- * works more or less correctly in common cases.
+ * to exercise the cache image feature verifying that it
+ * works more or less correctly in common cases.
*
- * This test is an initial smoke check, so the sequence of
- * operations is relatively simple. In particular, we are
- * testing:
+ * This test is an initial smoke check, so the sequence of
+ * operations is relatively simple. In particular, we are
+ * testing:
*
- * i) Creation of file with metadata cache image
- * superblock extension message and cache image
- * block.
+ * i) Creation of file with metadata cache image
+ * superblock extension message and cache image
+ * block.
*
- * ii) Open of file with metadata cache image superblock
- * extension message and cache image block.
- * Deserialization and removal of both, insertion
- * of prefetched cache entries, and deserialization
- * of prefetched cache entries as they are protected.
+ * ii) Open of file with metadata cache image superblock
+ * extension message and cache image block.
+ * Deserialization and removal of both, insertion
+ * of prefetched cache entries, and deserialization
+ * of prefetched cache entries as they are protected.
*
- * iii) Subsequent write of file without metadata cache
- * image.
+ * iii) Subsequent write of file without metadata cache
+ * image.
*
- * iv) Open and close of file with metadata cache image
- * image requested, but with no operations on the
- * file.
+ * iv) Open and close of file with metadata cache image
+ * image requested, but with no operations on the
+ * file.
*
- * To do this:
+ * To do this:
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set all cache image flags, forcing full functionality.
+ * Set all cache image flags, forcing full functionality.
*
- * 2) Create some datasets in the file.
+ * 2) Create some datasets in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file.
+ * 4) Open the file.
*
- * Verify that the metadata cache is instructed
- * to load the metadata cache image.
+ * Verify that the metadata cache is instructed
+ * to load the metadata cache image.
*
- * 5) Open a dataset.
+ * 5) Open a dataset.
*
- * Verify that it contains the expected data
+ * Verify that it contains the expected data
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file.
+ * 7) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 8) Open a dataset.
+ * 8) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Open the file with the cache image FAPL entry.
+ * 10) Open the file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set all cache image flags, forcing full functionality.
+ * Set all cache image flags, forcing full functionality.
*
- * 11) Close the file. Since there has been no access to
- * any entries that would be included in the cache image,
- * there should be no cache image.
+ * 11) Close the file. Since there has been no access to
+ * any entries that would be included in the cache image,
+ * there should be no cache image.
*
- * 12) Open the file.
+ * 12) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 13) Open a dataset.
+ * 13) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 14) Close the file.
+ * 14) Close the file.
*
- * 15) Delete the file.
+ * 15) Delete the file.
*
* Return: void
*
@@ -3156,7 +3155,7 @@ cache_image_smoke_check_1(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3171,13 +3170,13 @@ cache_image_smoke_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
* Set flags forcing full function of the cache image feature.
*/
@@ -3188,8 +3187,8 @@ cache_image_smoke_check_1(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3197,10 +3196,10 @@ cache_image_smoke_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets in the file. */
if ( pass ) {
@@ -3221,10 +3220,10 @@ cache_image_smoke_check_1(void)
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -3237,26 +3236,26 @@ cache_image_smoke_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 4) Open the file.
+
+
+ /* 4) Open the file.
*
- * Verify that the metadata cache is instructed to load the
- * metadata cache image, and that the supplied address and length
- * are HADDR_UNDEF and zero respectively. Note that these values
+ * Verify that the metadata cache is instructed to load the
+ * metadata cache image, and that the supplied address and length
+ * are HADDR_UNDEF and zero respectively. Note that these values
* indicate that the metadata image block doesn't exist.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3264,13 +3263,13 @@ cache_image_smoke_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -3290,9 +3289,9 @@ cache_image_smoke_check_1(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
@@ -3305,24 +3304,24 @@ cache_image_smoke_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 7) Open the file.
+
+
+ /* 7) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3330,13 +3329,13 @@ cache_image_smoke_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 8) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -3357,7 +3356,7 @@ cache_image_smoke_check_1(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3372,24 +3371,24 @@ cache_image_smoke_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Open the file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3397,13 +3396,13 @@ cache_image_smoke_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 11) Close the file. Since there has been no access to
- * any entries that would be included in the cache image,
- * there should be no cache image.
+
+ /* 11) Close the file. Since there has been no access to
+ * any entries that would be included in the cache image,
+ * there should be no cache image.
*/
if ( pass ) {
@@ -3415,24 +3414,24 @@ cache_image_smoke_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 12) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3440,13 +3439,13 @@ cache_image_smoke_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 13) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*/
if ( pass ) {
@@ -3466,10 +3465,10 @@ cache_image_smoke_check_1(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 14) Close the file. */
if ( pass ) {
@@ -3481,9 +3480,9 @@ cache_image_smoke_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 15) Delete the file */
@@ -3506,55 +3505,55 @@ cache_image_smoke_check_1(void)
} /* cache_image_smoke_check_1() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_smoke_check_2()
*
* Purpose: This test is one of a sequence of tests intended
- * to exercise the cache image feature verifying that it
- * works more or less correctly in common cases.
+ * to exercise the cache image feature verifying that it
+ * works more or less correctly in common cases.
*
- * This test is an initial smoke check, so the sequence of
- * operations is relatively simple. In particular, we are
- * testing:
+ * This test is an initial smoke check, so the sequence of
+ * operations is relatively simple. In particular, we are
+ * testing:
*
- * i) Creation of file with metadata cache image
- * superblock extension message and cache image
- * block.
+ * i) Creation of file with metadata cache image
+ * superblock extension message and cache image
+ * block.
*
- * ii) Open of file with metadata cache image superblock
- * extension message and cache image block. Write
- * of prefetched entries to file on file close.
+ * ii) Open of file with metadata cache image superblock
+ * extension message and cache image block. Write
+ * of prefetched entries to file on file close.
*
- * To do this:
+ * To do this:
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set all cache image flags, forcing full functionality.
+ * Set all cache image flags, forcing full functionality.
*
- * 2) Create some datasets in the file.
+ * 2) Create some datasets in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file.
+ * 4) Open the file.
*
- * 5) Close the file.
+ * 5) Close the file.
*
- * 6) Open the file.
+ * 6) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 7) Open a dataset.
+ * 7) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 8) Close the file.
+ * 8) Close the file.
*
- * 9) Delete the file.
+ * 9) Delete the file.
*
* Return: void
*
@@ -3579,7 +3578,7 @@ cache_image_smoke_check_2(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3594,13 +3593,13 @@ cache_image_smoke_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
* Set flags forcing full function of the cache image feature.
*/
@@ -3611,8 +3610,8 @@ cache_image_smoke_check_2(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3620,10 +3619,10 @@ cache_image_smoke_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets in the file. */
if ( pass ) {
@@ -3643,10 +3642,10 @@ cache_image_smoke_check_2(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -3659,23 +3658,23 @@ cache_image_smoke_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 4) Open the file.
+ /* 4) Open the file.
*
- * Verify that the metadata cache is instructed to load the
+ * Verify that the metadata cache is instructed to load the
* metadata cache image.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3684,15 +3683,15 @@ cache_image_smoke_check_2(void)
}
/* can't verify that metadata cache image has been loaded directly,
- * as in this cache, the load will not happen until close, and thus
- * the images_created stat will not be readily available as it is
+ * as in this cache, the load will not happen until close, and thus
+ * the images_created stat will not be readily available as it is
* incremented just before the cache is shut down.
*/
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Close the file. */
if ( pass ) {
@@ -3704,24 +3703,24 @@ cache_image_smoke_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 6) Open the file.
+
+
+ /* 6) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3729,13 +3728,13 @@ cache_image_smoke_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 7) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -3744,7 +3743,7 @@ cache_image_smoke_check_2(void)
verify_datasets(file_id, 0, 5);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3759,9 +3758,9 @@ cache_image_smoke_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 9) Delete the file */
@@ -3784,77 +3783,77 @@ cache_image_smoke_check_2(void)
} /* cache_image_smoke_check_2() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_smoke_check_3()
*
* Purpose: This test is one of a sequence of tests intended
- * to exercise the cache image feature verifying that it
- * works more or less correctly in common cases.
+ * to exercise the cache image feature verifying that it
+ * works more or less correctly in common cases.
*
- * This test is an initial smoke check, so the sequence of
- * operations is relatively simple. In particular, we are
- * testing:
+ * This test is an initial smoke check, so the sequence of
+ * operations is relatively simple. In particular, we are
+ * testing:
*
- * i) Creation of file with metadata cache image
- * superblock extension message and cache image
- * block.
+ * i) Creation of file with metadata cache image
+ * superblock extension message and cache image
+ * block.
*
- * ii) Read only open and close of file with metadata
- * cache image superblock extension message and
- * cache image block.
+ * ii) Read only open and close of file with metadata
+ * cache image superblock extension message and
+ * cache image block.
*
- * iii) Subsequent R/W open and close of file with metadata
- * cache image superblock extension message and
+ * iii) Subsequent R/W open and close of file with metadata
+ * cache image superblock extension message and
* cache image block.
*
- * To do this:
+ * To do this:
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set all cache image flags, forcing full functionality.
+ * Set all cache image flags, forcing full functionality.
*
- * 2) Create some datasets in the file.
+ * 2) Create some datasets in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file read only.
+ * 4) Open the file read only.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 5 Open a dataset.
+ * 5 Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file.
+ * 7) Open the file.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 8 Open a dataset.
+ * 8 Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Open the file.
+ * 10) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 11) Open a dataset.
+ * 11) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 12) Close the file.
+ * 12) Close the file.
*
- * 13) Delete the file.
+ * 13) Delete the file.
*
* Return: void
*
@@ -3879,7 +3878,7 @@ cache_image_smoke_check_3(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3894,13 +3893,13 @@ cache_image_smoke_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
* Set flags forcing full function of the cache image feature.
*/
@@ -3911,8 +3910,8 @@ cache_image_smoke_check_3(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3920,10 +3919,10 @@ cache_image_smoke_check_3(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets in the file. */
if ( pass ) {
@@ -3942,10 +3941,10 @@ cache_image_smoke_check_3(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -3958,24 +3957,24 @@ cache_image_smoke_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 4) Open the file read only.
+
+
+ /* 4) Open the file read only.
*
- * Verify that the metadata cache is instructed to load the
+ * Verify that the metadata cache is instructed to load the
* metadata cache image.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3983,13 +3982,13 @@ cache_image_smoke_check_3(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -4009,10 +4008,10 @@ cache_image_smoke_check_3(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
if ( pass ) {
@@ -4024,24 +4023,24 @@ cache_image_smoke_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 7) Open the file.
+
+
+ /* 7) Open the file.
*
- * Verify that the file contains a metadata cache image
+ * Verify that the file contains a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4049,13 +4048,13 @@ cache_image_smoke_check_3(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 8) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -4076,7 +4075,7 @@ cache_image_smoke_check_3(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4090,22 +4089,22 @@ cache_image_smoke_check_3(void)
failure_mssg = "H5Fclose() failed.\n";
}
}
-
-
- /* 10) Open the file.
+
+
+ /* 10) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4113,13 +4112,13 @@ cache_image_smoke_check_3(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 11) Open and close a dataset.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -4140,7 +4139,7 @@ cache_image_smoke_check_3(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4155,9 +4154,9 @@ cache_image_smoke_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 13) Delete the file */
@@ -4180,66 +4179,66 @@ cache_image_smoke_check_3(void)
} /* cache_image_smoke_check_3() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_smoke_check_4()
*
- * Purpose: This test attempts to mimic the typical "poor man's
- * parallel use case in which the file is passed between
- * processes, each of which open the file, write some data,
- * close the file, and then pass control on to the next
- * process.
+ * Purpose: This test attempts to mimic the typical "poor man's
+ * parallel use case in which the file is passed between
+ * processes, each of which open the file, write some data,
+ * close the file, and then pass control on to the next
+ * process.
*
- * In this case, we only write one dataset per process.
+ * In this case, we only write one dataset per process.
*
- * Cycle of operation
+ * Cycle of operation
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set all cache image flags, forcing full functionality.
+ * Set all cache image flags, forcing full functionality.
*
- * 2) Create and write a dataset in the file.
+ * 2) Create and write a dataset in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file with the cache image FAPL entry.
+ * 4) Open the file with the cache image FAPL entry.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 5 Create and write a new dataset
+ * 5 Create and write a new dataset
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * If sufficient datasets have been created, continue to
+ * If sufficient datasets have been created, continue to
* 7). Otherwise goto 4)
*
- * 7) Open the file.
+ * 7) Open the file.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 8) Open all datasets that have been created, and
- * verify that they contain the expected data.
+ * 8) Open all datasets that have been created, and
+ * verify that they contain the expected data.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Open the file.
+ * 10) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 11) Open all datasets that have been created, and
+ * 11) Open all datasets that have been created, and
* verify that they contain the expected data.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 12) Close the file.
+ * 12) Close the file.
*
- * 13) Delete the file.
+ * 13) Delete the file.
*
* Return: void
*
@@ -4266,7 +4265,7 @@ cache_image_smoke_check_4(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4281,13 +4280,13 @@ cache_image_smoke_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
* Set flags forcing full function of the cache image feature.
*/
@@ -4298,8 +4297,8 @@ cache_image_smoke_check_4(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4307,10 +4306,10 @@ cache_image_smoke_check_4(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create a dataset in the file. */
if ( pass ) {
@@ -4329,10 +4328,10 @@ cache_image_smoke_check_4(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -4345,26 +4344,26 @@ cache_image_smoke_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ( ( pass ) && ( max_dset < MAX_NUM_DSETS ) )
{
-
- /* 4) Open the file.
+
+ /* 4) Open the file.
*
- * Verify that the metadata cache is instructed to load the
+ * Verify that the metadata cache is instructed to load the
* metadata cache image.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4372,11 +4371,11 @@ cache_image_smoke_check_4(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp, max_dset, pass);
-
+
/* 5) Create a dataset in the file. */
if ( pass ) {
@@ -4395,11 +4394,11 @@ cache_image_smoke_check_4(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
- HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 1, max_dset, pass);
-
+
/* 6) Close the file. */
if ( pass ) {
@@ -4412,27 +4411,27 @@ cache_image_smoke_check_4(void)
}
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 2, max_dset, pass);
} /* end while */
cp += 3;
-
-
- /* 7) Open the file.
+
+
+ /* 7) Open the file.
*
- * Verify that the file contains a metadata cache image
+ * Verify that the file contains a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4440,13 +4439,13 @@ cache_image_smoke_check_4(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 8) Open and close all datasets.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -4467,7 +4466,7 @@ cache_image_smoke_check_4(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4481,22 +4480,22 @@ cache_image_smoke_check_4(void)
failure_mssg = "H5Fclose() failed.\n";
}
}
-
-
- /* 10) Open the file.
+
+
+ /* 10) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4504,13 +4503,13 @@ cache_image_smoke_check_4(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 11) Open and close all datasets.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
@@ -4531,7 +4530,7 @@ cache_image_smoke_check_4(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4546,7 +4545,7 @@ cache_image_smoke_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Delete the file */
@@ -4569,79 +4568,79 @@ cache_image_smoke_check_4(void)
return !pass;
} /* cache_image_smoke_check_4() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_smoke_check_5()
*
- * Purpose: This test attempts to mimic the typical "poor man's
- * parallel use case in which the file is passed between
- * processes, each of which open the file, write some data,
- * close the file, and then pass control on to the next
- * process.
+ * Purpose: This test attempts to mimic the typical "poor man's
+ * parallel use case in which the file is passed between
+ * processes, each of which open the file, write some data,
+ * close the file, and then pass control on to the next
+ * process.
+ *
+ * In this case, we create one group for each process, and
+ * populate it with a "zoo" of HDF5 objects selected to
+ * (ideally) exercise all HDF5 on disk data structures.
*
- * In this case, we create one group for each process, and
- * populate it with a "zoo" of HDF5 objects selected to
- * (ideally) exercise all HDF5 on disk data structures.
+ * Cycle of operation
*
- * Cycle of operation
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Set all cache image flags, forcing full functionality.
*
- * Set all cache image flags, forcing full functionality.
+ * 2) Create a process specific group.
*
- * 2) Create a process specific group.
+ * 3) Construct a "zoo" in the above group, and validate it.
*
- * 3) Construct a "zoo" in the above group, and validate it.
+ * 4) Close the file.
*
- * 4) Close the file.
+ * 5) Open the file with the cache image FAPL entry.
*
- * 5) Open the file with the cache image FAPL entry.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * 6) Validate the "zoo" created in the previous file open.
*
- * 6) Validate the "zoo" created in the previous file open.
+ * 7) Create a process specific group for this file open
*
- * 7) Create a process specific group for this file open
+ * 8) Construct a "zoo" in the above group, and validate it.
*
- * 8) Construct a "zoo" in the above group, and validate it.
- *
- * 9) Close the file.
+ * 9) Close the file.
*
- * If sufficient zoos have been created, continue to
+ * If sufficient zoos have been created, continue to
* 10). Otherwise goto 5)
*
- * 10) Open the file R/O.
+ * 10) Open the file R/O.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 11) Validate all the zoos.
+ * 11) Validate all the zoos.
*
- * 12) Close the file.
+ * 12) Close the file.
*
- * 13) Open the file.
+ * 13) Open the file.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 14) Validate all the zoos.
+ * 14) Validate all the zoos.
*
- * 15) Close the file.
+ * 15) Close the file.
*
- * 16) Open the file.
+ * 16) Open the file.
*
- * Verify that the file doesn't contain a metadata cache
- * image superblock extension message.
+ * Verify that the file doesn't contain a metadata cache
+ * image superblock extension message.
*
- * 17) Validate all the zoos.
+ * 17) Validate all the zoos.
*
- * 18) Close the file.
+ * 18) Close the file.
*
- * 19) Delete the file.
+ * 19) Delete the file.
*
* Return: void
*
@@ -4673,7 +4672,7 @@ cache_image_smoke_check_5(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4688,13 +4687,13 @@ cache_image_smoke_check_5(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
* Set flags forcing full function of the cache image feature.
*/
@@ -4705,8 +4704,8 @@ cache_image_smoke_check_5(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4714,7 +4713,7 @@ cache_image_smoke_check_5(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4723,22 +4722,22 @@ cache_image_smoke_check_5(void)
HDsprintf(process_group_name, "/process_%d", min_group);
- proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT,
+ proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
if ( proc_gid < 0 ) {
- pass = FALSE;
- failure_mssg = "H5Gcreate2() failed (1).\n";
+ pass = FALSE;
+ failure_mssg = "H5Gcreate2() failed (1).\n";
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Construct a "zoo" in the above group, and validate it. */
- if ( pass )
+ if ( pass )
create_zoo(file_id, process_group_name, min_group);
#if H5C_COLLECT_CACHE_STATS
@@ -4752,16 +4751,16 @@ cache_image_smoke_check_5(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 4) Close the file. */
if ( pass ) {
- if ( H5Gclose(proc_gid) < 0 ) {
-
+ if ( H5Gclose(proc_gid) < 0 ) {
+
pass = FALSE;
failure_mssg = "H5Gclose(proc_gid) failed. (1)";
}
@@ -4777,26 +4776,26 @@ cache_image_smoke_check_5(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ( ( pass ) && ( max_group < MAX_NUM_GROUPS ) )
{
-
- /* 5) Open the file.
+
+ /* 5) Open the file.
*
- * Verify that the metadata cache is instructed to load the
+ * Verify that the metadata cache is instructed to load the
* metadata cache image.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4804,13 +4803,13 @@ cache_image_smoke_check_5(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L1 cp = %d, max_group = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L1 cp = %d, max_group = %d, pass = %d.\n",
fcn_name, cp, max_group, pass);
/* 6) Validate the "zoo" created in the previous file open. */
- if ( pass )
+ if ( pass )
validate_zoo(file_id, process_group_name, max_group);
#if H5C_COLLECT_CACHE_STATS
@@ -4824,47 +4823,47 @@ cache_image_smoke_check_5(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
- HDfprintf(stdout, "%s:L2 cp = %d, max_group = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L2 cp = %d, max_group = %d, pass = %d.\n",
fcn_name, cp + 1, max_group, pass);
- /* 7) Create a process specific group for this file open */
+ /* 7) Create a process specific group for this file open */
if ( pass ) {
- max_group++;
+ max_group++;
HDsprintf(process_group_name, "/process_%d", max_group);
- proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT,
+ proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
if ( proc_gid < 0 ) {
- pass = FALSE;
- failure_mssg = "H5Gcreate2() failed (2).\n";
+ pass = FALSE;
+ failure_mssg = "H5Gcreate2() failed (2).\n";
}
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L3 cp = %d, max_group = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L3 cp = %d, max_group = %d, pass = %d.\n",
fcn_name, cp + 2, max_group, pass);
-
- /* 8) Construct a "zoo" in the above group, and validate it. */
- if ( pass )
+
+ /* 8) Construct a "zoo" in the above group, and validate it. */
+ if ( pass )
create_zoo(file_id, process_group_name, max_group);
- if ( show_progress )
- HDfprintf(stdout, "%s:L4 cp = %d, max_group = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L4 cp = %d, max_group = %d, pass = %d.\n",
fcn_name, cp + 3, max_group, pass);
-
+
/* 9) Close the file. */
if ( pass ) {
- if ( H5Gclose(proc_gid) < 0 ) {
-
+ if ( H5Gclose(proc_gid) < 0 ) {
+
pass = FALSE;
failure_mssg = "H5Gclose(process_gid) failed. (2)";
}
@@ -4880,24 +4879,24 @@ cache_image_smoke_check_5(void)
}
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L5 cp = %d, max_group = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L5 cp = %d, max_group = %d, pass = %d.\n",
fcn_name, cp + 4, max_group, pass);
} /* end while */
cp += 5;
-
- /* 10) Open the file read only.
+
+ /* 10) Open the file read only.
*
- * Verify that the file contains a metadata cache image
+ * Verify that the file contains a metadata cache image
* superblock extension message.
*/
if(pass) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4915,7 +4914,7 @@ cache_image_smoke_check_5(void)
HDsprintf(process_group_name, "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
-
+
#if H5C_COLLECT_CACHE_STATS
if( pass) {
if(cache_ptr->images_loaded == 0) {
@@ -4936,20 +4935,20 @@ cache_image_smoke_check_5(void)
}
}
- /* 13) Open the file R/W.
+ /* 13) Open the file R/W.
*
- * Verify that the file contains a metadata cache image
+ * Verify that the file contains a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4957,7 +4956,7 @@ cache_image_smoke_check_5(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4968,7 +4967,7 @@ cache_image_smoke_check_5(void)
HDsprintf(process_group_name, "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
-
+
#if H5C_COLLECT_CACHE_STATS
if ( pass ) {
@@ -4981,7 +4980,7 @@ cache_image_smoke_check_5(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4995,22 +4994,22 @@ cache_image_smoke_check_5(void)
failure_mssg = "H5Fclose() failed.\n";
}
}
-
-
- /* 16) Open the file.
+
+
+ /* 16) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5018,13 +5017,13 @@ cache_image_smoke_check_5(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 17) Validate all the zoos.
*
- * Verify that the metadata cache image superblock
+ * Verify that the metadata cache image superblock
* extension message has been deleted.
*/
i = min_group;
@@ -5032,7 +5031,7 @@ cache_image_smoke_check_5(void)
HDsprintf(process_group_name, "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
-
+
#if H5C_COLLECT_CACHE_STATS
if ( pass ) {
@@ -5045,7 +5044,7 @@ cache_image_smoke_check_5(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5060,9 +5059,9 @@ cache_image_smoke_check_5(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 19) Delete the file */
@@ -5086,78 +5085,78 @@ cache_image_smoke_check_5(void)
} /* cache_image_smoke_check_5() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_smoke_check_6()
*
* Purpose: As the free space manager metadata is now included in the
- * cache image, a smoke check to verify generally correct
- * behaviour of the persistent free space managers seems
- * prudent.
+ * cache image, a smoke check to verify generally correct
+ * behaviour of the persistent free space managers seems
+ * prudent.
*
- * The basic idea of this test is to construct a long
- * sequence of dataset creations and deletions, all separated
- * by file open/close cycles with cache image enabled. If the
- * perisistant free space managers are performing as expected,
- * the size of the file should stabilize.
+ * The basic idea of this test is to construct a long
+ * sequence of dataset creations and deletions, all separated
+ * by file open/close cycles with cache image enabled. If the
+ * perisistant free space managers are performing as expected,
+ * the size of the file should stabilize.
*
- * To implement this, proceed as outlined in the cycle of
- * operation below:
+ * To implement this, proceed as outlined in the cycle of
+ * operation below:
*
- * Cycle of operation
+ * Cycle of operation
*
- * 1) Create a HDF5 file with the cache image FAPL entry.
+ * 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image
- * FAPL entry.
+ * Verify that the cache is informed of the cache image
+ * FAPL entry.
*
- * Set all cache image flags, forcing full functionality.
+ * Set all cache image flags, forcing full functionality.
*
- * 2) Create and write a dataset in the file.
+ * 2) Create and write a dataset in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file with the cache image FAPL entry.
+ * 4) Open the file with the cache image FAPL entry.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 5) Create and write a new dataset.
+ * 5) Create and write a new dataset.
*
- * 6) Verify and delete the old dataset.
+ * 6) Verify and delete the old dataset.
*
- * 7) Close the file.
+ * 7) Close the file.
*
- * If sufficient datasets have been created, and then
- * deleteded continue to 8). Otherwise goto 4)
+ * If sufficient datasets have been created, and then
+ * deleteded continue to 8). Otherwise goto 4)
*
- * 8) Open the file.
+ * 8) Open the file.
*
- * Verify that the file contains a metadata cache
- * image superblock extension message.
+ * Verify that the file contains a metadata cache
+ * image superblock extension message.
*
- * 9) Verify the last dataset created.
+ * 9) Verify the last dataset created.
*
- * 10) Close the file.
+ * 10) Close the file.
*
- * 11) Open the file.
+ * 11) Open the file.
*
- * 12) Verify and delete the last dataset.
+ * 12) Verify and delete the last dataset.
*
- * Verify that a metadata cache image is not loaded.
+ * Verify that a metadata cache image is not loaded.
*
- * 13) Close the file.
+ * 13) Close the file.
*
- * 14) Get the size of the file. Verify that it is less
- * than 20 KB. Without deletions and persistent free
- * space managers, size size is about 167 MB, so this
- * is sufficient to verify that the persistent free
- * space managers are more or less doing their job.
+ * 14) Get the size of the file. Verify that it is less
+ * than 20 KB. Without deletions and persistent free
+ * space managers, size size is about 167 MB, so this
+ * is sufficient to verify that the persistent free
+ * space managers are more or less doing their job.
*
* Note that in the absence of paged allocation, file
* size gets below 1 KB.
*
- * 15) Delete the file.
+ * 15) Delete the file.
*
* Return: void
*
@@ -5185,7 +5184,7 @@ cache_image_smoke_check_6(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5200,13 +5199,13 @@ cache_image_smoke_check_6(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a HDF5 file with the cache image FAPL entry.
+ /* 1) Create a HDF5 file with the cache image FAPL entry.
*
- * Verify that the cache is informed of the cache image FAPL entry.
+ * Verify that the cache is informed of the cache image FAPL entry.
*
* Set flags forcing full function of the cache image feature.
*/
@@ -5217,8 +5216,8 @@ cache_image_smoke_check_6(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5226,10 +5225,10 @@ cache_image_smoke_check_6(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create a dataset in the file. */
if ( pass ) {
@@ -5248,10 +5247,10 @@ cache_image_smoke_check_6(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -5264,26 +5263,26 @@ cache_image_smoke_check_6(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ( ( pass ) && ( max_dset < MAX_NUM_DSETS ) )
{
-
- /* 4) Open the file.
+
+ /* 4) Open the file.
*
- * Verify that the metadata cache is instructed to load the
+ * Verify that the metadata cache is instructed to load the
* metadata cache image.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5291,11 +5290,11 @@ cache_image_smoke_check_6(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp, max_dset, pass);
-
+
/* 5) Create a dataset in the file. */
if ( pass ) {
@@ -5314,22 +5313,22 @@ cache_image_smoke_check_6(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
- HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 1, max_dset, pass);
- /* 6) Verify and delete the old dataset. */
- if ( pass ) {
+ /* 6) Verify and delete the old dataset. */
+ if ( pass ) {
- delete_datasets(file_id, min_dset - 2, max_dset - 2);
- }
+ delete_datasets(file_id, min_dset - 2, max_dset - 2);
+ }
- if ( show_progress )
- HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 2, max_dset, pass);
-
+
/* 7) Close the file. */
if ( pass ) {
@@ -5342,27 +5341,27 @@ cache_image_smoke_check_6(void)
}
}
- if ( show_progress )
- HDfprintf(stdout, "%s:L4 cp = %d, max_dset = %d, pass = %d.\n",
+ if ( show_progress )
+ HDfprintf(stdout, "%s:L4 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 3, max_dset, pass);
} /* end while */
cp += 4;
-
-
- /* 8) Open the file.
+
+
+ /* 8) Open the file.
*
- * Verify that the file contains a metadata cache image
+ * Verify that the file contains a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5370,10 +5369,10 @@ cache_image_smoke_check_6(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 9) Verify the last dataset created. */
if ( pass ) {
@@ -5393,7 +5392,7 @@ cache_image_smoke_check_6(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5407,22 +5406,22 @@ cache_image_smoke_check_6(void)
failure_mssg = "H5Fclose() failed.\n";
}
}
-
-
- /* 11) Open the file.
+
+
+ /* 11) Open the file.
*
- * Verify that the file doesn't contain a metadata cache image
+ * Verify that the file doesn't contain a metadata cache image
* superblock extension message.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5430,13 +5429,13 @@ cache_image_smoke_check_6(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Verify and delete the last dataset.
*
- * Verify that a metadata cache image is not loaded.
+ * Verify that a metadata cache image is not loaded.
*/
if ( pass ) {
@@ -5455,7 +5454,7 @@ cache_image_smoke_check_6(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
-
+
/* 13) Close the file. */
@@ -5468,7 +5467,7 @@ cache_image_smoke_check_6(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5479,7 +5478,7 @@ cache_image_smoke_check_6(void)
* space managers are more or less doing their job.
*
* Note that in the absence of paged allocation, file
- * size gets below 1 KB, but since this test is run both
+ * size gets below 1 KB, but since this test is run both
* with and without paged allocation, we must leave some
* extra space for the paged allocation case.
*/
@@ -5493,9 +5492,9 @@ cache_image_smoke_check_6(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 15) Delete the file */
if ( pass ) {
@@ -5518,56 +5517,56 @@ cache_image_smoke_check_6(void)
} /* cache_image_smoke_check_6() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_api_error_check_1()
*
* Purpose: This test is one of a sequence of tests intended
- * to verify correct management of API errors.
+ * to verify correct management of API errors.
*
- * The object of this test is to verify that a file without
- * a pre-existing cache image that is opened both read only
- * and with a cache image requested is handle correctly
- * (the cache image request should be ignored silently).
+ * The object of this test is to verify that a file without
+ * a pre-existing cache image that is opened both read only
+ * and with a cache image requested is handle correctly
+ * (the cache image request should be ignored silently).
*
- * The test is set up as follows:
+ * The test is set up as follows:
*
- * 1) Create a HDF5 file.
+ * 1) Create a HDF5 file.
*
- * 2) Create some datasets in the file.
+ * 2) Create some datasets in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file read only with a cache image FAPL entry
- * requested.
+ * 4) Open the file read only with a cache image FAPL entry
+ * requested.
*
- * 5) Open a dataset.
+ * 5) Open a dataset.
*
- * Verify that it contains the expected data
+ * Verify that it contains the expected data
*
- * Verify that the cache image was not loaded.
+ * Verify that the cache image was not loaded.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file read only.
+ * 7) Open the file read only.
*
- * 8) Open a dataset.
+ * 8) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * Verify that the cache image was not loaded.
+ * Verify that the cache image was not loaded.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Open the file read write.
+ * 10) Open the file read write.
*
- * 11) Open a dataset.
+ * 11) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * 12) Close the file.
+ * 12) Close the file.
*
- * 13) Delete the file.
+ * 13) Delete the file.
*
* Return: void
*
@@ -5592,7 +5591,7 @@ cache_image_api_error_check_1(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5607,7 +5606,7 @@ cache_image_api_error_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5619,8 +5618,8 @@ cache_image_api_error_check_1(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5628,10 +5627,10 @@ cache_image_api_error_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets in the file. */
if ( pass ) {
@@ -5652,10 +5651,10 @@ cache_image_api_error_check_1(void)
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -5668,20 +5667,20 @@ cache_image_api_error_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 4) Open the file read only with a cache image FAPL entry requested. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ TRUE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5689,10 +5688,10 @@ cache_image_api_error_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -5716,9 +5715,9 @@ cache_image_api_error_check_1(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
@@ -5731,20 +5730,20 @@ cache_image_api_error_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 7) Open the file read only. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5752,10 +5751,10 @@ cache_image_api_error_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 8) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -5780,7 +5779,7 @@ cache_image_api_error_check_1(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5795,20 +5794,20 @@ cache_image_api_error_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Open the file read / write. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5816,9 +5815,9 @@ cache_image_api_error_check_1(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 11) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -5842,9 +5841,9 @@ cache_image_api_error_check_1(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 12) Close the file. */
@@ -5857,9 +5856,9 @@ cache_image_api_error_check_1(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 13) Delete the file */
@@ -5882,68 +5881,68 @@ cache_image_api_error_check_1(void)
} /* cache_image_api_error_check_1() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_api_error_check_2()
*
* Purpose: This test is one of a sequence of tests intended
- * to verify correct management of API errors.
+ * to verify correct management of API errors.
*
- * The object of this test is to verify that a file with
- * a pre-existing cache image that is opened both read only
- * and with a cache image requested is handled correctly
- * (the cache image request should be ignored silently).
+ * The object of this test is to verify that a file with
+ * a pre-existing cache image that is opened both read only
+ * and with a cache image requested is handled correctly
+ * (the cache image request should be ignored silently).
*
- * The test is set up as follows:
+ * The test is set up as follows:
*
- * 1) Create a HDF5 file with a cache image requested..
+ * 1) Create a HDF5 file with a cache image requested..
*
- * 2) Create some datasets in the file.
+ * 2) Create some datasets in the file.
*
- * 3) Close the file.
+ * 3) Close the file.
*
- * 4) Open the file read only with a cache image FAPL entry
- * requested.
+ * 4) Open the file read only with a cache image FAPL entry
+ * requested.
*
- * 5) Open a dataset.
+ * 5) Open a dataset.
*
- * Verify that it contains the expected data
+ * Verify that it contains the expected data
*
- * Verify that the cache image was loaded.
+ * Verify that the cache image was loaded.
*
- * 6) Close the file.
+ * 6) Close the file.
*
- * 7) Open the file read only.
+ * 7) Open the file read only.
*
- * 8) Open a dataset.
+ * 8) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * Verify that the cache image was loaded.
+ * Verify that the cache image was loaded.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Open the file read write.
+ * 10) Open the file read write.
*
- * 11) Open a dataset.
+ * 11) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * Verify that the cache image was loaded.
+ * Verify that the cache image was loaded.
*
- * 12) Close the file.
+ * 12) Close the file.
*
- * 13) Open the file read write.
+ * 13) Open the file read write.
*
- * 14) Open a dataset.
+ * 14) Open a dataset.
*
- * Verify that it contains the expected data.
+ * Verify that it contains the expected data.
*
- * Verify that the cache image was NOT loaded.
+ * Verify that the cache image was NOT loaded.
*
- * 15) Close the file.
+ * 15) Close the file.
*
- * 16) Delete the file.
+ * 16) Delete the file.
*
* Return: void
*
@@ -5968,7 +5967,7 @@ cache_image_api_error_check_2(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5983,7 +5982,7 @@ cache_image_api_error_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5995,8 +5994,8 @@ cache_image_api_error_check_2(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6004,10 +6003,10 @@ cache_image_api_error_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Create some datasets in the file. */
if ( pass ) {
@@ -6028,10 +6027,10 @@ cache_image_api_error_check_2(void)
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 3) Close the file. */
if ( pass ) {
@@ -6044,20 +6043,20 @@ cache_image_api_error_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 4) Open the file read only with a cache image FAPL entry requested. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6065,10 +6064,10 @@ cache_image_api_error_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -6092,9 +6091,9 @@ cache_image_api_error_check_2(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Close the file. */
@@ -6107,20 +6106,20 @@ cache_image_api_error_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 7) Open the file read only. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -6128,10 +6127,10 @@ cache_image_api_error_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 8) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -6156,7 +6155,7 @@ cache_image_api_error_check_2(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6171,20 +6170,20 @@ cache_image_api_error_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Open the file read / write. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
+ /* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6192,9 +6191,9 @@ cache_image_api_error_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 11) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -6218,9 +6217,9 @@ cache_image_api_error_check_2(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 12) Close the file. */
@@ -6233,7 +6232,7 @@ cache_image_api_error_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6242,11 +6241,11 @@ cache_image_api_error_check_2(void)
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6254,9 +6253,9 @@ cache_image_api_error_check_2(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 14) Open and close a dataset.
*
* Verify that it contains the expected data.
@@ -6280,9 +6279,9 @@ cache_image_api_error_check_2(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 15) Close the file. */
@@ -6295,9 +6294,9 @@ cache_image_api_error_check_2(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 13) Delete the file */
@@ -6320,36 +6319,36 @@ cache_image_api_error_check_2(void)
} /* cache_image_api_error_check_2() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_api_error_check_3()
*
* Purpose: This test is one of a sequence of tests intended
- * to verify correct management of API errors.
+ * to verify correct management of API errors.
*
- * At present, SWMR and cache image may not be active
- * at the same time. The purpose of this test is to
- * verify that attempts to run SWMR and cache image
- * at the same time will fail.
+ * At present, SWMR and cache image may not be active
+ * at the same time. The purpose of this test is to
+ * verify that attempts to run SWMR and cache image
+ * at the same time will fail.
*
- * The test is set up as follows:
+ * The test is set up as follows:
*
- * 1) Create a HDF5 file with a cache image requested..
+ * 1) Create a HDF5 file with a cache image requested..
*
- * 2) Try to start SWMR write -- should fail.
+ * 2) Try to start SWMR write -- should fail.
*
* 3) Discard the file if necessary
*
- * 4) Attempt to create a HDF5 file with SWMR write
- * access and cache image requested -- should fail.
+ * 4) Attempt to create a HDF5 file with SWMR write
+ * access and cache image requested -- should fail.
*
* 5) Discard the file if necessary
*
* 6) Create a HDF5 file with a cache image requested.
*
- * 7) Create some datasets in the file.
+ * 7) Create some datasets in the file.
*
- * 8) Close the file.
+ * 8) Close the file.
*
* 9) Attempt to open the file with SWMR write access --
* should fail.
@@ -6379,7 +6378,7 @@ cache_image_api_error_check_3(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6394,7 +6393,7 @@ cache_image_api_error_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6406,8 +6405,8 @@ cache_image_api_error_check_3(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6415,9 +6414,9 @@ cache_image_api_error_check_3(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 2) Try to start SWMR write -- should fail. */
@@ -6432,9 +6431,9 @@ cache_image_api_error_check_3(void)
} H5E_END_TRY;
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 3) Discard the file if necessary */
@@ -6454,19 +6453,19 @@ cache_image_api_error_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 4) Attempt to create a HDF5 file with SWMR write
+
+ /* 4) Attempt to create a HDF5 file with SWMR write
* access and cache image requested -- should fail.
*/
-
+
attempt_swmr_open_hdf5_file(/* create_file */ TRUE,
- /* set_mdci_fapl */ TRUE,
+ /* set_mdci_fapl */ TRUE,
/* hdf_file_name */ filename);
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6474,16 +6473,16 @@ cache_image_api_error_check_3(void)
if ( pass ) {
- /* file probably doesn't exist, so don't
+ /* file probably doesn't exist, so don't
* error check the remove call.
*/
HDremove(filename);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Create a HDF5 file with a cache image requested. */
if ( pass ) {
@@ -6492,8 +6491,8 @@ cache_image_api_error_check_3(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6501,10 +6500,10 @@ cache_image_api_error_check_3(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Create some datasets in the file. */
if ( pass ) {
@@ -6523,9 +6522,9 @@ cache_image_api_error_check_3(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 8) Close the file. */
@@ -6539,20 +6538,20 @@ cache_image_api_error_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 9) Attempt to open the file with SWMR write access -- should fail. */
-
+
attempt_swmr_open_hdf5_file(/* create_file */ FALSE,
- /* set_mdci_fapl */ TRUE,
+ /* set_mdci_fapl */ TRUE,
/* hdf_file_name */ filename);
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Discard the file if necessary. */
if ( pass ) {
@@ -6564,7 +6563,7 @@ cache_image_api_error_check_3(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6578,67 +6577,67 @@ cache_image_api_error_check_3(void)
} /* cache_image_api_error_check_3() */
-
+
/*-------------------------------------------------------------------------
* Function: cache_image_api_error_check_4()
*
* Purpose: This test is one of a sequence of tests intended
- * to verify correct management of API errors.
+ * to verify correct management of API errors.
*
- * The object of this test is to verify that a request for
- * a cache image when a version 2 superblock is not available/
- * not requested is handled correctly.
- * (the cache image request should be ignored silently).
+ * The object of this test is to verify that a request for
+ * a cache image when a version 2 superblock is not available/
+ * not requested is handled correctly.
+ * (the cache image request should be ignored silently).
*
- * The test is set up as follows:
+ * The test is set up as follows:
*
- * 1) Create a FAPL requesting a cache image, but WITHOUT
- * specifying the latest file format.
+ * 1) Create a FAPL requesting a cache image, but WITHOUT
+ * specifying the latest file format.
*
- * 2) Create a HDF5 file using the above FAPL.
+ * 2) Create a HDF5 file using the above FAPL.
*
- * 3) Create some datasets in the file.
+ * 3) Create some datasets in the file.
*
- * 4) Close the file.
+ * 4) Close the file.
*
- * 5) Open the file read only. Verify that the file doesn't
- * contain a cache image.
+ * 5) Open the file read only. Verify that the file doesn't
+ * contain a cache image.
*
- * 6) Verify that the datasets exist and contain the
- * expected data
+ * 6) Verify that the datasets exist and contain the
+ * expected data
*
- * Verify that the cache image was not loaded.
+ * Verify that the cache image was not loaded.
*
- * 7) Close the file.
+ * 7) Close the file.
*
- * 8) Open the file R/W using the FAPL defined in 1) above.
- * Verify that the file does not contain a cache image.
+ * 8) Open the file R/W using the FAPL defined in 1) above.
+ * Verify that the file does not contain a cache image.
*
- * 9) Close the file.
+ * 9) Close the file.
*
- * 10) Open the file R/W using the FAPL defined in 1) above.
- * Verify that the file does not contain a cache image.
+ * 10) Open the file R/W using the FAPL defined in 1) above.
+ * Verify that the file does not contain a cache image.
*
- * 11) Verify that the data sets contain the expected data
+ * 11) Verify that the data sets contain the expected data
*
- * Verify that a cache image was not loaded.
+ * Verify that a cache image was not loaded.
*
- * 12) Create several more data sets.
+ * 12) Create several more data sets.
*
- * 13) Close the file.
+ * 13) Close the file.
*
- * 14) Open the file read write.
- *
- * Verify that the file does not contain a cache image.
+ * 14) Open the file read write.
*
- * 15) Verify the data sets exist and contain the expected
- * data.
+ * Verify that the file does not contain a cache image.
*
- * Verify that a cache image was not loaded.
+ * 15) Verify the data sets exist and contain the expected
+ * data.
*
- * 16) Close the file.
+ * Verify that a cache image was not loaded.
*
- * 17) Delete the file.
+ * 16) Close the file.
+ *
+ * 17) Delete the file.
*
* Return: void
*
@@ -6665,7 +6664,7 @@ cache_image_api_error_check_4(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6680,11 +6679,11 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 1) Create a FAPL requesting a cache image, but WITHOUT
- * specifying the latest file format.
+ /* 1) Create a FAPL requesting a cache image, but WITHOUT
+ * specifying the latest file format.
*/
if ( pass ) {
@@ -6697,7 +6696,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -6715,7 +6714,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6743,7 +6742,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
@@ -6762,10 +6761,10 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 3) Create some datasets in the file. */
if ( pass ) {
@@ -6786,10 +6785,10 @@ cache_image_api_error_check_4(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 4) Close the file. */
if ( pass ) {
@@ -6802,20 +6801,20 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 5) Open the file read only. */
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6823,11 +6822,11 @@ cache_image_api_error_check_4(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 6) Verify that the datasets exist and contain the
+
+
+ /* 6) Verify that the datasets exist and contain the
* expected data
*/
@@ -6847,9 +6846,9 @@ cache_image_api_error_check_4(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Close the file. */
@@ -6862,11 +6861,11 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
- /* 8) Open the file R/W using the FAPL defined in 1) above.
+
+
+ /* 8) Open the file R/W using the FAPL defined in 1) above.
*
* Verify that the file does not contain a cache image.
*/
@@ -6893,7 +6892,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
@@ -6912,7 +6911,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -6925,7 +6924,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6940,9 +6939,9 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Open the file R/W using the FAPL defined in 1) above.
@@ -6971,7 +6970,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
@@ -6990,7 +6989,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7003,7 +7002,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7028,7 +7027,7 @@ cache_image_api_error_check_4(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7039,7 +7038,7 @@ cache_image_api_error_check_4(void)
create_datasets(file_id, 6, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7054,23 +7053,23 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 14) Open the file read write.
- *
+ *
* Verify that the file does not contain a cache image.
*/
if ( pass ) {
open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7078,10 +7077,10 @@ cache_image_api_error_check_4(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
-
+
+
/* 15) Verify the data sets exist and contain the expected data.
*
* Verify that a cache image was not loaded.
@@ -7103,7 +7102,7 @@ cache_image_api_error_check_4(void)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7118,9 +7117,9 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 17) Delete the file */
@@ -7133,7 +7132,7 @@ cache_image_api_error_check_4(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7152,36 +7151,36 @@ cache_image_api_error_check_4(void)
} /* cache_image_api_error_check_4() */
-
+
/*-------------------------------------------------------------------------
* Function: get_free_sections_test()
*
* Purpose: It is possible that H5Fget_free_sections() to be
- * called before any activity on the metadata cache.
- * This is a potential problem, as satisfying the
- * H5Fget_free_sections() call requires access to all
- * free space managers. When persistent free space
+ * called before any activity on the metadata cache.
+ * This is a potential problem, as satisfying the
+ * H5Fget_free_sections() call requires access to all
+ * free space managers. When persistent free space
* managers are enabled, this will require calling
- * H5MF_tidy_self_referential_fsm_hack(). This is a
+ * H5MF_tidy_self_referential_fsm_hack(). This is a
* non issue in the absence of a cache image. However,
- * this is a problem if a cache image exists, as
- * the call to H5MF_tidy_self_referential_fsm_hack()
- * will free the file space allocated to the cache
- * image.
- *
- * The objective of this test is to create a test file
- * with both non-empty self referential presistant
- * free space managers, and a cache image, and then
- * verify that this situation is handled correctly if
+ * this is a problem if a cache image exists, as
+ * the call to H5MF_tidy_self_referential_fsm_hack()
+ * will free the file space allocated to the cache
+ * image.
+ *
+ * The objective of this test is to create a test file
+ * with both non-empty self referential presistant
+ * free space managers, and a cache image, and then
+ * verify that this situation is handled correctly if
* H5Fget_free_sections() is called before the metadata
* cache image is loaded.
*
- * The test is set up as follows:
+ * The test is set up as follows:
*
- * 1) Create a HDF5 file with a cache image requested
- * and persistent free space managers enabled.
+ * 1) Create a HDF5 file with a cache image requested
+ * and persistent free space managers enabled.
*
- * 2) Create some data sets, and then delete some of
+ * 2) Create some data sets, and then delete some of
* of those near the beginning of the file.
*
* 3) Close the file.
@@ -7192,12 +7191,12 @@ cache_image_api_error_check_4(void)
* been loaded.
*
* 6) Verify that one or more self referential FSMs
- * have been stored at the end of the file just
+ * have been stored at the end of the file just
* before the cache image.
*
* 7) Call H5Fget_free_sections().
*
- * 8) Verify that the cache image has been loaded and
+ * 8) Verify that the cache image has been loaded and
* that the self referential FSMs have been floated.
*
* 9) Verify that the remaining data sets contain the
@@ -7211,12 +7210,12 @@ cache_image_api_error_check_4(void)
* been loaded.
*
* 13) Verify that one or more self referential FSMs
- * have been stored at the end of the file just
+ * have been stored at the end of the file just
* before the cache image.
*
* 14) Call H5Fget_free_sections().
*
- * 15) Verify that the cache image has been loaded and
+ * 15) Verify that the cache image has been loaded and
* that the self referential FSMs have been floated.
*
* 16) Verify that the remaining data sets contain the
@@ -7224,7 +7223,7 @@ cache_image_api_error_check_4(void)
*
* 17) Delete the remaining data sets.
*
- * 18) Close the file.
+ * 18) Close the file.
*
* 19) Verify that file space has been reclaimed.
*
@@ -7253,7 +7252,7 @@ get_free_sections_test(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7268,12 +7267,12 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with a cache image requested
- * and persistent free space managers enabled.
+ * and persistent free space managers enabled.
*/
if ( pass ) {
@@ -7282,8 +7281,8 @@ get_free_sections_test(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7291,11 +7290,11 @@ get_free_sections_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
- /* 2) Create some data sets, and then delete some of
+ /* 2) Create some data sets, and then delete some of
* of those near the beginning of the file.
*/
@@ -7304,7 +7303,7 @@ get_free_sections_test(void)
create_datasets(file_id, 1, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7312,7 +7311,7 @@ get_free_sections_test(void)
verify_datasets(file_id, 1, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7320,10 +7319,10 @@ get_free_sections_test(void)
delete_datasets(file_id, 1, 5);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 3) Close the file. */
if ( pass ) {
@@ -7336,10 +7335,10 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 4) Open the file read only. */
if ( pass ) {
@@ -7348,8 +7347,8 @@ get_free_sections_test(void)
/* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7357,10 +7356,10 @@ get_free_sections_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 5) Verify that a cache image exists, and has not been loaded. */
if ( pass ) {
@@ -7373,18 +7372,18 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Verify that one or more self referential FSMs
- * have been stored at the end of the file just
+ * have been stored at the end of the file just
* before the cache image.
*/
if ( pass ) {
- /* file_ptr->shared->first_alloc_dealloc is set to FALSE if the
+ /* file_ptr->shared->first_alloc_dealloc is set to FALSE if the
* file is opened R/O.
*/
if ( ( file_ptr->shared->first_alloc_dealloc ) ||
@@ -7398,15 +7397,15 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Call H5Fget_free_sections(). */
if ( pass ) {
- if ( H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL)
+ if ( H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL)
< 0 ){
pass = FALSE;
@@ -7414,11 +7413,11 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 8) Verify that the cache image has been loaded and
+
+ /* 8) Verify that the cache image has been loaded and
* that the self referential FSMs have been floated.
*/
if ( pass ) {
@@ -7435,7 +7434,7 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7446,10 +7445,10 @@ get_free_sections_test(void)
verify_datasets(file_id, 6, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 10) Close the file. */
if ( pass ) {
@@ -7461,10 +7460,10 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 11) Open the file R/W. */
if ( pass ) {
@@ -7473,8 +7472,8 @@ get_free_sections_test(void)
/* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7482,10 +7481,10 @@ get_free_sections_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 12) Verify that a cache image exists, and has not been loaded. */
if ( pass ) {
@@ -7498,12 +7497,12 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 13) Verify that one or more self referential FSMs
- * have been stored at the end of the file just
+ * have been stored at the end of the file just
* before the cache image.
*/
if ( pass ) {
@@ -7519,15 +7518,15 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 14) Call H5Fget_free_sections(). */
if ( pass ) {
- if ( H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL)
+ if ( H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL)
< 0 ){
pass = FALSE;
@@ -7535,11 +7534,11 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
- /* 15) Verify that the cache image has been loaded and
+
+ /* 15) Verify that the cache image has been loaded and
* that the self referential FSMs have been floated.
*/
if ( pass ) {
@@ -7556,7 +7555,7 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7567,10 +7566,10 @@ get_free_sections_test(void)
verify_datasets(file_id, 6, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 17) Delete the remaining data sets. */
if ( pass ) {
@@ -7578,10 +7577,10 @@ get_free_sections_test(void)
delete_datasets(file_id, 6, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 18) Close the file. */
if ( pass ) {
@@ -7593,7 +7592,7 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7613,10 +7612,10 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 20) Discard the file. */
if ( pass ) {
@@ -7628,7 +7627,7 @@ get_free_sections_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -7641,40 +7640,40 @@ get_free_sections_test(void)
} /* get_free_sections_test() */
-
+
/*-------------------------------------------------------------------------
* Function: evict_on_close_test()
*
- * Purpose: If a file containing a cache image which in turn
- * contains dirty entries is opened R/O, the metadata
- * cache must refuse to evict the dirty entries, as
+ * Purpose: If a file containing a cache image which in turn
+ * contains dirty entries is opened R/O, the metadata
+ * cache must refuse to evict the dirty entries, as
* it will not be able to reload them from file. This
* is a bit tricky, as the dirty entries must marked as
- * clean in the metadata cache so that the MDC will not
+ * clean in the metadata cache so that the MDC will not
* attempt to flush then on file close.
*
- * The objective of this test is to verify that the
+ * The objective of this test is to verify that the
* metadata will not evict dirty entries in the above
* context when the file is opened with the evict on close
* FAPL entry.
*
- * Do this by creating a HDF5 file with a cache image
- * containing dirty metadata.
+ * Do this by creating a HDF5 file with a cache image
+ * containing dirty metadata.
*
- * Then close the file, re-open it R/O, and scan its
+ * Then close the file, re-open it R/O, and scan its
* contents twice. If evict on close succeeds in evicting
- * the dirty metadata, the second scan will fail, as valid
+ * the dirty metadata, the second scan will fail, as valid
* versions of the dirty metadata will not be available.
*
- * To make the test more useful, enable persistent free
+ * To make the test more useful, enable persistent free
* space managers.
*
- * The test is set up as follows:
+ * The test is set up as follows:
*
- * 1) Create a HDF5 file without a cache image requested
- * and persistent free space managers enabled.
+ * 1) Create a HDF5 file without a cache image requested
+ * and persistent free space managers enabled.
*
- * 2) Create some data sets and verify them.
+ * 2) Create some data sets and verify them.
*
* 3) Close the file.
*
@@ -7733,7 +7732,7 @@ evict_on_close_test(void)
pass = TRUE;
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7748,12 +7747,12 @@ evict_on_close_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file without a cache image requested
- * and persistent free space managers enabled.
+ * and persistent free space managers enabled.
*/
if ( pass ) {
@@ -7761,8 +7760,8 @@ evict_on_close_test(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ TRUE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7770,7 +7769,7 @@ evict_on_close_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7781,7 +7780,7 @@ evict_on_close_test(void)
create_datasets(file_id, 1, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7789,10 +7788,10 @@ evict_on_close_test(void)
verify_datasets(file_id, 1, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 3) Close the file. */
if ( pass ) {
@@ -7805,10 +7804,10 @@ evict_on_close_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 4) Open the file R/W, and with cache image requested. */
if ( pass ) {
@@ -7817,8 +7816,8 @@ evict_on_close_test(void)
/* mdci_sbem_expected */ FALSE,
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7826,7 +7825,7 @@ evict_on_close_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7840,10 +7839,10 @@ evict_on_close_test(void)
verify_datasets(file_id, 1, 10);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 6) Create some more datasets and verify them */
if ( pass ) {
@@ -7851,7 +7850,7 @@ evict_on_close_test(void)
create_datasets(file_id, 11, 20);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7864,15 +7863,15 @@ evict_on_close_test(void)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDfprintf(stdout, "index size / index dirty size = %lld / %lld\n",
+ HDfprintf(stdout, "index size / index dirty size = %lld / %lld\n",
(long long)(cache_ptr->index_size),
(long long)(cache_ptr->dirty_index_size));
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 7) Close the file. */
if ( pass ) {
@@ -7884,10 +7883,10 @@ evict_on_close_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 8) Open the file R/O and with evict on close enabled. */
if ( pass ) {
@@ -7896,8 +7895,8 @@ evict_on_close_test(void)
/* mdci_sbem_expected */ TRUE,
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ TRUE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ TRUE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7905,7 +7904,7 @@ evict_on_close_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s*: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7916,7 +7915,7 @@ evict_on_close_test(void)
verify_datasets(file_id, 1, 20);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7924,7 +7923,7 @@ evict_on_close_test(void)
verify_datasets(file_id, 1, 20);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7939,10 +7938,10 @@ evict_on_close_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
-
+
/* 11) Open the file R/w and with evict on close enabled. */
if ( pass ) {
@@ -7951,8 +7950,8 @@ evict_on_close_test(void)
/* mdci_sbem_expected */ TRUE,
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ TRUE,
+ /* config_fsm */ FALSE,
+ /* set_eoc */ TRUE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7960,7 +7959,7 @@ evict_on_close_test(void)
/* cache_ptr_ptr */ &cache_ptr);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s*: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7971,7 +7970,7 @@ evict_on_close_test(void)
verify_datasets(file_id, 1, 20);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) {
@@ -7979,7 +7978,7 @@ evict_on_close_test(void)
verify_datasets(file_id, 1, 20);
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7994,7 +7993,7 @@ evict_on_close_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -8009,7 +8008,7 @@ evict_on_close_test(void)
}
}
- if ( show_progress )
+ if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -8023,7 +8022,7 @@ evict_on_close_test(void)
} /* evict_on_close_test() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 6c65280..77554fd 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -15,7 +15,7 @@
*
* This file contains tests for metadata tagging.
*/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
#include "H5Fpkg.h"
@@ -29,16 +29,16 @@
/* Test Defines */
/* ============ */
-#define FILENAME "tagging_test.h5"
-#define FILENAME2 "tagging_ext_test.h5"
-#define GROUPNAME "Group"
+#define FILENAME "tagging_test.h5"
+#define FILENAME2 "tagging_ext_test.h5"
+#define GROUPNAME "Group"
#define GROUPNAMEPATH "/Group"
#define GROUPNAMECOPY "GroupCopy"
-#define ATTRNAME "Attribute 1"
-#define ATTRNAME3 "Attribute 3"
-#define DATASETNAME "Dataset"
-#define DATASETNAME2 "Dataset2"
-#define LINKNAME "Link"
+#define ATTRNAME "Attribute 1"
+#define ATTRNAME3 "Attribute 3"
+#define DATASETNAME "Dataset"
+#define DATASETNAME2 "Dataset2"
+#define LINKNAME "Link"
#define RANK 2
#define DIMS 32
@@ -47,7 +47,7 @@
#define TEST_DEFAULT 0
#define TEST_SHMESG 1
#define NUM_TEST_TYPES 2
-
+
/* ===================== */
/* Function Declarations */
/* ===================== */
@@ -98,7 +98,7 @@ static unsigned check_invalid_tag_application(void);
#ifndef NDEBUG
-
+
/*-------------------------------------------------------------------------
* Function: dump_cache()
*
@@ -127,19 +127,19 @@ static int dump_cache(hid_t fid)
TEST_ERROR;
return 0;
-
+
error:
return -1;
} /* dump_cache */
#endif /* NDEBUG */ /* end debugging functions */
-
+
/*-------------------------------------------------------------------------
* Function: verify_no_unknown_tags()
*
* Purpose: Verifies that all tags in the provided cache have the
- * 'dirtied' flag set. Other verification functions in this
- * test file set this flag after checking them, so
+ * 'dirtied' flag set. Other verification functions in this
+ * test file set this flag after checking them, so
* this is handy to verify that tests have checked all entries
* in the cache.
*
@@ -181,7 +181,7 @@ error:
return -1;
} /* verify_no_unknown_tags */
-
+
/*-------------------------------------------------------------------------
* Function: mark_all_entries_investigated()
*
@@ -229,7 +229,7 @@ error:
return -1;
} /* mark_all_entries_investigated */
-
+
/*-------------------------------------------------------------------------
* Function: reset_all_entries_investigated()
*
@@ -275,15 +275,15 @@ error:
return -1;
} /* reset_all_entries_investigated */
-
+
/*-------------------------------------------------------------------------
* Function: verify_tag()
*
* Purpose: Asserts that there is an entry in the specified cache with
* the provided entry id and provided tag. The function will
- * fail if this is not the case. If found, this function will
- * set the entry's flush_marker flag, so future verification
- * attempts can skip over this entry, knowing it has already been
+ * fail if this is not the case. If found, this function will
+ * set the entry's flush_marker flag, so future verification
+ * attempts can skip over this entry, knowing it has already been
* checked.
*
* Return: 0 on Success, -1 on Failure
@@ -327,7 +327,7 @@ verify_tag(hid_t fid, int id, haddr_t tag)
/* Didn't find the tagged entry, throw an error */
TEST_ERROR;
-
+
done:
return 0;
@@ -358,7 +358,7 @@ error:
return -1;
} /* evict entries */
-
+
/*-------------------------------------------------------------------------
* Function: get_object_header_tag()
*
@@ -389,7 +389,7 @@ error:
return -1;
} /* get_object_header_tag */
-
+
/*-------------------------------------------------------------------------
* Function: get_sbe_tag()
*
@@ -420,7 +420,7 @@ error:
/* Test Functions */
/* ============== */
-
+
/*-------------------------------------------------------------------------
* Function: check_file_creation_tags
*
@@ -434,7 +434,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_file_creation_tags(hid_t fcpl_id, int type)
{
/* Variable Declarations */
@@ -501,7 +501,7 @@ error:
return 1;
} /* check_file_creation_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_file_open_tags
*
@@ -515,7 +515,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_file_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -539,12 +539,12 @@ check_file_open_tags(hid_t fcpl, int type)
/* Retrieve various tags */
if ( type == TEST_SHMESG ) {
-
+
/* determine tag value of superblock extension object header */
if ( get_sbe_tag(fid, &sbe_tag) < 0 ) TEST_ERROR;
} /* end if */
-
+
/* Close the file */
if ( H5Fclose(fid) < 0 ) TEST_ERROR;
@@ -607,7 +607,7 @@ error:
return 1;
} /* check_file_open_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_group_creation_tags
*
@@ -621,7 +621,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_group_creation_tags(void)
{
/* Variable Declarations */
@@ -633,7 +633,7 @@ check_group_creation_tags(void)
/* Testing Macro */
TESTING("tag application during group creation");
-
+
/* ===== */
/* Setup */
/* ===== */
@@ -665,7 +665,7 @@ check_group_creation_tags(void)
/* if verbose, print cache index to screen for visual verification */
if ( verbose ) dump_cache(fid);
#endif /* NDEBUG */ /* end debugging functions */
-
+
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_SNODE_ID, root_tag) < 0 ) TEST_ERROR;
@@ -702,7 +702,7 @@ error:
return 1;
} /* check_group_creation_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_multi_group_creation_tags
*
@@ -716,7 +716,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_multi_group_creation_tags(void)
{
/* Variable Declarations */
@@ -829,7 +829,7 @@ error:
return 1;
} /* check_multi_group_creation_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_link_iteration_tags
*
@@ -843,7 +843,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_link_iteration_tags(void)
{
/* Variable Declarations */
@@ -941,7 +941,7 @@ error:
return 1;
} /* check_link_iteration_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dense_attribute_tags
*
@@ -955,7 +955,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dense_attribute_tags(void)
{
/* Variable Declarations */
@@ -969,7 +969,7 @@ check_dense_attribute_tags(void)
hid_t fapl = -1; /* File access property list */
haddr_t d_tag = 0; /* Dataset tag value */
haddr_t root_tag = 0; /* Root group tag value */
- char attrname[500]; /* Name of attribute */
+ char attrname[500]; /* Name of attribute */
/* Testing Macro */
TESTING("tag application during dense attribute manipulation");
@@ -995,10 +995,10 @@ check_dense_attribute_tags(void)
/* Create dataset */
if ( (did = H5Dcreate2(fid, DATASETNAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0 ) TEST_ERROR;
if ( H5Pclose(dcpl) < 0 ) TEST_ERROR;
-
+
/* get dataset object header */
if ( get_object_header_tag(did, &d_tag) < 0 ) TEST_ERROR;
-
+
/* Clear Metadata Tags (don't care about them for this test */
mark_all_entries_investigated(fid);
@@ -1124,7 +1124,7 @@ error:
return 1;
} /* check_dense_attribute_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_group_open_tags
*
@@ -1138,7 +1138,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_group_open_tags(void)
{
/* Variable Declarations */
@@ -1150,7 +1150,7 @@ check_group_open_tags(void)
/* Testing Macro */
TESTING("tag application during group open");
-
+
/* ===== */
/* Setup */
/* ===== */
@@ -1225,7 +1225,7 @@ error:
return 1;
} /* check_group_open_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_attribute_creation_tags
*
@@ -1239,7 +1239,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_attribute_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -1312,7 +1312,7 @@ check_attribute_creation_tags(hid_t fcpl, int type)
/* verify shared message index tagged with sohm */
if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_SOHM_TABLE_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
-
+
/* verify fractal heap header belonging to group */
if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
@@ -1331,7 +1331,7 @@ check_attribute_creation_tags(hid_t fcpl, int type)
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
-
+
/* Reset the changes we've made to the cache's data structures */
if(reset_all_entries_investigated(fid) < 0) TEST_ERROR;
@@ -1354,7 +1354,7 @@ error:
return 1;
} /* check_attribute_creation_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_attribute_open_tags
*
@@ -1368,7 +1368,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_attribute_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -1439,7 +1439,7 @@ check_attribute_open_tags(hid_t fcpl, int type)
/* verify object header chunk belonging to group */
if ( verify_tag(fid, H5AC_OHDR_CHK_ID, g_tag) < 0 ) TEST_ERROR;
-
+
if ( type == TEST_SHMESG ) {
/* verify (another) object header chunk belonging to group */
@@ -1485,7 +1485,7 @@ error:
return 1;
} /* check_attribute_open_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_attribute_rename_tags
*
@@ -1499,7 +1499,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_attribute_rename_tags(hid_t fcpl, int type)
{
/* Variable declarations */
@@ -1547,7 +1547,7 @@ check_attribute_rename_tags(hid_t fcpl, int type)
/* Create attribute */
if ( (aid = H5Acreate2(gid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
-
+
/* fill out data buffer */
for(i = 0; i < DIMS; i++)
for(j = 0; j < DIMS; j++)
@@ -1613,11 +1613,11 @@ check_attribute_rename_tags(hid_t fcpl, int type)
/* verify shared header message stored as a list */
if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
- /*
- * 3 calls to verify_tag() for verifying free space:
- * one freespace header tag for H5FD_MEM_DRAW manager,
- * one freespace header tag for H5FD_MEM_SUPER manager
- * one freespace section info tag for H5FD_MEM_SUPER manager
+ /*
+ * 3 calls to verify_tag() for verifying free space:
+ * one freespace header tag for H5FD_MEM_DRAW manager,
+ * one freespace header tag for H5FD_MEM_SUPER manager
+ * one freespace section info tag for H5FD_MEM_SUPER manager
*/
if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
@@ -1664,7 +1664,7 @@ error:
return 1;
} /* check_attribute_rename_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_attribute_delete_tags
*
@@ -1678,7 +1678,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_attribute_delete_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -1726,7 +1726,7 @@ check_attribute_delete_tags(hid_t fcpl, int type)
/* Create attribute */
if ( (aid = H5Acreate2(gid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
-
+
/* fill out data buffer */
for(i = 0;i < DIMS; i++)
for(j = 0;j < DIMS; j++)
@@ -1764,30 +1764,30 @@ check_attribute_delete_tags(hid_t fcpl, int type)
/* verify object header belonging to group */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
-
+
if ( type == TEST_SHMESG ) {
/* verify shared header message master table */
if ( verify_tag(fid, H5AC_SOHM_TABLE_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
- /*
- * 2 calls to verify_tag() for verifying free space:
+ /*
+ * 2 calls to verify_tag() for verifying free space:
* one freespace header tag for free-space header,
* one freespace header tag for free-space section info
*/
- if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 )
+ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 )
TEST_ERROR;
- if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 )
+ if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 )
TEST_ERROR;
#if 0
- /* If the free space managers are persistent, the
+ /* If the free space managers are persistent, the
* H5MF_tidy_self_referential_fsm_hack() must have been run.
- * Since this function floats all self referential free space
- * managers, the H5FD_MEM_SUPER FSM will not be in the metadata
+ * Since this function floats all self referential free space
+ * managers, the H5FD_MEM_SUPER FSM will not be in the metadata
* cache.
*/
- if ( ( ! persistent_fsms ) &&
+ if ( ( ! persistent_fsms ) &&
( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) )
TEST_ERROR;
#endif
@@ -1822,7 +1822,7 @@ error:
return 1;
} /* check_attribute_delete_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_creation_tags
*
@@ -1836,7 +1836,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -1874,10 +1874,10 @@ check_dataset_creation_tags(hid_t fcpl, int type)
/* ============================ */
/* Create Dataset in Root Group */
/* ============================ */
-
+
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -1919,7 +1919,7 @@ check_dataset_creation_tags(hid_t fcpl, int type)
/* Verify dataset's tagged metadata */
if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
-
+
/* Verify shared object header message tags */
if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
@@ -1949,7 +1949,7 @@ error:
return 1;
} /* check_dataset_creation_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_creation_earlyalloc_tags
*
@@ -1963,7 +1963,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -2046,7 +2046,7 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
/* Verify dataset's tagged metadata */
if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
-
+
/* Verify shared object header message tags */
if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
@@ -2080,7 +2080,7 @@ error:
return 1;
} /* check_dataset_creation_earlyalloc_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_open_tags
*
@@ -2094,7 +2094,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_open_tags(void)
{
/* Variable Declarations */
@@ -2125,7 +2125,7 @@ check_dataset_open_tags(void)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -2155,7 +2155,7 @@ check_dataset_open_tags(void)
/* ========================== */
/* Open Dataset in Root Group */
/* ========================== */
-
+
if (( did = H5Dopen2(fid, DATASETNAME, H5P_DEFAULT)) < 0 ) TEST_ERROR;
/* =================================== */
@@ -2200,7 +2200,7 @@ error:
return 1;
} /* check_dataset_open_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_write_tags
*
@@ -2214,7 +2214,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_write_tags(void)
{
/* Variable Declarations */
@@ -2250,7 +2250,7 @@ check_dataset_write_tags(void)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -2299,7 +2299,7 @@ check_dataset_write_tags(void)
/* if verbose, print cache index to screen for visual verification */
if ( verbose ) dump_cache(fid);
#endif /* NDEBUG */ /* end debugging functions */
-
+
/* Verify 10 b-tree nodes belonging to dataset */
for (i=0; i<10; i++)
if ( verify_tag(fid, H5AC_BT_ID, d_tag) < 0 ) TEST_ERROR;
@@ -2335,7 +2335,7 @@ error:
return 1;
} /* check_dataset_write_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_attribute_write_tags
*
@@ -2349,7 +2349,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_attribute_write_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -2424,7 +2424,7 @@ check_attribute_write_tags(hid_t fcpl, int type)
/* if verbose, print cache index to screen for visual verification */
if ( verbose ) dump_cache(fid);
#endif /* NDEBUG */ /* end debugging functions */
-
+
/* Verify object header of group */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
@@ -2483,7 +2483,7 @@ error:
return 1;
} /* check_attribute_write_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_read_tags
*
@@ -2497,7 +2497,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_read_tags(void)
{
/* Variable Declarations */
@@ -2533,7 +2533,7 @@ check_dataset_read_tags(void)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -2581,7 +2581,7 @@ check_dataset_read_tags(void)
/* if verbose, print cache index to screen for visual verification */
if ( verbose ) dump_cache(fid);
#endif /* NDEBUG */ /* end debugging functions */
-
+
/* Verify 19 b-tree nodes belonging to dataset */
for (i=0; i<19; i++)
if ( verify_tag(fid, H5AC_BT_ID, d_tag) < 0 ) TEST_ERROR;
@@ -2614,7 +2614,7 @@ error:
return 1;
} /* check_dataset_read_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_size_retrieval
*
@@ -2628,7 +2628,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_size_retrieval(void)
{
/* Variable Declarations */
@@ -2665,7 +2665,7 @@ check_dataset_size_retrieval(void)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -2746,7 +2746,7 @@ error:
return 1;
} /* check_dataset_size_retrieval */
-
+
/*-------------------------------------------------------------------------
* Function: check_dataset_extend_tags
*
@@ -2760,7 +2760,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_dataset_extend_tags(void)
{
@@ -2798,7 +2798,7 @@ check_dataset_extend_tags(void)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -2879,7 +2879,7 @@ error:
return 1;
} /* check_dataset_extend_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_object_info_tags
*
@@ -2893,7 +2893,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_object_info_tags(void)
{
/* Variable Declarations */
@@ -2902,7 +2902,7 @@ check_object_info_tags(void)
int verbose = FALSE; /* verbose file output */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
- H5O_info_t oinfo; /* Object info struct */
+ H5O_info_t oinfo; /* Object info struct */
/* Testing Macro */
TESTING("tag application during object info retrieval");
@@ -2982,7 +2982,7 @@ error:
return 1;
} /* check_object_info_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_object_copy_tags
*
@@ -2996,7 +2996,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_object_copy_tags(void)
{
/* Variable Declarations */
@@ -3046,7 +3046,7 @@ check_object_copy_tags(void)
if ( (gid = H5Gopen2(fid, GROUPNAMECOPY, H5P_DEFAULT)) < 0 ) TEST_ERROR;
if ( get_object_header_tag(gid, &copy_tag) < 0 ) TEST_ERROR;
if (H5Gclose(gid) < 0) TEST_ERROR;
-
+
/* =================================== */
/* Verification of Metadata Tag Values */
/* =================================== */
@@ -3095,7 +3095,7 @@ error:
return 1;
} /* check_object_copy_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_link_removal_tags
*
@@ -3109,7 +3109,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_link_removal_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
@@ -3156,7 +3156,7 @@ check_link_removal_tags(hid_t fcpl, int type)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -3219,7 +3219,7 @@ check_link_removal_tags(hid_t fcpl, int type)
if ( verify_tag(fid, H5AC_SOHM_TABLE_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
} /* end if */
-
+
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
@@ -3247,7 +3247,7 @@ error:
return 1;
} /* check_link_removal_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_link_getname_tags
*
@@ -3261,7 +3261,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_link_getname_tags(void)
{
/* Variable Declarations */
@@ -3309,7 +3309,7 @@ check_link_getname_tags(void)
/* Set up creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
+
/* Enable chunking */
if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR;
@@ -3392,7 +3392,7 @@ error:
return 1;
} /* check_link_getname_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_external_link_creation_tags
*
@@ -3406,7 +3406,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_external_link_creation_tags(void)
{
/* Variable Declarations */
@@ -3449,7 +3449,7 @@ check_external_link_creation_tags(void)
/* ==================== */
/* Create External Link */
/* ==================== */
-
+
if (H5Lcreate_external(FILENAME2, GROUPNAMEPATH, fid, LINKNAME, H5P_DEFAULT, H5P_DEFAULT) < 0 ) TEST_ERROR;
/* =================================== */
@@ -3460,7 +3460,7 @@ check_external_link_creation_tags(void)
/* if verbose, print cache index to screen for visual verification */
if ( verbose ) dump_cache(fid);
#endif /* NDEBUG */ /* end debugging functions */
-
+
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_OHDR_CHK_ID, root_tag) < 0 ) TEST_ERROR;
@@ -3490,7 +3490,7 @@ error:
return 1;
} /* check_external_link_creation_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_external_link_open_tags
*
@@ -3504,7 +3504,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static unsigned
check_external_link_open_tags(void)
{
/* Variable Declarations */
@@ -3556,11 +3556,11 @@ check_external_link_open_tags(void)
/* ================== */
/* Open External Link */
/* ================== */
-
+
if ( (xid = H5Gopen2(fid, LINKNAME, H5P_DEFAULT)) < 0 ) TEST_ERROR;
if ( (fid2 = H5Iget_file_id(xid)) < 0) TEST_ERROR;
if ( get_object_header_tag(xid, &link_tag) < 0 ) TEST_ERROR;
-
+
/* =================================== */
/* Verification of Metadata Tag Values */
/* =================================== */
@@ -3614,12 +3614,12 @@ error:
return 1;
} /* check_external_link_open_tags */
-
+
/*-------------------------------------------------------------------------
* Function: check_invalid_tag_application
*
* Purpose: This function verifies that an error occurs if a tag
- * has not been set up during a protect or set of
+ * has not been set up during a protect or set of
* a new piece of metadata.
*
* Return: 0 on Success, 1 on Failure
@@ -3643,7 +3643,7 @@ check_invalid_tag_application(void)
/* Testing Macro */
TESTING("failure on invalid tag application");
-
+
#if H5C_DO_TAGGING_SANITY_CHECKS
/* Create a test file */
if ( (fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
@@ -3705,7 +3705,7 @@ error:
return 1;
} /* check_invalid_tag_application */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -3718,8 +3718,8 @@ error:
*
*-------------------------------------------------------------------------
*/
-int
-main(void)
+int
+main(void)
{
/* Variable Declarations */
hid_t fcpl_default = -1; /* file creation prop list */
@@ -3727,13 +3727,13 @@ main(void)
hid_t fcpl = -1; /* file creation prop list */
unsigned nerrs = 0; /* Error Encountered */
int test_type = 0; /* test type iterator */
-
+
/* Open the HDF5 Library */
H5open();
-
- /* ========== */
+
+ /* ========== */
/* Test Setup */
- /* ========== */
+ /* ========== */
/* Create a standard file creation property list */
fcpl_default = H5Pcreate(H5P_FILE_CREATE);
@@ -3749,13 +3749,13 @@ main(void)
/* ========= */
for (test_type=0; test_type<NUM_TEST_TYPES; test_type++) {
-
+
/* Run tests on each fcpl set up above. */
if (test_type == TEST_DEFAULT) {
if (!nerrs) HDprintf("Testing standard tag application cases w/ default fcpl:\n");
fcpl = fcpl_default;
-
+
} else if (test_type == TEST_SHMESG) {
if (!nerrs) HDprintf("Testing standard tag application cases w/ shared messages:\n");
@@ -3792,7 +3792,7 @@ main(void)
if (!nerrs) nerrs += check_link_getname_tags();
if (!nerrs) nerrs += check_external_link_creation_tags();
if (!nerrs) nerrs += check_external_link_open_tags();
-
+
if (!nerrs) nerrs += check_dense_attribute_tags();
if (!nerrs) nerrs += check_link_iteration_tags();
if (!nerrs) nerrs += check_invalid_tag_application();
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index eef2070..ff3767c 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -2217,7 +2217,7 @@ main (int argc, char *argv[])
if (argc>1) {
if (argc>2 || strcmp("--noopt", argv[1])) {
HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
}
H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, (H5T_conv_t)((void (*) (void))H5T__conv_struct_opt));
}
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 998c81c..f46a76d 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -15,7 +15,7 @@
* Serial tests for encoding/decoding plists
*/
-#include "h5test.h"
+#include "testhdf5.h"
#include "H5ACprivate.h"
#include "H5Pprivate.h"
diff --git a/test/external.c b/test/external.c
index 3e8b7de..c9f0a9e 100644
--- a/test/external.c
+++ b/test/external.c
@@ -17,7 +17,6 @@
*
* Purpose: Tests datasets stored in external raw files.
*/
-#include "h5test.h"
#include "external_common.h"
diff --git a/test/istore.c b/test/istore.c
index 7489b7e..8759be3 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -338,7 +338,7 @@ test_extend(hid_t f, const char *prefix,
HDfprintf(stderr,",%lu", (unsigned long)size[1]);
if (ndims > 2)
HDfprintf(stderr,",%lu", (unsigned long)size[2]);
- HD fprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s");
+ HDfprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s");
if (0 == nelmts)
HDfprintf(stderr," *SKIPPED*");
HDfprintf(stderr,"\n");
diff --git a/test/mf.c b/test/mf.c
index 4f256bc..99975c0 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -2574,16 +2574,16 @@ error:
* The third block of 50 is allocated from there
* There is space of 1998 left in the sdata_aggr
*
- * Allocate second block (2058) from meta_aggr:
- * request-size is > what is left in meta_aggr and >= meta_aggr->alloc_size
- * sdata_aggr is at EOA and has used up more than sdata_aggr->alloc_size
- * Result:
- * unused spaced in sdata_aggr is freed to free-space and is shrunk
- * sdata_aggr is reset to 0
- * A block of request-size is obtained via file allocation
- * The new block's address is returned
- * The block does not adjoin meta_aggr
- * meta_aggr's info is unchanged
+ * Allocate second block (2058) from meta_aggr:
+ * request-size is > what is left in meta_aggr and >= meta_aggr->alloc_size
+ * sdata_aggr is at EOA and has used up more than sdata_aggr->alloc_size
+ * Result:
+ * unused spaced in sdata_aggr is freed to free-space and is shrunk
+ * sdata_aggr is reset to 0
+ * A block of request-size is obtained via file allocation
+ * The new block's address is returned
+ * The block does not adjoin meta_aggr
+ * meta_aggr's info is unchanged
*-------------------------------------------------------------------------
*/
static unsigned
@@ -5479,10 +5479,10 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5FD_mem_t type, stype;
haddr_t addr1, addr2, saddr1;
H5FS_stat_t state[H5FD_MEM_NTYPES];
- haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF;
- haddr_t sdata_addr=HADDR_UNDEF, new_sdata_addr=HADDR_UNDEF;
- hsize_t ma_size=0, new_ma_size=0, sdata_size=0, new_sdata_size=0;
- hsize_t alignment=0, mis_align=0, tmp=0;
+ haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF;
+ haddr_t sdata_addr=HADDR_UNDEF, new_sdata_addr=HADDR_UNDEF;
+ hsize_t ma_size=0, new_ma_size=0, sdata_size=0, new_sdata_size=0;
+ hsize_t alignment=0, mis_align=0, tmp=0;
hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */
@@ -6385,22 +6385,22 @@ error:
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW; \
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP; \
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP; \
- sprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's'); \
+ HDsprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's'); \
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER]; \
memb_addr[H5FD_MEM_SUPER] = 0; \
- sprintf(sv[H5FD_MEM_BTREE], "%%s-%c.h5", 'b'); \
+ HDsprintf(sv[H5FD_MEM_BTREE], "%%s-%c.h5", 'b'); \
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE]; \
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX/6; \
- sprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r'); \
+ HDsprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r'); \
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW]; \
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/3; \
- sprintf(sv[H5FD_MEM_GHEAP], "%%s-%c.h5", 'g'); \
+ HDsprintf(sv[H5FD_MEM_GHEAP], "%%s-%c.h5", 'g'); \
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP]; \
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX/2; \
- sprintf(sv[H5FD_MEM_LHEAP], "%%s-%c.h5", 'l'); \
+ HDsprintf(sv[H5FD_MEM_LHEAP], "%%s-%c.h5", 'l'); \
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP]; \
memb_addr[H5FD_MEM_LHEAP] = HADDR_MAX*2/3; \
- sprintf(sv[H5FD_MEM_OHDR], "%%s-%c.h5", 'o'); \
+ HDsprintf(sv[H5FD_MEM_OHDR], "%%s-%c.h5", 'o'); \
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR]; \
memb_addr[H5FD_MEM_OHDR] = HADDR_MAX*5/6; \
}
@@ -6747,7 +6747,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("File's free-space is persistent with new library format")
else
TESTING("File's free-space is persistent with old library format")
-
+
if(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")) {
/* File creation property list template */
@@ -6891,14 +6891,14 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} else {
SKIPPED();
- puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return(0);
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
H5Pclose(fcpl);
H5Pclose(fapl2);
} H5E_END_TRY;
@@ -6907,7 +6907,7 @@ error:
/*
*-------------------------------------------------------------------------
- * Verify free-space are merged/shrunk away
+ * Verify free-space are merged/shrunk away
*-------------------------------------------------------------------------
*/
static unsigned
@@ -6922,7 +6922,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
H5FS_stat_t fs_stat; /* Information for free-space manager */
haddr_t addr1, addr2, addr3, addr4; /* File address for H5FD_MEM_SUPER */
haddr_t addrx;
- H5FD_mem_t fs_type;
+ H5FD_mem_t fs_type;
hbool_t contig_addr_vfd;
hbool_t ran_H5MF_tidy_self_referential_fsm_hack = FALSE;
@@ -6972,7 +6972,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
-
+
/* Put block #1, #3 to H5FD_MEM_SUPER free-space manager */
if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
@@ -7089,14 +7089,14 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} else {
SKIPPED();
- puts(" Current VFD doesn't support persistent free-space manager");
+ HDputs(" Current VFD doesn't support persistent free-space manager");
}
return(0);
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
H5Pclose(fcpl);
H5Pclose(fapl2);
} H5E_END_TRY;
@@ -7159,11 +7159,11 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
/* Create file-creation template */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
FAIL_STACK_ERROR
-
+
/* Set default file space information */
if(H5Pset_file_space_strategy(fcpl, fs_type, (hbool_t)fs_persist, fs_threshold) < 0)
FAIL_STACK_ERROR
-
+
/* Create the file to work on */
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl2)) < 0)
FAIL_STACK_ERROR
@@ -7186,7 +7186,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
FAIL_STACK_ERROR
if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
FAIL_STACK_ERROR
-
+
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
@@ -7218,7 +7218,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
hssize_t nsects; /* # of free-space sections */
int i; /* local index variable */
H5F_sect_info_t *sect_info; /* array to hold the free-space information */
-
+
/* Get the # of free-space sections in the file */
if((nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)0, NULL)) < 0)
FAIL_STACK_ERROR
@@ -7233,7 +7233,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
sect_info = (H5F_sect_info_t *)HDcalloc((size_t)nsects, sizeof(H5F_sect_info_t));
H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)nsects, sect_info);
-
+
/* Verify the size of free-space sections */
for(i = 0; i < nsects; i++)
if(sect_info[i].size < fs_threshold)
@@ -7266,7 +7266,7 @@ error:
H5E_BEGIN_TRY {
H5Pclose(fcpl);
H5Pclose(fapl2);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_mf_strat_thres_persist() */
@@ -7309,7 +7309,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
HDmemset(&fs_state_zero, 0, sizeof(H5FS_stat_t));
/* Copy the file access property list */
- if((fapl2 = H5Pcopy(fapl)) < 0)
+ if((fapl2 = H5Pcopy(fapl)) < 0)
FAIL_STACK_ERROR
if(new_format)
@@ -7365,7 +7365,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if(fs_type == H5F_FSPACE_STRATEGY_PAGE) {
if(H5FS_stat_info(f, f->shared->fs_man[tt], &fs_state) < 0)
FAIL_STACK_ERROR
- }
+ }
/* Put block #3, #5 to H5FD_MEM_SUPER free-space manager */
if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
@@ -7398,7 +7398,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if(fs_type == H5F_FSPACE_STRATEGY_PAGE) {
fs_state.tot_sect_count = fs_state.serial_sect_count = 1;
fs_state.tot_space += (TBLOCK_SIZE4 + TBLOCK_SIZE6);
- }
+ }
/* For old format: the sections at EOF are shrunk away */
if(check_stats(f, f->shared->fs_man[tt], (fs_type == H5F_FSPACE_STRATEGY_PAGE) ? &fs_state:&fs_state_zero))
@@ -7422,7 +7422,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* Re-open the file */
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 0)
FAIL_STACK_ERROR
-
+
/* Get a pointer to the internal file object */
if(NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
@@ -7452,7 +7452,7 @@ error:
H5E_BEGIN_TRY {
H5Pclose(fcpl);
H5Pclose(fapl2);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_mf_strat_thres_gone() */
@@ -7482,11 +7482,11 @@ error:
static unsigned
test_dichotomy(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FD_mem_t type, stype;
- haddr_t addr1, addr3, saddr1, saddr2;
+ hid_t file = -1; /* File ID */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FD_mem_t type, stype;
+ haddr_t addr1, addr3, saddr1, saddr2;
TESTING("Allocation from raw or metadata free-space manager");
@@ -7539,7 +7539,7 @@ test_dichotomy(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_dichotomy() */
@@ -7660,7 +7660,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Get a pointer to the internal file object */
if(NULL == (f = (H5F_t *)H5I_object(fid)))
TEST_ERROR
-
+
/* Allocate 3 small metadata blocks: addr1, addr2, addr3 */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034);
@@ -7725,7 +7725,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Re-open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 0)
TEST_ERROR
-
+
/* Get a pointer to the internal file object */
if(NULL == (f = (H5F_t *)H5I_object(fid)))
TEST_ERROR
@@ -7765,7 +7765,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Verify that the small raw data manager is there */
if(!H5F_addr_defined(f->shared->fs_addr[H5F_MEM_PAGE_DRAW]))
TEST_ERROR
-
+
/* Set up to use the small raw data manager */
if(!(f->shared->fs_man[H5F_MEM_PAGE_DRAW]))
if(H5MF__open_fstype(f, H5F_MEM_PAGE_DRAW) < 0)
@@ -7789,7 +7789,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
if(found_addr != gaddr1)
TEST_ERROR
-
+
/* Close file */
if(H5Fclose(fid) < 0)
TEST_ERROR
@@ -7803,7 +7803,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return(0);
@@ -7927,7 +7927,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support paged aggregation");
+ HDputs(" Current VFD doesn't support paged aggregation");
}
return(0);
@@ -8024,13 +8024,13 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198, (hsize_t)TBLOCK_SIZE50);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
-
+
/* Free the block with addr1 */
H5MF_xfree(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE3248);
/* Allocate a new metadata block with addr1 */
/* There is a page end threshold of size H5F_FILE_SPACE_PGEND_META_THRES at the end of the block */
- /* The block is right next to the threshold */
+ /* The block is right next to the threshold */
addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3286);
/* Try extending the block into the threshold with size > H5F_FILE_SPACE_PGEND_META_THRES */
@@ -8082,7 +8082,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support paged aggregation");
+ HDputs(" Current VFD doesn't support paged aggregation");
}
return(0);
@@ -8192,7 +8192,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
if(was_extended == FALSE) TEST_ERROR
/* Try extending the block with gaddr2 */
- /* There is no free-space section big enough to fulfill the request (request is < H5F_FILE_SPACE_PGEND_META_THRES) */
+ /* There is no free-space section big enough to fulfill the request (request is < H5F_FILE_SPACE_PGEND_META_THRES) */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190, (hsize_t)TBLOCK_SIZE5);
/* Should not succeed */
if(was_extended == TRUE) TEST_ERROR
@@ -8223,7 +8223,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support paged aggregation strategy");
+ HDputs(" Current VFD doesn't support paged aggregation strategy");
}
return(0);
@@ -8280,7 +8280,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Set the strategy to paged aggregation */
if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
FAIL_STACK_ERROR
-
+
/* Create the file to work on */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
FAIL_STACK_ERROR
@@ -8355,7 +8355,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
if(fs_stat.tot_space != (16384+288))
TEST_ERROR
-
+
/* Close file */
if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR
@@ -8376,7 +8376,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support paged aggregation strategy");
+ HDputs(" Current VFD doesn't support paged aggregation strategy");
}
return(0);
@@ -8423,7 +8423,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
multi = TRUE;
else if(!HDstrcmp(env_h5_drvr, "family"))
family = TRUE;
-
+
if(!multi && !split) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -8539,7 +8539,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support paged aggregation strategy");
+ HDputs(" Current VFD doesn't support paged aggregation strategy");
}
return(0);
@@ -8557,7 +8557,7 @@ error:
* Function: test_page_alignment
*
* Purpose: To verify the proper alignment is used when H5Pset_alignment()
- * is set and paged aggregation is enabled.
+ * is set and paged aggregation is enabled.
*
* Return: Success: 0
* Failure: number of errors
@@ -8588,7 +8588,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
split = TRUE;
else if(!HDstrcmp(env_h5_drvr, "multi"))
multi = TRUE;
-
+
if(!multi && !split) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -8680,7 +8680,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* The alignment to use will be the library's default file space page size */
if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
TEST_ERROR
-
+
/* Create the file to work on */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl_new)) < 0)
TEST_ERROR
@@ -8721,7 +8721,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
if(H5Fclose(fid) < 0)
TEST_ERROR
- /*
+ /*
* Case 2: Verify that the alignment in use is the alignment set
* via H5Pset_alignment when paged aggregation not enabled.
*/
@@ -8778,7 +8778,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
if(H5Fclose(fid) < 0)
TEST_ERROR
- /*
+ /*
* Case 3: Verify that the alignment in use is the alignment set
* via H5Pset_alignment when paged aggregation not enabled.
*/
@@ -8801,7 +8801,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Get a pointer to the internal file object */
if(NULL == (f = (H5F_t *)H5I_object(fid)))
TEST_ERROR
-
+
/* Allocate 2 small raw data blocks */
saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
@@ -8845,7 +8845,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
} else {
SKIPPED();
- puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return(0);
@@ -8863,10 +8863,10 @@ error:
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- hid_t new_fapl = -1; /* File access property list for alignment & aggr setting */
+ hid_t fapl = -1; /* File access property list for data files */
+ hid_t new_fapl = -1; /* File access property list for alignment & aggr setting */
unsigned nerrors = 0; /* Cumulative error count */
- test_type_t curr_test; /* Current test being worked on */
+ test_type_t curr_test; /* Current test being worked on */
const char *env_h5_drvr; /* File Driver value from environment */
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
@@ -8968,7 +8968,7 @@ main(void)
nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, FALSE);
nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, TRUE);
- /* Temporary skipped for multi/split drivers:
+ /* Temporary skipped for multi/split drivers:
fail file create when persisting free-space or using paged aggregation strategy */
#ifdef PB_OUT
/* Tests specific for multi and split files--persisting free-space */
@@ -8976,7 +8976,7 @@ main(void)
nerrors += test_mf_fs_persist_multi();
#endif
- /*
+ /*
* Tests specific for file space paging
*/
/* Temporary: The following 7 tests are modified to skip testing for multi/split driver:
diff --git a/test/objcopy.c b/test/objcopy.c
index b0904d0..b11352b 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1199,8 +1199,8 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
hssize_t nelmts; /* # of elements in dataspace */
void *rbuf = NULL; /* Buffer for reading raw data */
void *rbuf2 = NULL; /* Buffer for reading raw data */
- H5D_space_status_t space_status; /* Dataset's raw data space status */
- H5D_space_status_t space_status2; /* Dataset's raw data space status */
+ H5D_space_status_t space_status; /* Dataset's raw dataspace status */
+ H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
/* Check the datatypes are equal */
@@ -8279,7 +8279,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* make a copy of the datatype for later use */
if((tid_copy = H5Tcopy(tid)) < 0)TEST_ERROR
- /* named data type */
+ /* named datatype */
if((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* create and set chunk plist */
@@ -10980,7 +10980,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* create datatype */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)TEST_ERROR
- /* committed data type */
+ /* committed datatype */
if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* create dataset at SRC file */
@@ -12770,7 +12770,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* create datatype */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)TEST_ERROR
- /* named data type */
+ /* named datatype */
if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* create dataset at SRC file */
@@ -13159,7 +13159,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* create datatype */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)TEST_ERROR
- /* committed data type "a" */
+ /* committed datatype "a" */
if((H5Tcommit2(fid_dst, "/a", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* close the datatype */
@@ -13168,7 +13168,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* create datatype */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)TEST_ERROR
- /* committed data type "b" */
+ /* committed datatype "b" */
if((H5Tcommit2(fid_dst, "/b", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* close the datatype */
@@ -13768,8 +13768,6 @@ error:
* Programmer: Vailin Choi
* Feb 7, 2012
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -14184,7 +14182,7 @@ main(void)
/* Set the FAPL for the destination file's type of format */
if(configuration & CONFIG_DST_NEW_FORMAT) {
- puts("Testing with latest format for destination file:");
+ HDputs("Testing with latest format for destination file:");
dst_fapl = fapl2;
same_file = FALSE;
} /* end if */
@@ -14360,7 +14358,7 @@ main(void)
/* Results */
if(nerrors) {
- printf("***** %d OBJECT COPY TEST%s FAILED! *****\n",
+ HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n",
nerrors, (1 == nerrors ? "" : "S"));
exit(EXIT_FAILURE);
} /* end if */
diff --git a/test/tattr.c b/test/tattr.c
index 53e0e43..5d35e41 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -11147,6 +11147,6 @@ test_attr(void)
void
cleanup_attr(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/testframe.c b/test/testframe.c
index a096f36..68c66ec 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -42,10 +42,10 @@ typedef struct TestStruct {
* Variables used by testing framework.
*/
static int enable_error_stack = 0; /* enable error stack; disable=0 enable=1 */
-static int num_errs = 0; /* Total number of errors during testing */
+static int num_errs = 0; /* Total number of errors during testing */
int TestVerbosity = VERBO_DEF; /* Default Verbosity is Low */
-static int Summary = 0; /* Show test summary. Default is no. */
-static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
+static int Summary = 0; /* Show test summary. Default is no. */
+static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */
static TestStruct *Test = NULL; /* Array of tests */
static unsigned TestAlloc = 0; /* Size of the Test array */
@@ -74,14 +74,12 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
{
/* Sanity checking */
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
- HDprintf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n",
- TheDescr, MAXTESTDESC);
- exit(EXIT_FAILURE);
+ HDprintf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
+ HDexit(EXIT_FAILURE);
} /* end if */
if (HDstrlen(TheName) >= MAXTESTNAME) {
- HDprintf("Test name too long, increase MAXTESTNAME(%d).\n",
- MAXTESTNAME);
- exit(EXIT_FAILURE);
+ HDprintf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Check for increasing the Test array size */
@@ -167,7 +165,7 @@ void TestUsage(void)
unsigned i;
print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n",
- TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
+ TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
print_func(" [-[e]x[clude] name]+ \n");
print_func(" [-o[nly] name]+ \n");
print_func(" [-b[egin] name] \n");
@@ -228,78 +226,80 @@ void TestParseCmdLine(int argc, char *argv[])
int ret_code;
while (argv++, --argc > 0){
- if ((HDstrcmp(*argv, "-verbose") == 0) ||
- (HDstrcmp(*argv, "-v") == 0)) {
- if (argc > 0){
- --argc; ++argv;
- ParseTestVerbosity(*argv);
- }else{
- TestUsage();
- exit(EXIT_FAILURE);
+ if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
+ if (argc > 0){
+ --argc; ++argv;
+ ParseTestVerbosity(*argv);
+ }
+ else{
+ TestUsage();
+ HDexit(EXIT_FAILURE);
+ }
}
- }
- else if (((HDstrcmp(*argv, "-exclude") == 0) ||
- (HDstrcmp(*argv, "-x") == 0))) {
- if (argc > 0){
- --argc; ++argv;
- SetTest(*argv, SKIPTEST);
- }else{
- TestUsage();
- exit(EXIT_FAILURE);
+ else if (((HDstrcmp(*argv, "-exclude") == 0) ||
+ (HDstrcmp(*argv, "-x") == 0))) {
+ if (argc > 0){
+ --argc; ++argv;
+ SetTest(*argv, SKIPTEST);
+ }
+ else{
+ TestUsage();
+ HDexit(EXIT_FAILURE);
+ }
}
- }
- else if (((HDstrcmp(*argv, "-begin") == 0) ||
- (HDstrcmp(*argv, "-b") == 0))) {
- if (argc > 0){
- --argc; ++argv;
- SetTest(*argv, BEGINTEST);
- }else{
- TestUsage();
- exit(EXIT_FAILURE);
+ else if (((HDstrcmp(*argv, "-begin") == 0) ||
+ (HDstrcmp(*argv, "-b") == 0))) {
+ if (argc > 0){
+ --argc; ++argv;
+ SetTest(*argv, BEGINTEST);
+ }
+ else{
+ TestUsage();
+ HDexit(EXIT_FAILURE);
+ }
}
- }
- else if (((HDstrcmp(*argv, "-only") == 0) ||
- (HDstrcmp(*argv, "-o") == 0))) {
- if(argc > 0) {
- unsigned Loop;
+ else if (((HDstrcmp(*argv, "-only") == 0) ||
+ (HDstrcmp(*argv, "-o") == 0))) {
+ if(argc > 0) {
+ unsigned Loop;
- --argc; ++argv;
+ --argc; ++argv;
- /* Skip all tests, then activate only one. */
+ /* Skip all tests, then activate only one. */
if(!skipped_all) {
for(Loop = 0; Loop < Index; Loop++)
Test[Loop].SkipFlag = 1;
skipped_all = TRUE;
} /* end if */
- SetTest(*argv, ONLYTEST);
- } /* end if */
- else {
- TestUsage();
- exit(EXIT_FAILURE);
+ SetTest(*argv, ONLYTEST);
+ }
+ else{
+ TestUsage();
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
+ Summary = 1;
+ else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
+ enable_error_stack = 1;
+ else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
+ TestUsage();
+ HDexit(EXIT_SUCCESS);
+ }
+ else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
+ SetTestNoCleanup();
+ else {
+ /* non-standard option. Break out. */
+ break;
}
- }
- else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
- Summary = 1;
- else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
- enable_error_stack = 1;
- else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
- TestUsage();
- exit(EXIT_SUCCESS);
- }
- else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
- SetTestNoCleanup();
- else {
- /* non-standard option. Break out. */
- break;
- }
}
/* Call extra parsing function if provided. */
if (NULL != TestPrivateParser){
- ret_code=TestPrivateParser(argc+1, argv-1);
- if (ret_code != 0)
- exit(EXIT_FAILURE);
+ ret_code=TestPrivateParser(argc+1, argv-1);
+ if (ret_code != 0)
+ HDexit(EXIT_FAILURE);
}
}
@@ -318,10 +318,10 @@ void PerformTests(void)
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
- Test_parameters = Test[Loop].Parameters;
- ALARM_ON;
+ Test_parameters = Test[Loop].Parameters;
+ ALARM_ON;
Test[Loop].Call();
- ALARM_OFF;
+ ALARM_OFF;
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
@@ -440,18 +440,18 @@ int GetTestExpress(void)
/* set it here for now. Should be done in something like h5test_init(). */
if(TestExpress==-1)
{
- env_val = getenv("HDF5TestExpress");
-
- if(env_val == NULL)
- SetTestExpress(1);
- else if(strcmp(env_val, "0") == 0)
- SetTestExpress(0);
- else if(strcmp(env_val, "1") == 0)
- SetTestExpress(1);
- else if(strcmp(env_val, "2") == 0)
- SetTestExpress(2);
- else
- SetTestExpress(3);
+ env_val = getenv("HDF5TestExpress");
+
+ if(env_val == NULL)
+ SetTestExpress(1);
+ else if(strcmp(env_val, "0") == 0)
+ SetTestExpress(0);
+ else if(strcmp(env_val, "1") == 0)
+ SetTestExpress(1);
+ else if(strcmp(env_val, "2") == 0)
+ SetTestExpress(2);
+ else
+ SetTestExpress(3);
}
return(TestExpress);
@@ -508,13 +508,13 @@ int SetTestNoCleanup(void)
void ParseTestVerbosity(char *argv)
{
if (*argv == 'l')
- SetTestVerbosity(VERBO_LO);
+ SetTestVerbosity(VERBO_LO);
else if (*argv == 'm')
- SetTestVerbosity(VERBO_MED);
+ SetTestVerbosity(VERBO_MED);
else if (*argv == 'h')
- SetTestVerbosity(VERBO_HI);
+ SetTestVerbosity(VERBO_HI);
else
- SetTestVerbosity(atoi(argv));
+ SetTestVerbosity(atoi(argv));
}
@@ -582,29 +582,29 @@ void SetTest(const char *testname, int action)
switch (action){
case SKIPTEST:
for (Loop = 0; Loop < Index; Loop++)
- if (HDstrcmp(testname, Test[Loop].Name) == 0){
- Test[Loop].SkipFlag = 1;
- break;
- }
+ if (HDstrcmp(testname, Test[Loop].Name) == 0){
+ Test[Loop].SkipFlag = 1;
+ break;
+ }
break;
case BEGINTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) != 0)
- Test[Loop].SkipFlag = 1;
- else{
- /* Found it. Set it to run. Done. */
- Test[Loop].SkipFlag = 0;
- break;
- }
+ if (HDstrcmp(testname, Test[Loop].Name) != 0)
+ Test[Loop].SkipFlag = 1;
+ else{
+ /* Found it. Set it to run. Done. */
+ Test[Loop].SkipFlag = 0;
+ break;
+ }
}
break;
case ONLYTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
- /* Found it. Set it to run. Break to skip the rest. */
- Test[Loop].SkipFlag = 0;
- break;
- }
+ if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ /* Found it. Set it to run. Break to skip the rest. */
+ Test[Loop].SkipFlag = 0;
+ break;
+ }
}
break;
default:
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 1f3f6a0..ef3b784 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -177,53 +177,53 @@ extern "C" {
#endif
/* Prototypes for the test routines */
-void test_metadata(void);
-void test_checksum(void);
-void test_tst(void);
-void test_heap(void);
-void test_refstr(void);
-void test_file(void);
-void test_h5o(void);
-void test_h5t(void);
-void test_h5s(void);
-void test_coords(void);
-void test_h5d(void);
-void test_attr(void);
-void test_select(void);
-void test_time(void);
-void test_reference(void);
-void test_vltypes(void);
-void test_vlstrings(void);
-void test_iterate(void);
-void test_array(void);
-void test_genprop(void);
-void test_configure(void);
-void test_misc(void);
-void test_ids(void);
-void test_skiplist(void);
-void test_sohm(void);
-void test_unicode(void);
+void test_metadata(void);
+void test_checksum(void);
+void test_tst(void);
+void test_heap(void);
+void test_refstr(void);
+void test_file(void);
+void test_h5o(void);
+void test_h5t(void);
+void test_h5s(void);
+void test_coords(void);
+void test_h5d(void);
+void test_attr(void);
+void test_select(void);
+void test_time(void);
+void test_reference(void);
+void test_vltypes(void);
+void test_vlstrings(void);
+void test_iterate(void);
+void test_array(void);
+void test_genprop(void);
+void test_configure(void);
+void test_misc(void);
+void test_ids(void);
+void test_skiplist(void);
+void test_sohm(void);
+void test_unicode(void);
/* Prototypes for the cleanup routines */
-void cleanup_metadata(void);
-void cleanup_checksum(void);
-void cleanup_file(void);
-void cleanup_h5o(void);
-void cleanup_h5s(void);
-void cleanup_coords(void);
-void cleanup_attr(void);
-void cleanup_select(void);
-void cleanup_time(void);
-void cleanup_reference(void);
-void cleanup_vltypes(void);
-void cleanup_vlstrings(void);
-void cleanup_iterate(void);
-void cleanup_array(void);
-void cleanup_genprop(void);
-void cleanup_configure(void);
-void cleanup_sohm(void);
-void cleanup_misc(void);
-void cleanup_unicode(void);
+void cleanup_metadata(void);
+void cleanup_checksum(void);
+void cleanup_file(void);
+void cleanup_h5o(void);
+void cleanup_h5s(void);
+void cleanup_coords(void);
+void cleanup_attr(void);
+void cleanup_select(void);
+void cleanup_time(void);
+void cleanup_reference(void);
+void cleanup_vltypes(void);
+void cleanup_vlstrings(void);
+void cleanup_iterate(void);
+void cleanup_array(void);
+void cleanup_genprop(void);
+void cleanup_configure(void);
+void cleanup_sohm(void);
+void cleanup_misc(void);
+void cleanup_unicode(void);
#ifdef __cplusplus
}
diff --git a/test/testmeta.c b/test/testmeta.c
index b97eb68..9a40e6f 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -23,34 +23,34 @@
*/
-#include "hdf5.h"
+#include "h5test.h"
-#define FILEN "testmeta.h5"
+#define FILEN "testmeta.h5"
-#define CHUNK_SIZE 512
+#define CHUNK_SIZE 512
-#define NDATAARRAYS 3
-/*#define NPOINTS 2048*/
-#define NPOINTS 20
-#define NEXTARRAYS 10
-#define NDATAOBJECTS 100000
+#define NDATAARRAYS 3
+/*#define NPOINTS 2048*/
+#define NPOINTS 20
+#define NEXTARRAYS 10
+#define NDATAOBJECTS 100000
int main(void)
{
- hid_t file_id, prop_id, memspace_id, type_id;
- hid_t group_id;
- hid_t dataset_id, dataspace_id;
- herr_t status;
- hsize_t dims[1];
- hsize_t maxdims[1];
- float data[NPOINTS];
- float floatval;
- unsigned numdataobj = 0;
- unsigned i, j;
- char name[80];
- hsize_t start[1] = {0};
- hsize_t stride[1] = {1};
- hsize_t count[1] = {1};
+ hid_t file_id, prop_id, memspace_id, type_id;
+ hid_t group_id;
+ hid_t dataset_id, dataspace_id;
+ herr_t status;
+ hsize_t dims[1];
+ hsize_t maxdims[1];
+ float data[NPOINTS];
+ float floatval;
+ unsigned numdataobj = 0;
+ unsigned i, j;
+ char name[80];
+ hsize_t start[1] = {0};
+ hsize_t stride[1] = {1};
+ hsize_t count[1] = {1};
/* Create a file */
file_id = H5Fcreate(FILEN, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -64,8 +64,7 @@ int main(void)
H5T_NATIVE_UINT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write value to NumDataObj dataset */
- status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL,
- H5S_ALL, H5P_DEFAULT, &numdataobj);
+ status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &numdataobj);
/* Close the identifiers */
status = H5Dclose(dataset_id);
@@ -78,16 +77,14 @@ int main(void)
status = H5Pset_chunk(prop_id, 1, dims);
/* Create dataspace */
- dims[0]=1;
- maxdims[0]=H5S_UNLIMITED;
+ dims[0] = 1;
+ maxdims[0] = H5S_UNLIMITED;
dataspace_id = H5Screate_simple(1, dims, maxdims);
- for(i=0; i<NEXTARRAYS; i++)
- {
+ for(i = 0; i < NEXTARRAYS; i++) {
/* Create dataset */
sprintf(name, "/ExtArray%06d", i);
- dataset_id = H5Dcreate2(file_id, name,
- H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
+ dataset_id = H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
/* Close the identifier */
status = H5Dclose(dataset_id);
@@ -101,47 +98,43 @@ int main(void)
group_id = H5Gcreate2(file_id, "/DataArray", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
- for(j=0; j<NDATAOBJECTS; j++)
- {
+ for(j = 0; j < NDATAOBJECTS; j++) {
/* Removed print statement as it would lock system resources on Windows */
/*
- * printf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
+ * HDprintf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
* fflush(stdout);
*/
floatval = (float)j;
/* Create group to hold data arrays for this object */
- sprintf(name, "/DataArray/%06d", j);
+ HDsprintf(name, "/DataArray/%06d", j);
group_id = H5Gcreate2(file_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if(group_id < 0) {
- fprintf(stderr, "Failed to create DataArray group.\n");
+ HDfprintf(stderr, "Failed to create DataArray group.\n");
status = H5Fclose(file_id);
return -1;
}
/* Loop over data arrays */
- for(i=0; i<NDATAARRAYS; i++)
- {
+ for(i = 0; i < NDATAARRAYS; i++) {
/* Create dataspace */
dims[0]=NPOINTS;
maxdims[0]=NPOINTS;
dataspace_id = H5Screate_simple(1 ,dims, maxdims);
/* Create dataset */
- sprintf(name, "DataArray%06d", i);
- dataset_id = H5Dcreate2(group_id, name,
- H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ HDsprintf(name, "DataArray%06d", i);
+ dataset_id = H5Dcreate2(group_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if(dataset_id < 0) {
- fprintf(stderr, "Failed to create DataArray dataset.\n");
+ HDfprintf(stderr, "Failed to create DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
/* Write the data array data */
- status = H5Dwrite(dataset_id, H5T_NATIVE_FLOAT, H5S_ALL,
- H5S_ALL, H5P_DEFAULT, data);
+ status = H5Dwrite(dataset_id, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if(status < 0) {
- fprintf(stderr, "Failed to write DataArray dataset.\n");
+ HDfprintf(stderr, "Failed to write DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -154,17 +147,16 @@ int main(void)
/* Open NumDataObj dataset */
dataset_id = H5Dopen2(file_id, "/NumDataObj", H5P_DEFAULT);
if(dataset_id < 0) {
- fprintf(stderr, "Failed to open NumDataObj dataset.\n");
+ HDfprintf(stderr, "Failed to open NumDataObj dataset.\n");
status = H5Fclose(file_id);
return -1;
}
/* Write value to NumDataObj dataset */
numdataobj = j + 1;
- status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL,
- H5S_ALL, H5P_DEFAULT, &numdataobj);
+ status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &numdataobj);
if(status < 0) {
- fprintf(stderr, "Failed to write NumDataObj dataset.\n");
+ HDfprintf(stderr, "Failed to write NumDataObj dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -176,10 +168,10 @@ int main(void)
/* Extend attribute arrays */
for(i = 0; i < NEXTARRAYS; i++) {
/* Open extendable dataset */
- sprintf(name, "/ExtArray%06d", i);
+ HDsprintf(name, "/ExtArray%06d", i);
dataset_id = H5Dopen2(file_id, name, H5P_DEFAULT);
if(dataset_id < 0) {
- fprintf(stderr, "Failed to open ExtArray dataset.\n");
+ HDfprintf(stderr, "Failed to open ExtArray dataset.\n");
status = H5Fclose(file_id);
return -1;
} /* end if */
@@ -188,7 +180,7 @@ int main(void)
dims[0] = (hsize_t)j + 1;
status = H5Dset_extent(dataset_id, dims);
if(status < 0) {
- fprintf(stderr, "Failed to extend DataArray dataset.\n");
+ HDfprintf(stderr, "Failed to extend DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
} /* end if */
@@ -200,16 +192,12 @@ int main(void)
type_id = H5Dget_type(dataset_id);
start[0] = 0;
- status = H5Sselect_hyperslab(memspace_id, H5S_SELECT_SET,
- start, stride, count, NULL);
+ status = H5Sselect_hyperslab(memspace_id, H5S_SELECT_SET, start, stride, count, NULL);
start[0] = (hssize_t)j;
- status = H5Sselect_hyperslab(dataspace_id, H5S_SELECT_SET,
- start, stride, count, NULL);
- status = H5Dwrite(dataset_id, type_id, memspace_id,
- dataspace_id, H5P_DEFAULT, &floatval);
- if(status < 0)
- {
- fprintf(stderr, "Failed to write DataArray dataset.\n");
+ status = H5Sselect_hyperslab(dataspace_id, H5S_SELECT_SET, start, stride, count, NULL);
+ status = H5Dwrite(dataset_id, type_id, memspace_id, dataspace_id, H5P_DEFAULT, &floatval);
+ if(status < 0) {
+ HDfprintf(stderr, "Failed to write DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -226,7 +214,7 @@ int main(void)
/* Close the file */
status = H5Fclose(file_id);
- printf("\n");
+ HDprintf("\n");
return 0;
}
diff --git a/test/th5s.c b/test/th5s.c
index 78baf08..4d4eb82 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -1214,7 +1214,7 @@ test_h5s_encode(void)
ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Encode simple data space in a buffer */
+ /* Encode simple dataspace in a buffer */
ret = H5Sencode(sid1, NULL, &sbuf_size);
CHECK(ret, FAIL, "H5Sencode");
@@ -1275,7 +1275,7 @@ test_h5s_encode(void)
sid2 = H5Screate(H5S_NULL);
CHECK(sid2, FAIL, "H5Screate");
- /* Encode null data space in a buffer */
+ /* Encode null dataspace in a buffer */
ret = H5Sencode(sid2, NULL, &null_size);
CHECK(ret, FAIL, "H5Sencode");
diff --git a/test/trefer.c b/test/trefer.c
index 78139d2..6b67eb4 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -21,7 +21,7 @@
#include "testhdf5.h"
-#define FILE1 "trefer1.h5"
+#define FILE1 "trefer1.h5"
#define FILE2 "trefer2.h5"
#define FILE3 "trefer3.h5"
@@ -510,9 +510,9 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hid_t dset1, /* Dataset ID */
dset2, /* Dereferenced dataset ID */
dset3; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid2, /* Dataspace ID #2 */
- sid3; /* Dataspace ID #3 */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid2, /* Dataspace ID #2 */
+ sid3; /* Dataspace ID #3 */
hid_t dapl_id; /* Dataset access property list */
hsize_t dims1[] = {SPACE1_DIM1},
dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
diff --git a/test/tselect.c b/test/tselect.c
index 00ddeb1..9885a05 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -13,50 +13,50 @@
/***********************************************************
*
-* Test program: tselect
+* Test program: tselect
*
* Test the Dataspace selection functionality
*
*************************************************************/
-#define H5S_FRIEND /*suppress error about including H5Spkg */
+#define H5S_FRIEND /*suppress error about including H5Spkg */
/* Define this macro to indicate that the testing APIs should be available */
#define H5S_TESTING
#include "testhdf5.h"
#include "hdf5.h"
-#include "H5Spkg.h" /* Dataspaces */
+#include "H5Spkg.h" /* Dataspaces */
#define FILENAME "tselect.h5"
/* 3-D dataset with fixed dimensions */
#define SPACE1_NAME "Space1"
-#define SPACE1_RANK 3
-#define SPACE1_DIM1 3
-#define SPACE1_DIM2 15
-#define SPACE1_DIM3 13
+#define SPACE1_RANK 3
+#define SPACE1_DIM1 3
+#define SPACE1_DIM2 15
+#define SPACE1_DIM3 13
/* 2-D dataset with fixed dimensions */
#define SPACE2_NAME "Space2"
-#define SPACE2_RANK 2
-#define SPACE2_DIM1 30
-#define SPACE2_DIM2 26
-#define SPACE2A_RANK 1
-#define SPACE2A_DIM1 (SPACE2_DIM1*SPACE2_DIM2)
+#define SPACE2_RANK 2
+#define SPACE2_DIM1 30
+#define SPACE2_DIM2 26
+#define SPACE2A_RANK 1
+#define SPACE2A_DIM1 (SPACE2_DIM1*SPACE2_DIM2)
/* 2-D dataset with fixed dimensions */
#define SPACE3_NAME "Space3"
-#define SPACE3_RANK 2
-#define SPACE3_DIM1 15
-#define SPACE3_DIM2 26
+#define SPACE3_RANK 2
+#define SPACE3_DIM1 15
+#define SPACE3_DIM2 26
/* 3-D dataset with fixed dimensions */
#define SPACE4_NAME "Space4"
-#define SPACE4_RANK 3
-#define SPACE4_DIM1 11
-#define SPACE4_DIM2 13
-#define SPACE4_DIM3 17
+#define SPACE4_RANK 3
+#define SPACE4_DIM1 11
+#define SPACE4_DIM2 13
+#define SPACE4_DIM3 17
/* Number of random hyperslabs to test */
#define NHYPERSLABS 10
@@ -66,22 +66,22 @@
/* 5-D dataset with fixed dimensions */
#define SPACE5_NAME "Space5"
-#define SPACE5_RANK 5
-#define SPACE5_DIM1 10
-#define SPACE5_DIM2 10
-#define SPACE5_DIM3 10
-#define SPACE5_DIM4 10
-#define SPACE5_DIM5 10
+#define SPACE5_RANK 5
+#define SPACE5_DIM1 10
+#define SPACE5_DIM2 10
+#define SPACE5_DIM3 10
+#define SPACE5_DIM4 10
+#define SPACE5_DIM5 10
/* 1-D dataset with same size as 5-D dataset */
-#define SPACE6_RANK 1
-#define SPACE6_DIM1 (SPACE5_DIM1*SPACE5_DIM2*SPACE5_DIM3*SPACE5_DIM4*SPACE5_DIM5)
+#define SPACE6_RANK 1
+#define SPACE6_DIM1 (SPACE5_DIM1*SPACE5_DIM2*SPACE5_DIM3*SPACE5_DIM4*SPACE5_DIM5)
/* 2-D dataset with easy dimension sizes */
#define SPACE7_NAME "Space7"
-#define SPACE7_RANK 2
-#define SPACE7_DIM1 10
-#define SPACE7_DIM2 10
+#define SPACE7_RANK 2
+#define SPACE7_DIM1 10
+#define SPACE7_DIM2 10
#define SPACE7_FILL 254
#define SPACE7_CHUNK_DIM1 5
#define SPACE7_CHUNK_DIM2 5
@@ -89,16 +89,16 @@
/* 4-D dataset with fixed dimensions */
#define SPACE8_NAME "Space8"
-#define SPACE8_RANK 4
-#define SPACE8_DIM1 11
-#define SPACE8_DIM2 13
-#define SPACE8_DIM3 17
-#define SPACE8_DIM4 19
+#define SPACE8_RANK 4
+#define SPACE8_DIM1 11
+#define SPACE8_DIM2 13
+#define SPACE8_DIM3 17
+#define SPACE8_DIM4 19
/* Another 2-D dataset with easy dimension sizes */
-#define SPACE9_RANK 2
-#define SPACE9_DIM1 12
-#define SPACE9_DIM2 12
+#define SPACE9_RANK 2
+#define SPACE9_DIM1 12
+#define SPACE9_DIM2 12
/* Element selection information */
#define POINT1_NPOINTS 10
@@ -125,13 +125,13 @@
#define SPACE10_CHUNK_SIZE 12
/* Information for bounds checking test */
-#define SPACE11_RANK 2
+#define SPACE11_RANK 2
#define SPACE11_DIM1 100
#define SPACE11_DIM2 100
#define SPACE11_NPOINTS 4
/* Information for offsets w/chunks test #2 */
-#define SPACE12_RANK 1
+#define SPACE12_RANK 1
#define SPACE12_DIM0 25
#define SPACE12_CHUNK_DIM0 5
@@ -164,10 +164,10 @@
#define SPACEUD3_DIM2 13
/* #defines for shape same / different rank tests */
-#define SS_DR_MAX_RANK 5
+#define SS_DR_MAX_RANK 5
/* Information for regular hyperslab query test */
-#define SPACE13_RANK 3
+#define SPACE13_RANK 3
#define SPACE13_DIM1 50
#define SPACE13_DIM2 50
#define SPACE13_DIM3 50
@@ -215,21 +215,21 @@ test_select_hyper_iter1(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_A
static void
test_select_hyper(hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace 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_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
H5S_class_t ext_type; /* Extent type */
/* Output message about test being performed */
@@ -380,7 +380,7 @@ test_select_hyper(hid_t xfer_plist)
} /* test_select_hyper() */
struct pnt_iter {
- hsize_t coord[POINT1_NPOINTS*2][SPACE2_RANK]; /* Coordinates for point selection */
+ hsize_t coord[POINT1_NPOINTS*2][SPACE2_RANK]; /* Coordinates for point selection */
uint8_t *buf; /* Buffer the points are in */
int offset; /* Which point we are looking at */
};
@@ -417,24 +417,24 @@ test_select_point_iter1(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_A
static void
test_select_point(hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
- hsize_t temp_coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
- hsize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hsize_t temp_coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hsize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
- hsize_t temp_coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
+ hsize_t temp_coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
+ hsize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
+ hsize_t temp_coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
+ hsize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
+ hsize_t temp_coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
struct pnt_iter pi; /* Custom Pointer iterator struct */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Element Selection Functions\n"));
@@ -703,15 +703,15 @@ test_select_none_iter1(void H5_ATTR_UNUSED *_elem, hid_t H5_ATTR_UNUSED type_id,
static void
test_select_all(hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hsize_t dims1[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j,k; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
H5S_class_t ext_type; /* Extent type */
/* Output message about test being performed */
@@ -784,21 +784,21 @@ test_select_all(hid_t xfer_plist)
static void
test_select_all_hyper(hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE3_DIM1, SPACE3_DIM2};
- 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE3_DIM1, SPACE3_DIM2};
+ 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_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
H5S_class_t ext_type; /* Extent type */
/* Output message about test being performed */
@@ -925,23 +925,23 @@ test_select_all_hyper(hid_t xfer_plist)
static void
test_select_combo(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
- 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
+ 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_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n"));
@@ -1069,16 +1069,16 @@ compare_size_t(const void *s1, const void *s2)
static void
test_select_hyper_stride(hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace 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 */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
@@ -1108,7 +1108,7 @@ test_select_hyper_stride(hid_t xfer_plist)
220,221,222,246,247,248, /* Block #12 */
};
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
@@ -1224,19 +1224,19 @@ test_select_hyper_stride(hid_t xfer_plist)
static void
test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims2[] = {SPACE2_DIM2, SPACE2_DIM1};
- 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims2[] = {SPACE2_DIM2, SPACE2_DIM1};
+ 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 */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Contiguous Hyperslabs Functionality\n"));
@@ -1350,17 +1350,17 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
static void
test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims2[] = {SPACE8_DIM4, SPACE8_DIM3, SPACE8_DIM2, SPACE8_DIM1};
- hsize_t start[SPACE8_RANK]; /* Starting location of hyperslab */
- hsize_t count[SPACE8_RANK]; /* Element count of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims2[] = {SPACE8_DIM4, SPACE8_DIM3, SPACE8_DIM2, SPACE8_DIM1};
+ hsize_t start[SPACE8_RANK]; /* Starting location of hyperslab */
+ hsize_t count[SPACE8_RANK]; /* Element count of hyperslab */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j,k,l; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing More Contiguous Hyperslabs Functionality\n"));
@@ -1471,17 +1471,17 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
static void
test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims2[] = {SPACE8_DIM4, SPACE8_DIM3, SPACE8_DIM2, SPACE8_DIM1};
- hsize_t start[SPACE8_RANK]; /* Starting location of hyperslab */
- hsize_t count[SPACE8_RANK]; /* Element count of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims2[] = {SPACE8_DIM4, SPACE8_DIM3, SPACE8_DIM2, SPACE8_DIM1};
+ hsize_t start[SPACE8_RANK]; /* Starting location of hyperslab */
+ hsize_t count[SPACE8_RANK]; /* Element count of hyperslab */
uint16_t *wbuf, /* Buffer to write to disk */
*rbuf, /* Buffer read from disk */
*tbuf, *tbuf2; /* Temporary buffer pointers */
unsigned i,j,k,l; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Yet More Contiguous Hyperslabs Functionality\n"));
@@ -1597,7 +1597,7 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
HDfree(rbuf);
} /* test_select_hyper_contig3() */
-
+
/****************************************************************
**
** verify_select_hyper_contig_dr__run_test(): Verify data from
@@ -1609,10 +1609,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
size_t cube_size, unsigned edge_size, unsigned cube_rank)
{
const uint16_t *cube_ptr; /* Pointer into the cube buffer */
- uint16_t expected_value; /* Expected value in dataset */
+ uint16_t expected_value; /* Expected value in dataset */
unsigned i, j, k, l, m; /* Local index variables */
size_t s; /* Local index variable */
- hbool_t mis_match; /* Flag to indicate mis-match in expected value */
+ hbool_t mis_match; /* Flag to indicate mis-match in expected value */
HDassert(cube_buf);
HDassert(cube_size > 0);
@@ -1656,7 +1656,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
TestErrPrintf("Initial cube data don't match! Line = %d\n", __LINE__);
} /* verify_select_hyper_contig_dr__run_test() */
-
+
/****************************************************************
**
** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace)
@@ -1671,37 +1671,37 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
const uint16_t *zero_buf, unsigned edge_size, unsigned chunk_edge_size,
unsigned small_rank, unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t mis_match; /* Flag indicating a value read in wasn't what was expected */
+ hbool_t mis_match; /* Flag indicating a value read in wasn't what was expected */
hid_t fapl; /* File access property list */
- hid_t fid1; /* File ID */
- hid_t small_cube_sid; /* Dataspace ID for small cube in memory & file */
- hid_t mem_large_cube_sid; /* Dataspace ID for large cube in memory */
- hid_t file_large_cube_sid; /* Dataspace ID for large cube in file */
- hid_t small_cube_dcpl_id = H5P_DEFAULT; /* DCPL for small cube dataset */
- hid_t large_cube_dcpl_id = H5P_DEFAULT; /* DCPL for large cube dataset */
- hid_t small_cube_dataset; /* Dataset ID */
- hid_t large_cube_dataset; /* Dataset ID */
+ hid_t fid1; /* File ID */
+ hid_t small_cube_sid; /* Dataspace ID for small cube in memory & file */
+ hid_t mem_large_cube_sid; /* Dataspace ID for large cube in memory */
+ hid_t file_large_cube_sid; /* Dataspace ID for large cube in file */
+ hid_t small_cube_dcpl_id = H5P_DEFAULT; /* DCPL for small cube dataset */
+ hid_t large_cube_dcpl_id = H5P_DEFAULT; /* DCPL for large cube dataset */
+ hid_t small_cube_dataset; /* Dataset ID */
+ hid_t large_cube_dataset; /* Dataset ID */
size_t start_index; /* Offset within buffer to begin inspecting */
size_t stop_index; /* Offset within buffer to end inspecting */
- uint16_t expected_value; /* Expected value in dataset */
- uint16_t * small_cube_buf_1; /* Buffer for small cube data */
- uint16_t * large_cube_buf_1; /* Buffer for large cube data */
- uint16_t * ptr_1; /* Temporary pointer into cube data */
- hsize_t dims[SS_DR_MAX_RANK]; /* Dataspace dimensions */
- hsize_t start[SS_DR_MAX_RANK]; /* Shared hyperslab start offset */
- hsize_t stride[SS_DR_MAX_RANK]; /* Shared hyperslab stride */
- hsize_t count[SS_DR_MAX_RANK]; /* Shared hyperslab count */
- hsize_t block[SS_DR_MAX_RANK]; /* Shared hyperslab block size */
- hsize_t * start_ptr; /* Actual hyperslab start offset */
- hsize_t * stride_ptr; /* Actual hyperslab stride */
- hsize_t * count_ptr; /* Actual hyperslab count */
- hsize_t * block_ptr; /* Actual hyperslab block size */
+ uint16_t expected_value; /* Expected value in dataset */
+ uint16_t * small_cube_buf_1; /* Buffer for small cube data */
+ uint16_t * large_cube_buf_1; /* Buffer for large cube data */
+ uint16_t * ptr_1; /* Temporary pointer into cube data */
+ hsize_t dims[SS_DR_MAX_RANK]; /* Dataspace dimensions */
+ hsize_t start[SS_DR_MAX_RANK]; /* Shared hyperslab start offset */
+ hsize_t stride[SS_DR_MAX_RANK]; /* Shared hyperslab stride */
+ hsize_t count[SS_DR_MAX_RANK]; /* Shared hyperslab count */
+ hsize_t block[SS_DR_MAX_RANK]; /* Shared hyperslab block size */
+ hsize_t * start_ptr; /* Actual hyperslab start offset */
+ hsize_t * stride_ptr; /* Actual hyperslab stride */
+ hsize_t * count_ptr; /* Actual hyperslab count */
+ hsize_t * block_ptr; /* Actual hyperslab block size */
size_t small_cube_size; /* Number of elements in small cube */
size_t large_cube_size; /* Number of elements in large cube */
unsigned u, v, w, x; /* Local index variables */
size_t s; /* Local index variable */
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
MESSAGE(7, ("\tn-cube slice through m-cube I/O test %d.\n", test_num));
MESSAGE(7, ("\tranks = %u/%u, edge_size = %u, chunk_edge_size = %u.\n", small_rank, large_rank, edge_size, chunk_edge_size));
@@ -1770,10 +1770,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
* datasets.
*/
if(chunk_edge_size > 0) {
- hsize_t chunk_dims[SS_DR_MAX_RANK]; /* Chunk dimensions */
+ hsize_t chunk_dims[SS_DR_MAX_RANK]; /* Chunk dimensions */
chunk_dims[0] = chunk_dims[1] =
- chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = (hsize_t)chunk_edge_size;
+ chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = (hsize_t)chunk_edge_size;
small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
CHECK(small_cube_dcpl_id, FAIL, "H5Pcreate");
@@ -2096,7 +2096,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
VERIFY(check, TRUE, "H5S_select_shape_same_test");
- /* write the slice from the in memory large cube to the on disk small cube */
+ /* write the slice from the in memory large cube to the on disk small cube */
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
@@ -2207,7 +2207,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
VERIFY(check, TRUE, "H5S_select_shape_same_test");
- /* write the cube from memory to the target slice of the disk cube */
+ /* write the cube from memory to the target slice of the disk cube */
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
@@ -2303,7 +2303,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* test_select_hyper_contig_dr__run_test() */
-
+
/****************************************************************
**
** test_select_hyper_contig_dr(): Test H5S (dataspace)
@@ -2371,25 +2371,25 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
} /* test_select_hyper_contig_dr() */
-
+
/****************************************************************
**
** test_select_hyper_checker_board_dr__select_checker_board():
-** Given an n-cube data space with each edge of length
-** edge_size, and a checker_edge_size either select a checker
-** board selection of the entire cube(if sel_rank == n),
-** or select a checker board selection of a
-** sel_rank dimensional slice through n-cube parallel to the
+** Given an n-cube dataspace with each edge of length
+** edge_size, and a checker_edge_size either select a checker
+** board selection of the entire cube(if sel_rank == n),
+** or select a checker board selection of a
+** sel_rank dimensional slice through n-cube parallel to the
** sel_rank fastest changing indices, with origin (in the
-** higher indices) as indicated by the start array.
+** higher indices) as indicated by the start array.
**
-** Note that this function, like all its relatives, is
-** hard coded to presume a maximum n-cube rank of 5.
-** While this maximum is declared as a constant, increasing
-** it will require extensive coding in addition to changing
+** Note that this function, like all its relatives, is
+** hard coded to presume a maximum n-cube rank of 5.
+** While this maximum is declared as a constant, increasing
+** it will require extensive coding in addition to changing
** the value of the constant.
**
-** JRM -- 9/9/09
+** JRM -- 9/9/09
**
****************************************************************/
static void
@@ -2397,18 +2397,18 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
unsigned tgt_n_cube_rank, unsigned edge_size, unsigned checker_edge_size,
unsigned sel_rank, hsize_t sel_start[])
{
- hbool_t first_selection = TRUE;
- unsigned n_cube_offset;
- unsigned sel_offset;
- hsize_t base_count;
+ hbool_t first_selection = TRUE;
+ unsigned n_cube_offset;
+ unsigned sel_offset;
+ hsize_t base_count;
hsize_t offset_count;
- hsize_t start[SS_DR_MAX_RANK]; /* Offset of hyperslab selection */
- hsize_t stride[SS_DR_MAX_RANK]; /* Stride of hyperslab selection */
- hsize_t count[SS_DR_MAX_RANK]; /* Count of hyperslab selection */
- hsize_t block[SS_DR_MAX_RANK]; /* Block size of hyperslab selection */
+ hsize_t start[SS_DR_MAX_RANK]; /* Offset of hyperslab selection */
+ hsize_t stride[SS_DR_MAX_RANK]; /* Stride of hyperslab selection */
+ hsize_t count[SS_DR_MAX_RANK]; /* Count of hyperslab selection */
+ hsize_t block[SS_DR_MAX_RANK]; /* Block size of hyperslab selection */
unsigned i, j, k, l, m; /* Local index variable */
unsigned u; /* Local index variables */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
HDassert(edge_size >= 6);
HDassert(0 < checker_edge_size);
@@ -2567,8 +2567,8 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
/* Wierdness alert:
*
* Some how, it seems that selections can extend beyond the
- * boundaries of the target data space -- hence the following
- * code to manually clip the selection back to the data space
+ * boundaries of the target dataspace -- hence the following
+ * code to manually clip the selection back to the dataspace
* proper.
*/
for(u = 0; u < SS_DR_MAX_RANK; u++) {
@@ -2582,47 +2582,47 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* test_select_hyper_checker_board_dr__select_checker_board() */
-
+
/****************************************************************
**
** test_select_hyper_checker_board_dr__verify_data():
**
-** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** Examine the supplied buffer to see if it contains the
+** expected data. Return TRUE if it does, and FALSE
** otherwise.
**
-** The supplied buffer is presumed to contain the results
-** of read or writing a checkerboard selection of an
-** n-cube, or a checkerboard selection of an m (1 <= m < n)
-** dimensional slice through an n-cube parallel to the
+** The supplied buffer is presumed to contain the results
+** of read or writing a checkerboard selection of an
+** n-cube, or a checkerboard selection of an m (1 <= m < n)
+** dimensional slice through an n-cube parallel to the
** fastest changing indices.
**
-** It is further presumed that the buffer was zeroed before
-** the read, and that the n-cube was initialize with the
+** It is further presumed that the buffer was zeroed before
+** the read, and that the n-cube was initialize with the
** natural numbers listed in order from the origin along
** the fastest changing axis.
**
** Thus for a 10x10x10 3-cube, the value stored in location
-** (x, y, z) (assuming that z is the fastest changing index
-** and x the slowest) is assumed to be:
+** (x, y, z) (assuming that z is the fastest changing index
+** and x the slowest) is assumed to be:
**
-** (10 * 10 * x) + (10 * y) + z
+** (10 * 10 * x) + (10 * y) + z
**
-** Thus, if the buffer contains the result of reading a
-** checker board selection of a 10x10x10 3-cube, location
-** (x, y, z) will contain zero if it is not in a checker,
-** and 100x + 10y + z if (x, y, z) is in a checker.
+** Thus, if the buffer contains the result of reading a
+** checker board selection of a 10x10x10 3-cube, location
+** (x, y, z) will contain zero if it is not in a checker,
+** and 100x + 10y + z if (x, y, z) is in a checker.
**
-** If the buffer contains the result of reading a 3
-** dimensional slice (parallel to the three fastest changing
-** indices) through an n cube (n > 3), then the expected
-** values in the buffer will be the same, save that we will
-** add a constant determined by the origin of the 3-cube
-** in the n-cube.
+** If the buffer contains the result of reading a 3
+** dimensional slice (parallel to the three fastest changing
+** indices) through an n cube (n > 3), then the expected
+** values in the buffer will be the same, save that we will
+** add a constant determined by the origin of the 3-cube
+** in the n-cube.
**
-** Finally, the function presumes that the first element
-** of the buffer resides either at the origin of either
-** a selected or an unselected checker.
+** Finally, the function presumes that the first element
+** of the buffer resides either at the origin of either
+** a selected or an unselected checker.
**
****************************************************************/
H5_ATTR_PURE static hbool_t
@@ -2726,7 +2726,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
return(good_data);
} /* test_select_hyper_checker_board_dr__verify_data() */
-
+
/****************************************************************
**
** test_select_hyper_checker_board_dr__run_test(): Test H5S
@@ -2742,36 +2742,36 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
unsigned chunk_edge_size, unsigned small_rank, unsigned large_rank,
hid_t dset_type, hid_t xfer_plist)
{
- hbool_t data_ok;
+ hbool_t data_ok;
hid_t fapl; /* File access property list */
- hid_t fid; /* HDF5 File IDs */
- hid_t full_small_cube_sid; /* Dataspace for small cube w/all selection */
- hid_t mem_small_cube_sid;
- hid_t file_small_cube_sid;
- hid_t full_large_cube_sid; /* Dataspace for large cube w/all selection */
- hid_t mem_large_cube_sid;
- hid_t file_large_cube_sid;
- hid_t small_cube_dcpl_id = H5P_DEFAULT; /* DCPL for small cube dataset */
- hid_t large_cube_dcpl_id = H5P_DEFAULT; /* DCPL for large cube dataset */
- hid_t small_cube_dataset; /* Dataset ID */
- hid_t large_cube_dataset; /* Dataset ID */
- unsigned small_rank_offset; /* Rank offset of slice */
- const unsigned test_max_rank = 5; /* must update code if this changes */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t full_small_cube_sid; /* Dataspace for small cube w/all selection */
+ hid_t mem_small_cube_sid;
+ hid_t file_small_cube_sid;
+ hid_t full_large_cube_sid; /* Dataspace for large cube w/all selection */
+ hid_t mem_large_cube_sid;
+ hid_t file_large_cube_sid;
+ hid_t small_cube_dcpl_id = H5P_DEFAULT; /* DCPL for small cube dataset */
+ hid_t large_cube_dcpl_id = H5P_DEFAULT; /* DCPL for large cube dataset */
+ hid_t small_cube_dataset; /* Dataset ID */
+ hid_t large_cube_dataset; /* Dataset ID */
+ unsigned small_rank_offset; /* Rank offset of slice */
+ const unsigned test_max_rank = 5; /* must update code if this changes */
size_t start_index; /* Offset within buffer to begin inspecting */
size_t stop_index; /* Offset within buffer to end inspecting */
- uint16_t expected_value;
- uint16_t * small_cube_buf_1;
- uint16_t * large_cube_buf_1;
- uint16_t * ptr_1;
+ uint16_t expected_value;
+ uint16_t * small_cube_buf_1;
+ uint16_t * large_cube_buf_1;
+ uint16_t * ptr_1;
size_t small_cube_size; /* Number of elements in small cube */
size_t large_cube_size; /* Number of elements in large cube */
- hsize_t dims[SS_DR_MAX_RANK];
- hsize_t chunk_dims[SS_DR_MAX_RANK];
- hsize_t sel_start[SS_DR_MAX_RANK];
+ hsize_t dims[SS_DR_MAX_RANK];
+ hsize_t chunk_dims[SS_DR_MAX_RANK];
+ hsize_t sel_start[SS_DR_MAX_RANK];
unsigned u, v, w, x; /* Local index variables */
size_t s; /* Local index variable */
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
MESSAGE(7, ("\tn-cube slice through m-cube I/O test %d.\n", test_num));
MESSAGE(7, ("\tranks = %d/%d, edge_size = %d, checker_edge_size = %d, chunk_edge_size = %d.\n", small_rank, large_rank, edge_size, checker_edge_size, chunk_edge_size));
@@ -2862,7 +2862,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
*/
if(chunk_edge_size > 0) {
chunk_dims[0] = chunk_dims[1] =
- chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = chunk_edge_size;
+ chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = chunk_edge_size;
small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
CHECK(small_cube_dcpl_id, FAIL, "H5Pcreate");
@@ -3272,7 +3272,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
VERIFY(check, TRUE, "H5S_select_shape_same_test");
- /* write the slice from the in memory large cube to the
+ /* write the slice from the in memory large cube to the
* on disk small cube
*/
ret = H5Dwrite(small_cube_dataset,
@@ -3404,7 +3404,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
VERIFY(check, TRUE, "H5S_select_shape_same_test");
- /* write the checker board selection of the in memory
+ /* write the checker board selection of the in memory
* small cube to a slice through the on disk large
* cube.
*/
@@ -3531,7 +3531,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
} /* test_select_hyper_checker_board_dr__run_test() */
-
+
/****************************************************************
**
** test_select_hyper_checker_board_dr(): Test H5S (dataspace)
@@ -3540,8 +3540,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
** tested H5S_shape_same in isolation, so now we try to do
** I/O.
**
-** This is just an initial smoke check, so we will work
-** with a slice through a cube only.
+** This is just an initial smoke check, so we will work
+** with a slice through a cube only.
**
****************************************************************/
static void
@@ -3616,7 +3616,7 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
} /* test_select_hyper_checker_board_dr() */
-
+
/****************************************************************
**
** test_select_hyper_copy(): Test H5S (dataspace) selection code.
@@ -3626,22 +3626,22 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
static void
test_select_hyper_copy(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t data1,data2; /* Dataset IDs */
- hid_t sid1,sid2,sid3; /* Dataspace IDs */
- 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t data1,data2; /* Dataset IDs */
+ hid_t sid1,sid2,sid3; /* Dataspace IDs */
+ 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 */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* 1st buffer read from disk */
*rbuf2, /* 2nd buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
@@ -3782,21 +3782,21 @@ test_select_hyper_copy(void)
static void
test_select_point_copy(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t data1,data2; /* Dataset IDs */
- hid_t sid1,sid2,sid3; /* Dataspace IDs */
- 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
- hsize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hsize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t data1,data2; /* Dataset IDs */
+ hid_t sid1,sid2,sid3; /* Dataspace IDs */
+ 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
+ hsize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
+ hsize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* 1st buffer read from disk */
*rbuf2, /* 2nd buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
@@ -3956,24 +3956,24 @@ test_select_point_copy(void)
static void
test_select_hyper_offset(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace 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 */
- hssize_t offset[SPACE1_RANK]; /* Offset of selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace 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 */
+ hssize_t offset[SPACE1_RANK]; /* Offset of selection */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- htri_t valid; /* Generic boolean return value */
+ herr_t ret; /* Generic return value */
+ htri_t valid; /* Generic boolean return value */
H5S_class_t ext_type; /* Extent type */
/* Output message about test being performed */
@@ -4118,21 +4118,21 @@ test_select_hyper_offset(void)
static void
test_select_hyper_offset2(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
- hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
- hsize_t start[SPACE7_RANK]; /* Starting location of hyperslab */
- hsize_t count[SPACE7_RANK]; /* Element count of hyperslab */
- hssize_t offset[SPACE7_RANK]; /* Offset of selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hsize_t start[SPACE7_RANK]; /* Starting location of hyperslab */
+ hsize_t count[SPACE7_RANK]; /* Element count of hyperslab */
+ hssize_t offset[SPACE7_RANK]; /* Offset of selection */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- htri_t valid; /* Generic boolean return value */
+ herr_t ret; /* Generic return value */
+ htri_t valid; /* Generic boolean return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing More Hyperslab Selection Functions with Offsets\n"));
@@ -4239,23 +4239,23 @@ test_select_hyper_offset2(void)
static void
test_select_point_offset(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
- hsize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hsize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
- hssize_t offset[SPACE1_RANK]; /* Offset of selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace 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 coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
+ hsize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
+ hsize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
+ hssize_t offset[SPACE1_RANK]; /* Offset of selection */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- htri_t valid; /* Generic boolean return value */
+ herr_t ret; /* Generic return value */
+ htri_t valid; /* Generic boolean return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Element Selection Functions\n"));
@@ -4411,17 +4411,17 @@ test_select_point_offset(void)
static void
test_select_hyper_union(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t xfer; /* Dataset Transfer Property List 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t xfer; /* Dataset Transfer Property List 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 */
size_t begin[SPACE2_DIM1]= /* Offset within irregular block */
{0,0,0,0,0,0,0,0,0,0, /* First ten rows start at offset 0 */
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}; /* Next eighteen rows start at offset 5 */
@@ -4434,8 +4434,8 @@ test_select_hyper_union(void)
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- hssize_t npoints; /* Number of elements in selection */
+ herr_t ret; /* Generic return value */
+ hssize_t npoints; /* Number of elements in selection */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n"));
@@ -5079,18 +5079,18 @@ test_select_hyper_union_stagger(void)
static void
test_select_hyper_union_3d(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t tmp_space; /* Temporary Dataspace ID */
- hid_t tmp2_space; /* Another temporary Dataspace ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
- 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 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t tmp_space; /* Temporary Dataspace ID */
+ hid_t tmp2_space; /* Another temporary Dataspace ID */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
+ 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 */
struct row_list {
size_t z;
size_t y;
@@ -5416,22 +5416,22 @@ test_select_hyper_and_2d(void)
static void
test_select_hyper_xor_2d(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
- hsize_t dims2[] = {SPACE2A_DIM1};
- hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
+ hsize_t dims2[] = {SPACE2A_DIM1};
+ hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- hssize_t npoints; /* Number of elements in selection */
+ herr_t ret; /* Generic return value */
+ hssize_t npoints; /* Number of elements in selection */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslab Selection Functions with XOR of 2-D hyperslabs\n"));
@@ -5547,22 +5547,22 @@ test_select_hyper_xor_2d(void)
static void
test_select_hyper_notb_2d(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
- hsize_t dims2[] = {SPACE2A_DIM1};
- hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
+ hsize_t dims2[] = {SPACE2A_DIM1};
+ hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- hssize_t npoints; /* Number of elements in selection */
+ herr_t ret; /* Generic return value */
+ hssize_t npoints; /* Number of elements in selection */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTB of 2-D hyperslabs\n"));
@@ -5677,22 +5677,22 @@ test_select_hyper_notb_2d(void)
static void
test_select_hyper_nota_2d(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
- hsize_t dims2[] = {SPACE2A_DIM1};
- hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
+ hsize_t dims2[] = {SPACE2A_DIM1};
+ hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- hssize_t npoints; /* Number of elements in selection */
+ herr_t ret; /* Generic return value */
+ hssize_t npoints; /* Number of elements in selection */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTA of 2-D hyperslabs\n"));
@@ -6988,15 +6988,15 @@ test_select_hyper_iter3(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned ndim
static void
test_select_fill_all(void)
{
- hid_t sid1; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hid_t sid1; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
unsigned fill_value; /* Fill value */
fill_iter_info iter_info; /* Iterator information structure */
hsize_t points[SPACE7_DIM1*SPACE7_DIM2][SPACE7_RANK]; /* Coordinates of selection */
unsigned *wbuf, /* buffer to write to disk */
*tbuf; /* temporary buffer pointer */
unsigned u, v; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Filling 'all' Selections\n"));
@@ -7062,8 +7062,8 @@ test_select_fill_all(void)
static void
test_select_fill_point(hssize_t *offset)
{
- hid_t sid1; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hid_t sid1; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
hssize_t real_offset[SPACE7_RANK]; /* Actual offset to use */
hsize_t points[5][SPACE7_RANK] = {{2,4}, {3,8}, {8,4}, {7,5}, {7,7}};
size_t num_points = 5; /* Number of points selected */
@@ -7072,7 +7072,7 @@ test_select_fill_point(hssize_t *offset)
unsigned *wbuf, /* buffer to write to disk */
*tbuf; /* temporary buffer pointer */
unsigned u, v, w; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Filling 'point' Selections\n"));
@@ -7157,8 +7157,8 @@ test_select_fill_point(hssize_t *offset)
static void
test_select_fill_hyper_simple(hssize_t *offset)
{
- hid_t sid1; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hid_t sid1; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
hssize_t real_offset[SPACE7_RANK]; /* Actual offset to use */
hsize_t start[SPACE7_RANK]; /* Hyperslab start */
hsize_t count[SPACE7_RANK]; /* Hyperslab block size */
@@ -7169,7 +7169,7 @@ test_select_fill_hyper_simple(hssize_t *offset)
unsigned *wbuf, /* buffer to write to disk */
*tbuf; /* temporary buffer pointer */
unsigned u, v; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Filling Simple 'hyperslab' Selections\n"));
@@ -7257,8 +7257,8 @@ test_select_fill_hyper_simple(hssize_t *offset)
static void
test_select_fill_hyper_regular(hssize_t *offset)
{
- hid_t sid1; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hid_t sid1; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
hssize_t real_offset[SPACE7_RANK]; /* Actual offset to use */
hsize_t start[SPACE7_RANK]; /* Hyperslab start */
hsize_t stride[SPACE7_RANK]; /* Hyperslab stride size */
@@ -7276,7 +7276,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
unsigned *wbuf, /* buffer to write to disk */
*tbuf; /* temporary buffer pointer */
unsigned u, v, w; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Filling Regular 'hyperslab' Selections\n"));
@@ -7365,8 +7365,8 @@ test_select_fill_hyper_regular(hssize_t *offset)
static void
test_select_fill_hyper_irregular(hssize_t *offset)
{
- hid_t sid1; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hid_t sid1; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
hssize_t real_offset[SPACE7_RANK]; /* Actual offset to use */
hsize_t start[SPACE7_RANK]; /* Hyperslab start */
hsize_t count[SPACE7_RANK]; /* Hyperslab block count */
@@ -7395,7 +7395,7 @@ test_select_fill_hyper_irregular(hssize_t *offset)
unsigned *wbuf, /* buffer to write to disk */
*tbuf; /* temporary buffer pointer */
unsigned u, v, w; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Filling Irregular 'hyperslab' Selections\n"));
@@ -7488,16 +7488,16 @@ test_select_fill_hyper_irregular(hssize_t *offset)
static void
test_select_none(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
- hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer to read from disk */
*tbuf; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing I/O on 0-sized Selections\n"));
@@ -7586,11 +7586,11 @@ test_select_none(void)
static void
test_scalar_select(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
- hsize_t coord1[SPACE7_RANK]; /* Coordinates for point selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hsize_t coord1[SPACE7_RANK]; /* Coordinates for point selection */
hsize_t start[SPACE7_RANK]; /* Hyperslab start */
hsize_t count[SPACE7_RANK]; /* Hyperslab block count */
uint8_t *wbuf_uint8, /* buffer to write to disk */
@@ -7600,7 +7600,7 @@ test_scalar_select(void)
rval_ushort, /* value read back in */
*tbuf_ushort; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing I/O on Selections in Scalar Dataspaces\n"));
@@ -7732,18 +7732,18 @@ test_scalar_select(void)
/****************************************************************
**
** test_scalar_select2(): Tests selections on scalar dataspace,
-** verify H5Sselect_hyperslab and H5Sselect_elements fails for
-** scalar dataspace.
+** verify H5Sselect_hyperslab and H5Sselect_elements fails for
+** scalar dataspace.
**
****************************************************************/
static void
test_scalar_select2(void)
{
- hid_t sid; /* Dataspace ID */
- hsize_t coord1[1]; /* Coordinates for point selection */
+ hid_t sid; /* Dataspace ID */
+ hsize_t coord1[1]; /* Coordinates for point selection */
hsize_t start[1]; /* Hyperslab start */
hsize_t count[1]; /* Hyperslab block count */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(6, ("Testing Selections in Scalar Dataspaces\n"));
@@ -7755,7 +7755,7 @@ test_scalar_select2(void)
/* Select one element in memory with a point selection */
coord1[0]=0;
H5E_BEGIN_TRY {
- ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)&coord1);
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)&coord1);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sselect_elements");
@@ -7763,7 +7763,7 @@ test_scalar_select2(void)
start[0]=0;
count[0]=0;
H5E_BEGIN_TRY {
- ret = H5Sselect_hyperslab(sid,H5S_SELECT_SET,start,NULL,count,NULL);
+ ret = H5Sselect_hyperslab(sid,H5S_SELECT_SET,start,NULL,count,NULL);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sselect_hyperslab");
@@ -7789,18 +7789,18 @@ test_scalar_select2(void)
static void
test_scalar_select3(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
- hsize_t coord1[SPACE7_RANK]; /* Coordinates for point selection */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2};
+ hsize_t coord1[SPACE7_RANK]; /* Coordinates for point selection */
hsize_t start[SPACE7_RANK]; /* Hyperslab start */
hsize_t count[SPACE7_RANK]; /* Hyperslab block count */
uint8_t wval_uint8, /* Value written out */
rval_uint8; /* Value read in */
unsigned short wval_ushort, /* Another value written out */
rval_ushort; /* Another value read in */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing I/O on Selections in Scalar Dataspaces in Memory\n"));
@@ -7923,40 +7923,40 @@ test_scalar_select3(void)
/****************************************************************
**
** test_shape_same(): Tests selections on dataspace, verify that
-** "shape same" routine is working correctly.
+** "shape same" routine is working correctly.
**
****************************************************************/
static void
test_shape_same(void)
{
- hid_t all_sid; /* Dataspace ID with "all" selection */
- hid_t none_sid; /* Dataspace ID with "none" selection */
- hid_t single_pt_sid; /* Dataspace ID with single point selection */
- hid_t mult_pt_sid; /* Dataspace ID with multiple point selection */
- hid_t single_hyper_sid; /* Dataspace ID with single block hyperslab selection */
- hid_t single_hyper_all_sid; /* Dataspace ID with single block hyperslab
+ hid_t all_sid; /* Dataspace ID with "all" selection */
+ hid_t none_sid; /* Dataspace ID with "none" selection */
+ hid_t single_pt_sid; /* Dataspace ID with single point selection */
+ hid_t mult_pt_sid; /* Dataspace ID with multiple point selection */
+ hid_t single_hyper_sid; /* Dataspace ID with single block hyperslab selection */
+ hid_t single_hyper_all_sid; /* Dataspace ID with single block hyperslab
* selection that is the entire dataspace
*/
- hid_t single_hyper_pt_sid; /* Dataspace ID with single block hyperslab
+ hid_t single_hyper_pt_sid; /* Dataspace ID with single block hyperslab
* selection that is the same as the single
* point selection
*/
- hid_t regular_hyper_sid; /* Dataspace ID with regular hyperslab selection */
- hid_t irreg_hyper_sid; /* Dataspace ID with irregular hyperslab selection */
- hid_t none_hyper_sid; /* Dataspace ID with "no hyperslabs" selection */
- hid_t scalar_all_sid; /* ID for scalar dataspace with "all" selection */
- hid_t scalar_none_sid; /* ID for scalar dataspace with "none" selection */
- hid_t tmp_sid; /* Temporary dataspace ID */
- hsize_t dims[] = {SPACE9_DIM1, SPACE9_DIM2};
- hsize_t coord1[1][SPACE2_RANK]; /* Coordinates for single point selection */
- hsize_t coord2[SPACE9_DIM2][SPACE9_RANK]; /* Coordinates for multiple point selection */
+ hid_t regular_hyper_sid; /* Dataspace ID with regular hyperslab selection */
+ hid_t irreg_hyper_sid; /* Dataspace ID with irregular hyperslab selection */
+ hid_t none_hyper_sid; /* Dataspace ID with "no hyperslabs" selection */
+ hid_t scalar_all_sid; /* ID for scalar dataspace with "all" selection */
+ hid_t scalar_none_sid; /* ID for scalar dataspace with "none" selection */
+ hid_t tmp_sid; /* Temporary dataspace ID */
+ hsize_t dims[] = {SPACE9_DIM1, SPACE9_DIM2};
+ hsize_t coord1[1][SPACE2_RANK]; /* Coordinates for single point selection */
+ hsize_t coord2[SPACE9_DIM2][SPACE9_RANK]; /* Coordinates for multiple point selection */
hsize_t start[SPACE9_RANK]; /* Hyperslab start */
hsize_t stride[SPACE9_RANK]; /* Hyperslab stride */
hsize_t count[SPACE9_RANK]; /* Hyperslab block count */
hsize_t block[SPACE9_RANK]; /* Hyperslab block size */
unsigned u,v; /* Local index variables */
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(6, ("Testing Same Shape Comparisons\n"));
@@ -8399,12 +8399,13 @@ test_shape_same(void)
CHECK(tmp_sid, FAIL, "H5Screate_simple");
/* Select sequence of points for point selection */
- for(u=1; u<(SPACE9_DIM1-1); u++) {
- for(v=1; v<(SPACE9_DIM2-1); v++) {
+ for(u = 1; u < (SPACE9_DIM1 - 1); u++) {
+ for(v = 1; v < (SPACE9_DIM2 - 1); v++) {
coord2[v - 1][0] = u;
coord2[v - 1][1] = v;
} /* end for */
- ret = H5Sselect_elements(tmp_sid,H5S_SELECT_APPEND,(SPACE9_DIM2-2),coord2);
+
+ ret = H5Sselect_elements(tmp_sid, H5S_SELECT_APPEND, (SPACE9_DIM2 - 2), coord2);
CHECK(ret, FAIL, "H5Sselect_elements");
} /* end for */
@@ -8426,12 +8427,12 @@ test_shape_same(void)
CHECK(ret, FAIL, "H5Sselect_none");
/* Select sequence of rows for hyperslab selection */
- for(u=1; u<(SPACE9_DIM1-1); u++) {
- start[0]=u; start[1]=1;
- stride[0]=1; stride[1]=1;
- count[0]=1; count[1]=1;
- block[0]=1; block[1]=(SPACE9_DIM2-2);
- ret = H5Sselect_hyperslab(tmp_sid,H5S_SELECT_OR,start,stride,count,block);
+ for(u = 1; u < (SPACE9_DIM1 - 1); u++) {
+ start[0] = u; start[1] = 1;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = 1; block[1] = (SPACE9_DIM2 - 2);
+ ret = H5Sselect_hyperslab(tmp_sid, H5S_SELECT_OR, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end for */
@@ -8514,12 +8515,12 @@ test_shape_same(void)
CHECK(tmp_sid, FAIL, "H5Screate_simple");
/* Select sequence of points for point selection */
- for(u=0; u<SPACE9_DIM1; u++) {
- for(v=0; v<SPACE9_DIM2; v++) {
+ for(u = 0; u < SPACE9_DIM1; u++) {
+ for(v = 0; v < SPACE9_DIM2; v++) {
coord2[v][0] = u;
coord2[v][1] = v;
} /* end for */
- ret = H5Sselect_elements(tmp_sid,H5S_SELECT_APPEND,SPACE9_DIM2,coord2);
+ ret = H5Sselect_elements(tmp_sid, H5S_SELECT_APPEND, SPACE9_DIM2, coord2);
CHECK(ret, FAIL, "H5Sselect_elements");
} /* end for */
@@ -8541,12 +8542,12 @@ test_shape_same(void)
CHECK(ret, FAIL, "H5Sselect_none");
/* Select sequence of rows for hyperslab selection */
- for(u=0; u<SPACE9_DIM2; u++) {
- start[0]=u; start[1]=0;
- stride[0]=1; stride[1]=1;
- count[0]=1; count[1]=1;
- block[0]=1; block[1]=SPACE9_DIM2;
- ret = H5Sselect_hyperslab(tmp_sid,H5S_SELECT_OR,start,stride,count,block);
+ for(u = 0; u < SPACE9_DIM2; u++) {
+ start[0] = u; start[1] = 0;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = 1; block[1] = SPACE9_DIM2;
+ ret = H5Sselect_hyperslab(tmp_sid, H5S_SELECT_OR, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end for */
@@ -8708,11 +8709,11 @@ test_shape_same(void)
/* Select sequence of rows for hyperslab selection */
for(u = 2; u < 11; u += 2) {
- start[0] = u; start[1] = 3;
+ start[0] = u; start[1] = 3;
stride[0] = 1; stride[1] = 2;
- count[0] = 1; count[1] = 2;
- block[0] = 1; block[1] = 1;
- ret = H5Sselect_hyperslab(tmp_sid,H5S_SELECT_OR,start,stride,count,block);
+ count[0] = 1; count[1] = 2;
+ block[0] = 1; block[1] = 1;
+ ret = H5Sselect_hyperslab(tmp_sid, H5S_SELECT_OR, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end for */
@@ -8729,11 +8730,11 @@ test_shape_same(void)
CHECK(tmp_sid, FAIL, "H5Screate_simple");
/* Select regular, strided hyperslab selection at an offset */
- start[0] = 1; start[1] = 1;
+ start[0] = 1; start[1] = 1;
stride[0] = 2; stride[1] = 2;
- count[0] = 5; count[1] = 2;
- block[0] = 1; block[1] = 1;
- ret = H5Sselect_hyperslab(tmp_sid,H5S_SELECT_SET,start,stride,count,block);
+ count[0] = 5; count[1] = 2;
+ block[0] = 1; block[1] = 1;
+ ret = H5Sselect_hyperslab(tmp_sid, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Compare against hyperslab selection */
@@ -8807,20 +8808,20 @@ test_shape_same(void)
tmp_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
CHECK(tmp_sid, FAIL, "H5Screate_simple");
- start[0]=2; start[1]=2;
- stride[0]=1; stride[1]=1;
- count[0]=1; count[1]=1;
- block[0]=1; block[1]=1;
- ret = H5Sselect_hyperslab(tmp_sid,H5S_SELECT_SET,start,stride,count,block);
+ start[0] = 2; start[1] = 2;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = 1; block[1] = 1;
+ ret = H5Sselect_hyperslab(tmp_sid, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Select sequence of columns for hyperslab selection */
- for(u=0; u<3; u++) {
- start[0]=4; start[1]=u+4;
- stride[0]=1; stride[1]=1;
- count[0]=1; count[1]=1;
- block[0]=3; block[1]=1;
- ret = H5Sselect_hyperslab(tmp_sid,H5S_SELECT_OR,start,stride,count,block);
+ for(u = 0; u < 3; u++) {
+ start[0] = 4; start[1] = u + 4;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = 3; block[1] = 1;
+ ret = H5Sselect_hyperslab(tmp_sid, H5S_SELECT_OR, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end for */
@@ -8994,23 +8995,23 @@ test_shape_same(void)
** test_shape_same_dr__smoke_check_1():
**
** Create a square, 2-D dataspace (10 X 10), and select
-** all of it.
+** all of it.
**
** Similarly, create nine, 3-D dataspaces (10 X 10 X 10),
-** and select (10 X 10 X 1) hyper slabs in each, three with
-** the slab parallel to the xy plane, three parallel to the
-** xz plane, and three parallel to the yz plane.
+** and select (10 X 10 X 1) hyperslabs in each, three with
+** the slab parallel to the xy plane, three parallel to the
+** xz plane, and three parallel to the yz plane.
**
-** Assuming that z is the fastest changing dimension,
+** Assuming that z is the fastest changing dimension,
** H5Sselect_shape_same() should return TRUE when comparing
** the full 2-D space against any hyperslab parallel to the
** yz plane in the 3-D space, and FALSE when comparing the
** full 2-D space against the other two hyperslabs.
**
** Also create two additional 3-D dataspaces (10 X 10 X 10),
-** and select a (10 X 10 X 2) hyper slab parallel to the yz
-** axis in one of them, and two parallel (10 X 10 X 1) hyper
-** slabs parallel to the yz axis in the other.
+** and select a (10 X 10 X 2) hyperslab parallel to the yz
+** axis in one of them, and two parallel (10 X 10 X 1) hyper
+** slabs parallel to the yz axis in the other.
** H5Sselect_shape_same() should return FALSE when comparing
** each to the 2-D selection.
**
@@ -9018,27 +9019,27 @@ test_shape_same(void)
static void
test_shape_same_dr__smoke_check_1(void)
{
- hid_t small_square_sid;
- hid_t small_cube_xy_slice_0_sid;
- hid_t small_cube_xy_slice_1_sid;
- hid_t small_cube_xy_slice_2_sid;
- hid_t small_cube_xz_slice_0_sid;
- hid_t small_cube_xz_slice_1_sid;
- hid_t small_cube_xz_slice_2_sid;
- hid_t small_cube_yz_slice_0_sid;
- hid_t small_cube_yz_slice_1_sid;
- hid_t small_cube_yz_slice_2_sid;
- hid_t small_cube_yz_slice_3_sid;
- hid_t small_cube_yz_slice_4_sid;
- hsize_t small_cube_dims[] = {10, 10, 10};
- hsize_t start[3];
- hsize_t stride[3];
- hsize_t count[3];
- hsize_t block[3];
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
-
- MESSAGE(7, (" Smoke check 1: Slices through a cube.\n"));
+ hid_t small_square_sid;
+ hid_t small_cube_xy_slice_0_sid;
+ hid_t small_cube_xy_slice_1_sid;
+ hid_t small_cube_xy_slice_2_sid;
+ hid_t small_cube_xz_slice_0_sid;
+ hid_t small_cube_xz_slice_1_sid;
+ hid_t small_cube_xz_slice_2_sid;
+ hid_t small_cube_yz_slice_0_sid;
+ hid_t small_cube_yz_slice_1_sid;
+ hid_t small_cube_yz_slice_2_sid;
+ hid_t small_cube_yz_slice_3_sid;
+ hid_t small_cube_yz_slice_4_sid;
+ hsize_t small_cube_dims[] = {10, 10, 10};
+ hsize_t start[3];
+ hsize_t stride[3];
+ hsize_t count[3];
+ hsize_t block[3];
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
+
+ MESSAGE(7, (" Smoke check 1: Slices through a cube.\n"));
/* Create the 10 x 10 dataspace */
small_square_sid = H5Screate_simple(2, small_cube_dims, NULL);
@@ -9054,24 +9055,24 @@ test_shape_same_dr__smoke_check_1(void)
small_cube_xy_slice_2_sid = H5Screate_simple(3, small_cube_dims, NULL);
CHECK(small_cube_xy_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
- start[2] = 0; /* z */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
+ start[2] = 0; /* z */
/* stride is a bit silly here, since we are only selecting a single */
/* contiguous plane, but include it anyway, with values large enough */
/* to ensure that we will only get the single block selected. */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 10; /* x */
- block[1] = 10; /* y */
- block[2] = 1; /* z */
+ block[0] = 10; /* x */
+ block[1] = 10; /* y */
+ block[2] = 1; /* z */
ret = H5Sselect_hyperslab(small_cube_xy_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9097,24 +9098,24 @@ test_shape_same_dr__smoke_check_1(void)
small_cube_xz_slice_2_sid = H5Screate_simple(3, small_cube_dims, NULL);
CHECK(small_cube_xz_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
- start[2] = 0; /* z */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
+ start[2] = 0; /* z */
/* stride is a bit silly here, since we are only selecting a single */
/* contiguous chunk, but include it anyway, with values large enough */
/* to ensure that we will only get the single chunk. */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 10; /* x */
- block[1] = 1; /* y */
- block[2] = 10; /* z */
+ block[0] = 10; /* x */
+ block[1] = 1; /* y */
+ block[2] = 10; /* z */
ret = H5Sselect_hyperslab(small_cube_xz_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9146,24 +9147,24 @@ test_shape_same_dr__smoke_check_1(void)
small_cube_yz_slice_4_sid = H5Screate_simple(3, small_cube_dims, NULL);
CHECK(small_cube_yz_slice_4_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
- start[2] = 0; /* z */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
+ start[2] = 0; /* z */
/* stride is a bit silly here, since we are only selecting a single */
/* contiguous chunk, but include it anyway, with values large enough */
/* to ensure that we will only get the single chunk. */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 1; /* x */
- block[1] = 10; /* y */
- block[2] = 10; /* z */
+ block[0] = 1; /* x */
+ block[1] = 10; /* y */
+ block[2] = 10; /* z */
ret = H5Sselect_hyperslab(small_cube_yz_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
@@ -9285,39 +9286,39 @@ test_shape_same_dr__smoke_check_1(void)
** test_shape_same_dr__smoke_check_2():
**
** Create a square, 2-D dataspace (10 X 10), and select
-** a "checker board" hyper slab as follows:
+** a "checker board" hyperslab as follows:
**
-** * * - - * * - - * *
+** * * - - * * - - * *
** * * - - * * - - * *
** - - * * - - * * - -
** - - * * - - * * - -
-** * * - - * * - - * *
+** * * - - * * - - * *
** * * - - * * - - * *
** - - * * - - * * - -
** - - * * - - * * - -
-** * * - - * * - - * *
+** * * - - * * - - * *
** * * - - * * - - * *
**
-** where asterisks indicate selected elements, and dashes
-** indicate unselected elements.
+** where asterisks indicate selected elements, and dashes
+** indicate unselected elements.
**
** Similarly, create nine, 3-D dataspaces (10 X 10 X 10),
-** and select similar (10 X 10 X 1) checker board hyper
-** slabs in each, three with the slab parallel to the xy
-** plane, three parallel to the xz plane, and three parallel
-** to the yz plane.
+** and select similar (10 X 10 X 1) checker board hyper
+** slabs in each, three with the slab parallel to the xy
+** plane, three parallel to the xz plane, and three parallel
+** to the yz plane.
**
-** Assuming that z is the fastest changing dimension,
+** Assuming that z is the fastest changing dimension,
** H5Sselect_shape_same() should return TRUE when comparing
** the 2-D space checker board selection against a checker
** board hyperslab parallel to the yz plane in the 3-D
** space, and FALSE when comparing the 2-D checkerboard
-** selection against two hyper slabs parallel to the xy
-** or xz planes.
+** selection against two hyperslabs parallel to the xy
+** or xz planes.
**
** Also create an additional 3-D dataspaces (10 X 10 X 10),
-** and select a checker board parallel with the yz axis,
-** save with some squares being on different planes.
+** and select a checker board parallel with the yz axis,
+** save with some squares being on different planes.
** H5Sselect_shape_same() should return FALSE when
** comparing this selection to the 2-D selection.
**
@@ -9325,57 +9326,57 @@ test_shape_same_dr__smoke_check_1(void)
static void
test_shape_same_dr__smoke_check_2(void)
{
- hid_t small_square_sid;
- hid_t small_cube_xy_slice_0_sid;
- hid_t small_cube_xy_slice_1_sid;
- hid_t small_cube_xy_slice_2_sid;
- hid_t small_cube_xz_slice_0_sid;
- hid_t small_cube_xz_slice_1_sid;
- hid_t small_cube_xz_slice_2_sid;
- hid_t small_cube_yz_slice_0_sid;
- hid_t small_cube_yz_slice_1_sid;
- hid_t small_cube_yz_slice_2_sid;
- hid_t small_cube_yz_slice_3_sid;
- hsize_t small_cube_dims[] = {10, 10, 10};
- hsize_t start[3];
- hsize_t stride[3];
- hsize_t count[3];
- hsize_t block[3];
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
-
- MESSAGE(7, (" Smoke check 2: Checker board slices through a cube.\n"));
+ hid_t small_square_sid;
+ hid_t small_cube_xy_slice_0_sid;
+ hid_t small_cube_xy_slice_1_sid;
+ hid_t small_cube_xy_slice_2_sid;
+ hid_t small_cube_xz_slice_0_sid;
+ hid_t small_cube_xz_slice_1_sid;
+ hid_t small_cube_xz_slice_2_sid;
+ hid_t small_cube_yz_slice_0_sid;
+ hid_t small_cube_yz_slice_1_sid;
+ hid_t small_cube_yz_slice_2_sid;
+ hid_t small_cube_yz_slice_3_sid;
+ hsize_t small_cube_dims[] = {10, 10, 10};
+ hsize_t start[3];
+ hsize_t stride[3];
+ hsize_t count[3];
+ hsize_t block[3];
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
+
+ MESSAGE(7, (" Smoke check 2: Checker board slices through a cube.\n"));
/* Create the 10 x 10 dataspace */
small_square_sid = H5Screate_simple(2, small_cube_dims, NULL);
CHECK(small_square_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
- stride[0] = 4; /* x */
- stride[1] = 4; /* y */
+ stride[0] = 4; /* x */
+ stride[1] = 4; /* y */
- count[0] = 3; /* x */
- count[1] = 3; /* y */
+ count[0] = 3; /* x */
+ count[1] = 3; /* y */
- block[0] = 2; /* x */
- block[1] = 2; /* y */
+ block[0] = 2; /* x */
+ block[1] = 2; /* y */
ret = H5Sselect_hyperslab(small_square_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 2; /* x */
- start[1] = 2; /* y */
+ start[0] = 2; /* x */
+ start[1] = 2; /* y */
- stride[0] = 4; /* x */
- stride[1] = 4; /* y */
+ stride[0] = 4; /* x */
+ stride[1] = 4; /* y */
- count[0] = 2; /* x */
- count[1] = 2; /* y */
+ count[0] = 2; /* x */
+ count[1] = 2; /* y */
- block[0] = 2; /* x */
- block[1] = 2; /* y */
+ block[0] = 2; /* x */
+ block[1] = 2; /* y */
ret = H5Sselect_hyperslab(small_square_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9392,21 +9393,21 @@ test_shape_same_dr__smoke_check_2(void)
CHECK(small_cube_xy_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
- start[2] = 0; /* z */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
+ start[2] = 0; /* z */
- stride[0] = 4; /* x */
- stride[1] = 4; /* y */
- stride[2] = 20; /* z -- large enough that there will only be one slice */
+ stride[0] = 4; /* x */
+ stride[1] = 4; /* y */
+ stride[2] = 20; /* z -- large enough that there will only be one slice */
- count[0] = 3; /* x */
- count[1] = 3; /* y */
- count[2] = 1; /* z */
+ count[0] = 3; /* x */
+ count[1] = 3; /* y */
+ count[2] = 1; /* z */
- block[0] = 2; /* x */
- block[1] = 2; /* y */
- block[2] = 1; /* z */
+ block[0] = 2; /* x */
+ block[1] = 2; /* y */
+ block[2] = 1; /* z */
ret = H5Sselect_hyperslab(small_cube_xy_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9422,21 +9423,21 @@ test_shape_same_dr__smoke_check_2(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 2; /* x */
- start[1] = 2; /* y */
- start[2] = 0; /* z */
+ start[0] = 2; /* x */
+ start[1] = 2; /* y */
+ start[2] = 0; /* z */
- stride[0] = 4; /* x */
- stride[1] = 4; /* y */
- stride[2] = 20; /* z -- large enough that there will only be one slice */
+ stride[0] = 4; /* x */
+ stride[1] = 4; /* y */
+ stride[2] = 20; /* z -- large enough that there will only be one slice */
- count[0] = 2; /* x */
- count[1] = 2; /* y */
- count[2] = 1; /* z */
+ count[0] = 2; /* x */
+ count[1] = 2; /* y */
+ count[2] = 1; /* z */
- block[0] = 2; /* x */
- block[1] = 2; /* y */
- block[2] = 1; /* z */
+ block[0] = 2; /* x */
+ block[1] = 2; /* y */
+ block[2] = 1; /* z */
ret = H5Sselect_hyperslab(small_cube_xy_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9463,21 +9464,21 @@ test_shape_same_dr__smoke_check_2(void)
CHECK(small_cube_xz_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
- start[2] = 0; /* z */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
+ start[2] = 0; /* z */
- stride[0] = 4; /* x */
- stride[1] = 20; /* y -- large enough that there will only be one slice */
- stride[2] = 4; /* z */
+ stride[0] = 4; /* x */
+ stride[1] = 20; /* y -- large enough that there will only be one slice */
+ stride[2] = 4; /* z */
- count[0] = 3; /* x */
- count[1] = 1; /* y */
- count[2] = 3; /* z */
+ count[0] = 3; /* x */
+ count[1] = 1; /* y */
+ count[2] = 3; /* z */
- block[0] = 2; /* x */
- block[1] = 1; /* y */
- block[2] = 2; /* z */
+ block[0] = 2; /* x */
+ block[1] = 1; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_xz_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9492,21 +9493,21 @@ test_shape_same_dr__smoke_check_2(void)
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 2; /* x */
- start[1] = 0; /* y */
- start[2] = 2; /* z */
+ start[0] = 2; /* x */
+ start[1] = 0; /* y */
+ start[2] = 2; /* z */
- stride[0] = 4; /* x */
- stride[1] = 20; /* y -- large enough that there will only be one slice */
- stride[2] = 4; /* z */
+ stride[0] = 4; /* x */
+ stride[1] = 20; /* y -- large enough that there will only be one slice */
+ stride[2] = 4; /* z */
- count[0] = 2; /* x */
- count[1] = 1; /* y */
- count[2] = 2; /* z */
+ count[0] = 2; /* x */
+ count[1] = 1; /* y */
+ count[2] = 2; /* z */
- block[0] = 2; /* x */
- block[1] = 1; /* y */
- block[2] = 2; /* z */
+ block[0] = 2; /* x */
+ block[1] = 1; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_xz_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9535,21 +9536,21 @@ test_shape_same_dr__smoke_check_2(void)
small_cube_yz_slice_3_sid = H5Screate_simple(3, small_cube_dims, NULL);
CHECK(small_cube_yz_slice_3_sid, FAIL, "H5Screate_simple");
- start[0] = 0; /* x */
- start[1] = 0; /* y */
- start[2] = 0; /* z */
+ start[0] = 0; /* x */
+ start[1] = 0; /* y */
+ start[2] = 0; /* z */
stride[0] = 20; /* x -- large enough that there will only be one slice */
stride[1] = 4; /* y */
stride[2] = 4; /* z */
- count[0] = 1; /* x */
- count[1] = 3; /* y */
- count[2] = 3; /* z */
+ count[0] = 1; /* x */
+ count[1] = 3; /* y */
+ count[2] = 3; /* z */
- block[0] = 1; /* x */
- block[1] = 2; /* y */
- block[2] = 2; /* z */
+ block[0] = 1; /* x */
+ block[1] = 2; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_yz_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9570,21 +9571,21 @@ test_shape_same_dr__smoke_check_2(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 0; /* x */
- start[1] = 2; /* y */
- start[2] = 2; /* z */
+ start[0] = 0; /* x */
+ start[1] = 2; /* y */
+ start[2] = 2; /* z */
- stride[0] = 20; /* x -- large enough that there will only be one slice */
- stride[1] = 4; /* y */
- stride[2] = 4; /* z */
+ stride[0] = 20; /* x -- large enough that there will only be one slice */
+ stride[1] = 4; /* y */
+ stride[2] = 4; /* z */
- count[0] = 1; /* x */
- count[1] = 2; /* y */
- count[2] = 2; /* z */
+ count[0] = 1; /* x */
+ count[1] = 2; /* y */
+ count[2] = 2; /* z */
- block[0] = 1; /* x */
- block[1] = 2; /* y */
- block[2] = 2; /* z */
+ block[0] = 1; /* x */
+ block[1] = 2; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_yz_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9693,108 +9694,108 @@ test_shape_same_dr__smoke_check_2(void)
** test_shape_same_dr__smoke_check_3():
**
** Create a square, 2-D dataspace (10 X 10), and select an
-** irregular hyper slab as follows:
-**
-** y
-** 9 - - - - - - - - - -
-** 8 - - - - - - - - - -
-** 7 - - - * * * * - - -
-** 6 - - * * * * * - - -
-** 5 - - * * - - - - - -
-** 4 - - * * - * * - - -
-** 3 - - * * - * * - - -
-** 2 - - - - - - - - - -
-** 1 - - - - - - - - - -
-** 0 - - - - - - - - - -
+** irregular hyperslab as follows:
+**
+** y
+** 9 - - - - - - - - - -
+** 8 - - - - - - - - - -
+** 7 - - - * * * * - - -
+** 6 - - * * * * * - - -
+** 5 - - * * - - - - - -
+** 4 - - * * - * * - - -
+** 3 - - * * - * * - - -
+** 2 - - - - - - - - - -
+** 1 - - - - - - - - - -
+** 0 - - - - - - - - - -
** 0 1 2 3 4 5 6 7 8 9 x
**
-** where asterisks indicate selected elements, and dashes
-** indicate unselected elements.
+** where asterisks indicate selected elements, and dashes
+** indicate unselected elements.
**
** Similarly, create nine, 3-D dataspaces (10 X 10 X 10),
-** and select similar irregular hyper slabs in each, three
-** with the slab parallel to the xy plane, three parallel
-** to the xz plane, and three parallel to the yz plane.
-** Further, translate the irregular slab in 2/3rds of the
-** cases.
+** and select similar irregular hyperslabs in each, three
+** with the slab parallel to the xy plane, three parallel
+** to the xz plane, and three parallel to the yz plane.
+** Further, translate the irregular slab in 2/3rds of the
+** cases.
**
-** Assuming that z is the fastest changing dimension,
+** Assuming that z is the fastest changing dimension,
** H5Sselect_shape_same() should return TRUE when
** comparing the 2-D irregular hyperslab selection
-** against the irregular hyperslab selections parallel
+** against the irregular hyperslab selections parallel
** to the yz plane in the 3-D space, and FALSE when
-** comparing it against the irregular hyper slabs
-** selections parallel to the xy or xz planes.
+** comparing it against the irregular hyperslabs
+** selections parallel to the xy or xz planes.
**
****************************************************************/
static void
test_shape_same_dr__smoke_check_3(void)
{
- hid_t small_square_sid;
- hid_t small_cube_xy_slice_0_sid;
- hid_t small_cube_xy_slice_1_sid;
- hid_t small_cube_xy_slice_2_sid;
- hid_t small_cube_xz_slice_0_sid;
- hid_t small_cube_xz_slice_1_sid;
- hid_t small_cube_xz_slice_2_sid;
- hid_t small_cube_yz_slice_0_sid;
- hid_t small_cube_yz_slice_1_sid;
- hid_t small_cube_yz_slice_2_sid;
- hsize_t small_cube_dims[] = {10, 10, 10};
- hsize_t start[3];
- hsize_t stride[3];
- hsize_t count[3];
- hsize_t block[3];
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
-
- MESSAGE(7, (" Smoke check 3: Offset subsets of slices through a cube.\n"));
+ hid_t small_square_sid;
+ hid_t small_cube_xy_slice_0_sid;
+ hid_t small_cube_xy_slice_1_sid;
+ hid_t small_cube_xy_slice_2_sid;
+ hid_t small_cube_xz_slice_0_sid;
+ hid_t small_cube_xz_slice_1_sid;
+ hid_t small_cube_xz_slice_2_sid;
+ hid_t small_cube_yz_slice_0_sid;
+ hid_t small_cube_yz_slice_1_sid;
+ hid_t small_cube_yz_slice_2_sid;
+ hsize_t small_cube_dims[] = {10, 10, 10};
+ hsize_t start[3];
+ hsize_t stride[3];
+ hsize_t count[3];
+ hsize_t block[3];
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
+
+ MESSAGE(7, (" Smoke check 3: Offset subsets of slices through a cube.\n"));
/* Create the 10 x 10 dataspace */
small_square_sid = H5Screate_simple(2, small_cube_dims, NULL);
CHECK(small_square_sid, FAIL, "H5Screate_simple");
- start[0] = 2; /* x */
- start[1] = 3; /* y */
+ start[0] = 2; /* x */
+ start[1] = 3; /* y */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
- block[0] = 2; /* x */
- block[1] = 4; /* y */
+ block[0] = 2; /* x */
+ block[1] = 4; /* y */
ret = H5Sselect_hyperslab(small_square_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 3; /* x */
- start[1] = 6; /* y */
+ start[0] = 3; /* x */
+ start[1] = 6; /* y */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
- block[0] = 4; /* x */
- block[1] = 2; /* y */
+ block[0] = 4; /* x */
+ block[1] = 2; /* y */
ret = H5Sselect_hyperslab(small_square_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 5; /* x */
- start[1] = 3; /* y */
+ start[0] = 5; /* x */
+ start[1] = 3; /* y */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
- block[0] = 2; /* x */
- block[1] = 2; /* y */
+ block[0] = 2; /* x */
+ block[1] = 2; /* y */
ret = H5Sselect_hyperslab(small_square_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9811,101 +9812,101 @@ test_shape_same_dr__smoke_check_3(void)
CHECK(small_cube_xy_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 2; /* x */
- start[1] = 3; /* y */
- start[2] = 5; /* z */
+ start[0] = 2; /* x */
+ start[1] = 3; /* y */
+ start[2] = 5; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 2; /* x */
- block[1] = 4; /* y */
- block[2] = 1; /* z */
+ block[0] = 2; /* x */
+ block[1] = 4; /* y */
+ block[2] = 1; /* z */
ret = H5Sselect_hyperslab(small_cube_xy_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[0] -= 1; /* x */
- start[1] -= 2; /* y */
+ start[0] -= 1; /* x */
+ start[1] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_xy_slice_1_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[1] += 5; /* y */
+ start[0] += 5; /* x */
+ start[1] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_xy_slice_2_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 3; /* x */
- start[1] = 6; /* y */
- start[2] = 5; /* z */
+ start[0] = 3; /* x */
+ start[1] = 6; /* y */
+ start[2] = 5; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 4; /* x */
- block[1] = 2; /* y */
- block[2] = 1; /* z */
+ block[0] = 4; /* x */
+ block[1] = 2; /* y */
+ block[2] = 1; /* z */
ret = H5Sselect_hyperslab(small_cube_xy_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[0] -= 1; /* x */
- start[1] -= 2; /* y */
+ start[0] -= 1; /* x */
+ start[1] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_xy_slice_1_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[1] += 5; /* y */
+ start[0] += 5; /* x */
+ start[1] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_xy_slice_2_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 5; /* x */
- start[1] = 3; /* y */
- start[2] = 5; /* z */
+ start[0] = 5; /* x */
+ start[1] = 3; /* y */
+ start[2] = 5; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 2; /* x */
- block[1] = 2; /* y */
- block[2] = 1; /* z */
+ block[0] = 2; /* x */
+ block[1] = 2; /* y */
+ block[2] = 1; /* z */
ret = H5Sselect_hyperslab(small_cube_xy_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[0] -= 1; /* x */
- start[1] -= 2; /* y */
+ start[0] -= 1; /* x */
+ start[1] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_xy_slice_1_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[1] += 5; /* y */
+ start[0] += 5; /* x */
+ start[1] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_xy_slice_2_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -9921,101 +9922,101 @@ test_shape_same_dr__smoke_check_3(void)
small_cube_xz_slice_2_sid = H5Screate_simple(3, small_cube_dims, NULL);
CHECK(small_cube_xz_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 2; /* x */
- start[1] = 5; /* y */
- start[2] = 3; /* z */
+ start[0] = 2; /* x */
+ start[1] = 5; /* y */
+ start[2] = 3; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 2; /* x */
- block[1] = 1; /* y */
- block[2] = 4; /* z */
+ block[0] = 2; /* x */
+ block[1] = 1; /* y */
+ block[2] = 4; /* z */
ret = H5Sselect_hyperslab(small_cube_xz_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[0] -= 1; /* x */
- start[2] -= 2; /* y */
+ start[0] -= 1; /* x */
+ start[2] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_xz_slice_1_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[2] += 5; /* y */
+ start[0] += 5; /* x */
+ start[2] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_xz_slice_2_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 3; /* x */
- start[1] = 5; /* y */
- start[2] = 6; /* z */
+ start[0] = 3; /* x */
+ start[1] = 5; /* y */
+ start[2] = 6; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 4; /* x */
- block[1] = 1; /* y */
- block[2] = 2; /* z */
+ block[0] = 4; /* x */
+ block[1] = 1; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_xz_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[0] -= 1; /* x */
- start[2] -= 2; /* y */
+ start[0] -= 1; /* x */
+ start[2] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_xz_slice_1_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[2] += 5; /* y */
+ start[0] += 5; /* x */
+ start[2] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_xz_slice_2_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 5; /* x */
- start[1] = 5; /* y */
- start[2] = 3; /* z */
+ start[0] = 5; /* x */
+ start[1] = 5; /* y */
+ start[2] = 3; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 2; /* x */
- block[1] = 1; /* y */
- block[2] = 2; /* z */
+ block[0] = 2; /* x */
+ block[1] = 1; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_xz_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[0] -= 1; /* x */
- start[2] -= 2; /* y */
+ start[0] -= 1; /* x */
+ start[2] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_xz_slice_1_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[2] += 5; /* y */
+ start[0] += 5; /* x */
+ start[2] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_xz_slice_2_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -10033,101 +10034,101 @@ test_shape_same_dr__smoke_check_3(void)
small_cube_yz_slice_2_sid = H5Screate_simple(3, small_cube_dims, NULL);
CHECK(small_cube_yz_slice_2_sid, FAIL, "H5Screate_simple");
- start[0] = 8; /* x */
- start[1] = 2; /* y */
- start[2] = 3; /* z */
+ start[0] = 8; /* x */
+ start[1] = 2; /* y */
+ start[2] = 3; /* z */
- stride[0] = 20; /* x -- large enough that there will only be one slice */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x -- large enough that there will only be one slice */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 1; /* x */
- block[1] = 2; /* y */
- block[2] = 4; /* z */
+ block[0] = 1; /* x */
+ block[1] = 2; /* y */
+ block[2] = 4; /* z */
ret = H5Sselect_hyperslab(small_cube_yz_slice_0_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[1] -= 1; /* x */
- start[2] -= 2; /* y */
+ start[1] -= 1; /* x */
+ start[2] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_yz_slice_1_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[2] += 5; /* y */
+ start[0] += 5; /* x */
+ start[2] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_yz_slice_2_sid, H5S_SELECT_SET,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 8; /* x */
- start[1] = 3; /* y */
- start[2] = 6; /* z */
+ start[0] = 8; /* x */
+ start[1] = 3; /* y */
+ start[2] = 6; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 1; /* x */
- block[1] = 4; /* y */
- block[2] = 2; /* z */
+ block[0] = 1; /* x */
+ block[1] = 4; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_yz_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[1] -= 1; /* x */
- start[2] -= 2; /* y */
+ start[1] -= 1; /* x */
+ start[2] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_yz_slice_1_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[2] += 5; /* y */
+ start[0] += 5; /* x */
+ start[2] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_yz_slice_2_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- start[0] = 8; /* x */
- start[1] = 5; /* y */
- start[2] = 3; /* z */
+ start[0] = 8; /* x */
+ start[1] = 5; /* y */
+ start[2] = 3; /* z */
- stride[0] = 20; /* x */
- stride[1] = 20; /* y */
- stride[2] = 20; /* z */
+ stride[0] = 20; /* x */
+ stride[1] = 20; /* y */
+ stride[2] = 20; /* z */
- count[0] = 1; /* x */
- count[1] = 1; /* y */
- count[2] = 1; /* z */
+ count[0] = 1; /* x */
+ count[1] = 1; /* y */
+ count[2] = 1; /* z */
- block[0] = 1; /* x */
- block[1] = 2; /* y */
- block[2] = 2; /* z */
+ block[0] = 1; /* x */
+ block[1] = 2; /* y */
+ block[2] = 2; /* z */
ret = H5Sselect_hyperslab(small_cube_yz_slice_0_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the starting point to the origin */
- start[1] -= 1; /* x */
- start[2] -= 2; /* y */
+ start[1] -= 1; /* x */
+ start[2] -= 2; /* y */
ret = H5Sselect_hyperslab(small_cube_yz_slice_1_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* move the irregular selection to the upper right hand corner */
- start[0] += 5; /* x */
- start[2] += 5; /* y */
+ start[0] += 5; /* x */
+ start[2] += 5; /* y */
ret = H5Sselect_hyperslab(small_cube_yz_slice_2_sid, H5S_SELECT_OR,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -10201,7 +10202,6 @@ test_shape_same_dr__smoke_check_3(void)
ret = H5Sclose(small_cube_yz_slice_2_sid);
CHECK(ret, FAIL, "H5Sclose");
-
} /* test_shape_same_dr__smoke_check_3() */
@@ -10210,78 +10210,78 @@ test_shape_same_dr__smoke_check_3(void)
** test_shape_same_dr__smoke_check_4():
**
** Create a square, 2-D dataspace (10 X 10), and select
-** the entire space.
+** the entire space.
**
** Similarly, create 3-D and 4-D dataspaces:
**
-** (1 X 10 X 10)
-** (10 X 1 X 10)
-** (10 X 10 X 1)
-** (10 X 10 X 10)
+** (1 X 10 X 10)
+** (10 X 1 X 10)
+** (10 X 10 X 1)
+** (10 X 10 X 10)
**
-** (1 X 1 X 10 X 10)
-** (1 X 10 X 1 X 10)
-** (1 X 10 X 10 X 1)
-** (10 X 1 X 1 X 10)
-** (10 X 1 X 10 X 1)
-** (10 X 10 X 1 X 1)
-** (10 X 1 X 10 X 10)
+** (1 X 1 X 10 X 10)
+** (1 X 10 X 1 X 10)
+** (1 X 10 X 10 X 1)
+** (10 X 1 X 1 X 10)
+** (10 X 1 X 10 X 1)
+** (10 X 10 X 1 X 1)
+** (10 X 1 X 10 X 10)
**
-** And select these entire spaces as well.
+** And select these entire spaces as well.
**
** Compare the 2-D space against all the other spaces
** with H5Sselect_shape_same(). The (1 X 10 X 10) &
-** (1 X 1 X 10 X 10) should return TRUE. All others
-** should return FALSE.
+** (1 X 1 X 10 X 10) should return TRUE. All others
+** should return FALSE.
**
****************************************************************/
static void
test_shape_same_dr__smoke_check_4(void)
{
- hid_t square_sid;
- hid_t three_d_space_0_sid;
- hid_t three_d_space_1_sid;
- hid_t three_d_space_2_sid;
- hid_t three_d_space_3_sid;
- hid_t four_d_space_0_sid;
- hid_t four_d_space_1_sid;
- hid_t four_d_space_2_sid;
- hid_t four_d_space_3_sid;
- hid_t four_d_space_4_sid;
- hid_t four_d_space_5_sid;
- hid_t four_d_space_6_sid;
- hsize_t dims[] = {10, 10, 10, 10};
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
-
- MESSAGE(7, (" Smoke check 4: Spaces of different dimension but same size.\n"));
+ hid_t square_sid;
+ hid_t three_d_space_0_sid;
+ hid_t three_d_space_1_sid;
+ hid_t three_d_space_2_sid;
+ hid_t three_d_space_3_sid;
+ hid_t four_d_space_0_sid;
+ hid_t four_d_space_1_sid;
+ hid_t four_d_space_2_sid;
+ hid_t four_d_space_3_sid;
+ hid_t four_d_space_4_sid;
+ hid_t four_d_space_5_sid;
+ hid_t four_d_space_6_sid;
+ hsize_t dims[] = {10, 10, 10, 10};
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
+
+ MESSAGE(7, (" Smoke check 4: Spaces of different dimension but same size.\n"));
/* Create the 10 x 10 dataspace */
square_sid = H5Screate_simple(2, dims, NULL);
CHECK(square_sid, FAIL, "H5Screate_simple");
- /* create (1 X 10 X 10) data space */
+ /* create (1 X 10 X 10) dataspace */
dims[0] = 1;
dims[1] = 10;
dims[2] = 10;
three_d_space_0_sid = H5Screate_simple(3, dims, NULL);
CHECK(three_d_space_0_sid, FAIL, "H5Screate_simple");
- /* create (10 X 1 X 10) data space */
+ /* create (10 X 1 X 10) dataspace */
dims[0] = 10;
dims[1] = 1;
dims[2] = 10;
three_d_space_1_sid = H5Screate_simple(3, dims, NULL);
CHECK(three_d_space_1_sid, FAIL, "H5Screate_simple");
- /* create (10 X 10 X 1) data space */
+ /* create (10 X 10 X 1) dataspace */
dims[0] = 10;
dims[1] = 10;
dims[2] = 1;
three_d_space_2_sid = H5Screate_simple(3, dims, NULL);
CHECK(three_d_space_2_sid, FAIL, "H5Screate_simple");
- /* create (10 X 10 X 10) data space */
+ /* create (10 X 10 X 10) dataspace */
dims[0] = 10;
dims[1] = 10;
dims[2] = 10;
@@ -10289,7 +10289,7 @@ test_shape_same_dr__smoke_check_4(void)
CHECK(three_d_space_3_sid, FAIL, "H5Screate_simple");
- /* create (1 X 1 X 10 X 10) data space */
+ /* create (1 X 1 X 10 X 10) dataspace */
dims[0] = 1;
dims[1] = 1;
dims[2] = 10;
@@ -10297,7 +10297,7 @@ test_shape_same_dr__smoke_check_4(void)
four_d_space_0_sid = H5Screate_simple(4, dims, NULL);
CHECK(four_d_space_0_sid, FAIL, "H5Screate_simple");
- /* create (1 X 10 X 1 X 10) data space */
+ /* create (1 X 10 X 1 X 10) dataspace */
dims[0] = 1;
dims[1] = 10;
dims[2] = 1;
@@ -10305,7 +10305,7 @@ test_shape_same_dr__smoke_check_4(void)
four_d_space_1_sid = H5Screate_simple(4, dims, NULL);
CHECK(four_d_space_1_sid, FAIL, "H5Screate_simple");
- /* create (1 X 10 X 10 X 1) data space */
+ /* create (1 X 10 X 10 X 1) dataspace */
dims[0] = 1;
dims[1] = 10;
dims[2] = 10;
@@ -10313,7 +10313,7 @@ test_shape_same_dr__smoke_check_4(void)
four_d_space_2_sid = H5Screate_simple(4, dims, NULL);
CHECK(four_d_space_2_sid, FAIL, "H5Screate_simple");
- /* create (10 X 1 X 1 X 10) data space */
+ /* create (10 X 1 X 1 X 10) dataspace */
dims[0] = 10;
dims[1] = 1;
dims[2] = 1;
@@ -10321,7 +10321,7 @@ test_shape_same_dr__smoke_check_4(void)
four_d_space_3_sid = H5Screate_simple(4, dims, NULL);
CHECK(four_d_space_3_sid, FAIL, "H5Screate_simple");
- /* create (10 X 1 X 10 X 1) data space */
+ /* create (10 X 1 X 10 X 1) dataspace */
dims[0] = 10;
dims[1] = 1;
dims[2] = 10;
@@ -10329,7 +10329,7 @@ test_shape_same_dr__smoke_check_4(void)
four_d_space_4_sid = H5Screate_simple(4, dims, NULL);
CHECK(four_d_space_4_sid, FAIL, "H5Screate_simple");
- /* create (10 X 10 X 1 X 1) data space */
+ /* create (10 X 10 X 1 X 1) dataspace */
dims[0] = 10;
dims[1] = 10;
dims[2] = 1;
@@ -10337,7 +10337,7 @@ test_shape_same_dr__smoke_check_4(void)
four_d_space_5_sid = H5Screate_simple(4, dims, NULL);
CHECK(four_d_space_5_sid, FAIL, "H5Screate_simple");
- /* create (10 X 1 X 10 X 10) data space */
+ /* create (10 X 1 X 10 X 10) dataspace */
dims[0] = 10;
dims[1] = 1;
dims[2] = 10;
@@ -10427,15 +10427,15 @@ test_shape_same_dr__smoke_check_4(void)
/****************************************************************
**
** test_shape_same_dr__full_space_vs_slice(): Tests selection
-** of a full n-cube data space vs an n-dimensional slice of
+** of a full n-cube dataspace vs an n-dimensional slice of
** of an m-cube (m > n) in a call to H5Sselect_shape_same().
-** Note that this test does not require the n-cube and the
-** n-dimensional slice to have the same rank (although
+** Note that this test does not require the n-cube and the
+** n-dimensional slice to have the same rank (although
** H5Sselect_shape_same() should always return FALSE if
-** they don't).
+** they don't).
**
-** Per Quincey's suggestion, only test up to 5 dimensional
-** spaces.
+** Per Quincey's suggestion, only test up to 5 dimensional
+** spaces.
**
****************************************************************/
static void
@@ -10447,22 +10447,22 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
hbool_t dim_selected[],
hbool_t expected_result)
{
- char test_desc_0[128];
- char test_desc_1[256];
+ char test_desc_0[128];
+ char test_desc_1[256];
int i;
- hid_t n_cube_0_sid; /* the fully selected hyper cube */
- hid_t n_cube_1_sid; /* the hyper cube in which a slice is selected */
- hsize_t dims[SS_DR_MAX_RANK];
- hsize_t start[SS_DR_MAX_RANK];
- hsize_t * start_ptr;
- hsize_t stride[SS_DR_MAX_RANK];
- hsize_t * stride_ptr;
- hsize_t count[SS_DR_MAX_RANK];
- hsize_t * count_ptr;
- hsize_t block[SS_DR_MAX_RANK];
- hsize_t * block_ptr;
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
+ hid_t n_cube_0_sid; /* the fully selected hyper cube */
+ hid_t n_cube_1_sid; /* the hyper cube in which a slice is selected */
+ hsize_t dims[SS_DR_MAX_RANK];
+ hsize_t start[SS_DR_MAX_RANK];
+ hsize_t * start_ptr;
+ hsize_t stride[SS_DR_MAX_RANK];
+ hsize_t * stride_ptr;
+ hsize_t count[SS_DR_MAX_RANK];
+ hsize_t * count_ptr;
+ hsize_t block[SS_DR_MAX_RANK];
+ hsize_t * block_ptr;
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
HDassert( 0 < small_rank );
HDassert( small_rank <= large_rank );
@@ -10536,7 +10536,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
block_ptr = &(block[i]);
- /* select the hyper slab */
+ /* select the hyperslab */
ret = H5Sselect_hyperslab(n_cube_1_sid, H5S_SELECT_SET,
start_ptr, stride_ptr, count_ptr, block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -10553,7 +10553,6 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
ret = H5Sclose(n_cube_1_sid);
CHECK(ret, FAIL, "H5Sclose");
-
} /* test_shape_same_dr__full_space_vs_slice() */
@@ -10562,25 +10561,25 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
** test_shape_same_dr__run_full_space_vs_slice_tests():
**
** Run the test_shape_same_dr__full_space_vs_slice() test
-** over a variety of ranks and offsets.
+** over a variety of ranks and offsets.
**
** At present, we test H5Sselect_shape_same() with
-** fully selected 1, 2, 3, and 4 cubes as one parameter, and
-** 1, 2, 3, and 4 dimensional slices through a n-cube of rank
-** no more than 5 (and at least the rank of the slice).
-** We stop at rank 5, as Quincey suggested that it would be
-** sufficient.
+** fully selected 1, 2, 3, and 4 cubes as one parameter, and
+** 1, 2, 3, and 4 dimensional slices through a n-cube of rank
+** no more than 5 (and at least the rank of the slice).
+** We stop at rank 5, as Quincey suggested that it would be
+** sufficient.
**
-** All the n-cubes will have lengths of the same size, so
+** All the n-cubes will have lengths of the same size, so
** H5Sselect_shape_same() should return true iff:
**
-** 1) the rank for the fully selected n cube equals the
+** 1) the rank for the fully selected n cube equals the
** number of dimensions selected in the slice through the
** m-cube (m >= n).
**
-** 2) The dimensions selected in the slice through the m-cube
-** are the dimesnions with the most quickly changing
-** indices.
+** 2) The dimensions selected in the slice through the m-cube
+** are the dimesnions with the most quickly changing
+** indices.
**
****************************************************************/
static void
@@ -10702,7 +10701,6 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
} while((v < 2) && (large_rank >= 5));
} /* end for */
} /* end for */
-
} /* test_shape_same_dr__run_full_space_vs_slice_tests() */
@@ -10718,8 +10716,8 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
** H5S_select_shape_same() should always return FALSE if
** they don't).
**
-** Per Quincey's suggestion, only test up to 5 dimensional
-** spaces.
+** Per Quincey's suggestion, only test up to 5 dimensional
+** spaces.
**
****************************************************************/
static void
@@ -10732,31 +10730,31 @@ test_shape_same_dr__checkerboard(int test_num,
hbool_t dim_selected[],
hbool_t expected_result)
{
- char test_desc_0[128];
- char test_desc_1[256];
+ char test_desc_0[128];
+ char test_desc_1[256];
int i;
- int dims_selected = 0;
- hid_t n_cube_0_sid; /* the checker board selected
+ int dims_selected = 0;
+ hid_t n_cube_0_sid; /* the checker board selected
* hyper cube
*/
- hid_t n_cube_1_sid; /* the hyper cube in which a
+ hid_t n_cube_1_sid; /* the hyper cube in which a
* checkerboard slice is selected
*/
- hsize_t dims[SS_DR_MAX_RANK];
- hsize_t base_start[2];
- hsize_t start[SS_DR_MAX_RANK];
- hsize_t * start_ptr;
- hsize_t base_stride[2];
- hsize_t stride[SS_DR_MAX_RANK];
- hsize_t * stride_ptr;
- hsize_t base_count[2];
- hsize_t count[SS_DR_MAX_RANK];
- hsize_t * count_ptr;
- hsize_t base_block[2];
- hsize_t block[SS_DR_MAX_RANK];
- hsize_t * block_ptr;
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
+ hsize_t dims[SS_DR_MAX_RANK];
+ hsize_t base_start[2];
+ hsize_t start[SS_DR_MAX_RANK];
+ hsize_t * start_ptr;
+ hsize_t base_stride[2];
+ hsize_t stride[SS_DR_MAX_RANK];
+ hsize_t * stride_ptr;
+ hsize_t base_count[2];
+ hsize_t count[SS_DR_MAX_RANK];
+ hsize_t * count_ptr;
+ hsize_t base_block[2];
+ hsize_t block[SS_DR_MAX_RANK];
+ hsize_t * block_ptr;
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
HDassert( 0 < small_rank );
HDassert( small_rank <= large_rank );
@@ -10805,19 +10803,19 @@ test_shape_same_dr__checkerboard(int test_num,
*
* In the 1-D case, the "checkerboard" would look like this:
*
- * * * - - * * - - * *
+ * * * - - * * - - * *
*
* and in the 2-D case, it would look like this:
*
- * * * - - * * - - * *
+ * * * - - * * - - * *
* * * - - * * - - * *
* - - * * - - * * - -
* - - * * - - * * - -
- * * * - - * * - - * *
+ * * * - - * * - - * *
* * * - - * * - - * *
* - - * * - - * * - -
* - - * * - - * * - -
- * * * - - * * - - * *
+ * * * - - * * - - * *
* * * - - * * - - * *
*
* In both cases, asterisks indicate selected elements,
@@ -10833,9 +10831,9 @@ test_shape_same_dr__checkerboard(int test_num,
* are not even divisors of the edge size -- thus
* something like the following is also possible:
*
- * * * * - - - * * * -
- * * * * - - - * * * -
- * * * * - - - * * * -
+ * * * * - - - * * * -
+ * * * * - - - * * * -
+ * * * * - - - * * * -
* - - - * * * - - - *
* - - - * * * - - - *
* - - - * * * - - - *
@@ -10871,7 +10869,7 @@ test_shape_same_dr__checkerboard(int test_num,
base_count[0] = edge_size / (checker_size * 2);
if((edge_size % (checker_size * 2)) > 0)
- base_count[0]++;
+ base_count[0]++;
base_count[1] = (edge_size - checker_size) / (checker_size * 2);
if(((edge_size - checker_size) % (checker_size * 2)) > 0)
@@ -10918,8 +10916,8 @@ test_shape_same_dr__checkerboard(int test_num,
/* Wierdness alert:
*
* Some how, it seems that selections can extend beyond the
- * boundaries of the target data space -- hence the following
- * code to manually clip the selection back to the data space
+ * boundaries of the target dataspace -- hence the following
+ * code to manually clip the selection back to the dataspace
* proper.
*/
for(i = 0; i < SS_DR_MAX_RANK; i++) {
@@ -10980,7 +10978,7 @@ test_shape_same_dr__checkerboard(int test_num,
count_ptr = &(count[i]);
block_ptr = &(block[i]);
- /* select the hyper slab */
+ /* select the hyperslab */
ret = H5Sselect_hyperslab(n_cube_1_sid, H5S_SELECT_SET,
start_ptr, stride_ptr, count_ptr, block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -11019,8 +11017,8 @@ test_shape_same_dr__checkerboard(int test_num,
/* Wierdness alert:
*
* Again, it seems that selections can extend beyond the
- * boundaries of the target data space -- hence the following
- * code to manually clip the selection back to the data space
+ * boundaries of the target dataspace -- hence the following
+ * code to manually clip the selection back to the dataspace
* proper.
*/
for(i = 0; i < SS_DR_MAX_RANK; i++) {
@@ -11316,7 +11314,6 @@ test_shape_same_dr__run_checkerboard_tests(void)
} while((v < 2) && (large_rank >= 5));
} /* end for */
} /* end for */
-
} /* test_shape_same_dr__run_checkerboard_tests() */
@@ -11344,71 +11341,71 @@ test_shape_same_dr__irregular(int test_num,
hbool_t dim_selected[],
hbool_t expected_result)
{
- char test_desc_0[128];
- char test_desc_1[256];
- int edge_size = 10;
+ char test_desc_0[128];
+ char test_desc_1[256];
+ int edge_size = 10;
int i;
int j;
int k;
- int dims_selected = 0;
- hid_t n_cube_0_sid; /* the hyper cube containing
+ int dims_selected = 0;
+ hid_t n_cube_0_sid; /* the hyper cube containing
* an irregular selection
*/
- hid_t n_cube_1_sid; /* the hyper cube in which a
+ hid_t n_cube_1_sid; /* the hyper cube in which a
* slice contains an irregular
* selection.
*/
- hsize_t dims[SS_DR_MAX_RANK];
- hsize_t start_0[SS_DR_MAX_RANK] = { 2, 2, 2, 2, 5};
- hsize_t stride_0[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t count_0[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
+ hsize_t dims[SS_DR_MAX_RANK];
+ hsize_t start_0[SS_DR_MAX_RANK] = { 2, 2, 2, 2, 5};
+ hsize_t stride_0[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
+ hsize_t count_0[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
hsize_t block_0[SS_DR_MAX_RANK] = { 2, 2, 2, 2, 3};
- hsize_t start_1[SS_DR_MAX_RANK] = { 2, 2, 2, 5, 2};
- hsize_t stride_1[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t count_1[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
+ hsize_t start_1[SS_DR_MAX_RANK] = { 2, 2, 2, 5, 2};
+ hsize_t stride_1[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
+ hsize_t count_1[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
hsize_t block_1[SS_DR_MAX_RANK] = { 2, 2, 2, 3, 2};
- hsize_t start_2[SS_DR_MAX_RANK] = { 2, 2, 5, 2, 2};
- hsize_t stride_2[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t count_2[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
+ hsize_t start_2[SS_DR_MAX_RANK] = { 2, 2, 5, 2, 2};
+ hsize_t stride_2[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
+ hsize_t count_2[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
hsize_t block_2[SS_DR_MAX_RANK] = { 2, 2, 3, 2, 2};
- hsize_t start_3[SS_DR_MAX_RANK] = { 2, 5, 2, 2, 2};
- hsize_t stride_3[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t count_3[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
+ hsize_t start_3[SS_DR_MAX_RANK] = { 2, 5, 2, 2, 2};
+ hsize_t stride_3[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
+ hsize_t count_3[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
hsize_t block_3[SS_DR_MAX_RANK] = { 2, 3, 2, 2, 2};
- hsize_t start_4[SS_DR_MAX_RANK] = { 5, 2, 2, 2, 2};
- hsize_t stride_4[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t count_4[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
+ hsize_t start_4[SS_DR_MAX_RANK] = { 5, 2, 2, 2, 2};
+ hsize_t stride_4[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
+ hsize_t count_4[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
hsize_t block_4[SS_DR_MAX_RANK] = { 3, 2, 2, 2, 2};
- hsize_t clip_start[SS_DR_MAX_RANK] = { 0, 0, 0, 0, 0};
- hsize_t clip_stride[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t clip_count[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
+ hsize_t clip_start[SS_DR_MAX_RANK] = { 0, 0, 0, 0, 0};
+ hsize_t clip_stride[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
+ hsize_t clip_count[SS_DR_MAX_RANK] = { 1, 1, 1, 1, 1};
hsize_t clip_block[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t *(starts[SS_DR_MAX_RANK]) =
- {start_0, start_1, start_2, start_3, start_4};
+ hsize_t *(starts[SS_DR_MAX_RANK]) =
+ {start_0, start_1, start_2, start_3, start_4};
hsize_t *(strides[SS_DR_MAX_RANK]) =
- {stride_0, stride_1, stride_2, stride_3, stride_4};
+ {stride_0, stride_1, stride_2, stride_3, stride_4};
hsize_t *(counts[SS_DR_MAX_RANK]) =
- {count_0, count_1, count_2, count_3, count_4};
+ {count_0, count_1, count_2, count_3, count_4};
hsize_t *(blocks[SS_DR_MAX_RANK]) =
- {block_0, block_1, block_2, block_3, block_4};
-
- hsize_t start[SS_DR_MAX_RANK];
- hsize_t * start_ptr;
- hsize_t stride[SS_DR_MAX_RANK];
- hsize_t * stride_ptr;
- hsize_t count[SS_DR_MAX_RANK];
- hsize_t * count_ptr;
- hsize_t block[SS_DR_MAX_RANK];
- hsize_t * block_ptr;
- htri_t check; /* Shape comparison return value */
- herr_t ret; /* Generic return value */
+ {block_0, block_1, block_2, block_3, block_4};
+
+ hsize_t start[SS_DR_MAX_RANK];
+ hsize_t * start_ptr;
+ hsize_t stride[SS_DR_MAX_RANK];
+ hsize_t * stride_ptr;
+ hsize_t count[SS_DR_MAX_RANK];
+ hsize_t * count_ptr;
+ hsize_t block[SS_DR_MAX_RANK];
+ hsize_t * block_ptr;
+ htri_t check; /* Shape comparison return value */
+ herr_t ret; /* Generic return value */
HDassert( 0 < small_rank );
HDassert( small_rank <= large_rank );
@@ -11465,23 +11462,23 @@ test_shape_same_dr__irregular(int test_num,
* In the 1-D case, the projection of the pattern looks
* like this:
*
- * - - * * - * * * - -
+ * - - * * - * * * - -
* 0 1 2 3 4 5 6 7 8 9 x
*
* and in the 2-D case, it would look like this:
*
*
- * y
- * 9 - - - - - - - - - -
- * 8 - - - - - - - - - -
- * 7 - - * * - - - - - -
- * 6 - - * * - - - - - -
- * 5 - - * * - - - - - -
- * 4 - - - - - - - - - -
- * 3 - - * * - * * * - -
- * 2 - - * * - * * * - -
- * 1 - - - - - - - - - -
- * 0 - - - - - - - - - -
+ * y
+ * 9 - - - - - - - - - -
+ * 8 - - - - - - - - - -
+ * 7 - - * * - - - - - -
+ * 6 - - * * - - - - - -
+ * 5 - - * * - - - - - -
+ * 4 - - - - - - - - - -
+ * 3 - - * * - * * * - -
+ * 2 - - * * - * * * - -
+ * 1 - - - - - - - - - -
+ * 0 - - - - - - - - - -
* 0 1 2 3 4 5 6 7 8 9 x
*
* In both cases, asterisks indicate selected elements,
@@ -11490,7 +11487,7 @@ test_shape_same_dr__irregular(int test_num,
* Note that is this case, since the edge size is fixed,
* the pattern does not change. However, we do use the
* displacement parameter to allow it to be moved around
- * within the n-cube or hyper slab.
+ * within the n-cube or hyperslab.
*/
/* first, ensure that the small n-cube has no selection */
@@ -11566,13 +11563,13 @@ test_shape_same_dr__irregular(int test_num,
} /* end else */
} /* end for */
- /* select the hyper slab */
+ /* select the hyperslab */
ret = H5Sselect_hyperslab(n_cube_1_sid, H5S_SELECT_OR,
start_ptr, stride_ptr, count_ptr, block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end for */
- /* it is possible that the selection extends beyond the data space.
+ /* it is possible that the selection extends beyond the dataspace.
* clip the selection to ensure that it doesn't.
*/
ret = H5Sselect_hyperslab(n_cube_1_sid, H5S_SELECT_AND,
@@ -11591,7 +11588,6 @@ test_shape_same_dr__irregular(int test_num,
ret = H5Sclose(n_cube_1_sid);
CHECK(ret, FAIL, "H5Sclose");
-
} /* test_shape_same_dr__irregular() */
@@ -11599,13 +11595,13 @@ test_shape_same_dr__irregular(int test_num,
**
** test_shape_same_dr__run_irregular_tests():
**
-** In this set of tests, we test H5S_select_shape_same()
+** In this set of tests, we test H5Sselect_shape_same()
** with an "irregular" subselection of 1, 2, 3, and 4 cubes as
** one parameter, and irregular subselections of 1, 2, 3,
** and 4 dimensional slices through a n-cube of rank no more
** than 5 (and at least the rank of the slice) as the other.
** Note that the "irregular" selection may be offset between
-** the n-cube and the slice.
+** the n-cube and the slice.
**
** All the irregular selections will be identical (modulo rank)
** so H5S_select_shape_same() should return true iff:
@@ -11806,7 +11802,6 @@ test_shape_same_dr__run_irregular_tests(void)
} while((v < 2 ) && (large_rank >= 5));
} /* end for */
} /* end for */
-
} /* test_shape_same_dr__run_irregular_tests() */
@@ -11814,7 +11809,7 @@ test_shape_same_dr__run_irregular_tests(void)
**
** test_shape_same_dr(): Tests selections on dataspace with
** different ranks, to verify that "shape same" routine
-** is now handling this case correctly.
+** is now handling this case correctly.
**
****************************************************************/
static void
@@ -11823,19 +11818,16 @@ test_shape_same_dr(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Same Shape/Different Rank Comparisons\n"));
-
/* first run some smoke checks */
test_shape_same_dr__smoke_check_1();
test_shape_same_dr__smoke_check_2();
test_shape_same_dr__smoke_check_3();
test_shape_same_dr__smoke_check_4();
-
/* now run more intensive tests. */
test_shape_same_dr__run_full_space_vs_slice_tests();
test_shape_same_dr__run_checkerboard_tests();
test_shape_same_dr__run_irregular_tests();
-
} /* test_shape_same_dr() */
@@ -12499,7 +12491,7 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sclose");
}
-
+
/****************************************************************
**
** test_select_hyper_chunk_offset(): Tests selections on dataspace,
@@ -13625,7 +13617,7 @@ test_select(void)
size_t rdcc_nbytes; /* Raw data number of bytes */
double rdcc_w0; /* Raw data write percentage */
hssize_t offset[SPACE7_RANK] = {1, 1}; /* Offset for testing selection offsets */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Selections\n"));
@@ -13779,15 +13771,15 @@ test_select(void)
} /* test_select() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_select
+ * Function: cleanup_select
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* July 2, 1998
*
*-------------------------------------------------------------------------
diff --git a/test/vds.c b/test/vds.c
index f8c40d9..9c7fd5c 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -1373,7 +1373,7 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
TEST_ERROR
return 1;
-} /* end test_vds_prefix() */
+} /* end test_vds_prefix */
/*-------------------------------------------------------------------------
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index 1d882b8..9ca077c 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -1,7 +1,7 @@
#include "hdf5.h"
#include "testphdf5.h"
-#include "H5Dprivate.h" /* For Chunk tests */
+#include "H5Dprivate.h" /* For Chunk tests */
/* FILENAME and filenames must have the same number of names */
const char *FILENAME[2]={ "bigio_test.h5",
@@ -17,7 +17,7 @@ const char *FILENAME[2]={ "bigio_test.h5",
#define MAINPROCESS (!mpi_rank) /* define process 0 as main process */
/* Constants definitions */
-#define RANK 2
+#define RANK 2
#define IN_ORDER 1
#define OUT_OF_ORDER 2
@@ -33,12 +33,12 @@ const char *FILENAME[2]={ "bigio_test.h5",
#define HYPER 1
#define POINT 2
-#define ALL 3
+#define ALL 3
/* Dataset data type. Int's can be easily octo dumped. */
typedef hsize_t B_DATATYPE;
-int facc_type = FACC_MPIO; /*Test file access type */
+int facc_type = FACC_MPIO; /*Test file access type */
int dxfer_coll_type = DXFER_COLLECTIVE_IO;
size_t bigcount = DXFER_BIGCOUNT;
int nerrors = 0;
@@ -54,12 +54,12 @@ hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type);
/*
* Setup the coordinates for point selection.
*/
-static void
+static void
set_coords(hsize_t start[],
hsize_t count[],
hsize_t stride[],
hsize_t block[],
- size_t num_points,
+ size_t num_points,
hsize_t coords[],
int order)
{
@@ -99,10 +99,10 @@ fill_datasets(hsize_t start[], hsize_t block[], B_DATATYPE * dataset)
/* put some trivial data in the data_array */
for (i=0; i < block[0]; i++){
- for (j=0; j < block[1]; j++){
- *dataptr = (B_DATATYPE)((i+start[0])*100 + (j+start[1]+1));
- dataptr++;
- }
+ for (j=0; j < block[1]; j++){
+ *dataptr = (B_DATATYPE)((i+start[0])*100 + (j+start[1]+1));
+ dataptr++;
+ }
}
}
@@ -113,7 +113,7 @@ void point_set(hsize_t start[],
hsize_t count[],
hsize_t stride[],
hsize_t block[],
- size_t num_points,
+ size_t num_points,
hsize_t coords[],
int order)
{
@@ -143,13 +143,13 @@ void point_set(hsize_t start[],
}
if(VERBOSE_MED) {
- printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total datapoints=%lu\n",
+ HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total datapoints=%lu\n",
(unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
(unsigned long)(block[0] * block[1] * count[0] * count[1]));
k = 0;
for(i = 0; i < num_points ; i++) {
- printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -165,19 +165,19 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE * dataset)
hsize_t i, j;
/* print the column heading */
- printf("%-8s", "Cols:");
+ HDprintf("%-8s", "Cols:");
for (j=0; j < block[1]; j++){
- printf("%3lu ", (unsigned long)(start[1]+j));
+ HDprintf("%3lu ", (unsigned long)(start[1]+j));
}
- printf("\n");
+ HDprintf("\n");
/* print the slab data */
for (i=0; i < block[0]; i++){
- printf("Row %2lu: ", (unsigned long)(i+start[0]));
- for (j=0; j < block[1]; j++){
- printf("%llu ", *dataptr++);
- }
- printf("\n");
+ HDprintf("Row %2lu: ", (unsigned long)(i+start[0]));
+ for (j=0; j < block[1]; j++){
+ HDprintf("%llu ", *dataptr++);
+ }
+ HDprintf("\n");
}
}
@@ -193,90 +193,90 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
/* print it if VERBOSE_MED */
if(VERBOSE_MED) {
- printf("verify_data dumping:::\n");
- printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
- printf("original values:\n");
- dataset_print(start, block, original);
- printf("compared values:\n");
- dataset_print(start, block, dataset);
+ HDprintf("verify_data dumping:::\n");
+ HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
+ HDprintf("original values:\n");
+ dataset_print(start, block, original);
+ HDprintf("compared values:\n");
+ dataset_print(start, block, dataset);
}
vrfyerrs = 0;
for (i=0; i < block[0]; i++){
- for (j=0; j < block[1]; j++){
- if(*dataset != *original){
- if(vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
- printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %llu, got %llu\n",
+ for (j=0; j < block[1]; j++){
+ if(*dataset != *original){
+ if(vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
+ HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %llu, got %llu\n",
(unsigned long)i, (unsigned long)j,
(unsigned long)(i+start[0]), (unsigned long)(j+start[1]),
*(original), *(dataset));
- }
- dataset++;
- original++;
- }
- }
+ }
+ dataset++;
+ original++;
+ }
+ }
}
if(vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("[more errors ...]\n");
+ HDprintf("[more errors ...]\n");
if(vrfyerrs)
- printf("%d errors found in verify_data\n", vrfyerrs);
+ HDprintf("%d errors found in verify_data\n", vrfyerrs);
return(vrfyerrs);
}
/* Set up the selection */
static void
ccslab_set(int mpi_rank,
- int mpi_size,
- hsize_t start[],
- hsize_t count[],
- hsize_t stride[],
- hsize_t block[],
- int mode)
+ int mpi_size,
+ hsize_t start[],
+ hsize_t count[],
+ hsize_t stride[],
+ hsize_t block[],
+ int mode)
{
switch (mode){
case BYROW_CONT:
- /* Each process takes a slabs of rows. */
- block[0] = 1;
- block[1] = 1;
- stride[0] = 1;
- stride[1] = 1;
- count[0] = space_dim1;
- count[1] = space_dim2;
- start[0] = mpi_rank*count[0];
- start[1] = 0;
-
- break;
+ /* Each process takes a slabs of rows. */
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = space_dim1;
+ count[1] = space_dim2;
+ start[0] = mpi_rank*count[0];
+ start[1] = 0;
+
+ break;
case BYROW_DISCONT:
- /* Each process takes several disjoint blocks. */
- block[0] = 1;
- block[1] = 1;
+ /* Each process takes several disjoint blocks. */
+ block[0] = 1;
+ block[1] = 1;
stride[0] = 3;
stride[1] = 3;
count[0] = space_dim1/(stride[0]*block[0]);
count[1] = (space_dim2)/(stride[1]*block[1]);
- start[0] = space_dim1*mpi_rank;
- start[1] = 0;
+ start[0] = space_dim1*mpi_rank;
+ start[1] = 0;
- break;
+ break;
case BYROW_SELECTNONE:
- /* Each process takes a slabs of rows, there are
+ /* Each process takes a slabs of rows, there are
no selections for the last process. */
- block[0] = 1;
- block[1] = 1;
- stride[0] = 1;
- stride[1] = 1;
- count[0] = ((mpi_rank >= MAX(1,(mpi_size-2)))?0:space_dim1);
- count[1] = space_dim2;
- start[0] = mpi_rank*count[0];
- start[1] = 0;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = ((mpi_rank >= MAX(1,(mpi_size-2)))?0:space_dim1);
+ count[1] = space_dim2;
+ start[0] = mpi_rank*count[0];
+ start[1] = 0;
- break;
+ break;
case BYROW_SELECTUNBALANCE:
/* The first one-third of the number of processes only
@@ -284,14 +284,14 @@ ccslab_set(int mpi_rank,
half of the domain. */
block[0] = 1;
- count[0] = 2;
+ count[0] = 2;
stride[0] = space_dim1*mpi_size/4+1;
block[1] = space_dim2;
count[1] = 1;
start[1] = 0;
stride[1] = 1;
- if((mpi_rank *3)<(mpi_size*2)) start[0] = mpi_rank;
- else start[0] = 1 + space_dim1*mpi_size/2 + (mpi_rank-2*mpi_size/3);
+ if((mpi_rank *3)<(mpi_size*2)) start[0] = mpi_rank;
+ else start[0] = 1 + space_dim1*mpi_size/2 + (mpi_rank-2*mpi_size/3);
break;
case BYROW_SELECTINCHUNK:
@@ -299,33 +299,33 @@ ccslab_set(int mpi_rank,
block[0] = 1;
count[0] = 1;
- start[0] = mpi_rank*space_dim1;
+ start[0] = mpi_rank*space_dim1;
stride[0]= 1;
- block[1] = space_dim2;
- count[1] = 1;
- stride[1]= 1;
- start[1] = 0;
+ block[1] = space_dim2;
+ count[1] = 1;
+ stride[1]= 1;
+ start[1] = 0;
break;
default:
- /* Unknown mode. Set it to cover the whole dataset. */
- block[0] = space_dim1*mpi_size;
- block[1] = space_dim2;
- stride[0] = block[0];
- stride[1] = block[1];
- count[0] = 1;
- count[1] = 1;
- start[0] = 0;
- start[1] = 0;
-
- break;
+ /* Unknown mode. Set it to cover the whole dataset. */
+ block[0] = space_dim1*mpi_size;
+ block[1] = space_dim2;
+ stride[0] = block[0];
+ stride[1] = block[1];
+ count[0] = 1;
+ count[1] = 1;
+ start[0] = 0;
+ start[1] = 0;
+
+ break;
}
if (VERBOSE_MED){
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0]*block[1]*count[0]*count[1]));
+ HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0]*block[1]*count[0]*count[1]));
}
}
@@ -336,10 +336,10 @@ ccslab_set(int mpi_rank,
*/
static void
ccdataset_fill(hsize_t start[],
- hsize_t stride[],
- hsize_t count[],
- hsize_t block[],
- DATATYPE * dataset,
+ hsize_t stride[],
+ hsize_t count[],
+ hsize_t block[],
+ DATATYPE * dataset,
int mem_selection)
{
DATATYPE *dataptr = dataset;
@@ -377,28 +377,28 @@ ccdataset_fill(hsize_t start[],
*/
static void
ccdataset_print(hsize_t start[],
- hsize_t block[],
- DATATYPE * dataset)
+ hsize_t block[],
+ DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
hsize_t i, j;
/* print the column heading */
- printf("Print only the first block of the dataset\n");
- printf("%-8s", "Cols:");
+ HDprintf("Print only the first block of the dataset\n");
+ HDprintf("%-8s", "Cols:");
for (j=0; j < block[1]; j++){
- printf("%3lu ", (unsigned long)(start[1]+j));
+ HDprintf("%3lu ", (unsigned long)(start[1]+j));
}
- printf("\n");
+ HDprintf("\n");
/* print the slab data */
for (i=0; i < block[0]; i++){
- printf("Row %2lu: ", (unsigned long)(i+start[0]));
- for (j=0; j < block[1]; j++){
- printf("%03d ", *dataptr++);
- }
- printf("\n");
+ HDprintf("Row %2lu: ", (unsigned long)(i+start[0]));
+ for (j=0; j < block[1]; j++){
+ HDprintf("%03d ", *dataptr++);
+ }
+ HDprintf("\n");
}
}
@@ -407,11 +407,11 @@ ccdataset_print(hsize_t start[],
*/
static int
ccdataset_vrfy(hsize_t start[],
- hsize_t count[],
- hsize_t stride[],
- hsize_t block[],
- DATATYPE *dataset,
- DATATYPE *original,
+ hsize_t count[],
+ hsize_t stride[],
+ hsize_t block[],
+ DATATYPE *dataset,
+ DATATYPE *original,
int mem_selection)
{
hsize_t i, j,k1,k2,k=0;
@@ -420,14 +420,14 @@ ccdataset_vrfy(hsize_t start[],
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- printf("dataset_vrfy dumping:::\n");
- printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
- printf("original values:\n");
- ccdataset_print(start, block, original);
- printf("compared values:\n");
- ccdataset_print(start, block, dataset);
+ HDprintf("dataset_vrfy dumping:::\n");
+ HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
+ HDprintf("original values:\n");
+ ccdataset_print(start, block, original);
+ HDprintf("compared values:\n");
+ ccdataset_print(start, block, dataset);
}
vrfyerrs = 0;
@@ -449,7 +449,7 @@ ccdataset_vrfy(hsize_t start[],
}
if (*dataptr != *oriptr){
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
- printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
(unsigned long)i, (unsigned long)j,
*(oriptr), *(dataptr));
}
@@ -459,9 +459,9 @@ ccdataset_vrfy(hsize_t start[],
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("[more errors ...]\n");
+ HDprintf("[more errors ...]\n");
if (vrfyerrs)
- printf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
+ HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
return(vrfyerrs);
}
@@ -478,28 +478,28 @@ static void
dataset_big_write(void)
{
- hid_t xfer_plist; /* Dataset transfer properties list */
- hid_t sid; /* Dataspace ID */
- hid_t file_dataspace; /* File dataspace ID */
- hid_t mem_dataspace; /* memory dataspace ID */
+ hid_t xfer_plist; /* Dataset transfer properties list */
+ hid_t sid; /* Dataspace ID */
+ hid_t file_dataspace; /* File dataspace ID */
+ hid_t mem_dataspace; /* memory dataspace ID */
hid_t dataset;
- hid_t datatype; /* Datatype ID */
- hsize_t dims[RANK]; /* dataset dim sizes */
- hsize_t start[RANK]; /* for hyperslab setting */
- hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
- hsize_t block[RANK]; /* for hyperslab setting */
+ hid_t datatype; /* Datatype ID */
+ hsize_t dims[RANK]; /* dataset dim sizes */
+ hsize_t start[RANK]; /* for hyperslab setting */
+ hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
hsize_t *coords = NULL;
int i;
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
hid_t fid; /* HDF5 file ID */
- hid_t acc_tpl; /* File access templates */
+ hid_t acc_tpl; /* File access templates */
hsize_t h;
size_t num_points;
B_DATATYPE * wdata;
/* allocate memory for data buffer */
- wdata = (B_DATATYPE *)malloc(bigcount*sizeof(B_DATATYPE));
+ wdata = (B_DATATYPE *)HDmalloc(bigcount*sizeof(B_DATATYPE));
VRFY((wdata != NULL), "wdata malloc succeeded");
/* setup file access template */
@@ -552,8 +552,8 @@ dataset_big_write(void)
fill_datasets(start, block, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
- dataset_print(start, block, wdata);
+ MESG("data_array created");
+ dataset_print(start, block, wdata);
}
/* set up the collective transfer properties list */
@@ -580,7 +580,7 @@ dataset_big_write(void)
/* Each process takes a slabs of cols. */
- if (mpi_rank == 0)
+ if (mpi_rank == 0)
HDprintf("\nTesting Dataset2 write by COL\n");
/* Create a large dataset */
dims[0] = bigcount;
@@ -615,8 +615,8 @@ dataset_big_write(void)
fill_datasets(start, block, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
- dataset_print(start, block, wdata);
+ MESG("data_array created");
+ dataset_print(start, block, wdata);
}
/* set up the collective transfer properties list */
@@ -690,7 +690,7 @@ dataset_big_write(void)
fill_datasets(start, dims, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
+ MESG("data_array created");
}
ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace,
@@ -729,7 +729,7 @@ dataset_big_write(void)
num_points = bigcount;
- coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
set_coords (start, count, stride, block, num_points, coords, IN_ORDER);
@@ -744,8 +744,8 @@ dataset_big_write(void)
fill_datasets(start, block, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
- dataset_print(start, block, wdata);
+ MESG("data_array created");
+ dataset_print(start, block, wdata);
}
/* create a memory dataspace */
@@ -778,7 +778,7 @@ dataset_big_write(void)
ret = H5Dclose(dataset);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- free(wdata);
+ HDfree(wdata);
H5Fclose(fid);
}
@@ -795,30 +795,30 @@ static void
dataset_big_read(void)
{
hid_t fid; /* HDF5 file ID */
- hid_t acc_tpl; /* File access templates */
- hid_t xfer_plist; /* Dataset transfer properties list */
- hid_t file_dataspace; /* File dataspace ID */
- hid_t mem_dataspace; /* memory dataspace ID */
+ hid_t acc_tpl; /* File access templates */
+ hid_t xfer_plist; /* Dataset transfer properties list */
+ hid_t file_dataspace; /* File dataspace ID */
+ hid_t mem_dataspace; /* memory dataspace ID */
hid_t dataset;
- B_DATATYPE *rdata = NULL; /* data buffer */
- B_DATATYPE *wdata = NULL; /* expected data buffer */
- hsize_t dims[RANK]; /* dataset dim sizes */
- hsize_t start[RANK]; /* for hyperslab setting */
- hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
- hsize_t block[RANK]; /* for hyperslab setting */
+ B_DATATYPE *rdata = NULL; /* data buffer */
+ B_DATATYPE *wdata = NULL; /* expected data buffer */
+ hsize_t dims[RANK]; /* dataset dim sizes */
+ hsize_t start[RANK]; /* for hyperslab setting */
+ hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
int i,j,k;
hsize_t h;
size_t num_points;
hsize_t *coords = NULL;
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* allocate memory for data buffer */
- rdata = (B_DATATYPE *)malloc(bigcount*sizeof(B_DATATYPE));
+ rdata = (B_DATATYPE *)HDmalloc(bigcount*sizeof(B_DATATYPE));
VRFY((rdata != NULL), "rdata malloc succeeded");
- wdata = (B_DATATYPE *)malloc(bigcount*sizeof(B_DATATYPE));
+ wdata = (B_DATATYPE *)HDmalloc(bigcount*sizeof(B_DATATYPE));
VRFY((wdata != NULL), "wdata malloc succeeded");
- memset(rdata, 0, bigcount*sizeof(B_DATATYPE));
+ HDmemset(rdata, 0, bigcount*sizeof(B_DATATYPE));
/* setup file access template */
acc_tpl = H5Pcreate (H5P_FILE_ACCESS);
@@ -865,7 +865,7 @@ dataset_big_read(void)
fill_datasets(start, block, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
+ MESG("data_array created");
}
/* set up the collective transfer properties list */
@@ -885,7 +885,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
- if(ret) {fprintf(stderr, "verify failed\n"); exit(1);}
+ if(ret) {HDfprintf(stderr, "verify failed\n"); exit(1);}
/* release all temporary handles. */
H5Sclose(file_dataspace);
@@ -897,7 +897,7 @@ dataset_big_read(void)
if (mpi_rank == 0)
HDprintf("\nRead Testing Dataset2 by ROW\n");
- memset(rdata, 0, bigcount*sizeof(B_DATATYPE));
+ HDmemset(rdata, 0, bigcount*sizeof(B_DATATYPE));
dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT);
VRFY((dataset >= 0), "H5Dopen2 succeeded");
@@ -927,7 +927,7 @@ dataset_big_read(void)
fill_datasets(start, block, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
+ MESG("data_array created");
}
/* set up the collective transfer properties list */
@@ -947,7 +947,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
- if(ret) {fprintf(stderr, "verify failed\n"); exit(1);}
+ if(ret) {HDfprintf(stderr, "verify failed\n"); exit(1);}
/* release all temporary handles. */
H5Sclose(file_dataspace);
@@ -958,7 +958,7 @@ dataset_big_read(void)
if (mpi_rank == 0)
HDprintf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n");
- memset(rdata, 0, bigcount*sizeof(B_DATATYPE));
+ HDmemset(rdata, 0, bigcount*sizeof(B_DATATYPE));
dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT);
VRFY((dataset >= 0), "H5Dopen2 succeeded");
@@ -989,7 +989,7 @@ dataset_big_read(void)
fill_datasets(start, dims, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
+ MESG("data_array created");
}
/* set up the collective transfer properties list */
@@ -1010,7 +1010,7 @@ dataset_big_read(void)
if(mpi_rank == 0) {
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
- if(ret) {fprintf(stderr, "verify failed\n"); exit(1);}
+ if(ret) {HDfprintf(stderr, "verify failed\n"); exit(1);}
}
/* release all temporary handles. */
@@ -1040,13 +1040,13 @@ dataset_big_read(void)
fill_datasets(start, block, wdata);
MESG("data_array initialized");
if(VERBOSE_MED){
- MESG("data_array created");
- dataset_print(start, block, wdata);
+ MESG("data_array created");
+ dataset_print(start, block, wdata);
}
num_points = bigcount;
- coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
set_coords (start, count, stride, block, num_points, coords, IN_ORDER);
@@ -1056,7 +1056,7 @@ dataset_big_read(void)
ret = H5Sselect_elements(file_dataspace, H5S_SELECT_SET, num_points, coords);
VRFY((ret >= 0), "H5Sselect_elements succeeded");
- if(coords) free(coords);
+ if(coords) HDfree(coords);
/* create a memory dataspace */
/* Warning: H5Screate_simple requires an array of hsize_t elements
@@ -1082,7 +1082,7 @@ dataset_big_read(void)
VRFY((ret >= 0), "H5Dread dataset1 succeeded");
ret = verify_data(start, count, stride, block, rdata, wdata);
- if(ret) {fprintf(stderr, "verify failed\n"); exit(1);}
+ if(ret) {HDfprintf(stderr, "verify failed\n"); exit(1);}
/* release all temporary handles. */
H5Sclose(file_dataspace);
@@ -1091,8 +1091,8 @@ dataset_big_read(void)
ret = H5Dclose(dataset);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- free(wdata);
- free(rdata);
+ HDfree(wdata);
+ HDfree(rdata);
wdata = NULL;
rdata = NULL;
@@ -1115,8 +1115,8 @@ dataset_big_read(void)
H5Fclose(fid);
/* release data buffers */
- if(rdata) free(rdata);
- if(wdata) free(wdata);
+ if(rdata) HDfree(rdata);
+ if(wdata) HDfree(wdata);
} /* dataset_large_readAll */
@@ -1129,7 +1129,7 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
{
hid_t ret_pl = -1;
herr_t ret; /* generic return value */
- int mpi_rank; /* mpi variables */
+ int mpi_rank; /* mpi variables */
/* need the rank for error checking macros */
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -1138,36 +1138,36 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
VRFY((ret_pl >= 0), "H5P_FILE_ACCESS");
if (l_facc_type == FACC_DEFAULT)
- return (ret_pl);
+ return (ret_pl);
if (l_facc_type == FACC_MPIO){
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(ret_pl, comm, info);
- VRFY((ret >= 0), "");
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_mpio(ret_pl, comm, info);
+ VRFY((ret >= 0), "");
ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
- VRFY((ret >= 0), "");
+ VRFY((ret >= 0), "");
ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
- VRFY((ret >= 0), "");
- return(ret_pl);
+ VRFY((ret >= 0), "");
+ return(ret_pl);
}
if (l_facc_type == (FACC_MPIO | FACC_SPLIT)){
- hid_t mpio_pl;
-
- mpio_pl = H5Pcreate (H5P_FILE_ACCESS);
- VRFY((mpio_pl >= 0), "");
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
- VRFY((ret >= 0), "");
-
- /* setup file access template */
- ret_pl = H5Pcreate (H5P_FILE_ACCESS);
- VRFY((ret_pl >= 0), "");
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl);
- VRFY((ret >= 0), "H5Pset_fapl_split succeeded");
- H5Pclose(mpio_pl);
- return(ret_pl);
+ hid_t mpio_pl;
+
+ mpio_pl = H5Pcreate (H5P_FILE_ACCESS);
+ VRFY((mpio_pl >= 0), "");
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
+ VRFY((ret >= 0), "");
+
+ /* setup file access template */
+ ret_pl = H5Pcreate (H5P_FILE_ACCESS);
+ VRFY((ret_pl >= 0), "");
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl);
+ VRFY((ret >= 0), "H5Pset_fapl_split succeeded");
+ H5Pclose(mpio_pl);
+ return(ret_pl);
}
/* unknown file access types */
@@ -1176,17 +1176,17 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/*-------------------------------------------------------------------------
- * Function: coll_chunk1
+ * Function: coll_chunk1
*
- * Purpose: Wrapper to test the collective chunk IO for regular JOINT
+ * Purpose: Wrapper to test the collective chunk IO for regular JOINT
selection with a single chunk
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Unknown
- * July 12th, 2004
+ * Programmer: Unknown
+ * July 12th, 2004
*
* Modifications:
*
@@ -1215,7 +1215,7 @@ coll_chunk1(void)
{
const char *filename = FILENAME[0];
if (mpi_rank == 0)
- printf("coll_chunk1\n");
+ HDprintf("coll_chunk1\n");
coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1230,17 +1230,17 @@ coll_chunk1(void)
/*-------------------------------------------------------------------------
- * Function: coll_chunk2
+ * Function: coll_chunk2
*
- * Purpose: Wrapper to test the collective chunk IO for regular DISJOINT
+ * Purpose: Wrapper to test the collective chunk IO for regular DISJOINT
selection with a single chunk
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Unknown
- * July 12th, 2004
+ * Programmer: Unknown
+ * July 12th, 2004
*
* Modifications:
*
@@ -1269,7 +1269,7 @@ coll_chunk2(void)
{
const char *filename = FILENAME[0];
if (mpi_rank == 0)
- printf("coll_chunk2\n");
+ HDprintf("coll_chunk2\n");
coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1284,17 +1284,17 @@ coll_chunk2(void)
/*-------------------------------------------------------------------------
- * Function: coll_chunk3
+ * Function: coll_chunk3
*
- * Purpose: Wrapper to test the collective chunk IO for regular JOINT
+ * Purpose: Wrapper to test the collective chunk IO for regular JOINT
selection with at least number of 2*mpi_size chunks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Unknown
- * July 12th, 2004
+ * Programmer: Unknown
+ * July 12th, 2004
*
* Modifications:
*
@@ -1324,7 +1324,7 @@ coll_chunk3(void)
{
const char *filename = FILENAME[0];
if (mpi_rank == 0)
- printf("coll_chunk3\n");
+ HDprintf("coll_chunk3\n");
coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1341,17 +1341,17 @@ coll_chunk3(void)
//-------------------------------------------------------------------------
// Borrowed/Modified (slightly) from t_coll_chunk.c
/*-------------------------------------------------------------------------
- * Function: coll_chunktest
+ * Function: coll_chunktest
*
* Purpose: The real testing routine for regular selection of collective
chunking storage
testing both write and read,
- If anything fails, it may be read or write. There is no
- separation test between read and write.
+ If anything fails, it may be read or write. There is no
+ separation test between read and write.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
* Modifications:
* Remove invalid temporary property checkings for API_LINK_HARD and
@@ -1359,8 +1359,8 @@ coll_chunk3(void)
* Programmer: Jonathan Kim
* Date: 2012-10-10
*
- * Programmer: Unknown
- * July 12th, 2004
+ * Programmer: Unknown
+ * July 12th, 2004
*
* Modifications:
*
@@ -1369,14 +1369,14 @@ coll_chunk3(void)
static void
coll_chunktest(const char* filename,
- int chunk_factor,
- int select_factor,
+ int chunk_factor,
+ int select_factor,
int api_option,
int file_selection,
int mem_selection,
int mode)
{
- hid_t file, dataset, file_dataspace, mem_dataspace;
+ hid_t file, dataset, file_dataspace, mem_dataspace;
hid_t acc_plist,xfer_plist,crp_plist;
hsize_t dims[RANK], chunk_dims[RANK];
@@ -1524,41 +1524,41 @@ coll_chunktest(const char* filename,
}
switch(api_option){
- case API_LINK_HARD:
- status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_ONE_IO);
+ case API_LINK_HARD:
+ status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_ONE_IO);
VRFY((status>= 0),"collective chunk optimization succeeded");
break;
- case API_MULTI_HARD:
- status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_MULTI_IO);
- VRFY((status>= 0),"collective chunk optimization succeeded ");
+ case API_MULTI_HARD:
+ status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_MULTI_IO);
+ VRFY((status>= 0),"collective chunk optimization succeeded ");
break;
- case API_LINK_TRUE:
+ case API_LINK_TRUE:
status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,2);
- VRFY((status>= 0),"collective chunk optimization set chunk number succeeded");
+ VRFY((status>= 0),"collective chunk optimization set chunk number succeeded");
break;
- case API_LINK_FALSE:
+ case API_LINK_FALSE:
status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,6);
VRFY((status>= 0),"collective chunk optimization set chunk number succeeded");
break;
- case API_MULTI_COLL:
+ case API_MULTI_COLL:
status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,8);/* make sure it is using multi-chunk IO */
VRFY((status>= 0),"collective chunk optimization set chunk number succeeded");
- status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,50);
+ status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,50);
VRFY((status>= 0),"collective chunk optimization set chunk ratio succeeded");
break;
- case API_MULTI_IND:
+ case API_MULTI_IND:
status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,8);/* make sure it is using multi-chunk IO */
VRFY((status>= 0),"collective chunk optimization set chunk number succeeded");
- status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,100);
+ status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,100);
VRFY((status>= 0),"collective chunk optimization set chunk ratio succeeded");
break;
- default:
+ default:
;
}
@@ -1615,7 +1615,7 @@ coll_chunktest(const char* filename,
/* write data collectively */
status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- xfer_plist, data_array1);
+ xfer_plist, data_array1);
VRFY((status >= 0),"dataset write succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
@@ -1820,22 +1820,22 @@ coll_chunktest(const char* filename,
/*****************************************************************************
*
- * Function: do_express_test()
+ * Function: do_express_test()
*
- * Purpose: Do an MPI_Allreduce to obtain the maximum value returned
- * by GetTestExpress() across all processes. Return this
- * value.
+ * Purpose: Do an MPI_Allreduce to obtain the maximum value returned
+ * by GetTestExpress() across all processes. Return this
+ * value.
*
- * Envirmoment variables can be different across different
- * processes. This function ensures that all processes agree
- * on whether to do an express test.
+ * Envirmoment variables can be different across different
+ * processes. This function ensures that all processes agree
+ * on whether to do an express test.
*
- * Return: Success: Maximum of the values returned by
- * GetTestExpress() across all processes.
+ * Return: Success: Maximum of the values returned by
+ * GetTestExpress() across all processes.
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: JRM -- 4/25/06
+ * Programmer: JRM -- 4/25/06
*
*****************************************************************************/
static int
@@ -1868,7 +1868,7 @@ do_express_test(int world_mpi_rank)
} /* do_express_test() */
-int main(int argc, char **argv)
+int main(int argc, char **argv)
{
int ExpressMode = 0;
hsize_t newsize = 1048576;
@@ -1894,12 +1894,12 @@ int main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ HDprintf("Failed to turn off atexit processing. Continue.\n");
};
/* set alarm. */
ALARM_ON;
-
+
ExpressMode = do_express_test(mpi_rank);
dataset_big_write();
@@ -1923,7 +1923,7 @@ int main(int argc, char **argv)
/* turn off alarm */
ALARM_OFF;
- if (mpi_rank == 0)
+ if (mpi_rank == 0)
HDremove(FILENAME[0]);
/* close HDF5 library */
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 3004f9f..ff89ee4 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -621,7 +621,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: MPI_Comm_group() failed with error %d.\n",
world_mpi_rank, FUNC, mpi_result);
}
@@ -640,7 +640,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: MPI_Group_excl() failed with error %d.\n",
world_mpi_rank, FUNC, mpi_result);
}
@@ -657,7 +657,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: MPI_Comm_create() failed with error %d.\n",
world_mpi_rank, FUNC, mpi_result);
}
@@ -671,7 +671,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: file_mpi_comm == MPI_COMM_NULL.\n",
world_mpi_rank, FUNC);
}
@@ -685,7 +685,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: file_mpi_comm != MPI_COMM_NULL.\n",
world_mpi_rank, FUNC);
}
@@ -703,7 +703,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: MPI_Comm_size() failed with error %d.\n",
world_mpi_rank, FUNC, mpi_result);
}
@@ -719,7 +719,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"%d:%s: MPI_Comm_rank() failed with error %d.\n",
world_mpi_rank, FUNC, mpi_result);
}
@@ -7456,7 +7456,7 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- printf("%d:Failed to turn off atexit processing. Continue.\n",
+ HDprintf("%d:Failed to turn off atexit processing. Continue.\n",
mpi_rank);
};
H5open();
@@ -7475,24 +7475,24 @@ main(int argc, char **argv)
}
#ifdef H5_HAVE_MPE
- if ( MAINPROCESS ) { printf(" Tests compiled for MPE.\n"); }
+ if ( MAINPROCESS ) { HDprintf(" Tests compiled for MPE.\n"); }
virt_num_data_entries = MPE_VIRT_NUM_DATA_ENTIES;
#endif /* H5_HAVE_MPE */
if (MAINPROCESS){
- printf("===================================\n");
- printf("Parallel metadata cache tests\n");
- printf(" mpi_size = %d\n", mpi_size);
- printf(" express_test = %d\n", express_test);
- printf("===================================\n");
+ HDprintf("===================================\n");
+ HDprintf("Parallel metadata cache tests\n");
+ HDprintf(" mpi_size = %d\n", mpi_size);
+ HDprintf(" express_test = %d\n", express_test);
+ HDprintf("===================================\n");
}
if ( mpi_size < 3 ) {
if ( MAINPROCESS ) {
- printf(" Need at least 3 processes. Exiting.\n");
+ HDprintf(" Need at least 3 processes. Exiting.\n");
}
goto finish;
}
@@ -7638,15 +7638,15 @@ finish:
*/
MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS){ /* only process 0 reports */
- printf("===================================\n");
+ HDprintf("===================================\n");
if (failures){
- printf("***metadata cache tests detected %d failures***\n",
+ HDprintf("***metadata cache tests detected %d failures***\n",
failures);
}
else{
- printf("metadata cache tests finished with no failures\n");
+ HDprintf("metadata cache tests finished with no failures\n");
}
- printf("===================================\n");
+ HDprintf("===================================\n");
}
takedown_derived_types();
diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c
index 5b512d6..08d455d 100644
--- a/testpar/t_cache_image.c
+++ b/testpar/t_cache_image.c
@@ -519,7 +519,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
/* create the dataset */
if ( pass ) {
- sprintf(dset_name, "/dset%03d", i);
+ HDsprintf(dset_name, "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE,
dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
@@ -713,7 +713,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, m);
}
@@ -830,7 +830,7 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
while ( ( pass ) && ( i <= max_dset ) )
{
- sprintf(dset_name, "/dset%03d", i);
+ HDsprintf(dset_name, "/dset%03d", i);
if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
@@ -1446,7 +1446,7 @@ par_create_dataset(int dset_num,
show_progress = (show_progress && (mpi_rank == 0));
verbose = (verbose && (mpi_rank == 0));
- sprintf(dset_name, "/dset%03d", dset_num);
+ HDsprintf(dset_name, "/dset%03d", dset_num);
if ( show_progress ) {
HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -1750,7 +1750,7 @@ par_create_dataset(int dset_num,
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, dset_num);
}
@@ -1848,7 +1848,7 @@ par_delete_dataset(int dset_num,
show_progress = (show_progress && (mpi_rank == 0));
- sprintf(dset_name, "/dset%03d", dset_num);
+ HDsprintf(dset_name, "/dset%03d", dset_num);
if ( show_progress ) {
HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -1932,8 +1932,8 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size )
int child_status;
pid_t child_pid;
- sprintf(file_name_idx_str, "%d", file_name_idx);
- sprintf(mpi_size_str, "%d", mpi_size);
+ HDsprintf(file_name_idx_str, "%d", file_name_idx);
+ HDsprintf(mpi_size_str, "%d", mpi_size);
child_pid = fork();
@@ -1954,7 +1954,7 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size )
HDfprintf(stdout,
"execl() of ici process failed. errno = %d(%s)\n",
errno, strerror(errno));
- exit(1);
+ HDexit(1);
}
} else if ( child_pid != -1 ) {
@@ -2056,7 +2056,7 @@ par_verify_dataset(int dset_num,
show_progress = (show_progress && (mpi_rank == 0));
verbose = (verbose && (mpi_rank == 0));
- sprintf(dset_name, "/dset%03d", dset_num);
+ HDsprintf(dset_name, "/dset%03d", dset_num);
if ( show_progress ) {
HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -2233,7 +2233,7 @@ par_verify_dataset(int dset_num,
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, dset_num);
}
@@ -2448,7 +2448,7 @@ serial_verify_dataset(int dset_num,
hid_t dset_id = -1;
hid_t filespace_id = -1;
- sprintf(dset_name, "/dset%03d", dset_num);
+ HDsprintf(dset_name, "/dset%03d", dset_num);
if ( show_progress ) {
HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -2603,7 +2603,7 @@ serial_verify_dataset(int dset_num,
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
j, k, dset_num);
}
@@ -2801,7 +2801,7 @@ usage(void)
int i = 0;
while(s[i] != NULL) {
- fprintf(stdout, "%s", s[i]);
+ HDfprintf(stdout, "%s", s[i]);
i++;
}
@@ -2876,7 +2876,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
/* open the dataset */
if ( pass ) {
- sprintf(dset_name, "/dset%03d", i);
+ HDsprintf(dset_name, "/dset%03d", i);
dataset_ids[i] = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
if ( dataset_ids[i] < 0 ) {
@@ -3016,7 +3016,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if ( verbose ) {
- fprintf(stdout,
+ HDfprintf(stdout,
"Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, m);
}
@@ -4137,31 +4137,31 @@ main(int argc, char **argv)
if ( pass ) {
- printf("done.\n");
+ HDprintf("done.\n");
HDfflush(stdout);
} else {
- printf("failed.\n");
- exit(1);
+ HDprintf("failed.\n");
+ HDexit(1);
}
i++;
}
HDfprintf(stdout, "Test file construction complete.\n");
- exit(0);
+ HDexit(0);
} else if ( ici ) {
if ( serial_insert_cache_image(file_idx, mpi_size) ) {
- exit(0);
+ HD exit(0);
} else {
HDfprintf(stderr, "\n\nCache image insertion failed.\n");
HDfprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg);
- exit(1);
+ HDexit(1);
}
}
@@ -4178,24 +4178,24 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- printf("%d:Failed to turn off atexit processing. Continue.\n",
+ HDprintf("%d:Failed to turn off atexit processing. Continue.\n",
mpi_rank);
};
H5open();
if ( mpi_rank == 0 ) {
- printf("===================================\n");
- printf("Parallel metadata cache image tests\n");
- printf(" mpi_size = %d\n", mpi_size);
- printf("===================================\n");
+ HDprintf("===================================\n");
+ HDprintf("Parallel metadata cache image tests\n");
+ HDprintf(" mpi_size = %d\n", mpi_size);
+ HDprintf("===================================\n");
}
if ( mpi_size < 2 ) {
if ( mpi_rank == 0 ) {
- printf(" Need at least 2 processes. Exiting.\n");
+ HDprintf(" Need at least 2 processes. Exiting.\n");
}
goto finish;
}
@@ -4220,7 +4220,7 @@ main(int argc, char **argv)
HDfprintf(stdout,
"execl() of setup process failed. errno = %d(%s)\n",
errno, strerror(errno));
- exit(1);
+ HDexit(1);
}
} else if ( child_pid != -1 ) {
@@ -4271,16 +4271,16 @@ finish:
MPI_Barrier(MPI_COMM_WORLD);
if ( mpi_rank == 0 ) { /* only process 0 reports */
- sleep(10);
- printf("===================================\n");
+ HDsleep(10);
+ HDprintf("===================================\n");
if ( nerrs > 0 ) {
- printf("***metadata cache image tests detected %d failures***\n",
+ HDprintf("***metadata cache image tests detected %d failures***\n",
nerrs);
}
else {
- printf("metadata cache image tests finished with no failures\n");
+ HDprintf("metadata cache image tests finished with no failures\n");
}
- printf("===================================\n");
+ HDprintf("===================================\n");
}
/* takedown_derived_types(); */
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index c6fa3d4..40cc1ca 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -1134,7 +1134,7 @@ ccslab_set(int mpi_rank,
break;
}
if (VERBOSE_MED){
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
+ HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
(unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
(unsigned long)(block[0]*block[1]*count[0]*count[1]));
@@ -1197,20 +1197,20 @@ ccdataset_print(hsize_t start[],
hsize_t i, j;
/* print the column heading */
- printf("Print only the first block of the dataset\n");
- printf("%-8s", "Cols:");
+ HDprintf("Print only the first block of the dataset\n");
+ HDprintf("%-8s", "Cols:");
for (j=0; j < block[1]; j++){
- printf("%3lu ", (unsigned long)(start[1]+j));
+ HDprintf("%3lu ", (unsigned long)(start[1]+j));
}
- printf("\n");
+ HDprintf("\n");
/* print the slab data */
for (i=0; i < block[0]; i++){
- printf("Row %2lu: ", (unsigned long)(i+start[0]));
+ HDprintf("Row %2lu: ", (unsigned long)(i+start[0]));
for (j=0; j < block[1]; j++){
- printf("%03d ", *dataptr++);
+ HDprintf("%03d ", *dataptr++);
}
- printf("\n");
+ HDprintf("\n");
}
}
@@ -1233,13 +1233,13 @@ ccdataset_vrfy(hsize_t start[],
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- printf("dataset_vrfy dumping:::\n");
- printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ HDprintf("dataset_vrfy dumping:::\n");
+ HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
(unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
- printf("original values:\n");
+ HDprintf("original values:\n");
ccdataset_print(start, block, original);
- printf("compared values:\n");
+ HDprintf("compared values:\n");
ccdataset_print(start, block, dataset);
}
@@ -1262,7 +1262,7 @@ ccdataset_vrfy(hsize_t start[],
}
if (*dataptr != *oriptr){
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
- printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
(unsigned long)i, (unsigned long)j,
*(oriptr), *(dataptr));
}
@@ -1272,8 +1272,8 @@ ccdataset_vrfy(hsize_t start[],
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("[more errors ...]\n");
+ HDprintf("[more errors ...]\n");
if (vrfyerrs)
- printf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
+ HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
return(vrfyerrs);
}
diff --git a/testpar/t_file.c b/testpar/t_file.c
index f670034..7b5acfc 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -24,14 +24,14 @@
/*
* This file needs to access private information from the H5F package.
*/
-#define H5AC_FRIEND /*suppress error about including H5ACpkg */
+#define H5AC_FRIEND /*suppress error about including H5ACpkg */
#include "H5ACpkg.h"
-#define H5C_FRIEND /*suppress error about including H5Cpkg */
+#define H5C_FRIEND /*suppress error about including H5Cpkg */
#include "H5Cpkg.h"
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
#include "H5Fpkg.h"
-#define H5MF_FRIEND /*suppress error about including H5MFpkg */
+#define H5MF_FRIEND /*suppress error about including H5MFpkg */
#include "H5MFpkg.h"
#define NUM_DSETS 5
@@ -39,7 +39,7 @@
int mpi_size, mpi_rank;
static int create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_strategy);
-static int open_file(const char *filename, hid_t fapl, int metadata_write_strategy,
+static int open_file(const char *filename, hid_t fapl, int metadata_write_strategy,
hsize_t page_size, size_t page_buffer_size);
/*
@@ -60,15 +60,15 @@ test_split_comm_access(void)
MPI_Info info = MPI_INFO_NULL;
int is_old, mrc;
int newrank, newprocs;
- hid_t fid; /* file IDs */
- hid_t acc_tpl; /* File access properties */
- herr_t ret; /* generic return value */
+ hid_t fid; /* file IDs */
+ hid_t acc_tpl; /* File access properties */
+ herr_t ret; /* generic return value */
const char *filename;
filename = (const char *)GetTestParameters();
if (VERBOSE_MED)
- printf("Split Communicator access test on file %s\n",
- filename);
+ HDprintf("Split Communicator access test on file %s\n",
+ filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
@@ -80,35 +80,35 @@ test_split_comm_access(void)
MPI_Comm_rank(comm,&newrank);
if (is_old){
- /* odd-rank processes */
- mrc = MPI_Barrier(comm);
- VRFY((mrc==MPI_SUCCESS), "");
+ /* odd-rank processes */
+ mrc = MPI_Barrier(comm);
+ VRFY((mrc==MPI_SUCCESS), "");
}else{
- /* even-rank processes */
- int sub_mpi_rank; /* rank in the sub-comm */
- MPI_Comm_rank(comm,&sub_mpi_rank);
-
- /* setup file access template */
- acc_tpl = create_faccess_plist(comm, info, facc_type);
- VRFY((acc_tpl >= 0), "");
-
- /* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
- VRFY((fid >= 0), "H5Fcreate succeeded");
-
- /* Release file-access template */
- ret=H5Pclose(acc_tpl);
- VRFY((ret >= 0), "");
-
- /* close the file */
- ret=H5Fclose(fid);
- VRFY((ret >= 0), "");
-
- /* delete the test file */
- if (sub_mpi_rank == 0){
- mrc = MPI_File_delete((char *)filename, info);
- /*VRFY((mrc==MPI_SUCCESS), ""); */
- }
+ /* even-rank processes */
+ int sub_mpi_rank; /* rank in the sub-comm */
+ MPI_Comm_rank(comm,&sub_mpi_rank);
+
+ /* setup file access template */
+ acc_tpl = create_faccess_plist(comm, info, facc_type);
+ VRFY((acc_tpl >= 0), "");
+
+ /* create the file collectively */
+ fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ VRFY((fid >= 0), "H5Fcreate succeeded");
+
+ /* Release file-access template */
+ ret=H5Pclose(acc_tpl);
+ VRFY((ret >= 0), "");
+
+ /* close the file */
+ ret=H5Fclose(fid);
+ VRFY((ret >= 0), "");
+
+ /* delete the test file */
+ if (sub_mpi_rank == 0){
+ mrc = MPI_File_delete((char *)filename, info);
+ /*VRFY((mrc==MPI_SUCCESS), ""); */
+ }
}
mrc = MPI_Comm_free(&comm);
VRFY((mrc==MPI_SUCCESS), "MPI_Comm_free succeeded");
@@ -126,7 +126,7 @@ test_page_buffer_access(void)
haddr_t raw_addr, meta_addr;
int *data;
H5F_t *f = NULL;
- herr_t ret; /* generic return value */
+ herr_t ret; /* generic return value */
const char *filename;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
@@ -136,7 +136,7 @@ test_page_buffer_access(void)
filename = (const char *)GetTestParameters();
if (VERBOSE_MED)
- printf("Page Buffer Usage in Parallel %s\n", filename);
+ HDprintf("Page Buffer Usage in Parallel %s\n", filename);
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -403,7 +403,7 @@ test_page_buffer_access(void)
ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*50, data);
VRFY((ret == 0), "");
VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
- for (i=0; i < 50; i++)
+ for (i=0; i < 50; i++)
VRFY((data[i] == -1), "Read different values than written");
/* close the file */
@@ -507,28 +507,28 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
VRFY((mem_dataspace >= 0), "");
for(k=0 ; k<NUM_DSETS; k++) {
- sprintf(dset_name, "D1dset%d", k);
+ HDsprintf(dset_name, "D1dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- sprintf(dset_name, "D2dset%d", k);
+ HDsprintf(dset_name, "D2dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- sprintf(dset_name, "D3dset%d", k);
+ HDsprintf(dset_name, "D3dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- sprintf(dset_name, "dset%d", k);
+ HDsprintf(dset_name, "dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -552,13 +552,13 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
for (i=0; i < num_elements; i++)
VRFY((data_array[i] == mpi_rank+1), "Dataset Verify failed");
- sprintf(dset_name, "D1dset%d", k);
+ HDsprintf(dset_name, "D1dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- sprintf(dset_name, "D2dset%d", k);
+ HDsprintf(dset_name, "D2dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- sprintf(dset_name, "D3dset%d", k);
+ HDsprintf(dset_name, "D3dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
}
@@ -660,7 +660,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy,
VRFY((mem_dataspace >= 0), "");
for(k=0 ; k<NUM_DSETS; k++) {
- sprintf(dset_name, "dset%d", k);
+ HDsprintf(dset_name, "dset%d", k);
dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -744,7 +744,7 @@ void
test_file_properties(void)
{
hid_t fid; /* HDF5 file ID */
- hid_t fapl_id; /* File access plist */
+ hid_t fapl_id; /* File access plist */
hbool_t is_coll;
const char *filename;
MPI_Comm comm = MPI_COMM_WORLD;
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index 4556b01..28baed5 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -37,9 +37,9 @@ static int mpi_size, mpi_rank;
#define HS_DIM1 200
#define HS_DIM2 100
-
+
/*-------------------------------------------------------------------------
- * Function: filter_read_internal
+ * Function: filter_read_internal
*
* Purpose: Tests parallel reading of a 2D dataset written serially using
* filters. During the parallel reading phase, the dataset is
@@ -54,13 +54,13 @@ static void
filter_read_internal(const char *filename, hid_t dcpl,
hsize_t *dset_size)
{
- hid_t file, dataset; /* HDF5 IDs */
- hid_t access_plist; /* Access property list ID */
- hid_t sid, memspace; /* Dataspace IDs */
- hsize_t size[2]; /* Dataspace dimensions */
- hsize_t hs_offset[2]; /* Hyperslab offset */
- hsize_t hs_size[2]; /* Hyperslab size */
- size_t i, j; /* Local index variables */
+ hid_t file, dataset; /* HDF5 IDs */
+ hid_t access_plist; /* Access property list ID */
+ hid_t sid, memspace; /* Dataspace IDs */
+ hsize_t size[2]; /* Dataspace dimensions */
+ hsize_t hs_offset[2]; /* Hyperslab offset */
+ hsize_t hs_size[2]; /* Hyperslab size */
+ size_t i, j; /* Local index variables */
char name[32] = "dataset";
herr_t hrc; /* Error status */
int *points = NULL; /* Writing buffer for entire dataset */
@@ -151,17 +151,17 @@ filter_read_internal(const char *filename, hid_t dcpl,
for (j=0; j<hs_size[1]; j++) {
if(points[i*size[1]+(size_t)hs_offset[1]+j] !=
check[i*hs_size[1]+j]) {
- fprintf(stderr," Read different values than written.\n");
- fprintf(stderr," At index %lu,%lu\n",
- (unsigned long)(i),
- (unsigned long)(hs_offset[1]+j));
- fprintf(stderr," At original: %d\n",
- (int)points[i*size[1]+(size_t)hs_offset[1]+j]);
- fprintf(stderr," At returned: %d\n",
- (int)check[i*hs_size[1]+j]);
+ HDfprintf(stderr," Read different values than written.\n");
+ HDfprintf(stderr," At index %lu,%lu\n",
+ (unsigned long)(i),
+ (unsigned long)(hs_offset[1]+j));
+ HDfprintf(stderr," At original: %d\n",
+ (int)points[i*size[1]+(size_t)hs_offset[1]+j]);
+ HDfprintf(stderr," At returned: %d\n",
+ (int)check[i*hs_size[1]+j]);
VRFY(FALSE, "");
- }
- }
+ }
+ }
}
/* Get the storage size of the dataset */
@@ -194,10 +194,10 @@ filter_read_internal(const char *filename, hid_t dcpl,
/*-------------------------------------------------------------------------
* Function: test_filter_read
*
- * Purpose: Tests parallel reading of datasets written serially using
+ * Purpose: Tests parallel reading of datasets written serially using
* several (combinations of) filters.
*
- * Programmer: Christian Chilan
+ * Programmer: Christian Chilan
* Tuesday, May 15, 2007
*
* Modifications:
@@ -208,7 +208,7 @@ filter_read_internal(const char *filename, hid_t dcpl,
void
test_filter_read(void)
{
- hid_t dc; /* HDF5 IDs */
+ hid_t dc; /* HDF5 IDs */
const hsize_t chunk_size[2] = {CHUNK_DIM1, CHUNK_DIM2}; /* Chunk dimensions */
hsize_t null_size; /* Size of dataset without filters */
unsigned chunk_opts; /* Chunk options */
@@ -236,7 +236,7 @@ test_filter_read(void)
filename = GetTestParameters();
if(VERBOSE_MED)
- printf("Parallel reading of dataset written with filters %s\n", filename);
+ HDprintf("Parallel reading of dataset written with filters %s\n", filename);
/*----------------------------------------------------------
* STEP 0: Test without filters.
@@ -448,10 +448,10 @@ test_filter_read(void)
/* Make sure encoding is enabled */
if(h5_szip_can_encode() == 1) {
- hrc = H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block);
+ hrc = H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block);
VRFY(hrc>=0, "H5Pset_szip");
- filter_read_internal(filename,dc,&combo_size);
+ filter_read_internal(filename,dc,&combo_size);
}
/* Clean up objects used for this test */
@@ -461,25 +461,25 @@ test_filter_read(void)
/* Testing shuffle+szip(with encoder)+checksum filters(checksum last) */
/* Make sure encoding is enabled */
if(h5_szip_can_encode() == 1) {
- dc = H5Pcreate(H5P_DATASET_CREATE);
+ dc = H5Pcreate(H5P_DATASET_CREATE);
VRFY(dc>=0, "H5Pcreate");
- hrc = H5Pset_chunk (dc, 2, chunk_size);
+ hrc = H5Pset_chunk (dc, 2, chunk_size);
VRFY(hrc>=0, "H5Pset_chunk");
- hrc = H5Pset_shuffle (dc);
+ hrc = H5Pset_shuffle (dc);
VRFY(hrc>=0, "H5Pset_shuffle");
- hrc = H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block);
+ hrc = H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block);
VRFY(hrc>=0, "H5Pset_szip");
- hrc = H5Pset_fletcher32 (dc);
+ hrc = H5Pset_fletcher32 (dc);
VRFY(hrc>=0, "H5Pset_fletcher32");
- filter_read_internal(filename,dc,&combo_size);
+ filter_read_internal(filename,dc,&combo_size);
- /* Clean up objects used for this test */
- hrc = H5Pclose (dc);
+ /* Clean up objects used for this test */
+ hrc = H5Pclose (dc);
VRFY(hrc>=0, "H5Pclose");
}
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index db5bd13..76f9276 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -5813,7 +5813,7 @@ test_write_parallel_read_serial(void)
static void
test_shrinking_growing_chunks(void)
{
- float *data = NULL;
+ double *data = NULL;
hsize_t dataset_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
@@ -5908,9 +5908,9 @@ test_shrinking_growing_chunks(void)
VRFY((H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE) >= 0),
"Set DXPL MPIO succeeded");
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(double);
- data = (float *) HDcalloc(1, data_size);
+ data = (double *) HDcalloc(1, data_size);
VRFY((NULL != data), "HDcalloc succeeded");
for (i = 0; i < SHRINKING_GROWING_CHUNKS_NLOOPS; i++) {
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 7f75d20..e9f4101 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -21,7 +21,7 @@
enum obj_type { is_group, is_dset };
-static int get_size(void);
+static int get_size(void);
static void write_dataset(hid_t, hid_t, hid_t);
static int read_dataset(hid_t, hid_t, hid_t);
static void create_group_recursive(hid_t, hid_t, hid_t, int);
@@ -54,13 +54,9 @@ get_size(void)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
if(mpi_size > size ) {
-
if((mpi_size % 2) == 0 ) {
-
size = mpi_size;
-
} else {
-
size = mpi_size + 1;
}
}
@@ -79,7 +75,7 @@ get_size(void)
void zero_dim_dset(void)
{
int mpi_size, mpi_rank;
- const char *filename;
+ const char *filename;
hid_t fid, plist, dcpl, dsid, sid;
hsize_t dim, chunk_dim;
herr_t ret;
@@ -133,27 +129,27 @@ void zero_dim_dset(void)
* Example of using PHDF5 to create ndatasets datasets. Each process write
* a slab of array to the file.
*
- * Changes: Updated function to use a dynamically calculated size,
- * instead of the old SIZE #define. This should allow it
- * to function with an arbitrary number of processors.
+ * Changes: Updated function to use a dynamically calculated size,
+ * instead of the old SIZE #define. This should allow it
+ * to function with an arbitrary number of processors.
*
- * JRM - 8/11/04
+ * JRM - 8/11/04
*/
void multiple_dset_write(void)
{
- int i, j, n, mpi_size, mpi_rank, size;
+ int i, j, n, mpi_size, mpi_rank, size;
hid_t iof, plist, dataset, memspace, filespace;
hid_t dcpl; /* Dataset creation property list */
hsize_t chunk_origin [DIM];
hsize_t chunk_dims [DIM], file_dims [DIM];
hsize_t count[DIM]={1,1};
- double * outme = NULL;
+ double *outme = NULL;
double fill=1.0; /* Fill value */
- char dname [100];
+ char dname [100];
herr_t ret;
- const H5Ptest_param_t *pt;
- char *filename;
- int ndatasets;
+ const H5Ptest_param_t *pt;
+ char *filename;
+ int ndatasets;
pt = GetTestParameters();
filename = pt->name;
@@ -190,23 +186,23 @@ void multiple_dset_write(void)
VRFY((ret>=0), "set fill-value succeeded");
for(n = 0; n < ndatasets; n++) {
- sprintf(dname, "dataset %d", n);
- dataset = H5Dcreate2(iof, dname, H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- VRFY((dataset > 0), dname);
+ HDsprintf(dname, "dataset %d", n);
+ dataset = H5Dcreate2(iof, dname, H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ VRFY((dataset > 0), dname);
- /* calculate data to write */
- for(i = 0; i < size; i++)
- for(j = 0; j < size; j++)
- outme [(i * size) + j] = n*1000 + mpi_rank;
+ /* calculate data to write */
+ for(i = 0; i < size; i++)
+ for(j = 0; j < size; j++)
+ outme [(i * size) + j] = n*1000 + mpi_rank;
- H5Dwrite(dataset, H5T_NATIVE_DOUBLE, memspace, filespace, H5P_DEFAULT, outme);
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, memspace, filespace, H5P_DEFAULT, outme);
- H5Dclose(dataset);
+ H5Dclose(dataset);
#ifdef BARRIER_CHECKS
- if(!((n+1) % 10)) {
- printf("created %d datasets\n", n+1);
- MPI_Barrier(MPI_COMM_WORLD);
- }
+ if(!((n+1) % 10)) {
+ HDprintf("created %d datasets\n", n+1);
+ MPI_Barrier(MPI_COMM_WORLD);
+ }
#endif /* BARRIER_CHECKS */
}
@@ -221,21 +217,21 @@ void multiple_dset_write(void)
/* Example of using PHDF5 to create, write, and read compact dataset.
*
- * Changes: Updated function to use a dynamically calculated size,
- * instead of the old SIZE #define. This should allow it
- * to function with an arbitrary number of processors.
+ * Changes: Updated function to use a dynamically calculated size,
+ * instead of the old SIZE #define. This should allow it
+ * to function with an arbitrary number of processors.
*
- * JRM - 8/11/04
+ * JRM - 8/11/04
*/
void compact_dataset(void)
{
- int i, j, mpi_size, mpi_rank, size, err_num=0;
- hid_t iof, plist, dcpl, dxpl, dataset, filespace;
+ int i, j, mpi_size, mpi_rank, size, err_num=0;
+ hid_t iof, plist, dcpl, dxpl, dataset, filespace;
hsize_t file_dims [DIM];
- double * outme;
- double * inme;
- char dname[]="dataset";
- herr_t ret;
+ double *outme;
+ double *inme;
+ char dname[]="dataset";
+ herr_t ret;
const char *filename;
size = get_size();
@@ -278,15 +274,15 @@ void compact_dataset(void)
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
- ret = H5Pset_dxpl_mpio_collective_opt(dxpl, H5FD_MPIO_INDIVIDUAL_IO);
- VRFY((ret>= 0),"set independent IO collectively succeeded");
+ ret = H5Pset_dxpl_mpio_collective_opt(dxpl, H5FD_MPIO_INDIVIDUAL_IO);
+ VRFY((ret>= 0),"set independent IO collectively succeeded");
}
/* Recalculate data to write. Each process writes the same data. */
for(i = 0; i < size; i++)
for(j = 0; j < size; j++)
- outme[(i * size) + j] =(i + j) * 1000;
+ outme[(i * size) + j] =(i + j) * 1000;
ret = H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, dxpl, outme);
VRFY((ret >= 0), "H5Dwrite succeeded");
@@ -308,8 +304,8 @@ void compact_dataset(void)
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
- ret = H5Pset_dxpl_mpio_collective_opt(dxpl,H5FD_MPIO_INDIVIDUAL_IO);
- VRFY((ret>= 0),"set independent IO collectively succeeded");
+ ret = H5Pset_dxpl_mpio_collective_opt(dxpl,H5FD_MPIO_INDIVIDUAL_IO);
+ VRFY((ret>= 0),"set independent IO collectively succeeded");
}
dataset = H5Dopen2(iof, dname, H5P_DEFAULT);
@@ -338,7 +334,7 @@ void compact_dataset(void)
for(j = 0; j < size; j++)
if(inme[(i * size) + j] != outme[(i * size) + j])
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[(i * size) + j], inme[(i * size) + j]);
+ HDprintf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[(i * size) + j], inme[(i * size) + j]);
H5Pclose(plist);
H5Pclose(dxpl);
@@ -352,24 +348,24 @@ void compact_dataset(void)
* Example of using PHDF5 to create, write, and read dataset and attribute
* of Null dataspace.
*
- * Changes: Removed the assert that mpi_size <= the SIZE #define.
- * As best I can tell, this assert isn't needed here,
- * and in any case, the SIZE #define is being removed
- * in an update of the functions in this file to run
- * with an arbitrary number of processes.
+ * Changes: Removed the assert that mpi_size <= the SIZE #define.
+ * As best I can tell, this assert isn't needed here,
+ * and in any case, the SIZE #define is being removed
+ * in an update of the functions in this file to run
+ * with an arbitrary number of processes.
*
* JRM - 8/24/04
*/
void null_dataset(void)
{
- int mpi_size, mpi_rank;
- hid_t iof, plist, dxpl, dataset, attr, sid;
+ int mpi_size, mpi_rank;
+ hid_t iof, plist, dxpl, dataset, attr, sid;
unsigned uval=2; /* Buffer for writing to dataset */
- int val=1; /* Buffer for writing to attribute */
- int nelem;
- char dname[]="dataset";
- char attr_name[]="attribute";
- herr_t ret;
+ int val=1; /* Buffer for writing to attribute */
+ int nelem;
+ char dname[]="dataset";
+ char attr_name[]="attribute";
+ herr_t ret;
const char *filename;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -397,8 +393,8 @@ void null_dataset(void)
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
- ret = H5Pset_dxpl_mpio_collective_opt(dxpl, H5FD_MPIO_INDIVIDUAL_IO);
- VRFY((ret>= 0),"set independent IO collectively succeeded");
+ ret = H5Pset_dxpl_mpio_collective_opt(dxpl, H5FD_MPIO_INDIVIDUAL_IO);
+ VRFY((ret>= 0),"set independent IO collectively succeeded");
}
@@ -431,8 +427,8 @@ void null_dataset(void)
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
- ret = H5Pset_dxpl_mpio_collective_opt(dxpl,H5FD_MPIO_INDIVIDUAL_IO);
- VRFY((ret>= 0),"set independent IO collectively succeeded");
+ ret = H5Pset_dxpl_mpio_collective_opt(dxpl,H5FD_MPIO_INDIVIDUAL_IO);
+ VRFY((ret>= 0),"set independent IO collectively succeeded");
}
@@ -464,11 +460,11 @@ void null_dataset(void)
* sizes(2GB, 4GB, etc.), but the metadata for the file pushes the file over
* the boundary of interest.
*
- * Changes: Removed the assert that mpi_size <= the SIZE #define.
- * As best I can tell, this assert isn't needed here,
- * and in any case, the SIZE #define is being removed
- * in an update of the functions in this file to run
- * with an arbitrary number of processes.
+ * Changes: Removed the assert that mpi_size <= the SIZE #define.
+ * As best I can tell, this assert isn't needed here,
+ * and in any case, the SIZE #define is being removed
+ * in an update of the functions in this file to run
+ * with an arbitrary number of processes.
*
* JRM - 8/11/04
*/
@@ -592,13 +588,13 @@ void big_dataset(void)
* not have actual data written to the entire raw data area and relies on the
* default fill value of zeros to work correctly.
*
- * Changes: Removed the assert that mpi_size <= the SIZE #define.
- * As best I can tell, this assert isn't needed here,
- * and in any case, the SIZE #define is being removed
- * in an update of the functions in this file to run
- * with an arbitrary number of processes.
+ * Changes: Removed the assert that mpi_size <= the SIZE #define.
+ * As best I can tell, this assert isn't needed here,
+ * and in any case, the SIZE #define is being removed
+ * in an update of the functions in this file to run
+ * with an arbitrary number of processes.
*
- * Also added code to free dynamically allocated buffers.
+ * Also added code to free dynamically allocated buffers.
*
* JRM - 8/11/04
*/
@@ -619,7 +615,7 @@ void dataset_fillvalue(void)
hsize_t dset_size; /* Dataset size */
int *rdata, *wdata; /* Buffers for data to read and write */
int *twdata, *trdata; /* Temporary pointer into buffer */
- int acc, i, j, k, l, ii; /* Local index variables */
+ int acc, i, ii, j, k, l; /* Local index variables */
herr_t ret; /* Generic return value */
const char *filename;
@@ -707,11 +703,11 @@ void dataset_fillvalue(void)
for(l = 0; l < (int)dset_dims[3]; l++, twdata++, trdata++)
if(*trdata != 0)
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i, j, k, l, *trdata);
+ HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i, j, k, l, *trdata);
if(err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("[more errors ...]\n");
+ HDprintf("[more errors ...]\n");
if(err_num) {
- printf("%d errors found in check_value\n", err_num);
+ HDprintf("%d errors found in check_value\n", err_num);
nerrors++;
}
}
@@ -798,21 +794,21 @@ void dataset_fillvalue(void)
if(i<mpi_size) {
if(*twdata != *trdata )
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", i,j,k,l, *twdata, *trdata);
+ HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", i,j,k,l, *twdata, *trdata);
} /* end if */
else {
if(*trdata != 0)
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i,j,k,l, *trdata);
+ HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i,j,k,l, *trdata);
} /* end else */
if(err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("[more errors ...]\n");
+ HDprintf("[more errors ...]\n");
if(err_num){
- printf("%d errors found in check_value\n", err_num);
+ HDprintf("%d errors found in check_value\n", err_num);
nerrors++;
}
}
-
+
/* Close all file objects */
ret = H5Dclose(dataset);
VRFY((ret >= 0), "H5Dclose succeeded");
@@ -866,8 +862,8 @@ void collective_group_write(void)
hsize_t chunk_size[2]; /* Chunk dimensions - computed shortly */
herr_t ret1, ret2;
const H5Ptest_param_t *pt;
- char *filename;
- int ngroups;
+ char *filename;
+ int ngroups;
pt = GetTestParameters();
filename = pt->name;
@@ -912,11 +908,11 @@ void collective_group_write(void)
/* creates ngroups groups under the root group, writes chunked
* datasets in parallel. */
for(m = 0; m < ngroups; m++) {
- sprintf(gname, "group%d", m);
+ HDsprintf(gname, "group%d", m);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
- sprintf(dname, "dataset%d", m);
+ HDsprintf(dname, "dataset%d", m);
did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -932,7 +928,7 @@ void collective_group_write(void)
#ifdef BARRIER_CHECKS
if(!((m+1) % 10)) {
- printf("created %d groups\n", m+1);
+ HDprintf("created %d groups\n", m+1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -954,8 +950,8 @@ void independent_group_read(void)
int mpi_rank, m;
hid_t plist, fid;
const H5Ptest_param_t *pt;
- char *filename;
- int ngroups;
+ char *filename;
+ int ngroups;
pt = GetTestParameters();
filename = pt->name;
@@ -989,9 +985,9 @@ void independent_group_read(void)
* instead of the old SIZE #define. This should allow it
* to function with an arbitrary number of processors.
*
- * Also added code to verify the results of dynamic memory
- * allocations, and to free dynamically allocated memeory
- * when we are done with it.
+ * Also added code to verify the results of dynamic memory
+ * allocations, and to free dynamically allocated memeory
+ * when we are done with it.
*
* JRM - 8/16/04
*/
@@ -1013,12 +1009,12 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
/* open every group under root group. */
- sprintf(gname, "group%d", m);
+ HDsprintf(gname, "group%d", m);
gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* check the data. */
- sprintf(dname, "dataset%d", m);
+ HDsprintf(dname, "dataset%d", m);
did = H5Dopen2(gid, dname, H5P_DEFAULT);
VRFY((did>0), dname);
@@ -1083,8 +1079,8 @@ void multiple_group_write(void)
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
herr_t ret;
const H5Ptest_param_t *pt;
- char *filename;
- int ngroups;
+ char *filename;
+ int ngroups;
pt = GetTestParameters();
filename = pt->name;
@@ -1119,23 +1115,23 @@ void multiple_group_write(void)
/* creates ngroups groups under the root group, writes datasets in
* parallel. */
for(m = 0; m < ngroups; m++) {
- sprintf(gname, "group%d", m);
+ HDsprintf(gname, "group%d", m);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* create attribute for these groups. */
- write_attribute(gid, is_group, m);
+ write_attribute(gid, is_group, m);
if(m != 0)
- write_dataset(memspace, filespace, gid);
+ write_dataset(memspace, filespace, gid);
H5Gclose(gid);
#ifdef BARRIER_CHECKS
if(!((m+1) % 10)) {
- printf("created %d groups\n", m+1);
+ HDprintf("created %d groups\n", m+1);
MPI_Barrier(MPI_COMM_WORLD);
- }
+ }
#endif /* BARRIER_CHECKS */
}
@@ -1181,13 +1177,13 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
VRFY((outme != NULL), "HDmalloc succeeded for outme");
for(n = 0; n < NDATASET; n++) {
- sprintf(dname, "dataset%d", n);
+ HDsprintf(dname, "dataset%d", n);
did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((did > 0), dname);
for(i = 0; i < size; i++)
for(j = 0; j < size; j++)
- outme[(i * size) + j] = n * 1000 + mpi_rank;
+ outme[(i * size) + j] = n * 1000 + mpi_rank;
H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, outme);
@@ -1214,12 +1210,12 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter)
#ifdef BARRIER_CHECKS
if(!((counter+1) % 10)) {
- printf("created %dth child groups\n", counter+1);
+ HDprintf("created %dth child groups\n", counter+1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
- sprintf(gname, "%dth_child_group", counter+1);
+ HDsprintf(gname, "%dth_child_group", counter+1);
child_gid = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((child_gid > 0), gname);
@@ -1251,8 +1247,8 @@ void multiple_group_read(void)
hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
const H5Ptest_param_t *pt;
- char *filename;
- int ngroups;
+ char *filename;
+ int ngroups;
pt = GetTestParameters();
filename = pt->name;
@@ -1280,19 +1276,19 @@ void multiple_group_read(void)
/* open every group under root group. */
for(m=0; m<ngroups; m++) {
- sprintf(gname, "group%d", m);
+ HDsprintf(gname, "group%d", m);
gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* check the data. */
if(m != 0)
if((error_num = read_dataset(memspace, filespace, gid))>0)
- nerrors += error_num;
+ nerrors += error_num;
/* check attribute.*/
error_num = 0;
if((error_num = read_attribute(gid, is_group, m))>0 )
- nerrors += error_num;
+ nerrors += error_num;
H5Gclose(gid);
@@ -1344,7 +1340,7 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
for(n=0; n<NDATASET; n++) {
- sprintf(dname, "dataset%d", n);
+ HDsprintf(dname, "dataset%d", n);
did = H5Dopen2(gid, dname, H5P_DEFAULT);
VRFY((did>0), dname);
@@ -1353,10 +1349,10 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
/* this is the original value */
for(i=0; i<size; i++)
- for(j=0; j<size; j++) {
- *outdata = n*1000 + mpi_rank;
+ for(j=0; j<size; j++) {
+ *outdata = n*1000 + mpi_rank;
outdata++;
- }
+ }
outdata -= size * size;
/* compare the original value(outdata) to the value in file(indata).*/
@@ -1396,7 +1392,7 @@ recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid, int counter)
nerrors += err_num;
if(counter < GROUP_DEPTH ) {
- sprintf(gname, "%dth_child_group", counter+1);
+ HDsprintf(gname, "%dth_child_group", counter+1);
child_gid = H5Gopen2(gid, gname, H5P_DEFAULT);
VRFY((child_gid>0), gname);
recursive_read_group(memspace, filespace, child_gid, counter+1);
@@ -1418,7 +1414,7 @@ write_attribute(hid_t obj_id, int this_type, int num)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if(this_type == is_group) {
- sprintf(attr_name, "Group Attribute %d", num);
+ HDsprintf(attr_name, "Group Attribute %d", num);
sid = H5Screate(H5S_SCALAR);
aid = H5Acreate2(obj_id, attr_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(aid, H5T_NATIVE_INT, &num);
@@ -1426,7 +1422,7 @@ write_attribute(hid_t obj_id, int this_type, int num)
H5Sclose(sid);
} /* end if */
else if(this_type == is_dset) {
- sprintf(attr_name, "Dataset Attribute %d", num);
+ HDsprintf(attr_name, "Dataset Attribute %d", num);
for(i=0; i<8; i++)
attr_data[i] = i;
sid = H5Screate_simple(dspace_rank, dspace_dims, NULL);
@@ -1450,23 +1446,23 @@ read_attribute(hid_t obj_id, int this_type, int num)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if(this_type == is_group) {
- sprintf(attr_name, "Group Attribute %d", num);
+ HDsprintf(attr_name, "Group Attribute %d", num);
aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT);
if(MAINPROCESS) {
H5Aread(aid, H5T_NATIVE_INT, &in_num);
vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block, &in_num, &num);
- }
+ }
H5Aclose(aid);
}
else if(this_type == is_dset) {
- sprintf(attr_name, "Dataset Attribute %d", num);
+ HDsprintf(attr_name, "Dataset Attribute %d", num);
for(i=0; i<8; i++)
out_data[i] = i;
aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT);
if(MAINPROCESS) {
H5Aread(aid, H5T_NATIVE_INT, in_data);
vrfy_errors = dataset_vrfy(NULL, NULL, NULL, dset_block, in_data, out_data);
- }
+ }
H5Aclose(aid);
}
@@ -1476,11 +1472,11 @@ read_attribute(hid_t obj_id, int this_type, int num)
/* This functions compares the original data with the read-in data for its
* hyperslab part only by process ID.
*
- * Changes: Modified function to use a passed in size parameter
- * instead of the old SIZE #define. This should let us
- * run with an arbitrary number of processes.
+ * Changes: Modified function to use a passed in size parameter
+ * instead of the old SIZE #define. This should let us
+ * run with an arbitrary number of processes.
*
- * JRM - 8/16/04
+ * JRM - 8/16/04
*/
static int
check_value(DATATYPE *indata, DATATYPE *outdata, int size)
@@ -1500,23 +1496,23 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size)
for(i=chunk_origin[0]; i<(chunk_origin[0]+chunk_dims[0]); i++)
for(j=chunk_origin[1]; j<(chunk_origin[1]+chunk_dims[1]); j++) {
if(*indata != *outdata )
- if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n",(unsigned long)i,(unsigned long)j,(unsigned long)i,(unsigned long)j, *outdata, *indata);
- }
+ if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
+ HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n",(unsigned long)i,(unsigned long)j,(unsigned long)i,(unsigned long)j, *outdata, *indata);
+ }
if(err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("[more errors ...]\n");
+ HDprintf("[more errors ...]\n");
if(err_num)
- printf("%d errors found in check_value\n", err_num);
+ HDprintf("%d errors found in check_value\n", err_num);
return err_num;
}
/* Decide the portion of data chunk in dataset by process ID.
*
- * Changes: Modified function to use a passed in size parameter
- * instead of the old SIZE #define. This should let us
- * run with an arbitrary number of processes.
+ * Changes: Modified function to use a passed in size parameter
+ * instead of the old SIZE #define. This should let us
+ * run with an arbitrary number of processes.
*
- * JRM - 8/11/04
+ * JRM - 8/11/04
*/
static void
@@ -1560,7 +1556,7 @@ get_slab(hsize_t chunk_origin[], hsize_t chunk_dims[], hsize_t count[],
* on failure.
* JRM - 9/13/04
*
- * Changes: None.
+ * Changes: None.
*/
#define N 4
@@ -1595,10 +1591,10 @@ void io_mode_confusion(void)
* test bed related variables
*/
- const char * fcn_name = "io_mode_confusion";
- const hbool_t verbose = FALSE;
- const H5Ptest_param_t * pt;
- char * filename;
+ const char * fcn_name = "io_mode_confusion";
+ const hbool_t verbose = FALSE;
+ const H5Ptest_param_t * pt;
+ char * filename;
pt = GetTestParameters();
@@ -1799,13 +1795,13 @@ void io_mode_confusion(void)
/*
* At present, the object header code maintains an image of its on disk
* representation, which is updates as necessary instead of generating on
- * request.
+ * request.
*
* Prior to the fix that this test in designed to verify, the image of the
* on disk representation was only updated on flush -- not when the object
* header was marked clean.
*
- * This worked perfectly well as long as all writes of a given object
+ * This worked perfectly well as long as all writes of a given object
* header were written from a single process. However, with the implementation
* of round robin metadata data writes in parallel HDF5, this is no longer
* the case -- it is possible for a given object header to be flushed from
@@ -1813,14 +1809,14 @@ void io_mode_confusion(void)
* clean in all other processes on each flush. This resulted in NULL or
* out of data object header information being written to disk.
*
- * To repair this, I modified the object header code to update its
- * on disk image both on flush on when marked clean.
+ * To repair this, I modified the object header code to update its
+ * on disk image both on flush on when marked clean.
*
* This test is directed at verifying that the fix performs as expected.
*
* The test functions by creating a HDF5 file with several small datasets,
- * and then flushing the file. This should result of at least one of
- * the associated object headers being flushed by a process other than
+ * and then flushing the file. This should result of at least one of
+ * the associated object headers being flushed by a process other than
* process 0.
*
* Then for each data set, add an attribute and flush the file again.
@@ -1830,26 +1826,26 @@ void io_mode_confusion(void)
* Open the each of the data sets in turn. If all opens are successful,
* the test passes. Otherwise the test fails.
*
- * Note that this test will probably become irrelevent shortly, when we
+ * Note that this test will probably become irrelevent shortly, when we
* land the journaling modifications on the trunk -- at which point all
* cache clients will have to construct on disk images on demand.
*
- * JRM -- 10/13/10
+ * JRM -- 10/13/10
*
* Changes:
- * Break it into two parts, a writer to write the file and a reader
- * the correctness of the writer. AKC -- 2010/10/27
+ * Break it into two parts, a writer to write the file and a reader
+ * the correctness of the writer. AKC -- 2010/10/27
*/
-#define NUM_DATA_SETS 4
-#define LOCAL_DATA_SIZE 4
-#define LARGE_ATTR_SIZE 256
+#define NUM_DATA_SETS 4
+#define LOCAL_DATA_SIZE 4
+#define LARGE_ATTR_SIZE 256
/* Since all even and odd processes are split into writer and reader comm
* respectively, process 0 and 1 in COMM_WORLD become the root process of
* the writer and reader comm respectively.
*/
-#define Writer_Root 0
-#define Reader_Root 1
+#define Writer_Root 0
+#define Reader_Root 1
#define Reader_wait(mpi_err, xsteps) \
mpi_err = MPI_Bcast(&xsteps, 1, MPI_INT, Writer_Root, MPI_COMM_WORLD)
#define Reader_result(mpi_err, xsteps_done) \
@@ -1861,26 +1857,26 @@ void io_mode_confusion(void)
/* object names used by both rr_obj_hdr_flush_confusion and
* rr_obj_hdr_flush_confusion_reader.
*/
-const char * dataset_name[NUM_DATA_SETS] =
- {
- "dataset_0",
- "dataset_1",
- "dataset_2",
- "dataset_3"
+const char * dataset_name[NUM_DATA_SETS] =
+ {
+ "dataset_0",
+ "dataset_1",
+ "dataset_2",
+ "dataset_3"
};
-const char * att_name[NUM_DATA_SETS] =
- {
- "attribute_0",
- "attribute_1",
- "attribute_2",
- "attribute_3"
+const char * att_name[NUM_DATA_SETS] =
+ {
+ "attribute_0",
+ "attribute_1",
+ "attribute_2",
+ "attribute_3"
};
-const char * lg_att_name[NUM_DATA_SETS] =
- {
- "large_attribute_0",
- "large_attribute_1",
- "large_attribute_2",
- "large_attribute_3"
+const char * lg_att_name[NUM_DATA_SETS] =
+ {
+ "large_attribute_0",
+ "large_attribute_1",
+ "large_attribute_2",
+ "large_attribute_3"
};
void rr_obj_hdr_flush_confusion(void)
@@ -1889,14 +1885,14 @@ void rr_obj_hdr_flush_confusion(void)
/* private communicator size and rank */
int mpi_size;
int mpi_rank;
- int mrc; /* mpi error code */
- int is_reader; /* 1 for reader process; 0 for writer process. */
+ int mrc; /* mpi error code */
+ int is_reader; /* 1 for reader process; 0 for writer process. */
MPI_Comm comm;
/* test bed related variables */
- const char * fcn_name = "rr_obj_hdr_flush_confusion";
- const hbool_t verbose = FALSE;
+ const char * fcn_name = "rr_obj_hdr_flush_confusion";
+ const hbool_t verbose = FALSE;
/* Create two new private communicators from MPI_COMM_WORLD.
* Even and odd ranked processes go to comm_writers and comm_readers
@@ -1919,9 +1915,9 @@ void rr_obj_hdr_flush_confusion(void)
* step. When all steps are done, they inform readers to end.
*/
if (is_reader)
- rr_obj_hdr_flush_confusion_reader(comm);
+ rr_obj_hdr_flush_confusion_reader(comm);
else
- rr_obj_hdr_flush_confusion_writer(comm);
+ rr_obj_hdr_flush_confusion_writer(comm);
MPI_Comm_free(&comm);
if(verbose )
@@ -1965,16 +1961,16 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* private communicator size and rank */
int mpi_size;
int mpi_rank;
- int mrc; /* mpi error code */
+ int mrc; /* mpi error code */
/* steps to verify and have been verified */
int steps = 0;
int steps_done = 0;
/* test bed related variables */
- const char * fcn_name = "rr_obj_hdr_flush_confusion_writer";
- const hbool_t verbose = FALSE;
- const H5Ptest_param_t * pt;
- char * filename;
+ const char * fcn_name = "rr_obj_hdr_flush_confusion_writer";
+ const hbool_t verbose = FALSE;
+ const H5Ptest_param_t * pt;
+ char * filename;
/*
* setup test bed related variables:
@@ -2008,7 +2004,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: Creating new file \"%s\".\n",
+ HDfprintf(stdout, "%0d:%s: Creating new file \"%s\".\n",
mpi_rank, fcn_name, filename);
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -2023,7 +2019,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: Creating the datasets.\n",
+ HDfprintf(stdout, "%0d:%s: Creating the datasets.\n",
mpi_rank, fcn_name);
disk_size[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_size);
@@ -2032,15 +2028,15 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
for ( i = 0; i < NUM_DATA_SETS; i++ ) {
disk_space[i] = H5Screate_simple(1, disk_size, NULL);
- VRFY((disk_space[i] >= 0), "H5Screate_simple(1) failed.\n");
+ VRFY((disk_space[i] >= 0), "H5Screate_simple(1) failed.\n");
- dataset[i] = H5Dcreate2(file_id, dataset_name[i], H5T_NATIVE_DOUBLE,
+ dataset[i] = H5Dcreate2(file_id, dataset_name[i], H5T_NATIVE_DOUBLE,
disk_space[i], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dataset[i] >= 0), "H5Dcreate(1) failed.\n");
}
- /*
+ /*
* setup data transfer property list
*/
@@ -2051,11 +2047,11 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
err = H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);
- VRFY((err >= 0),
+ VRFY((err >= 0),
"H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) failed.\n");
- /*
- * write data to the data sets
+ /*
+ * write data to the data sets
*/
if(verbose )
@@ -2071,22 +2067,22 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
}
for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- err = H5Sselect_hyperslab(disk_space[i], H5S_SELECT_SET, disk_start,
+ err = H5Sselect_hyperslab(disk_space[i], H5S_SELECT_SET, disk_start,
NULL, disk_count, NULL);
VRFY((err >= 0), "H5Sselect_hyperslab(1) failed.\n");
mem_space[i] = H5Screate_simple(1, mem_size, NULL);
- VRFY((mem_space[i] >= 0), "H5Screate_simple(2) failed.\n");
- err = H5Sselect_hyperslab(mem_space[i], H5S_SELECT_SET,
+ VRFY((mem_space[i] >= 0), "H5Screate_simple(2) failed.\n");
+ err = H5Sselect_hyperslab(mem_space[i], H5S_SELECT_SET,
mem_start, NULL, mem_count, NULL);
VRFY((err >= 0), "H5Sselect_hyperslab(2) failed.\n");
- err = H5Dwrite(dataset[i], H5T_NATIVE_DOUBLE, mem_space[i],
+ err = H5Dwrite(dataset[i], H5T_NATIVE_DOUBLE, mem_space[i],
disk_space[i], dxpl_id, data);
VRFY((err >= 0), "H5Dwrite(1) failed.\n");
for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- data[j] *= 10.0;
+ data[j] *= 10.0;
}
- /*
+ /*
* close the data spaces
*/
@@ -2102,12 +2098,12 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* End of Step 1: create the data sets and write data. */
- /*
+ /*
* flush the metadata cache
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
+ HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(1) failed.\n");
@@ -2131,7 +2127,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
for ( i = 0; i < NUM_DATA_SETS; i++ ) {
att_space[i] = H5Screate_simple(1, att_size, NULL);
VRFY((att_space[i] >= 0), "H5Screate_simple(3) failed.\n");
- att_id[i] = H5Acreate2(dataset[i], att_name[i], H5T_NATIVE_DOUBLE,
+ att_id[i] = H5Acreate2(dataset[i], att_name[i], H5T_NATIVE_DOUBLE,
att_space[i], H5P_DEFAULT, H5P_DEFAULT);
VRFY((att_id[i] >= 0), "H5Acreate(1) failed.\n");
err = H5Awrite(att_id[i], H5T_NATIVE_DOUBLE, att);
@@ -2142,11 +2138,11 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
}
/*
- * close attribute IDs and spaces
+ * close attribute IDs and spaces
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: closing attr ids and spaces .\n",
+ HDfprintf(stdout, "%0d:%s: closing attr ids and spaces .\n",
mpi_rank, fcn_name);
for ( i = 0; i < NUM_DATA_SETS; i++ ) {
@@ -2159,12 +2155,12 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* End of Step 2: write attributes to each dataset */
- /*
+ /*
* flush the metadata cache again
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
+ HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(2) failed.\n");
@@ -2178,7 +2174,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: writing large attributes.\n",
+ HDfprintf(stdout, "%0d:%s: writing large attributes.\n",
mpi_rank, fcn_name);
lg_att_size[0] = (hsize_t)(LARGE_ATTR_SIZE);
@@ -2190,7 +2186,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
for ( i = 0; i < NUM_DATA_SETS; i++ ) {
lg_att_space[i] = H5Screate_simple(1, lg_att_size, NULL);
VRFY((lg_att_space[i] >= 0), "H5Screate_simple(4) failed.\n");
- lg_att_id[i] = H5Acreate2(dataset[i], lg_att_name[i], H5T_NATIVE_DOUBLE,
+ lg_att_id[i] = H5Acreate2(dataset[i], lg_att_name[i], H5T_NATIVE_DOUBLE,
lg_att_space[i], H5P_DEFAULT, H5P_DEFAULT);
VRFY((lg_att_id[i] >= 0), "H5Acreate(2) failed.\n");
err = H5Awrite(lg_att_id[i], H5T_NATIVE_DOUBLE, lg_att);
@@ -2199,21 +2195,21 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
lg_att[j] /= 10.0;
}
}
-
+
/* Step 3: write large attributes to each dataset */
- /*
+ /*
* flush the metadata cache yet again to clean the object headers.
*
* This is an attempt to crate a situation where we have dirty
* object header continuation chunks, but clean opject headers
* to verify a speculative bug fix -- it doesn't seem to work,
- * but I will leave the code in anyway, as the object header
+ * but I will leave the code in anyway, as the object header
* code is going to change a lot in the near future.
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
+ HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(3) failed.\n");
@@ -2227,7 +2223,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: writing different large attributes.\n",
+ HDfprintf(stdout, "%0d:%s: writing different large attributes.\n",
mpi_rank, fcn_name);
for ( j = 0; j < LARGE_ATTR_SIZE; j++ ) {
@@ -2244,11 +2240,11 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* End of Step 4: write different large attributes to each dataset */
- /*
+ /*
* flush the metadata cache again
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
+ HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n",
mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(3) failed.\n");
@@ -2260,11 +2256,11 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* Step 5: Close all objects and the file */
/*
- * close large attribute IDs and spaces
+ * close large attribute IDs and spaces
*/
if(verbose )
- HDfprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n",
+ HDfprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n",
mpi_rank, fcn_name);
for ( i = 0; i < NUM_DATA_SETS; i++ ) {
@@ -2276,7 +2272,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
}
- /*
+ /*
* close the data sets
*/
@@ -2308,7 +2304,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
err = H5Fclose(file_id);
VRFY((err >= 0 ), "H5Fclose(1) failed");
-
+
/* End of Step 5: Close all objects and the file */
/* Tell the reader to check the file up to steps. */
steps++;
@@ -2359,15 +2355,15 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* private communicator size and rank */
int mpi_size;
int mpi_rank;
- int mrc; /* mpi error code */
- int steps = -1; /* How far (steps) to verify the file */
- int steps_done = -1; /* How far (steps) have been verified */
+ int mrc; /* mpi error code */
+ int steps = -1; /* How far (steps) to verify the file */
+ int steps_done = -1; /* How far (steps) have been verified */
/* test bed related variables */
- const char * fcn_name = "rr_obj_hdr_flush_confusion_reader";
- const hbool_t verbose = FALSE;
- const H5Ptest_param_t * pt;
- char * filename;
+ const char * fcn_name = "rr_obj_hdr_flush_confusion_reader";
+ const hbool_t verbose = FALSE;
+ const H5Ptest_param_t * pt;
+ char * filename;
/*
* setup test bed related variables:
@@ -2384,291 +2380,291 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* Repeatedly re-open the file and verify its contents until it is */
/* told to end (when steps=0). */
while (steps_done != 0){
- Reader_wait(mrc, steps);
- VRFY((mrc >= 0), "Reader_wait failed");
- steps_done = 0;
+ Reader_wait(mrc, steps);
+ VRFY((mrc >= 0), "Reader_wait failed");
+ steps_done = 0;
- if (steps > 0 ){
- /*
- * Set up file access property list with parallel I/O access
- */
+ if (steps > 0 ){
+ /*
+ * Set up file access property list with parallel I/O access
+ */
- if(verbose )
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n",
- mpi_rank, fcn_name);
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: Setting up property list.\n",
+ mpi_rank, fcn_name);
- fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed");
- err = H5Pset_fapl_mpio(fapl_id, comm, MPI_INFO_NULL);
- VRFY((err >= 0 ), "H5Pset_fapl_mpio() failed");
+ fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed");
+ err = H5Pset_fapl_mpio(fapl_id, comm, MPI_INFO_NULL);
+ VRFY((err >= 0 ), "H5Pset_fapl_mpio() failed");
- /*
- * Create a new file collectively and release property list identifier.
- */
+ /*
+ * Create a new file collectively and release property list identifier.
+ */
- if(verbose )
- HDfprintf(stdout, "%0d:%s: Re-open file \"%s\".\n",
- mpi_rank, fcn_name, filename);
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: Re-open file \"%s\".\n",
+ mpi_rank, fcn_name, filename);
- file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id);
- VRFY((file_id >= 0 ), "H5Fopen() failed");
- err = H5Pclose(fapl_id);
- VRFY((err >= 0 ), "H5Pclose(fapl_id) failed");
+ file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id);
+ VRFY((file_id >= 0 ), "H5Fopen() failed");
+ err = H5Pclose(fapl_id);
+ VRFY((err >= 0 ), "H5Pclose(fapl_id) failed");
#if 1
- if (steps >= 1){
- /*=====================================================*
- * Step 1: open the data sets and read data.
- *=====================================================*/
-
- if(verbose )
- HDfprintf(stdout, "%0d:%s: opening the datasets.\n",
- mpi_rank, fcn_name);
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- dataset[i] = -1;
- }
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- dataset[i] = H5Dopen2(file_id, dataset_name[i], H5P_DEFAULT);
- VRFY((dataset[i] >= 0), "H5Dopen(1) failed.\n");
- disk_space[i] = H5Dget_space(dataset[i]);
- VRFY((disk_space[i] >= 0), "H5Dget_space failed.\n");
- }
-
- /*
- * setup data transfer property list
- */
-
- if(verbose )
- HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
-
- dxpl_id = H5Pcreate(H5P_DATASET_XFER);
- VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
- err = H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);
- VRFY((err >= 0),
- "H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) failed.\n");
-
- /*
- * read data from the data sets
- */
-
- if(verbose )
- HDfprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name);
-
- disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
- disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank);
-
- mem_size[0] = (hsize_t)(LOCAL_DATA_SIZE);
-
- mem_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
- mem_start[0] = (hsize_t)(0);
-
- /* set up expected data for verification */
- for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) {
- data[j] = (double)(mpi_rank + 1);
- }
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- err = H5Sselect_hyperslab(disk_space[i], H5S_SELECT_SET, disk_start,
- NULL, disk_count, NULL);
- VRFY((err >= 0), "H5Sselect_hyperslab(1) failed.\n");
- mem_space[i] = H5Screate_simple(1, mem_size, NULL);
- VRFY((mem_space[i] >= 0), "H5Screate_simple(2) failed.\n");
- err = H5Sselect_hyperslab(mem_space[i], H5S_SELECT_SET,
- mem_start, NULL, mem_count, NULL);
- VRFY((err >= 0), "H5Sselect_hyperslab(2) failed.\n");
- err = H5Dread(dataset[i], H5T_NATIVE_DOUBLE, mem_space[i],
- disk_space[i], dxpl_id, data_read);
- VRFY((err >= 0), "H5Dread(1) failed.\n");
-
- /* compare read data with expected data */
- for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- if (data_read[j] != data[j]){
- HDfprintf(stdout,
- "%0d:%s: Reading datasets value failed in "
- "Dataset %d, at position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, data[j], data_read[j]);
- nerrors++;
- }
- for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- data[j] *= 10.0;
- }
-
- /*
- * close the data spaces
- */
-
- if(verbose )
- HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- err = H5Sclose(disk_space[i]);
- VRFY((err >= 0), "H5Sclose(disk_space[i]) failed.\n");
- err = H5Sclose(mem_space[i]);
- VRFY((err >= 0), "H5Sclose(mem_space[i]) failed.\n");
- }
- steps_done++;
- }
- /* End of Step 1: open the data sets and read data. */
+ if (steps >= 1){
+ /*=====================================================*
+ * Step 1: open the data sets and read data.
+ *=====================================================*/
+
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: opening the datasets.\n",
+ mpi_rank, fcn_name);
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ dataset[i] = -1;
+ }
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ dataset[i] = H5Dopen2(file_id, dataset_name[i], H5P_DEFAULT);
+ VRFY((dataset[i] >= 0), "H5Dopen(1) failed.\n");
+ disk_space[i] = H5Dget_space(dataset[i]);
+ VRFY((disk_space[i] >= 0), "H5Dget_space failed.\n");
+ }
+
+ /*
+ * setup data transfer property list
+ */
+
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
+
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
+ err = H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);
+ VRFY((err >= 0),
+ "H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) failed.\n");
+
+ /*
+ * read data from the data sets
+ */
+
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name);
+
+ disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
+ disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank);
+
+ mem_size[0] = (hsize_t)(LOCAL_DATA_SIZE);
+
+ mem_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
+ mem_start[0] = (hsize_t)(0);
+
+ /* set up expected data for verification */
+ for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) {
+ data[j] = (double)(mpi_rank + 1);
+ }
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ err = H5Sselect_hyperslab(disk_space[i], H5S_SELECT_SET, disk_start,
+ NULL, disk_count, NULL);
+ VRFY((err >= 0), "H5Sselect_hyperslab(1) failed.\n");
+ mem_space[i] = H5Screate_simple(1, mem_size, NULL);
+ VRFY((mem_space[i] >= 0), "H5Screate_simple(2) failed.\n");
+ err = H5Sselect_hyperslab(mem_space[i], H5S_SELECT_SET,
+ mem_start, NULL, mem_count, NULL);
+ VRFY((err >= 0), "H5Sselect_hyperslab(2) failed.\n");
+ err = H5Dread(dataset[i], H5T_NATIVE_DOUBLE, mem_space[i],
+ disk_space[i], dxpl_id, data_read);
+ VRFY((err >= 0), "H5Dread(1) failed.\n");
+
+ /* compare read data with expected data */
+ for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
+ if (data_read[j] != data[j]){
+ HDfprintf(stdout,
+ "%0d:%s: Reading datasets value failed in "
+ "Dataset %d, at position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, data[j], data_read[j]);
+ nerrors++;
+ }
+ for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
+ data[j] *= 10.0;
+ }
+
+ /*
+ * close the data spaces
+ */
+
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ err = H5Sclose(disk_space[i]);
+ VRFY((err >= 0), "H5Sclose(disk_space[i]) failed.\n");
+ err = H5Sclose(mem_space[i]);
+ VRFY((err >= 0), "H5Sclose(mem_space[i]) failed.\n");
+ }
+ steps_done++;
+ }
+ /* End of Step 1: open the data sets and read data. */
#endif
#if 1
- /*=====================================================*
- * Step 2: reading attributes from each dataset
- *=====================================================*/
-
- if (steps >= 2){
- if(verbose )
- HDfprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name);
-
- for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) {
-
- att[j] = (double)(j + 1);
- }
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- hid_t att_id, att_type;
-
- att_id = H5Aopen(dataset[i], att_name[i], H5P_DEFAULT);
- VRFY((att_id >= 0), "H5Aopen failed.\n");
- att_type = H5Aget_type(att_id);
- VRFY((att_type >= 0), "H5Aget_type failed.\n");
- tri_err = H5Tequal(att_type, H5T_NATIVE_DOUBLE);
- VRFY((tri_err >= 0), "H5Tequal failed.\n");
- if (tri_err==0){
- HDfprintf(stdout,
- "%0d:%s: Mismatched Attribute type of Dataset %d.\n",
- mpi_rank, fcn_name, i);
- nerrors++;
- }else{
- /* should verify attribute size before H5Aread */
- err = H5Aread(att_id, H5T_NATIVE_DOUBLE, att_read);
- VRFY((err >= 0), "H5Aread failed.\n");
- /* compare read attribute data with expected data */
- for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- if (att_read[j] != att[j]){
- HDfprintf(stdout,
- "%0d:%s: Mismatched attribute data read in Dataset %d, at position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, att[j], att_read[j]);
- nerrors++;
- }
- for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) {
-
- att[j] /= 10.0;
- }
- }
- err = H5Aclose(att_id);
- VRFY((err >= 0), "H5Aclose failed.\n");
- }
- steps_done++;
- }
- /* End of Step 2: reading attributes from each dataset */
+ /*=====================================================*
+ * Step 2: reading attributes from each dataset
+ *=====================================================*/
+
+ if (steps >= 2){
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name);
+
+ for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) {
+
+ att[j] = (double)(j + 1);
+ }
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ hid_t att_id, att_type;
+
+ att_id = H5Aopen(dataset[i], att_name[i], H5P_DEFAULT);
+ VRFY((att_id >= 0), "H5Aopen failed.\n");
+ att_type = H5Aget_type(att_id);
+ VRFY((att_type >= 0), "H5Aget_type failed.\n");
+ tri_err = H5Tequal(att_type, H5T_NATIVE_DOUBLE);
+ VRFY((tri_err >= 0), "H5Tequal failed.\n");
+ if (tri_err==0){
+ HDfprintf(stdout,
+ "%0d:%s: Mismatched Attribute type of Dataset %d.\n",
+ mpi_rank, fcn_name, i);
+ nerrors++;
+ }else{
+ /* should verify attribute size before H5Aread */
+ err = H5Aread(att_id, H5T_NATIVE_DOUBLE, att_read);
+ VRFY((err >= 0), "H5Aread failed.\n");
+ /* compare read attribute data with expected data */
+ for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
+ if (att_read[j] != att[j]){
+ HDfprintf(stdout,
+ "%0d:%s: Mismatched attribute data read in Dataset %d, at position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, att[j], att_read[j]);
+ nerrors++;
+ }
+ for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) {
+
+ att[j] /= 10.0;
+ }
+ }
+ err = H5Aclose(att_id);
+ VRFY((err >= 0), "H5Aclose failed.\n");
+ }
+ steps_done++;
+ }
+ /* End of Step 2: reading attributes from each dataset */
#endif
#if 1
- /*=====================================================*
- * Step 3 or 4: read large attributes from each dataset.
- * Step 4 has different attribute value from step 3.
- *=====================================================*/
-
- if (steps >= 3){
- if(verbose )
- HDfprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name);
-
- for ( j = 0; j < LARGE_ATTR_SIZE; j++ ) {
-
- lg_att[j] = (steps==3) ? (double)(j + 1) : (double)(j+2);
- }
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- lg_att_id[i] = H5Aopen(dataset[i], lg_att_name[i], H5P_DEFAULT);
- VRFY((lg_att_id[i] >= 0), "H5Aopen(2) failed.\n");
- lg_att_type[i] = H5Aget_type(lg_att_id[i]);
- VRFY((err >= 0), "H5Aget_type failed.\n");
- tri_err = H5Tequal(lg_att_type[i], H5T_NATIVE_DOUBLE);
- VRFY((tri_err >= 0), "H5Tequal failed.\n");
- if (tri_err==0){
- HDfprintf(stdout,
- "%0d:%s: Mismatched Large attribute type of Dataset %d.\n",
- mpi_rank, fcn_name, i);
- nerrors++;
- }else{
- /* should verify large attribute size before H5Aread */
- err = H5Aread(lg_att_id[i], H5T_NATIVE_DOUBLE, lg_att_read);
- VRFY((err >= 0), "H5Aread failed.\n");
- /* compare read attribute data with expected data */
- for ( j = 0; j < LARGE_ATTR_SIZE; j++ )
- if (lg_att_read[j] != lg_att[j]){
- HDfprintf(stdout,
- "%0d:%s: Mismatched large attribute data read in Dataset %d, at position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);
- nerrors++;
- }
- for ( j = 0; j < LARGE_ATTR_SIZE; j++ ) {
-
- lg_att[j] /= 10.0;
- }
- }
- err = H5Tclose(lg_att_type[i]);
- VRFY((err >= 0), "H5Tclose failed.\n");
- err = H5Aclose(lg_att_id[i]);
- VRFY((err >= 0), "H5Aclose failed.\n");
- }
- /* Both step 3 and 4 use this same read checking code. */
- steps_done = (steps==3) ? 3 : 4;
- }
-
- /* End of Step 3 or 4: read large attributes from each dataset */
+ /*=====================================================*
+ * Step 3 or 4: read large attributes from each dataset.
+ * Step 4 has different attribute value from step 3.
+ *=====================================================*/
+
+ if (steps >= 3){
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name);
+
+ for ( j = 0; j < LARGE_ATTR_SIZE; j++ ) {
+
+ lg_att[j] = (steps==3) ? (double)(j + 1) : (double)(j+2);
+ }
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ lg_att_id[i] = H5Aopen(dataset[i], lg_att_name[i], H5P_DEFAULT);
+ VRFY((lg_att_id[i] >= 0), "H5Aopen(2) failed.\n");
+ lg_att_type[i] = H5Aget_type(lg_att_id[i]);
+ VRFY((err >= 0), "H5Aget_type failed.\n");
+ tri_err = H5Tequal(lg_att_type[i], H5T_NATIVE_DOUBLE);
+ VRFY((tri_err >= 0), "H5Tequal failed.\n");
+ if (tri_err==0){
+ HDfprintf(stdout,
+ "%0d:%s: Mismatched Large attribute type of Dataset %d.\n",
+ mpi_rank, fcn_name, i);
+ nerrors++;
+ }else{
+ /* should verify large attribute size before H5Aread */
+ err = H5Aread(lg_att_id[i], H5T_NATIVE_DOUBLE, lg_att_read);
+ VRFY((err >= 0), "H5Aread failed.\n");
+ /* compare read attribute data with expected data */
+ for ( j = 0; j < LARGE_ATTR_SIZE; j++ )
+ if (lg_att_read[j] != lg_att[j]){
+ HDfprintf(stdout,
+ "%0d:%s: Mismatched large attribute data read in Dataset %d, at position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);
+ nerrors++;
+ }
+ for ( j = 0; j < LARGE_ATTR_SIZE; j++ ) {
+
+ lg_att[j] /= 10.0;
+ }
+ }
+ err = H5Tclose(lg_att_type[i]);
+ VRFY((err >= 0), "H5Tclose failed.\n");
+ err = H5Aclose(lg_att_id[i]);
+ VRFY((err >= 0), "H5Aclose failed.\n");
+ }
+ /* Both step 3 and 4 use this same read checking code. */
+ steps_done = (steps==3) ? 3 : 4;
+ }
+
+ /* End of Step 3 or 4: read large attributes from each dataset */
#endif
- /*=====================================================*
- * Step 5: read all objects from the file
- *=====================================================*/
- if (steps>=5){
- /* nothing extra to verify. The file is closed normally. */
- /* Just increment steps_done */
- steps_done++;
- }
-
- /*
- * Close the data sets
- */
-
- if(verbose )
- HDfprintf(stdout, "%0d:%s: closing datasets again.\n",
- mpi_rank, fcn_name);
-
- for ( i = 0; i < NUM_DATA_SETS; i++ ) {
- if ( dataset[i] >= 0 ) {
- err = H5Dclose(dataset[i]);
- VRFY((err >= 0), "H5Dclose(dataset[i])1 failed.\n");
- }
- }
-
- /*
- * close the data transfer property list.
- */
-
- if(verbose )
- HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
-
- err = H5Pclose(dxpl_id);
- VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n");
-
- /*
- * Close the file
- */
- if(verbose)
- HDfprintf(stdout, "%0d:%s: closing file again.\n",
- mpi_rank, fcn_name);
- err = H5Fclose(file_id);
- VRFY((err >= 0 ), "H5Fclose(1) failed");
-
- } /* else if (steps_done==0) */
- Reader_result(mrc, steps_done);
+ /*=====================================================*
+ * Step 5: read all objects from the file
+ *=====================================================*/
+ if (steps>=5){
+ /* nothing extra to verify. The file is closed normally. */
+ /* Just increment steps_done */
+ steps_done++;
+ }
+
+ /*
+ * Close the data sets
+ */
+
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: closing datasets again.\n",
+ mpi_rank, fcn_name);
+
+ for ( i = 0; i < NUM_DATA_SETS; i++ ) {
+ if ( dataset[i] >= 0 ) {
+ err = H5Dclose(dataset[i]);
+ VRFY((err >= 0), "H5Dclose(dataset[i])1 failed.\n");
+ }
+ }
+
+ /*
+ * close the data transfer property list.
+ */
+
+ if(verbose )
+ HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
+
+ err = H5Pclose(dxpl_id);
+ VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n");
+
+ /*
+ * Close the file
+ */
+ if(verbose)
+ HDfprintf(stdout, "%0d:%s: closing file again.\n",
+ mpi_rank, fcn_name);
+ err = H5Fclose(file_id);
+ VRFY((err >= 0 ), "H5Fclose(1) failed");
+
+ } /* else if (steps_done==0) */
+ Reader_result(mrc, steps_done);
} /* end while(1) */
if(verbose )
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 94ecbfa..890a918 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -53,7 +53,7 @@ static int test_mpio_overlap_writes(char *filename) {
MPI_Status mpi_stat;
if (VERBOSE_MED)
- printf("MPIO independent overlapping writes test on file %s\n",
+ HDprintf("MPIO independent overlapping writes test on file %s\n",
filename);
nerrs = 0;
@@ -64,8 +64,8 @@ static int test_mpio_overlap_writes(char *filename) {
/* Need at least 2 processes */
if (mpi_size < 2) {
if (MAINPROCESS)
- printf("Need at least 2 processes to run MPIO test.\n");
- printf(" -SKIP- \n");
+ HDprintf("Need at least 2 processes to run MPIO test.\n");
+ HDprintf(" -SKIP- \n");
return 0;
}
@@ -138,13 +138,13 @@ static int test_mpio_overlap_writes(char *filename) {
expected = (unsigned char) (mpi_off + i);
if ((expected != buf[i])
&& (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) {
- printf(
+ HDprintf(
"proc %d: found data error at [%ld], expect %u, got %u\n",
mpi_rank, (long) (mpi_off + i), expected, buf[i]);
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("proc %d: [more errors ...]\n", mpi_rank);
+ HDprintf("proc %d: [more errors ...]\n", mpi_rank);
nerrs += vrfyerrs;
}
@@ -204,7 +204,7 @@ static int test_mpio_gb_file(char *filename) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (VERBOSE_MED)
- printf("MPI_Offset range test\n");
+ HDprintf("MPI_Offset range test\n");
/* figure out the signness and sizeof MPI_Offset */
mpi_off = 0;
@@ -216,10 +216,10 @@ static int test_mpio_gb_file(char *filename) {
* sizes.
*/
if (MAINPROCESS) { /* only process 0 needs to check it*/
- printf("MPI_Offset is %s %d bytes integeral type\n",
+ HDprintf("MPI_Offset is %s %d bytes integeral type\n",
is_signed ? "signed" : "unsigned", (int) sizeof(MPI_Offset));
if (sizeof_mpi_offset <= 4 && is_signed) {
- printf("Skipped 2GB range test "
+ HDprintf("Skipped 2GB range test "
"because MPI_Offset cannot support it\n");
} else {
/* verify correctness of assigning 2GB sizes */
@@ -241,7 +241,7 @@ static int test_mpio_gb_file(char *filename) {
}
if (sizeof_mpi_offset <= 4) {
- printf("Skipped 4GB range test "
+ HDprintf("Skipped 4GB range test "
"because MPI_Offset cannot support it\n");
} else {
/* verify correctness of assigning 4GB sizes */
@@ -267,10 +267,10 @@ static int test_mpio_gb_file(char *filename) {
* Verify if we can write to a file of multiple GB sizes.
*/
if (VERBOSE_MED)
- printf("MPIO GB file test %s\n", filename);
+ HDprintf("MPIO GB file test %s\n", filename);
if (sizeof_mpi_offset <= 4) {
- printf("Skipped GB file range test "
+ HDprintf("Skipped GB file range test "
"because MPI_Offset cannot support it\n");
} else {
buf = (char *) HDmalloc(MB);
@@ -286,7 +286,7 @@ static int test_mpio_gb_file(char *filename) {
MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh);
VRFY((mrc == MPI_SUCCESS), "MPI_FILE_OPEN");
- printf("MPIO GB file write test %s\n", filename);
+ HDprintf("MPIO GB file write test %s\n", filename);
/* instead of writing every bytes of the file, we will just write
* some data around the 2 and 4 GB boundaries. That should cover
@@ -328,9 +328,9 @@ static int test_mpio_gb_file(char *filename) {
*/
/* open it again to verify the data written */
/* but only if there was no write errors */
- printf("MPIO GB file read test %s\n", filename);
+ HDprintf("MPIO GB file read test %s\n", filename);
if (errors_sum(writerrs) > 0) {
- printf("proc %d: Skip read test due to previous write errors\n",
+ HDprintf("proc %d: Skip read test due to previous write errors\n",
mpi_rank);
goto finish;
}
@@ -356,14 +356,14 @@ static int test_mpio_gb_file(char *filename) {
for (j = 0; j < MB; j++) {
if ((*(buf + j) != expected)
&& (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) {
- printf(
+ HDprintf(
"proc %d: found data error at [%ld+%d], expect %d, got %d\n",
mpi_rank, (long) mpi_off, j, expected,
*(buf + j));
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- printf("proc %d: [more errors ...]\n", mpi_rank);
+ HDprintf("proc %d: [more errors ...]\n", mpi_rank);
nerrs += vrfyerrs;
}
@@ -380,7 +380,7 @@ static int test_mpio_gb_file(char *filename) {
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync before leaving test");
- printf("Test if MPI_File_get_size works correctly with %s\n", filename);
+ HDprintf("Test if MPI_File_get_size works correctly with %s\n", filename);
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, info,
&fh);
@@ -428,7 +428,7 @@ static int test_mpio_gb_file(char *filename) {
*/
#define DIMSIZE 32 /* Dimension size. */
-#define PRINTID printf("Proc %d: ", mpi_rank)
+#define PRINTID HDprintf("Proc %d: ", mpi_rank)
#define USENONE 0
#define USEATOM 1 /* request atomic I/O */
#define USEFSYNC 2 /* request file_sync */
@@ -452,24 +452,24 @@ static int test_mpio_1wMr(char *filename, int special_request) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (MAINPROCESS && VERBOSE_MED) {
- printf("Testing one process writes, all processes read.\n");
- printf("Using %d processes accessing file %s\n", mpi_size, filename);
- printf(" (Filename can be specified via program argument)\n");
+ HDprintf("Testing one process writes, all processes read.\n");
+ HDprintf("Using %d processes accessing file %s\n", mpi_size, filename);
+ HDprintf(" (Filename can be specified via program argument)\n");
}
/* show the hostname so that we can tell where the processes are running */
if (VERBOSE_DEF) {
#ifdef H5_HAVE_GETHOSTNAME
if(HDgethostname(hostname, sizeof(hostname)) < 0) {
- printf("gethostname failed\n");
+ HDprintf("gethostname failed\n");
hostname[0] = '\0';
}
#else
- printf("gethostname unavailable\n");
+ HDprintf("gethostname unavailable\n");
hostname[0] = '\0';
#endif
PRINTID;
- printf("hostname=%s\n", hostname);
+ HDprintf("hostname=%s\n", hostname);
}
/* Delete any old file in order to start anew. */
@@ -483,7 +483,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
!= MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_open failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
}
@@ -495,29 +495,29 @@ static int test_mpio_1wMr(char *filename, int special_request) {
if ((mpi_err = MPI_File_get_atomicity(fh, &atomicity)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
}
if (VERBOSE_HI)
- printf("Initial atomicity = %d\n", atomicity);
+ HDprintf("Initial atomicity = %d\n", atomicity);
if ((mpi_err = MPI_File_set_atomicity(fh, 1)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_set_atomicity failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_set_atomicity failed (%s)\n", mpi_err_str);
}
if ((mpi_err = MPI_File_get_atomicity(fh, &atomicity)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
}
if (VERBOSE_HI)
- printf("After set_atomicity atomicity = %d\n", atomicity);
+ HDprintf("After set_atomicity atomicity = %d\n", atomicity);
}
/* This barrier is not necessary but do it anyway. */
MPI_Barrier(MPI_COMM_WORLD);
if (VERBOSE_HI) {
PRINTID;
- printf("between MPI_Barrier and MPI_File_write_at\n");
+ HDprintf("between MPI_Barrier and MPI_File_write_at\n");
}
/* ==================================================
@@ -533,13 +533,13 @@ static int test_mpio_1wMr(char *filename, int special_request) {
if (mpi_rank == irank) {
if (VERBOSE_HI) {
PRINTID;
- printf("wrote %d bytes at %ld\n", DIMSIZE, (long) mpi_off);
+ HDprintf("wrote %d bytes at %ld\n", DIMSIZE, (long) mpi_off);
}
if ((mpi_err = MPI_File_write_at(fh, mpi_off, writedata, DIMSIZE,
MPI_BYTE, &mpi_stat)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n",
+ HDprintf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n",
(long) mpi_off, DIMSIZE, mpi_err_str);
return 1;
};
@@ -550,7 +550,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
MPI_Bcast(&mpi_err, 1, MPI_INT, irank, MPI_COMM_WORLD);
if (VERBOSE_HI) {
PRINTID;
- printf("MPI_Bcast: mpi_err = %d\n", mpi_err);
+ HDprintf("MPI_Bcast: mpi_err = %d\n", mpi_err);
}
if (special_request & USEFSYNC) {
@@ -559,19 +559,19 @@ static int test_mpio_1wMr(char *filename, int special_request) {
* should not need this.
* ==================================================*/
if (VERBOSE_HI)
- printf("Apply MPI_File_sync\n");
+ HDprintf("Apply MPI_File_sync\n");
/* call file_sync to force the write out */
if ((mpi_err = MPI_File_sync(fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_sync failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_sync failed (%s)\n", mpi_err_str);
}
MPI_Barrier(MPI_COMM_WORLD);
/* call file_sync to force the write out */
if ((mpi_err = MPI_File_sync(fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_sync failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_sync failed (%s)\n", mpi_err_str);
}
}
@@ -580,7 +580,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
MPI_Barrier(MPI_COMM_WORLD);
if (VERBOSE_HI) {
PRINTID;
- printf("after MPI_Barrier\n");
+ HDprintf("after MPI_Barrier\n");
}
/* ==================================================
@@ -592,7 +592,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
&mpi_stat)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- printf("MPI_File_read_at offset(%ld), bytes (%d), failed (%s)\n",
+ HDprintf("MPI_File_read_at offset(%ld), bytes (%d), failed (%s)\n",
(long) mpi_off, DIMSIZE, mpi_err_str);
return 1;
};
@@ -600,7 +600,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
expect_val = irank * DIMSIZE + i;
if (readdata[i] != expect_val) {
PRINTID;
- printf("read data[%d:%d] got %02x, expect %02x\n", irank, i,
+ HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i,
readdata[i], expect_val);
nerrs++;
}
@@ -610,7 +610,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
if (VERBOSE_HI) {
PRINTID;
- printf("%d data errors detected\n", nerrs);
+ HDprintf("%d data errors detected\n", nerrs);
}
mpi_err = MPI_Barrier(MPI_COMM_WORLD);
@@ -664,7 +664,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
2. This test will verify whether the complicated derived datatype is working on
the current platform.
- If this bug has been fixed in the previous not-working package, this test will issue a printf message to tell the developer to change
+ If this bug has been fixed in the previous not-working package, this test will issue a HDprintf message to tell the developer to change
the configuration specific file of HDF5 so that we can change our configurationsetting to support collective IO for irregular selections.
If it turns out that the previous working MPI-IO package no longer works, this test will also issue a message to inform the corresponding failure so that
@@ -703,7 +703,7 @@ static int test_mpio_derived_dtype(char *filename) {
MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh))
!= MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_open failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
}
@@ -717,13 +717,13 @@ static int test_mpio_derived_dtype(char *filename) {
if ((mpi_err = MPI_Type_create_hindexed(count, blocklens, offsets, MPI_BYTE,
&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_commit(&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
}
@@ -733,13 +733,13 @@ static int test_mpio_derived_dtype(char *filename) {
if ((mpi_err = MPI_Type_create_hindexed(count, blocklens, offsets, MPI_BYTE,
&filetypenew)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_commit(&filetypenew)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
}
@@ -754,52 +754,52 @@ static int test_mpio_derived_dtype(char *filename) {
if ((mpi_err = MPI_Type_create_struct(outcount, adv_blocklens, adv_disp,
bas_filetype, &adv_filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_commit(&adv_filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_set_view(fh, disp, etype, adv_filetype, "native",
MPI_INFO_NULL)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_set_view failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_write(fh, buf, 3, MPI_BYTE, &Status))
!= MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_write failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_write failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_close failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_close failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY,
MPI_INFO_NULL, &fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_open failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_set_view(fh, 0, MPI_BYTE, MPI_BYTE, "native",
MPI_INFO_NULL)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_set_view failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_read(fh, outbuf, 3, MPI_BYTE, &Status))
!= MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_read failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_read failed (%s)\n", mpi_err_str);
return 1;
}
@@ -807,9 +807,9 @@ static int test_mpio_derived_dtype(char *filename) {
retcode = 0;
} else {
/* if(mpi_rank == 0) {
- printf("complicated derived datatype is NOT working at this platform\n");
- printf("go back to hdf5/config and find the corresponding\n");
- printf("configure-specific file and change ?????\n");
+ HDprintf("complicated derived datatype is NOT working at this platform\n");
+ HDprintf("go back to hdf5/config and find the corresponding\n");
+ HDprintf("configure-specific file and change ?????\n");
}
*/
retcode = -1;
@@ -817,16 +817,16 @@ static int test_mpio_derived_dtype(char *filename) {
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_close failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_close failed (%s)\n", mpi_err_str);
return 1;
}
mpi_err = MPI_Barrier(MPI_COMM_WORLD);
if (retcode == -1) {
if (mpi_rank == 0) {
- printf(
+ HDprintf(
"Complicated derived datatype is NOT working at this platform\n");
- printf(" Please report to help@hdfgroup.org about this problem.\n");
+ HDprintf(" Please report to help@hdfgroup.org about this problem.\n");
}
retcode = 1;
}
@@ -851,7 +851,7 @@ static int test_mpio_derived_dtype(char *filename) {
2. This test will fail with the MPI-IO package that doesn't support this. For example,
mpich 1.2.6.
- If this bug has been fixed in the previous not-working package, this test will issue a printf message to tell the developer to change
+ If this bug has been fixed in the previous not-working package, this test will issue a HDprintf message to tell the developer to change
the configuration specific file of HDF5 so that we can change our configurationsetting to support special collective IO; currently only special collective IO.
If it turns out that the previous working MPI-IO package no longer works, this test will also issue a message to inform the corresponding failure so that
@@ -898,26 +898,26 @@ static int test_mpio_special_collective(char *filename) {
if ((mpi_err = MPI_Type_create_hindexed(2, blocklens, offsets, etype,
&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if ((mpi_err = MPI_Type_commit(&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if ((mpi_err = MPI_Type_create_hindexed(2, blocklens, offsets, etype,
&buftype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if ((mpi_err = MPI_Type_commit(&buftype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
} /* end if */
@@ -931,7 +931,7 @@ static int test_mpio_special_collective(char *filename) {
MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh))
!= MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_open failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
@@ -943,7 +943,7 @@ static int test_mpio_special_collective(char *filename) {
if ((mpi_err = MPI_File_set_view(fh, mpi_off, MPI_BYTE, filetype, filerep,
MPI_INFO_NULL)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_set_view failed (%s)\n", mpi_err_str);
+ HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
@@ -951,7 +951,7 @@ static int test_mpio_special_collective(char *filename) {
if ((mpi_err = MPI_File_write_at_all(fh, mpi_off, writedata, bufcount,
buftype, &mpi_stat)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n",
+ HDprintf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n",
(long) mpi_off, bufcount, mpi_err_str);
return 1;
} /* end if */
@@ -959,7 +959,7 @@ static int test_mpio_special_collective(char *filename) {
/* Close the file */
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_File_close failed. \n");
+ HDprintf("MPI_File_close failed. \n");
return 1;
} /* end if */
@@ -967,8 +967,8 @@ static int test_mpio_special_collective(char *filename) {
mpi_err = MPI_Barrier(MPI_COMM_WORLD);
if (retcode != 0) {
if (mpi_rank == 0) {
- printf("special collective IO is NOT working at this platform\n");
- printf(" Please report to help@hdfgroup.org about this problem.\n");
+ HDprintf("special collective IO is NOT working at this platform\n");
+ HDprintf(" Please report to help@hdfgroup.org about this problem.\n");
} /* end if */
retcode = 1;
} /* end if */
@@ -1024,15 +1024,15 @@ static int parse_options(int argc, char **argv) {
for (i = 0; i < n; i++)
if (h5_fixname(FILENAME[i], plist, filenames[i],
sizeof(filenames[i])) == NULL) {
- printf("h5_fixname failed\n");
+ HDprintf("h5_fixname failed\n");
nerrors++;
return (1);
}
H5Pclose(plist);
if (VERBOSE_MED) {
- printf("Test filenames are:\n");
+ HDprintf("Test filenames are:\n");
for (i = 0; i < n; i++)
- printf(" %s\n", filenames[i]);
+ HDprintf(" %s\n", filenames[i]);
}
}
@@ -1043,10 +1043,10 @@ static int parse_options(int argc, char **argv) {
* Show command usage
*/
static void usage(void) {
- printf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n");
- printf("\t-v<verbosity>\tset verbose level (0-9,l,m,h)\n");
- printf("\t-f <prefix>\tfilename prefix\n");
- printf("\n");
+ HDprintf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n");
+ HDprintf("\t-v<verbosity>\tset verbose level (0-9,l,m,h)\n");
+ HDprintf("\t-f <prefix>\tfilename prefix\n");
+ HDprintf("\n");
}
/*
@@ -1072,7 +1072,7 @@ int main(int argc, char **argv) {
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0) {
- printf("Failed to turn off atexit processing. Continue.\n");
+ HDprintf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
if (parse_options(argc, argv) != 0) {
@@ -1082,9 +1082,9 @@ int main(int argc, char **argv) {
}
if (MAINPROCESS) {
- printf("===================================\n");
- printf("MPI functionality tests\n");
- printf("===================================\n");
+ HDprintf("===================================\n");
+ HDprintf("MPI functionality tests\n");
+ HDprintf("===================================\n");
}
if (VERBOSE_MED)
@@ -1103,7 +1103,7 @@ int main(int argc, char **argv) {
ret_code = test_mpio_1wMr(filenames[0], USENONE);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1114,7 +1114,7 @@ int main(int argc, char **argv) {
ret_code = test_mpio_1wMr(filenames[0], USEATOM);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1122,7 +1122,7 @@ int main(int argc, char **argv) {
ret_code = test_mpio_1wMr(filenames[0], USEFSYNC);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
}
@@ -1135,12 +1135,12 @@ int main(int argc, char **argv) {
ret_code = test_mpio_gb_file(filenames[0]);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
#else
if (mpi_rank==0)
- printf(" will be skipped on Windows (JIRA HDDFV-8064)\n");
+ HDprintf(" will be skipped on Windows (JIRA HDDFV-8064)\n");
#endif
/*=======================================
@@ -1150,7 +1150,7 @@ int main(int argc, char **argv) {
ret_code = test_mpio_overlap_writes(filenames[0]);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1161,7 +1161,7 @@ int main(int argc, char **argv) {
ret_code = test_mpio_derived_dtype(filenames[0]);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1171,7 +1171,7 @@ int main(int argc, char **argv) {
if (mpi_size < 4) {
MPI_BANNER("MPIO special collective io test SKIPPED.");
if (mpi_rank == 0)
- printf("This test needs at least four processes to run.\n");
+ HDprintf("This test needs at least four processes to run.\n");
ret_code = 0;
goto sc_finish;
} /* end if */
@@ -1181,7 +1181,7 @@ int main(int argc, char **argv) {
sc_finish: ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- printf("***FAILED with %d total errors\n", ret_code);
+ HDprintf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1191,14 +1191,14 @@ int main(int argc, char **argv) {
*/
MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS) { /* only process 0 reports */
- printf("===================================\n");
+ HDprintf("===================================\n");
if (nerrors) {
- printf("***MPI tests detected %d errors***\n", nerrors);
+ HDprintf("***MPI tests detected %d errors***\n", nerrors);
}
else {
- printf("MPI tests finished with no errors\n");
+ HDprintf("MPI tests finished with no errors\n");
}
- printf("===================================\n");
+ HDprintf("===================================\n");
}
/* turn off alarm */
diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c
index 574591c..8e554ee 100644
--- a/testpar/t_ph5basic.c
+++ b/testpar/t_ph5basic.c
@@ -50,13 +50,13 @@ test_fapl_mpio_dup(void)
int nkeys, nkeys_tmp;
if (VERBOSE_MED)
- printf("Verify fapl_mpio duplicates communicator and INFO objects\n");
+ HDprintf("Verify fapl_mpio duplicates communicator and INFO objects\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
if (VERBOSE_MED)
- printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size);
+ HDprintf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size);
/* Create a new communicator that has the same processes as MPI_COMM_WORLD.
* Use MPI_Comm_split because it is simplier than MPI_Comm_create
@@ -66,7 +66,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm,&mpi_size_old);
MPI_Comm_rank(comm,&mpi_rank_old);
if (VERBOSE_MED)
- printf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old);
+ HDprintf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old);
/* create a new INFO object with some trivial information. */
mrc = MPI_Info_create(&info);
@@ -103,7 +103,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp,&mpi_size_tmp);
MPI_Comm_rank(comm_tmp,&mpi_rank_tmp);
if (VERBOSE_MED)
- printf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n",
+ HDprintf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n",
mpi_rank_tmp, mpi_size_tmp);
VRFY((mpi_size_tmp==mpi_size), "MPI_Comm_size");
VRFY((mpi_rank_tmp==mpi_rank), "MPI_Comm_rank");
@@ -151,7 +151,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp,&mpi_size_tmp);
MPI_Comm_rank(comm_tmp,&mpi_rank_tmp);
if (VERBOSE_MED)
- printf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n",
+ HDprintf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n",
mpi_rank_tmp, mpi_size_tmp);
VRFY((mpi_size_tmp==mpi_size), "MPI_Comm_size");
VRFY((mpi_rank_tmp==mpi_rank), "MPI_Comm_rank");
@@ -171,7 +171,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp,&mpi_size_tmp);
MPI_Comm_rank(comm_tmp,&mpi_rank_tmp);
if (VERBOSE_MED)
- printf("After Property list closed: rank/size of comm are %d/%d\n",
+ HDprintf("After Property list closed: rank/size of comm are %d/%d\n",
mpi_rank_tmp, mpi_size_tmp);
if (MPI_INFO_NULL != info_tmp){
mrc=MPI_Info_get_nkeys(info_tmp, &nkeys_tmp);
diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c
index 719d150..d75e627 100644
--- a/testpar/t_prestart.c
+++ b/testpar/t_prestart.c
@@ -107,7 +107,7 @@ main (int argc, char **argv)
for (i=0; i < block[0]; i++){
for (j=0; j < block[1]; j++){
if(*dataptr != mpi_rank+1) {
- printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
(unsigned long)i, (unsigned long)j,
(unsigned long)(i+start[0]), (unsigned long)(j+start[1]),
mpi_rank+1, *(dataptr));
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index d5efa94..3f72db9 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -141,7 +141,7 @@ test_plist_ed(void)
herr_t ret; /* Generic return value */
if(VERBOSE_MED)
- printf("Encode/Decode DCPLs\n");
+ HDprintf("Encode/Decode DCPLs\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index fa6697b..0eb4838 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -22,9 +22,6 @@
#define H5S_TESTING
-#include "hdf5.h"
-#include "H5private.h"
-#include "testphdf5.h"
#include "H5Spkg.h" /* Dataspaces */
#include "testphdf5.h"
@@ -4718,10 +4715,10 @@ void pause_proc(void)
if (MAINPROCESS)
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop){
if (!loops++){
- printf("Proc %d (%*s, %d): to debug, attach %d\n",
+ HDprintf("Proc %d (%*s, %d): to debug, attach %d\n",
mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
- printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
+ HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);
}
@@ -4745,18 +4742,18 @@ int MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
"[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- printf("\t-m<n_datasets>"
+ HDprintf("\t-m<n_datasets>"
"\tset number of datasets for the multiple dataset test\n");
- printf("\t-n<n_groups>"
+ HDprintf("\t-n<n_groups>"
"\tset number of groups for the multiple group test\n");
- printf("\t-f <prefix>\tfilename prefix\n");
- printf("\t-2\t\tuse Split-file together with MPIO\n");
- printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n",
+ HDprintf("\t-f <prefix>\tfilename prefix\n");
+ HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
+ HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n",
ROW_FACTOR, COL_FACTOR);
- printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- printf("\n");
+ HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ HDprintf("\n");
}
@@ -4834,7 +4831,7 @@ parse_options(int argc, char **argv)
break;
case 'h': /* print help message--return with nerrors set */
return(1);
- default: printf("Illegal option(%s)\n", *argv);
+ default: HDprintf("Illegal option(%s)\n", *argv);
nerrors++;
return(1);
}
@@ -4843,12 +4840,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0){
- printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return(1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0){
- printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return(1);
}
@@ -4856,7 +4853,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)){
if (MAINPROCESS)
- printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n",
+ HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n",
dim0, dim1, mpi_size);
nerrors++;
return(1);
@@ -4871,13 +4868,13 @@ parse_options(int argc, char **argv)
for (i=0; i < n; i++)
if (h5_fixname(FILENAME[i],fapl,filenames[i],sizeof(filenames[i]))
== NULL){
- printf("h5_fixname failed\n");
+ HDprintf("h5_fixname failed\n");
nerrors++;
return(1);
}
- printf("Test filenames are:\n");
+ HDprintf("Test filenames are:\n");
for (i=0; i < n; i++)
- printf(" %s\n", filenames[i]);
+ HDprintf(" %s\n", filenames[i]);
}
return(0);
@@ -5014,10 +5011,10 @@ int main(int argc, char **argv)
dim1 = COL_FACTOR*mpi_size;
if (MAINPROCESS){
- printf("===================================\n");
- printf("Shape Same Tests Start\n");
- printf(" express_test = %d.\n", GetTestExpress());
- printf("===================================\n");
+ HDprintf("===================================\n");
+ HDprintf("Shape Same Tests Start\n");
+ HDprintf(" express_test = %d.\n", GetTestExpress());
+ HDprintf("===================================\n");
}
/* Attempt to turn off atexit post processing so that in case errors
@@ -5026,7 +5023,7 @@ int main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- printf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ HDprintf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank);
};
H5open();
h5_show_hostname();
@@ -5065,7 +5062,7 @@ int main(int argc, char **argv)
TestParseCmdLine(argc, argv);
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS){
- printf("===================================\n"
+ HDprintf("===================================\n"
" Using Independent I/O with file set view to replace collective I/O \n"
"===================================\n");
}
@@ -5096,12 +5093,12 @@ int main(int argc, char **argv)
}
if (MAINPROCESS){ /* only process 0 reports */
- printf("===================================\n");
+ HDprintf("===================================\n");
if (nerrors)
- printf("***Shape Same tests detected %d errors***\n", nerrors);
+ HDprintf("***Shape Same tests detected %d errors***\n", nerrors);
else
- printf("Shape Same tests finished with no errors\n");
- printf("===================================\n");
+ HDprintf("Shape Same tests finished with no errors\n");
+ HDprintf("===================================\n");
}
/* close HDF5 library */
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index 23fc704..7c4fd4c 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -51,7 +51,7 @@ static void coll_read_test(int chunk_factor);
* Function: coll_irregular_cont_write
*
* Purpose: Wrapper to test the collectively irregular hyperslab write in
- contiguous storage
+ * contiguous storage
*
* Return: Success: 0
*
@@ -76,7 +76,7 @@ coll_irregular_cont_write(void)
* Function: coll_irregular_cont_read
*
* Purpose: Wrapper to test the collectively irregular hyperslab read in
- contiguous storage
+ * contiguous storage
*
* Return: Success: 0
*
@@ -100,7 +100,7 @@ coll_irregular_cont_read(void)
* Function: coll_irregular_simple_chunk_write
*
* Purpose: Wrapper to test the collectively irregular hyperslab write in
- chunk storage(1 chunk)
+ * chunk storage(1 chunk)
*
* Return: Success: 0
*
@@ -125,7 +125,7 @@ coll_irregular_simple_chunk_write(void)
* Function: coll_irregular_simple_chunk_read
*
* Purpose: Wrapper to test the collectively irregular hyperslab read in chunk
- storage(1 chunk)
+ * storage(1 chunk)
*
* Return: Success: 0
*
@@ -148,7 +148,7 @@ coll_irregular_simple_chunk_read(void)
* Function: coll_irregular_complex_chunk_write
*
* Purpose: Wrapper to test the collectively irregular hyperslab write in chunk
- storage(4 chunks)
+ * storage(4 chunks)
*
* Return: Success: 0
*
@@ -173,7 +173,7 @@ coll_irregular_complex_chunk_write(void)
* Function: coll_irregular_complex_chunk_read
*
* Purpose: Wrapper to test the collectively irregular hyperslab read in chunk
- storage(1 chunk)
+ * storage(1 chunk)
*
* Return: Success: 0
*
@@ -197,9 +197,9 @@ coll_irregular_complex_chunk_read(void)
* Function: coll_write_test
*
* Purpose: To test the collectively irregular hyperslab write in chunk
- storage
+ * storage
* Input: number of chunks on each dimension
- if number is equal to 0, contiguous storage
+ * if number is equal to 0, contiguous storage
* Return: Success: 0
*
* Failure: -1
@@ -670,9 +670,9 @@ void coll_write_test(int chunk_factor)
* Function: coll_read_test
*
* Purpose: To test the collectively irregular hyperslab read in chunk
- storage
+ * storage
* Input: number of chunks on each dimension
- if number is equal to 0, contiguous storage
+ * if number is equal to 0, contiguous storage
* Return: Success: 0
*
* Failure: -1
@@ -923,7 +923,7 @@ coll_read_test(int chunk_factor)
ret = H5Fclose(file);
VRFY((ret >= 0),"");
- return ;
+ return;
}
diff --git a/testpar/testpar.h b/testpar/testpar.h
index 84c073f..4fbe8d8 100644
--- a/testpar/testpar.h
+++ b/testpar/testpar.h
@@ -32,7 +32,7 @@
*/
#define MESG(mesg) \
if (VERBOSE_MED && *mesg != '\0') \
- printf("%s\n", mesg)
+ HDprintf("%s\n", mesg)
/*
* VRFY: Verify if the condition val is true.
@@ -48,14 +48,14 @@
if (val) { \
MESG(mesg); \
} else { \
- printf("Proc %d: ", mpi_rank); \
- printf("*** Parallel ERROR ***\n"); \
- printf(" VRFY (%s) failed at line %4d in %s\n", \
+ HDprintf("Proc %d: ", mpi_rank); \
+ HDprintf("*** Parallel ERROR ***\n"); \
+ HDprintf(" VRFY (%s) failed at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
++nerrors; \
fflush(stdout); \
if (!VERBOSE_MED) { \
- printf("aborting MPI processes\n"); \
+ HDprintf("aborting MPI processes\n"); \
MPI_Abort(MPI_COMM_WORLD, 1); \
} \
} \
@@ -70,9 +70,9 @@
if (val) { \
MESG(mesg); \
} else { \
- printf("Proc %d: ", mpi_rank); \
- printf("*** PHDF5 REMARK (not an error) ***\n"); \
- printf(" Condition (%s) failed at line %4d in %s\n", \
+ HDprintf("Proc %d: ", mpi_rank); \
+ HDprintf("*** PHDF5 REMARK (not an error) ***\n"); \
+ HDprintf(" Condition (%s) failed at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
fflush(stdout); \
} \
@@ -80,10 +80,10 @@
#define MPI_BANNER(mesg) do { \
if (VERBOSE_MED || MAINPROCESS){ \
- printf("--------------------------------\n"); \
- printf("Proc %d: ", mpi_rank); \
- printf("*** %s\n", mesg); \
- printf("--------------------------------\n"); \
+ HDprintf("--------------------------------\n"); \
+ HDprintf("Proc %d: ", mpi_rank); \
+ HDprintf("*** %s\n", mesg); \
+ HDprintf("--------------------------------\n"); \
} \
} while(0)
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index 9fece12..cf611b7 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -19,7 +19,7 @@
#include "testpar.h"
enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD,
- API_MULTI_HARD,API_LINK_TRUE,API_LINK_FALSE,
+ API_MULTI_HARD,API_LINK_TRUE,API_LINK_FALSE,
API_MULTI_COLL,API_MULTI_IND};
#ifndef FALSE
@@ -32,20 +32,20 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD,
/* Constants definitions */
-#define DIM0 600 /* Default dataset sizes. */
-#define DIM1 1200 /* Values are from a monitor pixel sizes */
-#define ROW_FACTOR 8 /* Nominal row factor for dataset size */
-#define COL_FACTOR 16 /* Nominal column factor for dataset size */
-#define RANK 2
-#define DATASETNAME1 "Data1"
-#define DATASETNAME2 "Data2"
-#define DATASETNAME3 "Data3"
-#define DATASETNAME4 "Data4"
-#define DATASETNAME5 "Data5"
-#define DATASETNAME6 "Data6"
-#define DATASETNAME7 "Data7"
-#define DATASETNAME8 "Data8"
-#define DATASETNAME9 "Data9"
+#define DIM0 600 /* Default dataset sizes. */
+#define DIM1 1200 /* Values are from a monitor pixel sizes */
+#define ROW_FACTOR 8 /* Nominal row factor for dataset size */
+#define COL_FACTOR 16 /* Nominal column factor for dataset size */
+#define RANK 2
+#define DATASETNAME1 "Data1"
+#define DATASETNAME2 "Data2"
+#define DATASETNAME3 "Data3"
+#define DATASETNAME4 "Data4"
+#define DATASETNAME5 "Data5"
+#define DATASETNAME6 "Data6"
+#define DATASETNAME7 "Data7"
+#define DATASETNAME8 "Data8"
+#define DATASETNAME9 "Data9"
/* point selection order */
#define IN_ORDER 1
@@ -179,14 +179,14 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD,
/* Definitions of the selection mode for the no_collective_cause_tests function. */
#define TEST_COLLECTIVE 0x001
-#define TEST_SET_INDEPENDENT 0x002
+#define TEST_SET_INDEPENDENT 0x002
#define TEST_DATATYPE_CONVERSION 0x004
#define TEST_DATA_TRANSFORMS 0x008
#define TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES 0x010
#define TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT 0x020
#define TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL 0x040
#define TEST_FILTERS 0x080
-/* TEST_FILTERS will take place of this after supporting mpio + filter for
+/* TEST_FILTERS will take place of this after supporting mpio + filter for
* H5Dcreate and H5Dwrite */
#define TEST_FILTERS_READ 0x100
@@ -209,8 +209,8 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD,
/* type definitions */
typedef struct H5Ptest_param_t /* holds extra test parameters */
{
- char *name;
- int count;
+ char *name;
+ int count;
} H5Ptest_param_t;
/* Dataset data type. Int's can be easily octo dumped. */
@@ -218,19 +218,19 @@ typedef int DATATYPE;
/* Shape Same Tests Definitions */
typedef enum {
- IND_CONTIG, /* Independent IO on contigous datasets */
- COL_CONTIG, /* Collective IO on contigous datasets */
- IND_CHUNKED, /* Independent IO on chunked datasets */
- COL_CHUNKED /* Collective IO on chunked datasets */
+ IND_CONTIG, /* Independent IO on contigous datasets */
+ COL_CONTIG, /* Collective IO on contigous datasets */
+ IND_CHUNKED, /* Independent IO on chunked datasets */
+ COL_CHUNKED /* Collective IO on chunked datasets */
} ShapeSameTestMethods;
/* Shared global variables */
-extern int dim0, dim1; /*Dataset dimensions */
-extern int chunkdim0, chunkdim1; /*Chunk dimensions */
-extern int nerrors; /*errors count */
-extern H5E_auto2_t old_func; /* previous error handler */
-extern void *old_client_data; /*previous error handler arg.*/
-extern int facc_type; /*Test file access type */
+extern int dim0, dim1; /*Dataset dimensions */
+extern int chunkdim0, chunkdim1; /*Chunk dimensions */
+extern int nerrors; /*errors count */
+extern H5E_auto2_t old_func; /* previous error handler */
+extern void *old_client_data; /*previous error handler arg.*/
+extern int facc_type; /*Test file access type */
extern int dxfer_coll_type;
/* Test program prototypes */
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index b9e37e8..c93a2eb 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1722,7 +1722,7 @@ h5_fileaccess(void)
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 16c0d8c..1eef5ab 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -3753,7 +3753,7 @@ void setDefaultValues(struct Input *in, int count)
in->path.count = 1;
HDstrcpy(temp, "dataset");
- sprintf(num, "%d", count);
+ HDsprintf(num, "%d", count);
HDstrcat(temp, num);
HDstrcpy(in->path.group[0], temp);
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index bd10e8b..5e9339f 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1226,7 +1226,7 @@ print_group_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- printf("Small groups (with 0 to %u links):\n", sgroups_threshold-1);
+ HDprintf("Small groups (with 0 to %u links):\n", sgroups_threshold-1);
total = 0;
for(u = 0; u < (unsigned)sgroups_threshold; u++) {
if(iter->num_small_groups[u] > 0) {
@@ -1512,7 +1512,7 @@ print_freespace_info(const iter_t *iter)
HDfprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
HDfprintf(stdout, "Free-space section threshold: %Hu bytes\n", iter->fs_threshold);
- printf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
+ HDprintf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
total = 0;
for(u = 0; u < SIZE_SMALL_SECTS; u++) {
if(iter->num_small_sects[u] > 0) {
@@ -1520,7 +1520,7 @@ print_freespace_info(const iter_t *iter)
total += iter->num_small_sects[u];
} /* end if */
} /* end for */
- printf("\tTotal # of small size sections: %lu\n", total);
+ HDprintf("\tTotal # of small size sections: %lu\n", total);
HDprintf("Free-space section bins:\n");
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index cb77771..ef44ebb 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -1987,7 +1987,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 057cbbd..ec8df3c 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -4120,7 +4120,7 @@ int write_dset_in(hid_t loc_id,
dbuf = (double*)HDmalloc( size );
if (NULL == dbuf)
{
- printf ("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", (int) size / 1000000 );
+ HDprintf ("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", (int) size / 1000000 );
goto out;
}
diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c
index 6e7a24e..6b86dd5 100644
--- a/tools/test/h5repack/testh5repack_detect_szip.c
+++ b/tools/test/h5repack/testh5repack_detect_szip.c
@@ -50,10 +50,10 @@ int main(void)
#ifdef H5_HAVE_FILTER_SZIP
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
- printf("yes\n");
+ HDprintf("yes\n");
return(1);
}
#endif /* H5_HAVE_FILTER_SZIP */
- printf("no\n");
+ HDprintf("no\n");
return(0);
}
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index ae11032..2edfcf6 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -88,7 +88,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_GRPS groups in the root group */
for(i = 1; i <= NUM_GRPS; i++) {
- sprintf(name, "%s%d", GROUP_NAME,i);
+ HDsprintf(name, "%s%d", GROUP_NAME,i);
if((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Gclose(gid) < 0)
@@ -109,7 +109,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_ATTRS for the dataset */
for(i = 1; i <= NUM_ATTRS; i++) {
- sprintf(attrname, "%s%d", ATTR_NAME,i);
+ HDsprintf(attrname, "%s%d", ATTR_NAME,i);
if((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -190,7 +190,7 @@ gen_threshold_file(const char *fname)
/* Create 11 attributes for the dataset */
for(i = 1; i <= (THRES_NUM+1); i++) {
- sprintf(name, "%s%d", THRES_ATTR_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_NAME,i);
if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -217,7 +217,7 @@ gen_threshold_file(const char *fname)
/* Create 10 attributes for the 2-D dataset */
for(i = 1; i <= THRES_NUM; i++) {
- sprintf(name, "%s%d", THRES_ATTR_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_NAME,i);
if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -241,7 +241,7 @@ gen_threshold_file(const char *fname)
/* Create 10 1-D datasets with non-zero dimension size for the group */
for(i = 1; i <= THRES_NUM; i++) {
/* set up dataset name */
- sprintf(name, "%s%d", THRES_DSET_NAME,i);
+ HDsprintf(name, "%s%d", THRES_DSET_NAME,i);
/* Create the dataset */
if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -264,7 +264,7 @@ gen_threshold_file(const char *fname)
/* Create 25 attributes for the group */
for(i = 1; i <= THRES_NUM_25; i++) {
/* Set up attribute name */
- sprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i);
/* Create the attribute */
if((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -286,7 +286,7 @@ gen_threshold_file(const char *fname)
/* Create 9 1-D datasets with non-zero dimension size for the group */
for(i = 1; i < THRES_NUM; i++) {
/* set up dataset name */
- sprintf(name, "%s%d", THRES_DSET_NAME,i);
+ HDsprintf(name, "%s%d", THRES_DSET_NAME,i);
/* Create the dataset */
if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 7f80c23..96d7e75e7 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -15,10 +15,10 @@
/* The HDF5 test files */
const char *FILENAME[] = {
- "h5clear_sec2_v3.h5", /* 0 -- sec2 file with superblock version 3 */
- "h5clear_log_v3.h5", /* 1 -- log file with superblock veresion 3 */
- "h5clear_sec2_v0.h5", /* 2 -- sec2 file with superblock version 0 */
- "h5clear_sec2_v2.h5" /* 3 -- sec2 file with superblock version 2 */
+ "h5clear_sec2_v3.h5", /* 0 -- sec2 file with superblock version 3 */
+ "h5clear_log_v3.h5", /* 1 -- log file with superblock veresion 3 */
+ "h5clear_sec2_v0.h5", /* 2 -- sec2 file with superblock version 0 */
+ "h5clear_sec2_v2.h5" /* 3 -- sec2 file with superblock version 2 */
};
const char *FILENAME_ENHANCE[] = {
@@ -28,12 +28,12 @@ const char *FILENAME_ENHANCE[] = {
"h5clear_fsm_persist_user_equal.h5", /* 3: user block, persisting free-space, stored EOA = actual EOF */
"h5clear_fsm_persist_user_greater.h5", /* 4: user block, persisting free-space, stored EOA > actual EOF */
"h5clear_fsm_persist_user_less.h5", /* 5: user block, persisting free-space, stored EOA < actual EOF */
- "h5clear_status_noclose.h5", /* 6 -- v3 superblock, nonzero status_flags, no flush, exit,
+ "h5clear_status_noclose.h5", /* 6 -- v3 superblock, nonzero status_flags, no flush, exit,
stored EOA < actual EOF */
"h5clear_fsm_persist_noclose.h5" /* 7 -- persisting free-space, no flush, exit, stored EOA < actual EOF */
};
-#define KB 1024U
+#define KB 1024U
#define CACHE_IMAGE_FILE "h5clear_mdc_image.h5"
#define DSET "DSET"
@@ -42,14 +42,14 @@ const char *FILENAME_ENHANCE[] = {
#define USERBLOCK 512
/*-------------------------------------------------------------------------
- * Function: gen_cache_image_file
+ * Function: gen_cache_image_file
*
- * Purpose: To create a file with cache image feature enabled.
+ * Purpose: To create a file with cache image feature enabled.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Vailin Choi; March 2017
+ * Programmer: Vailin Choi; March 2017
*
*-------------------------------------------------------------------------
*/
@@ -136,9 +136,9 @@ error:
} /* gen_cache_image_file() */
/*-------------------------------------------------------------------------
- * Function: gen_enhance_files
+ * Function: gen_enhance_files
*
- * Purpose: To create the first 6 files in FILENAME_ENHANCE[]:
+ * Purpose: To create the first 6 files in FILENAME_ENHANCE[]:
* (0) FILENAME_ENHANCE[0]: "h5clear_fsm_persist_equal.h5"
* (1) FILENAME_ENHANCE[1]: "h5clear_fsm_persist_greater.h5"
* (2) FILENAME_ENHANCE[2]: "h5clear_fsm_persist_less.h5"
@@ -149,15 +149,15 @@ error:
* value to the location where the EOA is stored in the superblock.
* Also modify the chksum in the superblock due to this change.
*
- * The first call to this routine (without user block) will generate
+ * The first call to this routine (without user block) will generate
* the first 3 files.
* The second call to this routine (with user block) will generate
* the last 3 files.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Vailin Choi; March 2017
+ * Programmer: Vailin Choi; March 2017
*
*-------------------------------------------------------------------------
*/
@@ -190,7 +190,7 @@ gen_enhance_files(hbool_t user)
if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
goto error;
- /*
+ /*
* Create the file, then write invalid EOA to the file.
*/
for(i = 0+u; i < 3+u; i++) {
@@ -221,21 +221,21 @@ gen_enhance_files(hbool_t user)
if(H5Fclose(fid) < 0)
goto error;
- /*
+ /*
* No further action for:
- * --FILENAME_ENHANCE[0]: "h5clear_fsm_persist_equal.h5"
+ * --FILENAME_ENHANCE[0]: "h5clear_fsm_persist_equal.h5"
* --FILENAME_ENHANCE[3]: "h5clear_fsm_persist_user_equal.h5",
*/
if(!(i % 3))
continue;
- /*
+ /*
* For the following files:
* --FILENAME_ENHANCE[1]: "h5clear_fsm_persist_greater.h5"
* --FILENAME_ENHANCE[2]: "h5clear_fsm_persist_less.h5"
* --FILENAME_ENHANCE[4]: "h5clear_fsm_persist_greater.h5"
* --FILENAME_ENHANCE[5]: "h5clear_fsm_persist_less.h5"
*
- * Write invalid value to the location for stored eoa and
+ * Write invalid value to the location for stored eoa and
* update the chksum value.
*/
/* Open the file */
@@ -306,9 +306,9 @@ error:
} /* gen_enhance_files() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Generate test files used by h5clear.
+ * Purpose: Generate test files used by h5clear.
*
* (A) gen_cache_image_file():
* --generate a file with cache image feature
@@ -317,10 +317,10 @@ error:
* --generate the first 6 files in FILENAME_ENHANCE[]:
* (0) "h5clear_fsm_persist_equal.h5"
* (1) "h5clear_fsm_persist_greater.h5"
- * (2) "h5clear_fsm_persist_less.h5"
- * (3) "h5clear_fsm_persist_user_equal.h5"
+ * (2) "h5clear_fsm_persist_less.h5"
+ * (3) "h5clear_fsm_persist_user_equal.h5"
* (4) "h5clear_fsm_persist_user_greater.h5"
- * (5) "h5clear_fsm_persist_user_less.h5"
+ * (5) "h5clear_fsm_persist_user_less.h5"
*
* (C) Generate the following FILENAME[] files in main():
* (0a) "h5clear_sec2_v3.h5"
@@ -328,43 +328,43 @@ error:
* (1a) "h5clear_log_v3.h5",
* (1b) "latest_h5clear_log_v3.h5"
* (2) "h5clear_sec2_v0.h5"
- * (3) "h5clear_sec2_v2.h5"
- *
- * These HDF5 files are created with non-zero status_flags in
+ * (3) "h5clear_sec2_v2.h5"
+ *
+ * These HDF5 files are created with non-zero status_flags in
* the superblock via flushing and exiting without closing the
* library.
- * Due to file locking, status_flags in the superblock will be
- * nonzero after H5Fcreate. The library will clear status_flags
- * on file closing.
+ * Due to file locking, status_flags in the superblock will be
+ * nonzero after H5Fcreate. The library will clear status_flags
+ * on file closing.
* This program, after "H5Fcreate" the files, exits without
- * going through library closing. Thus, status_flags for these
- * files are not cleared.
- * The library will check consistency of status_flags when
- * opening a file with superblock >= v3 and will return error
+ * going through library closing. Thus, status_flags for these
+ * files are not cleared.
+ * The library will check consistency of status_flags when
+ * opening a file with superblock >= v3 and will return error
* accordingly.
- * The library will not check status_flags when opening a file
- * with < v3 superblock.
- * These files are used by "h5clear" to see if the tool clears
- * status_flags properly so users can open the files afterwards.
- *
+ * The library will not check status_flags when opening a file
+ * with < v3 superblock.
+ * These files are used by "h5clear" to see if the tool clears
+ * status_flags properly so users can open the files afterwards.
+ *
* (D) Generate the last two files in FILENAME_ENHANCE[] in main():
- * (6) "h5clear_status_noclose.h5",
+ * (6) "h5clear_status_noclose.h5",
* (7) "h5clear_fsm_persist_noclose.h5"
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Vailin Choi; July 2013
+ * Programmer: Vailin Choi; July 2013
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl = -1, new_fapl = -1; /* File access property lists */
- char fname[512]; /* File name */
+ hid_t fid = -1; /* File ID */
+ hid_t fcpl = -1; /* File creation property list */
+ hid_t fapl = -1, new_fapl = -1; /* File access property lists */
+ char fname[512]; /* File name */
unsigned new_format; /* To use latest library format or not */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
@@ -382,7 +382,7 @@ main(void)
if(gen_enhance_files(TRUE) < 0)
goto error;
- /*
+ /*
* Generate files in FILENAME[]
*/
/* Create a copy of the file access property list */
@@ -396,13 +396,13 @@ main(void)
if(H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
- /*
+ /*
* Files created within this for loop will have v3 superblock and nonzero status_flags
* --FILENAME[0]: "h5clear_sec2_v3.h5", "latest_h5clear_sec2_v3.h5"
* --FILENAME[1]: "h5clear_log_v3.h5", "latest_h5clear_log_v3.h5"
*/
for(new_format = FALSE; new_format <= TRUE; new_format++) {
- hid_t fapl2, my_fapl; /* File access property lists */
+ hid_t fapl2, my_fapl; /* File access property lists */
/* Set to use the appropriate file access property list */
if(new_format)
@@ -415,14 +415,14 @@ main(void)
if((my_fapl = H5Pcopy(fapl2)) < 0)
goto error;
/* Create the file */
- sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]);
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
+ HDsprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]);
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
goto error;
/* Flush the file */
if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
goto error;
-
+
/* Close the property list */
if(H5Pclose(my_fapl) < 0)
goto error;
@@ -439,8 +439,8 @@ main(void)
goto error;
/* Create the file */
- sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]);
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
+ HDsprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]);
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
goto error;
/* Flush the file */
@@ -453,11 +453,11 @@ main(void)
} /* end for */
- /*
+ /*
* Create a sec2 file with v0 superblock but nonzero status_flags:
* FILENAME[2]: "h5clear_sec2_v0.h5"
*/
- if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
/* Flush the file */
@@ -465,9 +465,9 @@ main(void)
goto error;
- /*
+ /*
* Create a sec2 file with v2 superblock but nonzero status_flags:
- * FILENAME[3]: "h5clear_sec2_v2.h5"
+ * FILENAME[3]: "h5clear_sec2_v2.h5"
*/
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto error;
@@ -476,14 +476,14 @@ main(void)
if(H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 50) < 0)
goto error;
- if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
goto error;
/* Flush the file */
if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
goto error;
-
+
/* Close the property lists */
if(H5Pclose(fapl) < 0)
goto error;
@@ -492,10 +492,10 @@ main(void)
if(H5Pclose(fcpl) < 0)
goto error;
- /*
+ /*
* Create the last two files in FILENAME_ENHANCE[]:
* --FILENAME_ENHANCE[6]: h5clear_status_noclose.h5
- * --FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
+ * --FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
*/
/*
* FILENAME_ENHANCE[6]: h5clear_status_noclose.h5
@@ -503,7 +503,7 @@ main(void)
* --version 3 superblock
* --nonzero status_flags
* --does not persist free-space
- * --does not flush the file, just exit without closing file:
+ * --does not flush the file, just exit without closing file:
* --this file is similar to the user-suppplied test file attached with HDFFV-10347
*/
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -542,8 +542,8 @@ main(void)
/* Does not flush and does not close the file */
- /*
- * FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
+ /*
+ * FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
* --stored EOA < actual EOF
* --persisting free-space
* --undefined fsinfo.eoa_pre_fsm_fsalloc
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index 3784278..f50e5fb 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*****************************************************************************
- This test generates attributes, groups, and datasets of many types. It
- creates a large number of attributes, groups, and datasets by specifying
+ This test generates attributes, groups, and datasets of many types. It
+ creates a large number of attributes, groups, and datasets by specifying
-a, -g, -d options respectively. Using "-h" option to see details.
Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
@@ -31,7 +31,7 @@
#define MAXVLEN 10
#define FIXED_LEN 8
-typedef enum { SOLID=0, LIQUID, GAS, PLASMA } phase_t;
+typedef enum { SOLID=0, LIQUID, GAS, PLASMA } phase_t;
typedef struct {
int i;
@@ -43,24 +43,24 @@ typedef struct {
float f_array[FIXED_LEN];
hvl_t i_vlen;
char *s_vlen;
-} test_comp_t;
+} test_comp_t;
typedef struct {
int zipcode;
char *city;
-} zipcode_t;
+} zipcode_t;
int add_attrs(hid_t oid, int idx);
int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf) ;
-herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
- int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
- int compressed, int latest);
+herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
+ int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
+ int compressed, int latest);
int main (int argc, char *argv[])
{
char fname[32];
- int i, ngrps=NGROUPS, ndsets=NDSETS, nattrs=NATTRS, dim0=DIM0,
- chunk=DIM0/10+1, nrows=NROWS, vlen=MAXVLEN, l=0, z=0;
+ int i, ngrps=NGROUPS, ndsets=NDSETS, nattrs=NATTRS, dim0=DIM0,
+ chunk=DIM0/10+1, nrows=NROWS, vlen=MAXVLEN, l=0, z=0;
memset(fname, 0, 32);
for (i=1; i<argc; i++) {
@@ -83,92 +83,92 @@ int main (int argc, char *argv[])
else if (strcmp(argv[i], "-l")==0)
l = 1;
else if (strcmp(argv[i], "-z")==0)
- z = 1;
+ z = 1;
else if (strcmp(argv[i], "-h")==0) {
- printf("\nOPTONS:\n");
- printf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
- printf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
- printf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
- printf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
- printf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
- printf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
- printf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0/10+1));
- printf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
- printf("\t-l:\tuse latest format (default: no).\n");
- printf("\t-z:\tuse gzip compression (default: no).\n");
- printf("\t-h:\tthis help information.\n");
- printf("Example:\n");
- printf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
+ HDprintf("\nOPTONS:\n");
+ HDprintf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
+ HDprintf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
+ HDprintf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
+ HDprintf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
+ HDprintf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
+ HDprintf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
+ HDprintf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0/10+1));
+ HDprintf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
+ HDprintf("\t-l:\tuse latest format (default: no).\n");
+ HDprintf("\t-z:\tuse gzip compression (default: no).\n");
+ HDprintf("\t-h:\tthis help information.\n");
+ HDprintf("Example:\n");
+ HDprintf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
exit(0);
}
}
-
+
if (strlen(fname)<=0)
- sprintf(fname, FNAME);
+ HDsprintf(fname, FNAME);
+
+ create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows,
+ (hsize_t)dim0, (hsize_t)chunk, vlen, z, l);
- create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows,
- (hsize_t)dim0, (hsize_t)chunk, vlen, z, l);
-
return 0;
}
/*****************************************************************************
- This function generates attributes, groups, and datasets of many types.
+ This function generates attributes, groups, and datasets of many types.
Parameters:
- fname: file_name.
- ngrps: number of top level groups.
- ndsets: number of datasets.
- attrs: number of attributes.
- nrow: number of rows in a dataset.
- chunk: chunk size (single number).
- vlen: max vlen size.
- comp: use latest format.
- latest: use gzip comnpression.
-
+ fname: file_name.
+ ngrps: number of top level groups.
+ ndsets: number of datasets.
+ attrs: number of attributes.
+ nrow: number of rows in a dataset.
+ chunk: chunk size (single number).
+ vlen: max vlen size.
+ comp: use latest format.
+ latest: use gzip comnpression.
+
Return: Non-negative on success/Negative on failure
-
+
Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
****************************************************************************/
-herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
- int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
- int compressed, int latest)
+herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
+ int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
+ int compressed, int latest)
{
int i, j, k;
- hid_t fid, sid_null, sid_scalar, sid_1d, sid_2d, did, aid, sid_2, sid_large,
- fapl=H5P_DEFAULT, dcpl=H5P_DEFAULT, gid1, gid2, cmp_tid, tid_str,
- tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s;
+ hid_t fid, sid_null, sid_scalar, sid_1d, sid_2d, did, aid, sid_2, sid_large,
+ fapl=H5P_DEFAULT, dcpl=H5P_DEFAULT, gid1, gid2, cmp_tid, tid_str,
+ tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s;
char name[32], tmp_name1[32], tmp_name2[32], tmp_name3[32];
- hsize_t dims[1]={dim0}, dims2d[2]={dim0, (dim0/4+1)}, dims_array[1]={FIXED_LEN},
- dim1[1]={2};
+ hsize_t dims[1]={dim0}, dims2d[2]={dim0, (dim0/4+1)}, dims_array[1]={FIXED_LEN},
+ dim1[1]={2};
char *enum_names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"};
test_comp_t *buf_comp=NULL, *buf_comp_large=NULL;
int *buf_int=NULL;
float (*buf_float_a)[FIXED_LEN]=NULL;
double **buf_double2d=NULL;
hvl_t *buf_vlen_i=NULL;
- char (*buf_str)[FIXED_LEN];
- char **buf_vlen_s=NULL;
- hobj_ref_t buf_ref[2];
- hdset_reg_ref_t buf_reg_ref[2];
+ char (*buf_str)[FIXED_LEN];
+ char **buf_vlen_s=NULL;
+ hobj_ref_t buf_ref[2];
+ hdset_reg_ref_t buf_reg_ref[2];
size_t offset, len;
herr_t status;
- char *names[NTYPES] = { "int", "ulong", "float", "double", "fixed string",
- "enum", "fixed float array", "vlen int array", "vlen strings"};
- hid_t types[NTYPES] = { H5T_NATIVE_INT, H5T_NATIVE_UINT64, H5T_NATIVE_FLOAT,
+ char *names[NTYPES] = { "int", "ulong", "float", "double", "fixed string",
+ "enum", "fixed float array", "vlen int array", "vlen strings"};
+ hid_t types[NTYPES] = { H5T_NATIVE_INT, H5T_NATIVE_UINT64, H5T_NATIVE_FLOAT,
H5T_NATIVE_DOUBLE, tid_str, tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s};
- hsize_t coords[4][2] = { {0, 1}, {3, 5}, {1, 0}, {2, 4}}, start=0, stride=1, count=1;
-
- if (nrows < NROWS) nrows = NROWS;
+ hsize_t coords[4][2] = { {0, 1}, {3, 5}, {1, 0}, {2, 4}}, start=0, stride=1, count=1;
+
+ if (nrows < NROWS) nrows = NROWS;
if (ngrps<NGROUPS) ngrps=NGROUPS;
- if (ndsets<NDSETS) ndsets=NDSETS;
- if (nattrs<NATTRS) nattrs=NATTRS;
- if (dim0<DIM0) dim0=DIM0;
+ if (ndsets<NDSETS) ndsets=NDSETS;
+ if (nattrs<NATTRS) nattrs=NATTRS;
+ if (dim0<DIM0) dim0=DIM0;
if (chunk>dim0) chunk=dim0/4;
if (chunk<1) chunk = 1;
- if (vlen<1) vlen = MAXVLEN;
+ if (vlen<1) vlen = MAXVLEN;
- /* create fixed string datatype */
+ /* create fixed string datatype */
types[4] = tid_str = H5Tcopy (H5T_C_S1);
H5Tset_size (tid_str, FIXED_LEN);
@@ -181,15 +181,15 @@ herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
/* create float array datatype */
types[6] = tid_array_f = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims_array);
-
+
/* create variable length integer datatypes */
types[7] = tid_vlen_i = H5Tvlen_create (H5T_NATIVE_INT);
-
+
/* create variable length string datatype */
types[8] = tid_vlen_s = H5Tcopy (H5T_C_S1);
H5Tset_size (tid_vlen_s, H5T_VARIABLE);
-
- /* create compound datatypes */
+
+ /* create compound datatypes */
cmp_tid = H5Tcreate (H5T_COMPOUND, sizeof (test_comp_t));
offset = 0;
for (i=0; i<NTYPES-2; i++) {
@@ -197,31 +197,31 @@ herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
offset += H5Tget_size(types[i]);
}
- H5Tinsert(cmp_tid, names[7], offset, types[7]);
- offset += sizeof (hvl_t);
- H5Tinsert(cmp_tid, names[8], offset, types[8]);
+ H5Tinsert(cmp_tid, names[7], offset, types[7]);
+ offset += sizeof (hvl_t);
+ H5Tinsert(cmp_tid, names[8], offset, types[8]);
- /* create dataspace */
+ /* create dataspace */
sid_1d = H5Screate_simple (1, dims, NULL);
sid_2d = H5Screate_simple (2, dims2d, NULL);
sid_2 = H5Screate_simple (1, dim1, NULL);
- sid_large = H5Screate_simple (1, &nrows, NULL);
- sid_null = H5Screate (H5S_NULL);
- sid_scalar = H5Screate (H5S_SCALAR);
-
- /* create fid access property */
- fapl = H5Pcreate (H5P_FILE_ACCESS);
+ sid_large = H5Screate_simple (1, &nrows, NULL);
+ sid_null = H5Screate (H5S_NULL);
+ sid_scalar = H5Screate (H5S_SCALAR);
+
+ /* create fid access property */
+ fapl = H5Pcreate (H5P_FILE_ACCESS);
H5Pset_libver_bounds (fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
- /* create dataset creation property */
+ /* create dataset creation property */
dcpl = H5Pcreate (H5P_DATASET_CREATE);
- /* set dataset chunk */
+ /* set dataset chunk */
if (chunk>0) {
H5Pset_chunk (dcpl, 1, &chunk);
}
- /* set dataset compression */
+ /* set dataset compression */
if (compressed) {
if (chunk<=0) {
chunk = dim0/10+1;;
@@ -229,54 +229,54 @@ herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
}
H5Pset_shuffle (dcpl);
H5Pset_deflate (dcpl, 6);
- }
+ }
- /* allocate buffers */
+ /* allocate buffers */
buf_comp = (test_comp_t *)calloc(dim0, sizeof(test_comp_t));
buf_comp_large = (test_comp_t *)calloc(nrows, sizeof(test_comp_t));
buf_int = (int *)calloc(dim0, sizeof(int));
buf_float_a = malloc(dim0*sizeof(*buf_float_a));
- buf_vlen_i = (hvl_t *)calloc(dim0, sizeof (hvl_t));
+ buf_vlen_i = (hvl_t *)calloc(dim0, sizeof (hvl_t));
buf_vlen_s = (char **)calloc(dim0, sizeof(char *));
- buf_str = malloc(dim0*sizeof (*buf_str));
+ buf_str = malloc(dim0*sizeof (*buf_str));
- /* allocate array of doulbe pointers */
- buf_double2d = (double **)calloc(dims2d[0],sizeof(double *));
- /* allocate a contigous chunk of memory for the data */
- buf_double2d[0] = (double *)calloc( dims2d[0]*dims2d[1],sizeof(double) );
- /* assign memory city to pointer array */
- for (i=1; i <dims2d[0]; i++) buf_double2d[i] = buf_double2d[0]+i*dims2d[1];
+ /* allocate array of doulbe pointers */
+ buf_double2d = (double **)calloc(dims2d[0],sizeof(double *));
+ /* allocate a contigous chunk of memory for the data */
+ buf_double2d[0] = (double *)calloc( dims2d[0]*dims2d[1],sizeof(double) );
+ /* assign memory city to pointer array */
+ for (i=1; i <dims2d[0]; i++) buf_double2d[i] = buf_double2d[0]+i*dims2d[1];
- /* fill buffer values */
- len = 1;
+ /* fill buffer values */
+ len = 1;
for (i=0; i<dims[0]; i++) {
buf_comp[i].i = buf_int[i] = i-2147483648;
buf_comp[i].l = 0xffffffffffffffff-i;
buf_comp[i].f = 1.0/(i+1.0);
buf_comp[i].d = 987654321.0*i+1.0/(i+1.0);
buf_comp[i].e = (phase_t) (i % (int) (PLASMA + 1));
-
- for (j=0; j<FIXED_LEN; j++) {
- buf_comp[i].f_array[j] = buf_float_a[i][j] = i*100+j;
- buf_str[i][j] = 'a' + (i%26);
- }
- buf_str[i][FIXED_LEN-1] = 0;
+
+ for (j=0; j<FIXED_LEN; j++) {
+ buf_comp[i].f_array[j] = buf_float_a[i][j] = i*100+j;
+ buf_str[i][j] = 'a' + (i%26);
+ }
+ buf_str[i][FIXED_LEN-1] = 0;
strcpy(buf_comp[i].s, buf_str[i]);
-
- len = (1-cos(i/8.0))/2*vlen+1;
- if (!i) len = vlen;
- buf_vlen_i[i].len = len;
- buf_vlen_i[i].p = (int *)calloc(len, sizeof(int));
- for (j=0; j<len; j++) ((int*)(buf_vlen_i[i].p))[j] = i*100+j;
- buf_comp[i].i_vlen = buf_vlen_i[i];
-
- buf_vlen_s[i] = (char *)calloc(len, sizeof(char));
- for (j=0; j<len-1; j++)
- buf_vlen_s[i][j] = j%26+'A';
- buf_comp[i].s_vlen = buf_vlen_s[i];
-
- for (j=0; j<dims2d[1]; j++)
- buf_double2d[i][j] = i+j/10000.0;
+
+ len = (1-cos(i/8.0))/2*vlen+1;
+ if (!i) len = vlen;
+ buf_vlen_i[i].len = len;
+ buf_vlen_i[i].p = (int *)calloc(len, sizeof(int));
+ for (j=0; j<len; j++) ((int*)(buf_vlen_i[i].p))[j] = i*100+j;
+ buf_comp[i].i_vlen = buf_vlen_i[i];
+
+ buf_vlen_s[i] = (char *)calloc(len, sizeof(char));
+ for (j=0; j<len-1; j++)
+ buf_vlen_s[i][j] = j%26+'A';
+ buf_comp[i].s_vlen = buf_vlen_s[i];
+
+ for (j=0; j<dims2d[1]; j++)
+ buf_double2d[i][j] = i+j/10000.0;
}
for (i=0; i<nrows; i++) {
@@ -289,147 +289,147 @@ herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
buf_comp_large[i].f_array[j] = i*100+j;
buf_comp_large[i].s[j] = 'a' + (i%26);
}
- len = i%vlen+1;
+ len = i%vlen+1;
buf_comp_large[i].i_vlen.len = len;
buf_comp_large[i].i_vlen.p = (int *)calloc(len, sizeof(int));
for (j=0; j<len; j++) ((int*)(buf_comp_large[i].i_vlen.p))[j] = i*100+j;
buf_comp_large[i].s_vlen = (char *)calloc(i+2, sizeof(char));
for (j=0; j<i+1; j++) (buf_comp_large[i].s_vlen)[j] = j%26+'A';
}
-
- /* create file */
+
+ /* create file */
if (latest)
fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
else
fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- add_attrs(fid, 0);
+ add_attrs(fid, 0);
- sprintf(name, "a cmp ds of %d rows", nrows);
- did = H5Dcreate (fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
- add_attrs(did, 0);
- H5Dclose(did);
+ HDsprintf(name, "a cmp ds of %d rows", nrows);
+ did = H5Dcreate (fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
+ add_attrs(did, 0);
+ H5Dclose(did);
- // /* add attributes*/
+ // /* add attributes*/
gid1 = H5Gcreate (fid, "attributes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (nattrs<1) nattrs = 1;
- i=0;
- while (i<nattrs) i += add_attrs(gid1, i);
- H5Gclose(gid1);
-
- /* add many sub groups to a group*/
+ if (nattrs<1) nattrs = 1;
+ i=0;
+ while (i<nattrs) i += add_attrs(gid1, i);
+ H5Gclose(gid1);
+
+ /* add many sub groups to a group*/
gid1 = H5Gcreate (fid, "groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- add_attrs(gid1, 0);
+ add_attrs(gid1, 0);
for (i=0; i<ngrps; i++) {
- /* create sub groups */
- sprintf(name, "g%02d", i);
+ /* create sub groups */
+ HDsprintf(name, "g%02d", i);
gid2 = H5Gcreate (gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (i<10) add_attrs(gid2, 0);
- H5Gclose(gid2);
- }
- H5Gclose(gid1);
-
- /* add many datasets to a group */
- gid1 = H5Gcreate (fid, "datasets", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- add_attrs(gid1, 0);
+ if (i<10) add_attrs(gid2, 0);
+ H5Gclose(gid2);
+ }
+ H5Gclose(gid1);
+
+ /* add many datasets to a group */
+ gid1 = H5Gcreate (fid, "datasets", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(gid1, 0);
for (j=0; j<ndsets; j+=12) {
- /* 1 add a null dataset */
- sprintf(name, "%05d null dataset", j);
+ /* 1 add a null dataset */
+ HDsprintf(name, "%05d null dataset", j);
did = H5Dcreate (gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
- /* 2 add scalar int point */
- sprintf(name, "%05d scalar int point", j);
+ /* 2 add scalar int point */
+ HDsprintf(name, "%05d scalar int point", j);
did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 3 scalar vlen string */
- sprintf(name, "%05d scalar vlen string", j);
+ H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 3 scalar vlen string */
+ HDsprintf(name, "%05d scalar vlen string", j);
did = H5Dcreate (gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 4 add fixed-length float array */
- sprintf(name, "%05d fixed-length float array", j);
- did = H5Dcreate (gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 5 add fixed-length strings */
- sprintf(name, "%05d fixed-length strings", j);
- did = H5Dcreate (gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 6 add compound data */
- sprintf(name, "%05d compund data", j);
- did = H5Dcreate (gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 7 add 2D double */
- sprintf(name, "%05d 2D double", j);
- strcpy (tmp_name1, name);
- did = H5Dcreate (gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 8 add 1D int array */
- sprintf(name, "%05d 1D int array", j);
+ H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 4 add fixed-length float array */
+ HDsprintf(name, "%05d fixed-length float array", j);
+ did = H5Dcreate (gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 5 add fixed-length strings */
+ HDsprintf(name, "%05d fixed-length strings", j);
+ did = H5Dcreate (gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 6 add compound data */
+ HDsprintf(name, "%05d compund data", j);
+ did = H5Dcreate (gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 7 add 2D double */
+ HDsprintf(name, "%05d 2D double", j);
+ strcpy (tmp_name1, name);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 8 add 1D int array */
+ HDsprintf(name, "%05d 1D int array", j);
did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 9 add vlen int array */
- sprintf(name, "%05d vlen int array", j);
- strcpy (tmp_name2, name);
+ H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 9 add vlen int array */
+ HDsprintf(name, "%05d vlen int array", j);
+ strcpy (tmp_name2, name);
did = H5Dcreate (gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
+ H5Dwrite (did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
- /* 10 add vlen strings */
- sprintf(name, "%05d vlen strings", j);
- strcpy (tmp_name3, name);
+ /* 10 add vlen strings */
+ HDsprintf(name, "%05d vlen strings", j);
+ strcpy (tmp_name3, name);
did = H5Dcreate (gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 11 add object refs */
- H5Rcreate(&buf_ref[0],gid1, ".", H5R_OBJECT, (hid_t)-1);
- H5Rcreate(&buf_ref[1],gid1, tmp_name3, H5R_OBJECT, (hid_t)-1);
- sprintf(name, "%05d obj refs", j);
+ H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 11 add object refs */
+ H5Rcreate(&buf_ref[0],gid1, ".", H5R_OBJECT, (hid_t)-1);
+ H5Rcreate(&buf_ref[1],gid1, tmp_name3, H5R_OBJECT, (hid_t)-1);
+ HDsprintf(name, "%05d obj refs", j);
did = H5Dcreate (gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 12 add region refs */
- H5Sselect_elements (sid_2d, H5S_SELECT_SET, 4, coords[0]);
- H5Rcreate(&buf_reg_ref[0],gid1, tmp_name1, H5R_DATASET_REGION, sid_2d);
- H5Sselect_none(sid_2d);
- count = dims[0]/2+1;
- H5Sselect_hyperslab (sid_1d, H5S_SELECT_SET, &start, &stride, &count,NULL);
- H5Rcreate(&buf_reg_ref[1],gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
- H5Sselect_none(sid_1d);
- sprintf(name, "%05d region refs", j);
+ H5Dwrite (did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 12 add region refs */
+ H5Sselect_elements (sid_2d, H5S_SELECT_SET, 4, coords[0]);
+ H5Rcreate(&buf_reg_ref[0],gid1, tmp_name1, H5R_DATASET_REGION, sid_2d);
+ H5Sselect_none(sid_2d);
+ count = dims[0]/2+1;
+ H5Sselect_hyperslab (sid_1d, H5S_SELECT_SET, &start, &stride, &count,NULL);
+ H5Rcreate(&buf_reg_ref[1],gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
+ H5Sselect_none(sid_1d);
+ HDsprintf(name, "%05d region refs", j);
did = H5Dcreate (gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
- }
- H5Gclose(gid1);
-
+ H5Dwrite (did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+ }
+ H5Gclose(gid1);
+
H5Tclose (tid_array_f);
H5Tclose (tid_vlen_i);
H5Tclose (tid_vlen_s);
@@ -447,22 +447,22 @@ herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
H5Fclose (fid);
for (i=0; i<dims[0]; i++) {
- if (buf_vlen_i[i].p) free(buf_vlen_i[i].p);
- if (buf_vlen_s[i]) free(buf_vlen_s[i]);
- }
+ if (buf_vlen_i[i].p) free(buf_vlen_i[i].p);
+ if (buf_vlen_s[i]) free(buf_vlen_s[i]);
+ }
for (i=0; i<nrows; i++) {
- if (buf_comp_large[i].i_vlen.p) free(buf_comp_large[i].i_vlen.p);
- if (buf_comp_large[i].s_vlen) free(buf_comp_large[i].s_vlen);
- }
-
+ if (buf_comp_large[i].i_vlen.p) free(buf_comp_large[i].i_vlen.p);
+ if (buf_comp_large[i].s_vlen) free(buf_comp_large[i].s_vlen);
+ }
+
free (buf_comp);
free (buf_comp_large);
free (buf_int);
free (buf_float_a);
free (buf_double2d[0]);
free (buf_double2d);
- free (buf_str);
+ free (buf_str);
free(buf_vlen_i);
free(buf_vlen_s);
@@ -470,34 +470,34 @@ herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
}
/* add a single attribute */
-int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf)
+int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf)
{
hid_t aid;
aid = H5Acreate (oid, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- if (aid <0)
- return 0;
-
- H5Awrite(aid, tid, buf);
+ if (aid <0)
+ return 0;
+
+ H5Awrite(aid, tid, buf);
H5Aclose(aid);
-
- return 1;
+
+ return 1;
}
-/*
+/*
adds different types of attributes to an object.
-
- returns the number of attributes added to the objects.
+
+ returns the number of attributes added to the objects.
*/
-int add_attrs(hid_t oid, int idx)
+int add_attrs(hid_t oid, int idx)
{
char name[32];
int i0, i1, i2, j, nattrs=0;
- hid_t aid, tid, tid1, sid;
+ hid_t aid, tid, tid1, sid;
hvl_t i_vlen[4];
- hobj_ref_t ref;
- zipcode_t cmp_data[4];
+ hobj_ref_t ref;
+ zipcode_t cmp_data[4];
unsigned int i = 0xffffffff;
long long l = -2147483647;
float f = 123456789.987654321;
@@ -505,22 +505,22 @@ int add_attrs(hid_t oid, int idx)
char *s[7] = {"Parting", "is such", "sweeter", "sorrow."};
float f_array[4] = {1.0, 2.22, 3.333, 4.444};
char *s_vlen[4] = {"Parting", "is such", "sweet", "sorrow."};
- hsize_t dims1[1]={1}, dims2[1]={4}, dims3[2]={3,5};
- int int3d[4][3][5];
- size_t offset = 0;
-
- for (i0=0; i0<4; i0++) {
- i_vlen[i0].len = (i0+1);
- i_vlen[i0].p = (int *)calloc(i_vlen[i0].len, sizeof(int));
- for (j=0; j<i_vlen[i0].len; j++)
- ((int *)i_vlen[i0].p)[j] = i0*100+j;
- for (i1=0; i1<3; i1++) {
- for (i2=0; i2<5; i2++)
- int3d[i0][i1][i2] = i0*i1-i1*i2+i0*i2;
- }
+ hsize_t dims1[1]={1}, dims2[1]={4}, dims3[2]={3,5};
+ int int3d[4][3][5];
+ size_t offset = 0;
+
+ for (i0=0; i0<4; i0++) {
+ i_vlen[i0].len = (i0+1);
+ i_vlen[i0].p = (int *)calloc(i_vlen[i0].len, sizeof(int));
+ for (j=0; j<i_vlen[i0].len; j++)
+ ((int *)i_vlen[i0].p)[j] = i0*100+j;
+ for (i1=0; i1<3; i1++) {
+ for (i2=0; i2<5; i2++)
+ int3d[i0][i1][i2] = i0*i1-i1*i2+i0*i2;
+ }
}
- cmp_data[0].zipcode = 01001;
+ cmp_data[0].zipcode = 01001;
cmp_data[0].city = "Agawam, Massachusetts";
cmp_data[1].zipcode = 99950;
cmp_data[1].city = "Ketchikan, Alaska";
@@ -528,82 +528,82 @@ int add_attrs(hid_t oid, int idx)
cmp_data[2].city = "Holtsville, New York";
cmp_data[3].zipcode = 61820;
cmp_data[3].city = "Champaign, Illinois";
-
- /* 1 scalar point */
- sid = H5Screate (H5S_SCALAR);
- sprintf(name, "%05d scalar int", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
- sprintf(name, "%05d scalar ulong", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
- sprintf(name, "%05d scalar str", idx);
- tid = H5Tcopy (H5T_C_S1);
+
+ /* 1 scalar point */
+ sid = H5Screate (H5S_SCALAR);
+ HDsprintf(name, "%05d scalar int", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
+ HDsprintf(name, "%05d scalar ulong", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
+ HDsprintf(name, "%05d scalar str", idx);
+ tid = H5Tcopy (H5T_C_S1);
H5Tset_size (tid, H5T_VARIABLE);
- nattrs += add_attr(oid, name, tid, sid, &s[2]);
- H5Tclose(tid);
- H5Sclose(sid);
+ nattrs += add_attr(oid, name, tid, sid, &s[2]);
+ H5Tclose(tid);
+ H5Sclose(sid);
- /* 4 single point */
- sid = H5Screate_simple (1, dims1, NULL);
+ /* 4 single point */
+ sid = H5Screate_simple (1, dims1, NULL);
H5Rcreate(&ref, oid, ".", H5R_OBJECT, (hid_t)-1);
- sprintf(name, "%05d single float", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
- sprintf(name, "%05d single double", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
- sprintf(name, "%05d single obj_ref", idx);
- nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
- H5Sclose(sid);
-
- /* 7 fixed length 1D array */
- sid = H5Screate_simple (1, dims1, NULL);
- tid = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims2);
- sprintf(name, "%05d array float", idx);
+ HDsprintf(name, "%05d single float", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
+ HDsprintf(name, "%05d single double", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
+ HDsprintf(name, "%05d single obj_ref", idx);
+ nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
+ H5Sclose(sid);
+
+ /* 7 fixed length 1D array */
+ sid = H5Screate_simple (1, dims1, NULL);
+ tid = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims2);
+ HDsprintf(name, "%05d array float", idx);
nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
- H5Tclose(tid);
- tid = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid, strlen(s[0])+1);
- tid1 = H5Tarray_create (tid, 1, dims2);
- sprintf(name, "%05d array str", idx);
- nattrs += add_attr(oid, name, tid1, sid, s);
- H5Tclose(tid1);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 9 fixed length 2D int arrays */
- sid = H5Screate_simple (1, dims2, NULL);
- tid = H5Tarray_create (H5T_NATIVE_INT, 2, dims3);
- sprintf(name, "%05d array int 2D", idx);
+ H5Tclose(tid);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, strlen(s[0])+1);
+ tid1 = H5Tarray_create (tid, 1, dims2);
+ HDsprintf(name, "%05d array str", idx);
+ nattrs += add_attr(oid, name, tid1, sid, s);
+ H5Tclose(tid1);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 9 fixed length 2D int arrays */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tarray_create (H5T_NATIVE_INT, 2, dims3);
+ HDsprintf(name, "%05d array int 2D", idx);
nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 10 variable length arrays */
- sid = H5Screate_simple (1, dims2, NULL);
- tid = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid, H5T_VARIABLE);
- sprintf(name, "%05d vlen strings", idx);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 10 variable length arrays */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, H5T_VARIABLE);
+ HDsprintf(name, "%05d vlen strings", idx);
nattrs += add_attr(oid, name, tid, sid, s_vlen);
- H5Tclose(tid);
- tid = H5Tvlen_create (H5T_NATIVE_INT);;
- sprintf(name, "%05d vlen int array", idx);
+ H5Tclose(tid);
+ tid = H5Tvlen_create (H5T_NATIVE_INT);;
+ HDsprintf(name, "%05d vlen int array", idx);
nattrs += add_attr(oid, name, tid, sid, i_vlen);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 12 compound data */
- sid = H5Screate_simple (1, dims2, NULL);
- tid = H5Tcreate (H5T_COMPOUND, sizeof (zipcode_t));
- tid1 = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid1, H5T_VARIABLE);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 12 compound data */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tcreate (H5T_COMPOUND, sizeof (zipcode_t));
+ tid1 = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid1, H5T_VARIABLE);
H5Tinsert (tid, "zip code", 0, H5T_NATIVE_INT); offset += sizeof(H5T_NATIVE_INT);
H5Tinsert (tid, "City", offset, tid1); offset += sizeof(char *);
- sprintf(name, "%05d compound data", idx);
+ HDsprintf(name, "%05d compound data", idx);
nattrs += add_attr(oid, name, tid, sid, cmp_data);
- H5Tclose(tid1);
- H5Tclose(tid);
- H5Sclose(sid);
-
- for (i0=0; i0<4; i0++)
- free(i_vlen[i0].p);
-
- return nattrs;
+ H5Tclose(tid1);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ for (i0=0; i0<4; i0++)
+ free(i_vlen[i0].p);
+
+ return nattrs;
}
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 08ebfc7..944674d 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -51,7 +51,7 @@ int main(void)
int result = 0;
herr_t error = 1;
- printf("%-70s", "Testing alignment in compound datatypes");
+ HDprintf("%-70s", "Testing alignment in compound datatypes");
strcpy(string5, "Hi!");
HDunlink(fname);
@@ -145,7 +145,7 @@ out:
result = 1;
mname = H5Tget_member_name(fix, 0);
- printf("%14s (%2d) %6s = %s\n",
+ HDprintf("%14s (%2d) %6s = %s\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0),
string5, (char *)(data + H5Tget_member_offset(fix, 0)));
if(mname)
@@ -153,7 +153,7 @@ out:
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
mname = H5Tget_member_name(fix, 1);
- printf("Data comparison:\n"
+ HDprintf("Data comparison:\n"
"%14s (%2d) %6f = %f\n"
" %6f = %f\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,1),
@@ -164,7 +164,7 @@ out:
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 2)));
mname = H5Tget_member_name(fix, 2);
- printf("%14s (%2d) %6f = %f\n"
+ HDprintf("%14s (%2d) %6f = %f\n"
" %6f = %6f\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,2),
(double)fnok[0], (double)fptr[0],
@@ -173,7 +173,7 @@ out:
H5free_memory(mname);
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
- printf("\n"
+ HDprintf("\n"
"Short circuit\n"
" %6f = %f\n"
" %6f = %f\n"
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index 1d52471..34b8a2d 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -64,13 +64,13 @@
#define H5FATAL 1
#define VRFY(val, mesg, fatal) do { \
if (!val) { \
- printf("Proc %d: ", mynod); \
+ printf("Proc %d: ", mynod); \
printf("*** Assertion failed (%s) at line %4d in %s\n", \
- mesg, (int)__LINE__, __FILE__); \
- if (fatal){ \
- fflush(stdout); \
- goto die_jar_jar_die; \
- } \
+ mesg, (int)__LINE__, __FILE__); \
+ if (fatal){ \
+ fflush(stdout); \
+ goto die_jar_jar_die; \
+ } \
} \
} while(0)
#define RANK 1
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index ed15fa5..aefd2b3 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -264,7 +264,7 @@ done:
case HDF5:
if (fd.h5fd != -1)
hrc = do_fclose(iot, &fd);
- break;
+ break;
default:
/* unknown request */
HDassert(0 && "Unknown IO type");
@@ -685,7 +685,7 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer)
VRFY((hrc >= 0), "H5Dwrite");
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
@@ -863,7 +863,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
@@ -987,7 +987,7 @@ dset_read(int local_dim, file_descr *fd, parameters *parms, void *buffer,
h5dset_space_id, h5dxpl, buffer);
VRFY((hrc >= 0), "H5Dread");
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
@@ -1114,7 +1114,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
GOTOERROR(FAIL);
}
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type);
@@ -1242,7 +1242,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
fd->h5fd = -1;
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);