summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr_dsetops_writer.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-17 21:19:24 (GMT)
committerGitHub <noreply@github.com>2021-06-17 21:19:24 (GMT)
commita00ad2b657b7918d4b11edee893f6701cf50e351 (patch)
tree345a6fa6c006bb564ffe53074acbd90f7611441b /test/vfd_swmr_dsetops_writer.c
parenta7f729581b1955479255f59337481d30ff17295f (diff)
downloadhdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.zip
hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.gz
hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.bz2
VFD SWMR: Normalization with develop (#765)
* Brings CMake updates from develop * Brings reduction in pedantic casts from develop * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Formatted source * Bring over some VOL registration changes * VOL cleanup * H5VL_request_status_t substitutions * H5F.c cleanup * Minor API tweaks from develop * Moves H5G package init/teardown to H5Gint.c * H5G cleanup * H5M cleanup * H5SM cleanup * H5T cleanup * H5R cleanup * H5Lpublic.h cleanup * H5L cleanup * H5O cleanup * H5A, H5CS, and H5AC cleanup * Moved H5A init/teardown code to H5Aint.c * Moves H5D I/O functions to H5D.c * H5D cleanup * Misc minor cleanup * H5P close cleanup * H5Tpublic.h cleanup * Fixes err_compat test * H5PLpublic.h cleanup * Updates H5Ppublic.h * H5Fpublic.h updates * H5A.c cleanup * Brings over H5Aexists and related changes * Brings CMake shell testing changes from develop * Close callback changes * H5R and H5Tcommit normalization * err_compat test works now * H5O tweaks * Updates VOL registration code * Brings over H5VL_create_object * H5Tconv.c reformatting * H5T.c tweaks * Brings datatype and reference updates from develop * Brings VOL plugin loading changes from develop * Brings event sets from develop * Brings async functions over * Tools changes * Brings over many tools changes from develop * Brings VOL flags from develop * Fixes h5dump double/float tests * Updates h5repack tests * Brings h5diff test changes from develop * Last h5dump changes * Brings test changes from develop * Committing clang-format changes * Tidied h5_testing() * Brings chunk iteration code + misc from develop * Updates vds test * Enables external link parallel test * Brings updated property lists from develop * H5G changes from develop * H5MF cleanup * Brings vfd_swmr test back into CMake * Updates threadsafe test * Updates plist test * Brings recent changes from develop * Require a C++11 compiler to build the C++ wrappers (#693) * Committing clang-format changes * Requires a C++11 compiler to build the C++ wrappers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699) * Removes pre-C99 build and header cruft (#700) * Assumes ANSI C headers exist * Assumes stdbool.h, stdint.h, and inttypes.h are present * Assumes the C++ compiler can handle stdint.h * Removes all work-arounds for missing functionality, especially stdbool.h Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates release documents * Brings parallel changes from develop * Adds a VFD/parallel check program for the VFD SWMR shell test * Updates MANIFEST * Disable building VFD SWMR acceptance tests on CMake * Removes err.h from genall5.c * Partial cleanup of H5Cpkg.h * Fixes printf specifiers in H5Cdbg.c * Java and fortran cmake changes (#694) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string * Some Javadoc warning fixes * Updated javadoc fixes * # WARNING: head commit changed in the meantime HDFFV-11229 Fix long double usage in tools and java Changed h5dump and h5ls to just print 128-bit for long double type. Added test and file for dataset and attributes with all three float types. * Committing clang-format changes * HDFFV-11229 Add release note * HDFFV-11229 windows testfile needed * fix typo * Remove non supported message text * HDFFV-11229 - change ldouble test to check both native and general * HDFFV-11229 add second file compare * HDFFV-11229 fix reference file * HDFFV-11229 autotools check two refs * HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output * Committing clang-format changes * Update release note * Update attribute type of ref file * Change source of ninja for macs * try port instead of brew * Recommended is to use brew. * Undo non long double changes * remove unneeded file * Fix perl and doxygen CMake code * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument * Add stamp files to BYPRODUCTS * Only one copy of file exists * Fix custom cmmand depends targets * Fix fortran custom command DEPENDS * Add LD_LIBRARY_PATH to tests * Add custom target for DEPENDS * Add h5detect conditionaly to generated target DEPENDS * Correct DEPENDS targets * Parallel builds need the mpi compiler for pkgconfig scripts. * install only if MPI build * Fortran target depends * Remove incorrect source attribute * doxygen adjustments * doxygen build updates * Correct version * Correct function version - function has been merged to 1.12 * Correct version string for map functions * Cleanup warnings for tools debug builds * TRILAB-227 - fix indexing for h5diff selections * Correct location of pos to index function call * TRILAB-227 Enable test * Quote subset args * Use MATCHES because of AppleClang * if blocks needed for build modes * Update list of DT platforms * VS2019 correctly displays float values * revert VS2019 change * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * Java reference functions updated enabled fortran in cmake gcc action yaml file java reference test changed to correctly test refs jni reference functions that create ids changed to use jni id logging * Correct BYPRODUCTS argument * Correct more genereated files BYPRODUCTS * BYPRODUCTS must have unique locations * Fix typo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Split H5L.c internal code to H5Lint.c (#691) * Committing clang-format changes * Splits internal parts of H5L.c to H5Lint.c Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Clean up type size checks in configure.ac (#702) * Committing clang-format changes * C++ warning and build fixes (#707) * Committing clang-format changes * C++ build and warning updates * Fixes all warnings on C++ (with gcc 9.3) * Updates CMake and Autotools C++ builds * Undo warning clobber Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes some DEC Alpha cruft from H5detect and H5private.h (#708) * Cleans up hsize_t and haddr_t size guessing (#709) * Cleans up definitions of haddr_t and hsize_t + cruft removal * Formatted source * Updates PGI C/C++ configurations (#715) * Updates PGI C/C++ configurations Tweaks some settings and configures pgc++ to use C++11 * Updated copyright information * Adds an Intel C++ configuration file (#716) * Adds an Intel C++ configuration file * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates bin/trace script to correctly wrap H5TRACE macros near clang-format column limit (#719) * Removes clang-format comments from H5O.c call * Fixes bin/trace to correctly wrap lines near the clang-format limit * Removed unused variable from bin/trace * Fixes issue with ccmake that prevents building Fortran (#723) ccmake runs iteratively, and the check_fortran_source_runs macros were clobbering a single output file that did not get updated on further configure iterations * Updates CMake size_t and ssize_t checks for MacOS * Moved a little boilerplate over from develop * Fixes some warnings * Committing clang-format changes * Moves gcc warning macros from H5public.h to H5private.h (#724) * Moves gcc warning suppression macros out of H5public.h * Update RELEASE.txt * Formatted source * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726) * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ Allows C++ library to be built on older versions of gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Moves H5PacketTable default ctor inside source file (#731) * Brings (most) H5Xdevelop.h headers from develop * Trivial H5F and H5O changes during normalization * Renames buf_ptr back to page_buf to better align with develop * Removed H5HGtrap.c * Brings changes from develop * Normalization (mainly cache) with develop * Fix Direct VFD Testing in CMake (#742) * Fixes C++ warnings when passing hsize_t values to printf in test code (#745) * Organize and align compiler flags (#741) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string * Some Javadoc warning fixes * Updated javadoc fixes * # WARNING: head commit changed in the meantime HDFFV-11229 Fix long double usage in tools and java Changed h5dump and h5ls to just print 128-bit for long double type. Added test and file for dataset and attributes with all three float types. * Committing clang-format changes * HDFFV-11229 Add release note * HDFFV-11229 windows testfile needed * fix typo * Remove non supported message text * HDFFV-11229 - change ldouble test to check both native and general * HDFFV-11229 add second file compare * HDFFV-11229 fix reference file * HDFFV-11229 autotools check two refs * HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output * Committing clang-format changes * Update release note * Update attribute type of ref file * Change source of ninja for macs * try port instead of brew * Recommended is to use brew. * Undo non long double changes * remove unneeded file * Fix perl and doxygen CMake code * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument * Add stamp files to BYPRODUCTS * Only one copy of file exists * Fix custom cmmand depends targets * Fix fortran custom command DEPENDS * Add LD_LIBRARY_PATH to tests * Add custom target for DEPENDS * Add h5detect conditionaly to generated target DEPENDS * Correct DEPENDS targets * Parallel builds need the mpi compiler for pkgconfig scripts. * install only if MPI build * Fortran target depends * Remove incorrect source attribute * doxygen adjustments * doxygen build updates * Correct version * Correct function version - function has been merged to 1.12 * Correct version string for map functions * Cleanup warnings for tools debug builds * TRILAB-227 - fix indexing for h5diff selections * Correct location of pos to index function call * TRILAB-227 Enable test * Quote subset args * Use MATCHES because of AppleClang * if blocks needed for build modes * Update list of DT platforms * VS2019 correctly displays float values * revert VS2019 change * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * Java reference functions updated enabled fortran in cmake gcc action yaml file java reference test changed to correctly test refs jni reference functions that create ids changed to use jni id logging * Correct BYPRODUCTS argument * Correct more genereated files BYPRODUCTS * BYPRODUCTS must have unique locations * Fix typo * Fix fortran configure checks * Rework H5_PAC_C_MAX_REAL_PRECISION setting logic * Add note about fortran configure change * Adds a quick for for some egregious chunk_info badness (#722) * Fixes issue with ccmake that prevents building Fortran (#723) ccmake runs iteratively, and the check_fortran_source_runs macros were clobbering a single output file that did not get updated on further configure iterations * Fix conflicts with merge * Move MAX_PRECISION back to HDF5UseFortran.cmake * Use STREQUAL to test macro argument * Move C language test to ConfigureChecks from HDF5UseFortran * MAX_PRECISION defines must be defined * Organize flags and align autotools and cmake * Fix comment in no-error-general warnings files. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Committing clang-format changes * Cache code tidying * Constification of cache code * Renaming of static calls in cache * Fixes H5C mess made by git during merge * Committing clang-format changes * Fixes a printf format issue w/ parallel * Revert "Committing clang-format changes" This reverts commit 1265fe87fec6589f029cf3b1de6d586c90168654. * Turns off clang formatter in H5C while syncing with develop * Adds a lot of HD prefixes and cleans up err.h usage * Committing clang-format changes * Brings cache skip list optimization from develop * Brings recent changes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/vfd_swmr_dsetops_writer.c')
-rw-r--r--test/vfd_swmr_dsetops_writer.c356
1 files changed, 178 insertions, 178 deletions
diff --git a/test/vfd_swmr_dsetops_writer.c b/test/vfd_swmr_dsetops_writer.c
index cbe78c6..78d540e 100644
--- a/test/vfd_swmr_dsetops_writer.c
+++ b/test/vfd_swmr_dsetops_writer.c
@@ -169,42 +169,42 @@ static const hid_t badhid = H5I_INVALID_HID;
static void
usage(const char *progname)
{
- fprintf(stderr,
- "usage: %s \n"
- " [-p] [-e elmts] [-o]\n"
- " [-g] [-k] [-m rows] [-n cols]\n"
- " [-s swrites] [-r rwrites] [-l lwrites] [-w writes]\n"
- " [-u nticks] [-c csteps] [-S] [-N] [-q] [-b]\n"
- "\n"
- "-p: create a dataset with compact layout\n"
- "-e elmts: # of <elmts> for the compact dataset\n"
- " (default is 16380)\n"
- "-t: perform write to the compact dataset\n"
- "-g: create a dataset with contiguous layout\n"
- "-k: create 5 datasets with chunked layout for the 5 indexing types\n"
- "-m rows: # of <rows> rows for the contiguous and/or chunked datasets\n"
- "-n cols: # of <cols> columns for the contiguous and/or chunked datasets\n"
- "-s swrites: perform sequential writes to all datasets\n"
- "-r rwrites: perform random writes to all datasets\n"
- "-l lwrites: perform hyperslab writes to all datasets\n"
- " # of rows to write: every other element is selected per row\n"
- "-w wwrites: perform raw data modifications to all datasets\n"
- "-u nticks: `nticks` ticks for the reader to wait before verification\n"
- " (default is 4)\n"
- "-c csteps: `csteps` steps communication interval between reader and writer\n"
- " (default is 1)\n"
- "-S: do not use VFD SWMR\n"
- "-N: do not use named pipes for test synchronization\n"
- "-q: silence printouts, few messages\n"
- "-b: write data in big-endian byte order\n"
- " (default is H5T_NATIVE_UINT32)\n\n"
- "Note:\n"
- "1. Require to specify at least -p, -g or -k option\n"
- "2. -c <csteps> option cannot exceed -s <swrites> or -r <rwrites>\n"
- " or -l <lwrites> or -w <wwrites> option\n"
- "\n",
- progname);
- exit(EXIT_FAILURE);
+ HDfprintf(stderr,
+ "usage: %s \n"
+ " [-p] [-e elmts] [-o]\n"
+ " [-g] [-k] [-m rows] [-n cols]\n"
+ " [-s swrites] [-r rwrites] [-l lwrites] [-w writes]\n"
+ " [-u nticks] [-c csteps] [-S] [-N] [-q] [-b]\n"
+ "\n"
+ "-p: create a dataset with compact layout\n"
+ "-e elmts: # of <elmts> for the compact dataset\n"
+ " (default is 16380)\n"
+ "-t: perform write to the compact dataset\n"
+ "-g: create a dataset with contiguous layout\n"
+ "-k: create 5 datasets with chunked layout for the 5 indexing types\n"
+ "-m rows: # of <rows> rows for the contiguous and/or chunked datasets\n"
+ "-n cols: # of <cols> columns for the contiguous and/or chunked datasets\n"
+ "-s swrites: perform sequential writes to all datasets\n"
+ "-r rwrites: perform random writes to all datasets\n"
+ "-l lwrites: perform hyperslab writes to all datasets\n"
+ " # of rows to write: every other element is selected per row\n"
+ "-w wwrites: perform raw data modifications to all datasets\n"
+ "-u nticks: `nticks` ticks for the reader to wait before verification\n"
+ " (default is 4)\n"
+ "-c csteps: `csteps` steps communication interval between reader and writer\n"
+ " (default is 1)\n"
+ "-S: do not use VFD SWMR\n"
+ "-N: do not use named pipes for test synchronization\n"
+ "-q: silence printouts, few messages\n"
+ "-b: write data in big-endian byte order\n"
+ " (default is H5T_NATIVE_UINT32)\n\n"
+ "Note:\n"
+ "1. Require to specify at least -p, -g or -k option\n"
+ "2. -c <csteps> option cannot exceed -s <swrites> or -r <rwrites>\n"
+ " or -l <lwrites> or -w <wwrites> option\n"
+ "\n",
+ progname);
+ HDexit(EXIT_FAILURE);
} /* usage() */
/*
@@ -221,7 +221,7 @@ state_init(state_t *s, int argc, char **argv)
*s = ALL_HID_INITIALIZER;
if (H5_basename(argv[0], &tfile) < 0) {
- printf("H5_basename failed\n");
+ HDprintf("H5_basename failed\n");
TEST_ERROR;
}
@@ -272,17 +272,17 @@ state_init(state_t *s, int argc, char **argv)
case 'u': /* ticks for raeder to wait before verification */
case 'c': /* communication interval */
errno = 0;
- tmp = strtoul(optarg, &end, 0);
+ tmp = HDstrtoul(optarg, &end, 0);
if (end == optarg || *end != '\0') {
- printf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
+ HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
TEST_ERROR;
}
else if (errno != 0) {
- printf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
+ HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
TEST_ERROR;
}
else if (tmp > UINT_MAX) {
- printf("`-%c` argument `%lu` too large\n", ch, tmp);
+ HDprintf("`-%c` argument `%lu` too large\n", ch, tmp);
TEST_ERROR;
}
@@ -318,44 +318,44 @@ state_init(state_t *s, int argc, char **argv)
/* Require to specify at least -p or -g or -k option */
if (!s->compact && !s->contig && !s->chunked) {
- printf("Require to specify at least -p or -g or -k option\n");
+ HDprintf("Require to specify at least -p or -g or -k option\n");
usage(s->progname);
goto error;
}
/* -e <elmts> */
if (s->compact_elmts > MAX_COMPACT_ELMS) {
- printf("size of compact dataset cannot exceed 16380 elements\n");
+ HDprintf("size of compact dataset cannot exceed 16380 elements\n");
TEST_ERROR;
}
/* -c <csteps> cannot be zero */
if (!s->csteps) {
- printf("communication interval cannot be zero\n");
+ HDprintf("communication interval cannot be zero\n");
TEST_ERROR;
}
/* -c <csteps> and -s <swrites> options */
if (s->swrites && s->csteps > s->swrites) {
- printf("communication interval with sequential writes is out of bounds\n");
+ HDprintf("communication interval with sequential writes is out of bounds\n");
TEST_ERROR;
}
/* -c <csteps> and -r <rwrites> options */
if (s->rwrites && s->csteps > s->rwrites) {
- printf("communication interval with random writes is out of bounds\n");
+ HDprintf("communication interval with random writes is out of bounds\n");
TEST_ERROR;
}
/* -c <csteps> and -l <lwrites> options */
if (s->lwrites && s->csteps > s->lwrites) {
- printf("communication interval with hyperslab writes is out of bounds\n");
+ HDprintf("communication interval with hyperslab writes is out of bounds\n");
TEST_ERROR;
}
/* -c <csteps> and -w <wwrites> options */
if (s->wwrites && s->csteps > s->wwrites) {
- printf("communication interval with raw data modification is out of bounds\n");
+ HDprintf("communication interval with raw data modification is out of bounds\n");
TEST_ERROR;
}
@@ -382,12 +382,12 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Create the named datatype that will be used by compact and contiguous datasets */
if ((dtid = H5Tcopy(s->filetype)) < 0) {
- printf("H5Tcopy failed\n");
+ HDprintf("H5Tcopy failed\n");
TEST_ERROR;
}
if (H5Tcommit2(s->file, "named_dtype", dtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
- printf("H5Tcommit2 failed\n");
+ HDprintf("H5Tcommit2 failed\n");
TEST_ERROR;
}
@@ -396,11 +396,11 @@ create_dsets(const state_t *s, dsets_state_t *ds)
hsize_t dims[1];
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_layout(dcpl, H5D_COMPACT) < 0) {
- printf("H5Pset_layout failed\n");
+ HDprintf("H5Pset_layout failed\n");
TEST_ERROR;
}
@@ -408,19 +408,19 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Dataspace for compact dataset */
if ((ds->compact_sid = H5Screate_simple(1, dims, dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
/* Create the compact dataset with named datatype */
if ((ds->compact_did = H5Dcreate2(s->file, DSET_COMPACT_NAME, dtid, ds->compact_sid, H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 compact dataset failed\n");
+ HDprintf("H5Dcreate2 compact dataset failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
}
@@ -434,29 +434,29 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Dataspace for contiguous dataset */
if ((ds->contig_sid = H5Screate_simple(2, dims, dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_layout(dcpl, H5D_CONTIGUOUS) < 0) {
- printf("H5Pset_layout failed\n");
+ HDprintf("H5Pset_layout failed\n");
TEST_ERROR;
}
/* Create the contiguous dataset with the named datatype */
if ((ds->contig_did = H5Dcreate2(s->file, DSET_CONTIG_NAME, dtid, ds->contig_sid, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 contiguous dataset failed\n");
+ HDprintf("H5Dcreate2 contiguous dataset failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
}
@@ -475,12 +475,12 @@ create_dsets(const state_t *s, dsets_state_t *ds)
chunk_dims[1] = MAX(1, s->cols / 2);
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_layout(dcpl, H5D_CHUNKED) < 0) {
- printf("H5Pset_layout failed\n");
+ HDprintf("H5Pset_layout failed\n");
TEST_ERROR;
}
@@ -488,19 +488,19 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, dims=max_dims=chunk_dims */
if (H5Pset_chunk(dcpl, 2, dims) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
if ((ds->single_sid = H5Screate_simple(2, dims, dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
/* Create the chunked dataset (single index) with the named datatype */
if ((ds->single_did = H5Dcreate2(s->file, DSET_SINGLE_NAME, dtid, ds->single_sid, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 chunked dataset:single index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset:single index failed\n");
TEST_ERROR;
}
@@ -508,29 +508,29 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, dims=max_dims, early allocation */
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) {
- printf("H5Pset_alloc_time\n");
+ HDprintf("H5Pset_alloc_time\n");
TEST_ERROR;
}
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
if ((ds->implicit_sid = H5Screate_simple(2, dims, dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
/* Create the chunked dataset (implicit index) with the named datatype */
if ((ds->implicit_did = H5Dcreate2(s->file, DSET_IMPLICIT_NAME, dtid, ds->implicit_sid, H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 chunked dataset:implicit index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset:implicit index failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
@@ -538,12 +538,12 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, fixed max_dims */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
@@ -551,14 +551,14 @@ create_dsets(const state_t *s, dsets_state_t *ds)
max_dims[1] = dims[1] + 10;
if ((ds->fa_sid = H5Screate_simple(2, dims, max_dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
/* Create the chunked dataset (fixed array index) with the named datatype */
if ((ds->fa_did =
H5Dcreate2(s->file, DSET_FA_NAME, dtid, ds->fa_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreaet2 chunked dataset: fa index failed\n");
+ HDprintf("H5Dcreaet2 chunked dataset: fa index failed\n");
TEST_ERROR;
}
@@ -567,14 +567,14 @@ create_dsets(const state_t *s, dsets_state_t *ds)
max_dims[1] = H5S_UNLIMITED;
if ((ds->ea_sid = H5Screate_simple(2, dims, max_dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
/* Create the chunked dataset (extensible array index) with the named datatype */
if ((ds->ea_did =
H5Dcreate2(s->file, DSET_EA_NAME, dtid, ds->ea_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 chunked dataset: ea index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset: ea index failed\n");
TEST_ERROR;
}
@@ -583,25 +583,25 @@ create_dsets(const state_t *s, dsets_state_t *ds)
max_dims[0] = H5S_UNLIMITED;
if ((ds->bt2_sid = H5Screate_simple(2, dims, max_dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
/* Create the chunked dataset (btree2 index) with the named datatype */
if ((ds->bt2_did =
H5Dcreate2(s->file, DSET_BT2_NAME, dtid, ds->bt2_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 chunked dataset: bt2 index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset: bt2 index failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
}
if (H5Tclose(dtid) < 0) {
- printf("H5Tclose failed\n");
+ HDprintf("H5Tclose failed\n");
TEST_ERROR;
}
@@ -643,7 +643,7 @@ open_dsets(const state_t *s, dsets_state_t *ds)
if (s->compact) {
if (!open_dset_real(s, &ds->compact_did, &ds->compact_sid, DSET_COMPACT_NAME)) {
- printf("open_dset_real() for compact dataset failed\n");
+ HDprintf("open_dset_real() for compact dataset failed\n");
TEST_ERROR;
}
}
@@ -651,7 +651,7 @@ open_dsets(const state_t *s, dsets_state_t *ds)
if (s->contig) {
if (!open_dset_real(s, &ds->contig_did, &ds->contig_sid, DSET_CONTIG_NAME)) {
- printf("open_dset_real() for contiguous dataset failed\n");
+ HDprintf("open_dset_real() for contiguous dataset failed\n");
TEST_ERROR;
}
}
@@ -659,27 +659,27 @@ open_dsets(const state_t *s, dsets_state_t *ds)
if (s->chunked) {
if (!open_dset_real(s, &ds->single_did, &ds->single_sid, DSET_SINGLE_NAME)) {
- printf("open_dset_real() for chunked dataset: single index failed\n");
+ HDprintf("open_dset_real() for chunked dataset: single index failed\n");
TEST_ERROR;
}
if (!open_dset_real(s, &ds->implicit_did, &ds->implicit_sid, DSET_IMPLICIT_NAME)) {
- printf("open_dset_real() for chunked dataset: implicit index failed\n");
+ HDprintf("open_dset_real() for chunked dataset: implicit index failed\n");
TEST_ERROR;
}
if (!open_dset_real(s, &ds->fa_did, &ds->fa_sid, DSET_FA_NAME)) {
- printf("open_dset_real() for chunked dataset: fa index failed\n");
+ HDprintf("open_dset_real() for chunked dataset: fa index failed\n");
TEST_ERROR;
}
if (!open_dset_real(s, &ds->ea_did, &ds->ea_sid, DSET_EA_NAME)) {
- printf("open_dset_real() for chunked dataset: ea index failed\n");
+ HDprintf("open_dset_real() for chunked dataset: ea index failed\n");
TEST_ERROR;
}
if (!open_dset_real(s, &ds->bt2_did, &ds->bt2_sid, DSET_BT2_NAME)) {
- printf("open_dset_real() for chunked dataset: bt2 index failed\n");
+ HDprintf("open_dset_real() for chunked dataset: bt2 index failed\n");
TEST_ERROR;
}
}
@@ -701,12 +701,12 @@ open_dset_real(const state_t *s, hid_t *did, hid_t *sid, const char *name)
hsize_t dims[2];
if ((*did = H5Dopen2(s->file, name, H5P_DEFAULT)) < 0) {
- printf("H5Dopen dataset failed\n");
+ HDprintf("H5Dopen dataset failed\n");
TEST_ERROR;
}
if ((*sid = H5Dget_space(*did)) < 0) {
- printf("H5Dget_space failed\n");
+ HDprintf("H5Dget_space failed\n");
TEST_ERROR;
}
if (H5Sget_simple_extent_dims(*sid, dims, NULL) < 0)
@@ -743,37 +743,37 @@ static bool
close_dsets(const dsets_state_t *ds)
{
if (!close_dset_real(ds->compact_did, ds->compact_sid)) {
- printf("H5Dclose compact dataset failed\n");
+ HDprintf("H5Dclose compact dataset failed\n");
TEST_ERROR;
}
if (!close_dset_real(ds->contig_did, ds->contig_sid)) {
- printf("H5Dclose contiguous dataset failed\n");
+ HDprintf("H5Dclose contiguous dataset failed\n");
TEST_ERROR;
}
if (!close_dset_real(ds->single_did, ds->single_sid)) {
- printf("H5Dclose chunked dataset: single index failed\n");
+ HDprintf("H5Dclose chunked dataset: single index failed\n");
TEST_ERROR;
}
if (!close_dset_real(ds->implicit_did, ds->implicit_sid)) {
- printf("H5Dclose chunked dataset: implicit index failed\n");
+ HDprintf("H5Dclose chunked dataset: implicit index failed\n");
TEST_ERROR;
}
if (!close_dset_real(ds->fa_did, ds->fa_sid)) {
- printf("H5Dclose chunked dataset: fa index failed\n");
+ HDprintf("H5Dclose chunked dataset: fa index failed\n");
TEST_ERROR;
}
if (!close_dset_real(ds->ea_did, ds->ea_sid)) {
- printf("H5Dclose chunked dataset: ea index failed\n");
+ HDprintf("H5Dclose chunked dataset: ea index failed\n");
TEST_ERROR;
}
if (!close_dset_real(ds->bt2_did, ds->bt2_sid)) {
- printf("H5Dclose chunked dataset: bt2 index failed\n");
+ HDprintf("H5Dclose chunked dataset: bt2 index failed\n");
TEST_ERROR;
}
@@ -791,12 +791,12 @@ static bool
close_dset_real(hid_t did, hid_t sid)
{
if (did != badhid && H5Dclose(did) < 0) {
- printf("H5Dclose dataset failed\n");
+ HDprintf("H5Dclose dataset failed\n");
TEST_ERROR;
}
if (sid != badhid && H5Sclose(sid) < 0) {
- printf("H5Sclose dataspace for dataset failed\n");
+ HDprintf("H5Sclose dataspace for dataset failed\n");
TEST_ERROR;
}
@@ -841,7 +841,7 @@ write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *
result = dsets_action(SEQ_WRITE, s, ds, step);
if (s->use_np && !np_writer(result, step, s, np, config)) {
- printf("np_writer() for sequential writes failed\n");
+ HDprintf("np_writer() for sequential writes failed\n");
TEST_ERROR;
}
}
@@ -858,11 +858,11 @@ write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *
dbgf(2, "Random writes %u to dataset\n", step);
newstep = (unsigned int)HDrandom() % (s->rows * s->cols);
- dbgf(2, "Random step is %u\n", newstep);
+ HDprintf("Random step is %u\n", newstep);
result = dsets_action(RANDOM_WRITE, s, ds, newstep);
if (s->use_np && !np_writer(result, step, s, np, config)) {
- printf("np_writer() for random writes failed\n");
+ HDprintf("np_writer() for random writes failed\n");
TEST_ERROR;
}
}
@@ -878,7 +878,7 @@ write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *
result = dsets_action(HYPER_WRITE, s, ds, k);
if (s->use_np && !np_writer(result, step, s, np, config)) {
- printf("np_writer() for hyperslab writes failed\n");
+ HDprintf("np_writer() for hyperslab writes failed\n");
TEST_ERROR;
}
}
@@ -893,7 +893,7 @@ write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *
result = dsets_action(MODIFY_DATA, s, ds, step);
if (s->use_np && !np_writer(result, step, s, np, config)) {
- printf("np_writer() for modify raw data failed\n");
+ HDprintf("np_writer() for modify raw data failed\n");
TEST_ERROR;
}
}
@@ -925,7 +925,7 @@ dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigne
/* Set up selection, dataspace and data buffer according to the specified action */
if (!dset_setup(action, which, s, start, stride, count, block, &mem_sid, &wbuf)) {
- printf("dset_setup() failed\n");
+ HDprintf("dset_setup() failed\n");
TEST_ERROR;
}
@@ -934,7 +934,7 @@ dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigne
if (!write_dset(ds->contig_did, s->filetype, mem_sid, ds->contig_sid, start, stride, count, block,
wbuf)) {
- printf("H5Dwrite to contiguous dataset failed\n");
+ HDprintf("H5Dwrite to contiguous dataset failed\n");
TEST_ERROR;
}
}
@@ -944,28 +944,28 @@ dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigne
if (!write_dset(ds->single_did, s->filetype, mem_sid, ds->single_sid, start, stride, count, block,
wbuf)) {
- printf("H5Dwrite to chunked dataset: single index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: single index dataset failed\n");
TEST_ERROR;
}
if (!write_dset(ds->implicit_did, s->filetype, mem_sid, ds->implicit_sid, start, stride, count, block,
wbuf)) {
- printf("H5Dwrite to chunked dataset: implicit index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: implicit index dataset failed\n");
TEST_ERROR;
}
if (!write_dset(ds->fa_did, s->filetype, mem_sid, ds->fa_sid, start, stride, count, block, wbuf)) {
- printf("H5Dwrite to chunked dataset: fa index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: fa index dataset failed\n");
TEST_ERROR;
}
if (!write_dset(ds->ea_did, s->filetype, mem_sid, ds->ea_sid, start, stride, count, block, wbuf)) {
- printf("H5Dwrite to chunked dataset: ea index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: ea index dataset failed\n");
TEST_ERROR;
}
if (!write_dset(ds->bt2_did, s->filetype, mem_sid, ds->bt2_sid, start, stride, count, block, wbuf)) {
- printf("H5Dwrite to chunked dataset: bt2 index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: bt2 index dataset failed\n");
TEST_ERROR;
}
}
@@ -1026,7 +1026,7 @@ dset_setup(unsigned action, unsigned which, const state_t *s, hsize_t *start, hs
/* Allocating the buffer for writing */
if ((tmp_buf = HDmalloc(count[1] * sizeof(unsigned int))) == NULL) {
- printf("HDmalloc failed\n");
+ HDprintf("HDmalloc failed\n");
TEST_ERROR;
}
@@ -1074,12 +1074,12 @@ write_dset(hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hsize_t *start,
{
if (H5Sselect_hyperslab(file_sid, H5S_SELECT_SET, start, stride, count, block) < 0) {
- printf("H5Sselect to dataset failed\n");
+ HDprintf("H5Sselect to dataset failed\n");
TEST_ERROR;
}
if (H5Dwrite(did, tid, mem_sid, file_sid, H5P_DEFAULT, buf) < 0) {
- printf("H5Dwrite to dataset failed\n");
+ HDprintf("H5Dwrite to dataset failed\n");
TEST_ERROR;
}
@@ -1100,7 +1100,7 @@ write_dset_compact(const state_t *s, const dsets_state_t *ds)
unsigned i;
if ((buf = HDmalloc(s->compact_elmts * sizeof(unsigned int))) == NULL) {
- printf("HDmalloc buffer for compact dataset failed\n");
+ HDprintf("HDmalloc buffer for compact dataset failed\n");
goto error;
}
@@ -1108,7 +1108,7 @@ write_dset_compact(const state_t *s, const dsets_state_t *ds)
buf[i] = i + 1;
if (H5Dwrite(ds->compact_did, s->filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- printf("H5Dwrite to compact dataset failed\n");
+ HDprintf("H5Dwrite to compact dataset failed\n");
TEST_ERROR;
}
@@ -1149,7 +1149,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
dbgf(2, "Verify sequential writes %u to dataset\n", step);
if (s->use_np && !np_confirm_verify_notify(np->fd_writer_to_reader, step, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1159,7 +1159,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
result = verify_dsets_action(SEQ_WRITE, s, ds, step);
if (s->use_np && !np_reader(result, step, s, np)) {
- printf("np_reader() for verifying addition failed\n");
+ HDprintf("np_reader() for verifying addition failed\n");
TEST_ERROR;
}
}
@@ -1176,10 +1176,10 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
dbgf(2, "Verify random writes %u to dataset\n", step);
newstep = (unsigned int)HDrandom() % (s->rows * s->cols);
- dbgf(2, "Random step is %u\n", newstep);
+ HDprintf("Random step is %u\n", newstep);
if (s->use_np && !np_confirm_verify_notify(np->fd_writer_to_reader, step, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1189,7 +1189,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
result = verify_dsets_action(RANDOM_WRITE, s, ds, newstep);
if (s->use_np && !np_reader(result, step, s, np)) {
- printf("np_reader() for verifying addition failed\n");
+ HDprintf("np_reader() for verifying addition failed\n");
TEST_ERROR;
}
}
@@ -1203,7 +1203,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
dbgf(2, "Verify hyperslab writes %u to dataset\n", step);
if (s->use_np && !np_confirm_verify_notify(np->fd_writer_to_reader, step, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1213,7 +1213,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
result = verify_dsets_action(HYPER_WRITE, s, ds, k);
if (s->use_np && !np_reader(result, step, s, np)) {
- printf("np_reader() for verifying addition failed\n");
+ HDprintf("np_reader() for verifying addition failed\n");
TEST_ERROR;
}
}
@@ -1226,7 +1226,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
dbgf(2, "Verify raw data modification %u to dataset\n", step);
if (s->use_np && !np_confirm_verify_notify(np->fd_writer_to_reader, step, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1236,7 +1236,7 @@ verify_write_dset_contig_chunked(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_con
result = verify_dsets_action(MODIFY_DATA, s, ds, step);
if (s->use_np && !np_reader(result, step, s, np)) {
- printf("np_reader() for verifying addition failed\n");
+ HDprintf("np_reader() for verifying addition failed\n");
TEST_ERROR;
}
}
@@ -1269,7 +1269,7 @@ verify_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds,
/* Set up selection, dataspace and data buffer according to the specified action */
if (!dset_setup(action, which, s, start, stride, count, block, &mem_sid, &vbuf)) {
- printf("dset_setup() failed\n");
+ HDprintf("dset_setup() failed\n");
TEST_ERROR;
}
@@ -1277,7 +1277,7 @@ verify_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds,
if (s->contig) {
if (!verify_read_dset(ds->contig_did, s->filetype, mem_sid, ds->contig_sid, start, stride, count,
block, vbuf)) {
- printf("H5Dwrite to contiguous dataset failed\n");
+ HDprintf("H5Dwrite to contiguous dataset failed\n");
TEST_ERROR;
}
}
@@ -1287,31 +1287,31 @@ verify_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds,
if (!verify_read_dset(ds->single_did, s->filetype, mem_sid, ds->single_sid, start, stride, count,
block, vbuf)) {
- printf("H5Dwrite to chunked dataset: single index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: single index dataset failed\n");
TEST_ERROR;
}
if (!verify_read_dset(ds->implicit_did, s->filetype, mem_sid, ds->implicit_sid, start, stride, count,
block, vbuf)) {
- printf("H5Dwrite to chunked dataset: implicit index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: implicit index dataset failed\n");
TEST_ERROR;
}
if (!verify_read_dset(ds->fa_did, s->filetype, mem_sid, ds->fa_sid, start, stride, count, block,
vbuf)) {
- printf("H5Dwrite to chunked dataset: fa index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: fa index dataset failed\n");
TEST_ERROR;
}
if (!verify_read_dset(ds->ea_did, s->filetype, mem_sid, ds->ea_sid, start, stride, count, block,
vbuf)) {
- printf("H5Dwrite to chunked dataset: ea index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: ea index dataset failed\n");
TEST_ERROR;
}
if (!verify_read_dset(ds->bt2_did, s->filetype, mem_sid, ds->bt2_sid, start, stride, count, block,
vbuf)) {
- printf("H5Dwrite to chunked dataset: bt2 index dataset failed\n");
+ HDprintf("H5Dwrite to chunked dataset: bt2 index dataset failed\n");
TEST_ERROR;
}
}
@@ -1342,25 +1342,25 @@ verify_read_dset(hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hsize_t *s
/* Refresh the dataset */
if (H5Drefresh(did) < 0) {
- printf("H5Drefresh dataset failed\n");
+ HDprintf("H5Drefresh dataset failed\n");
TEST_ERROR;
}
/* Allocate the buffer for reading */
if ((rbuf = HDmalloc(count[1] * sizeof(unsigned int))) == NULL) {
- printf("HDmalloc failed\n");
+ HDprintf("HDmalloc failed\n");
TEST_ERROR;
}
/* Make the selection the file dataspace */
if (H5Sselect_hyperslab(file_sid, H5S_SELECT_SET, start, stride, count, block) < 0) {
- printf("H5Sselect to dataset failed\n");
+ HDprintf("H5Sselect to dataset failed\n");
TEST_ERROR;
}
/* Read the data from the dataset into `rbuf` */
if (H5Dread(did, tid, mem_sid, file_sid, H5P_DEFAULT, rbuf) < 0) {
- printf("H5Dread from dataset failed\n");
+ HDprintf("H5Dread from dataset failed\n");
TEST_ERROR;
}
@@ -1391,18 +1391,18 @@ verify_read_dset_compact(const state_t *s, const dsets_state_t *ds)
unsigned i;
if ((rbuf = HDmalloc(s->compact_elmts * sizeof(unsigned int))) == NULL) {
- printf("HDmalloc buffer for compact dataset failed\n");
+ HDprintf("HDmalloc buffer for compact dataset failed\n");
goto error;
}
if (H5Dread(ds->compact_did, s->filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) {
- printf("H5Dwrite to compact dataset failed\n");
+ HDprintf("H5Dwrite to compact dataset failed\n");
TEST_ERROR;
}
for (i = 0; i < s->compact_elmts; i++)
if (rbuf[i] != (i + 1)) {
- printf("Invalid value for compact dataset element\n");
+ HDprintf("Invalid value for compact dataset element\n");
TEST_ERROR;
}
@@ -1440,36 +1440,36 @@ np_init(np_state_t *np, bool writer)
/* If the named pipes are present at the start of the test, remove them */
if (HDaccess(np->fifo_writer_to_reader, F_OK) == 0)
if (HDremove(np->fifo_writer_to_reader) != 0) {
- printf("HDremove fifo_writer_to_reader failed\n");
+ HDprintf("HDremove fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDaccess(np->fifo_reader_to_writer, F_OK) == 0)
if (HDremove(np->fifo_reader_to_writer) != 0) {
- printf("HDremove fifo_reader_to_writer failed\n");
+ HDprintf("HDremove fifo_reader_to_writer failed\n");
TEST_ERROR;
}
/* Writer creates two named pipes(FIFO) */
if (HDmkfifo(np->fifo_writer_to_reader, 0600) < 0) {
- printf("HDmkfifo fifo_writer_to_reader failed\n");
+ HDprintf("HDmkfifo fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDmkfifo(np->fifo_reader_to_writer, 0600) < 0) {
- printf("HDmkfifo fifo_reader_to_writer failed\n");
+ HDprintf("HDmkfifo fifo_reader_to_writer failed\n");
TEST_ERROR;
}
}
/* Both the writer and reader open the pipes */
if ((np->fd_writer_to_reader = HDopen(np->fifo_writer_to_reader, O_RDWR)) < 0) {
- printf("HDopen fifo_writer_to_reader failed\n");
+ HDprintf("HDopen fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if ((np->fd_reader_to_writer = HDopen(np->fifo_reader_to_writer, O_RDWR)) < 0) {
- printf("HDopen fifo_reader_to_writer failed\n");
+ HDprintf("HDopen fifo_reader_to_writer failed\n");
TEST_ERROR;
}
@@ -1488,24 +1488,24 @@ np_close(np_state_t *np, bool writer)
{
/* Both the writer and reader close the named pipes */
if (HDclose(np->fd_writer_to_reader) < 0) {
- printf("HDclose fd_writer_to_reader failed\n");
+ HDprintf("HDclose fd_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDclose(np->fd_reader_to_writer) < 0) {
- printf("HDclose fd_reader_to_writer failed\n");
+ HDprintf("HDclose fd_reader_to_writer failed\n");
TEST_ERROR;
}
/* Reader finishes last and deletes the named pipes */
if (!writer) {
if (HDremove(np->fifo_writer_to_reader) != 0) {
- printf("HDremove fifo_writer_to_reader failed\n");
+ HDprintf("HDremove fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDremove(np->fifo_reader_to_writer) != 0) {
- printf("HDremove fifo_reader_to_writer failed\n");
+ HDprintf("HDremove fifo_reader_to_writer failed\n");
TEST_ERROR;
}
}
@@ -1525,7 +1525,7 @@ np_writer(bool result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_
/* The action fails */
if (!result) {
- printf("attribute action failed\n");
+ HDprintf("attribute action failed\n");
H5_FAILED();
AT();
@@ -1543,7 +1543,7 @@ np_writer(bool result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_
/* Bump up the value of notify to tell the reader to start reading */
np->notify++;
if (HDwrite(np->fd_writer_to_reader, &np->notify, sizeof(int)) < 0) {
- printf("HDwrite failed\n");
+ HDprintf("HDwrite failed\n");
TEST_ERROR;
}
@@ -1560,7 +1560,7 @@ np_writer(bool result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_
/* Handshake between writer and reader */
if (!np_confirm_verify_notify(np->fd_reader_to_writer, step, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
}
@@ -1581,7 +1581,7 @@ np_reader(bool result, unsigned step, const state_t *s, np_state_t *np)
{
/* The verification fails */
if (!result) {
- printf("verify action failed\n");
+ HDprintf("verify action failed\n");
H5_FAILED();
AT();
@@ -1598,7 +1598,7 @@ np_reader(bool result, unsigned step, const state_t *s, np_state_t *np)
/* Send back the same notify value for acknowledgement:
* --inform the writer to move to the next step */
if (HDwrite(np->fd_reader_to_writer, &np->notify, sizeof(int)) < 0) {
- printf("HDwrite failed\n");
+ HDprintf("HDwrite failed\n");
TEST_ERROR;
}
}
@@ -1620,17 +1620,17 @@ np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np
if (step % s->csteps == 0) {
np->verify++;
if (HDread(fd, &np->notify, sizeof(int)) < 0) {
- printf("HDread failed\n");
+ HDprintf("HDread failed\n");
TEST_ERROR;
}
if (np->notify == -1) {
- printf("reader/writer failed to verify\n");
+ HDprintf("reader/writer failed to verify\n");
TEST_ERROR;
}
if (np->notify != np->verify) {
- printf("received message %d, expecting %d\n", np->notify, np->verify);
+ HDprintf("received message %d, expecting %d\n", np->notify, np->verify);
TEST_ERROR;
}
}
@@ -1658,18 +1658,18 @@ main(int argc, char **argv)
bool result;
if (!state_init(&s, argc, argv)) {
- printf("state_init() failed\n");
+ HDprintf("state_init() failed\n");
TEST_ERROR;
}
personality = HDstrstr(s.progname, "vfd_swmr_dsetops_");
- if (personality != NULL && strcmp(personality, "vfd_swmr_dsetops_writer") == 0)
+ if (personality != NULL && HDstrcmp(personality, "vfd_swmr_dsetops_writer") == 0)
writer = true;
- else if (personality != NULL && strcmp(personality, "vfd_swmr_dsetops_reader") == 0)
+ else if (personality != NULL && HDstrcmp(personality, "vfd_swmr_dsetops_reader") == 0)
writer = false;
else {
- printf("unknown personality, expected vfd_swmr_dsetops_{reader,writer}\n");
+ HDprintf("unknown personality, expected vfd_swmr_dsetops_{reader,writer}\n");
TEST_ERROR;
}
@@ -1678,45 +1678,45 @@ main(int argc, char **argv)
/* use_latest_format, use_vfd_swmr, only_meta_page, config */
if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, &config)) < 0) {
- printf("vfd_swmr_create_fapl() failed\n");
+ HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- printf("H5Pset_file_space_strategy failed\n");
+ HDprintf("H5Pset_file_space_strategy failed\n");
TEST_ERROR;
}
if (writer) {
if ((s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
- printf("H5Fcreate failed\n");
+ HDprintf("H5Fcreate failed\n");
TEST_ERROR;
}
if (!create_dsets(&s, &ds)) {
- printf("create_dsets() failed\n");
+ HDprintf("create_dsets() failed\n");
TEST_ERROR;
}
}
else {
if ((s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl)) < 0) {
- printf("H5Fopen failed\n");
+ HDprintf("H5Fopen failed\n");
TEST_ERROR;
}
if (!open_dsets(&s, &ds)) {
- printf("open_dsets() failed\n");
+ HDprintf("open_dsets() failed\n");
TEST_ERROR;
}
}
/* Initiailze named pipes */
if (s.use_np && !np_init(&np, writer)) {
- printf("np_init() failed\n");
+ HDprintf("np_init() failed\n");
TEST_ERROR;
}
@@ -1729,7 +1729,7 @@ main(int argc, char **argv)
result = write_dset_compact(&s, &ds);
if (s.use_np && !np_writer(result, 0, &s, &np, &config)) {
- printf("np_writer() for addition failed\n");
+ HDprintf("np_writer() for addition failed\n");
TEST_ERROR;
}
}
@@ -1737,7 +1737,7 @@ main(int argc, char **argv)
if (s.contig || s.chunked) {
/* Perform writes for contiguous and/or chunked datasets */
if (!write_dset_contig_chunked(&s, &ds, &config, &np)) {
- printf("write_dset_contig_chunked() failed\n");
+ HDprintf("write_dset_contig_chunked() failed\n");
TEST_ERROR;
}
}
@@ -1749,7 +1749,7 @@ main(int argc, char **argv)
dbgf(2, "Verify writes to compact dataset\n");
if (s.use_np && !np_confirm_verify_notify(np.fd_writer_to_reader, 0, &s, &np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
/* Wait for a few ticks for the update to happen */
@@ -1758,7 +1758,7 @@ main(int argc, char **argv)
result = verify_read_dset_compact(&s, &ds);
if (s.use_np && !np_reader(result, 0, &s, &np)) {
- printf("np_reader() for verifying addition failed\n");
+ HDprintf("np_reader() for verifying addition failed\n");
TEST_ERROR;
}
}
@@ -1767,34 +1767,34 @@ main(int argc, char **argv)
/* Verify writes for contiguous and/or chunked datasets */
if (!verify_write_dset_contig_chunked(&s, &ds, &config, &np)) {
- printf("verify_write_dset_contig_chunked() failed\n");
+ HDprintf("verify_write_dset_contig_chunked() failed\n");
TEST_ERROR;
}
}
}
if (!close_dsets(&ds)) {
- printf("close_dsets() failed\n");
+ HDprintf("close_dsets() failed\n");
TEST_ERROR;
}
if (H5Pclose(fapl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Pclose(fcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Fclose(s.file) < 0) {
- printf("H5Fclose failed\n");
+ HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
if (s.use_np && !np_close(&np, writer)) {
- printf("np_close() failed\n");
+ HDprintf("np_close() failed\n");
TEST_ERROR;
}