Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge2 839 issue PRs to hdf5 1 12 #906

Merged
merged 19 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
26e771c
Use internal version of H5Eprint2 to avoid possible stack overflow (#…
jhendersonHDF May 26, 2021
3e8965b
Reduces overly-pedantic casting in the public headers (#644)
derobins May 15, 2021
09c6265
Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)
brtnfld May 28, 2021
b7b4d94
Removes pre-C99 build and header cruft (#700)
derobins May 28, 2021
9bf4c9c
Clean up type size checks in configure.ac (#702)
derobins May 29, 2021
06e9a8f
Removes some DEC Alpha cruft from H5detect and H5private.h (#708)
derobins Jun 2, 2021
dece16e
Updates bin/trace script to correctly wrap H5TRACE macros near clang-…
derobins Jun 3, 2021
928c41a
Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726)
derobins Jun 4, 2021
c417a42
Moves H5PacketTable default ctor inside source file (#731)
derobins Jun 6, 2021
5b2528a
Remove private H5_GCC_DIAG_OFF/ON from standalone program (#734)
byrnHDF Jun 7, 2021
3fa974f
Organize and align compiler flags (#741)
byrnHDF Jun 11, 2021
6f0a976
Fixes C++ warnings when passing hsize_t values to printf in test code…
derobins Jun 11, 2021
fa027c7
Normalization of H5_nanosleep() with VFD SWMR branch (#746)
derobins Jun 11, 2021
3254fd3
Correct missing variable declaration.
lrknox Aug 13, 2021
c0f1516
Fixes some H5SL include statements (#758)
derobins Jun 16, 2021
4476617
Fixes non-C99 format strings in tarray test code (#766)
derobins Jun 18, 2021
ee6172a
Cleans up some POSIX header bits in H5private.h (#783)
derobins Jun 23, 2021
f202772
Further simplifies Autotools type size checks (#789)
derobins Jun 23, 2021
23c4ac3
Normalization of CMake H5pubconf.h with Autotools (#791)
derobins Jun 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions bin/trace
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,33 @@ sub rewrite_func ($$$$$) {
# Compose the trace macro
$trace = "H5TRACE" . scalar(@arg_str) . "(\"$rettype\", \"";
$trace .= join("", @arg_str) . "\"";
my $len = 4 + length $trace; # Add 4, for indenting the line
for (@arg_name) {
# Wrap lines that will be longer than the limit, after ');' is added
if ($len + length >= ($max_trace_macro_line_len - 2)) {
$argtrace .= join("", @arg_str) . "\"";

# Add 4 for indenting the line
my $len = 4 + length($trace);

for my $i (0 .. $#arg_name) {
# Handle wrapping

# Be VERY careful here! clang-format and this script MUST agree
# on which lines get wrapped or there will be churn as each tries
# to undo the other's output.
#
# TWO cases must be handled:
# 1) The argument is that last one and ');' will be appended
# 2) The argument is NOT the last one and ',' will be appended
#
# NB: clang-format does NOT consider terminal newlines when
# counting columns for the ColumnLimit
#
# The extra '2' added after $len includes the ', ' that would be
# added BEFORE the argument.
#
my $adjust = ($i + 1 == scalar(@arg_str)) ? 2 : 1;
my $len_if_added = $len + 2 + length($arg_name[$i]) + $adjust;

# Wrap lines that will be longer than the limit
if ($len_if_added > $max_trace_macro_line_len) {
# Wrap line, with indention
$trace .= ",\n ";
$len = 13; # Set to 13, for indention
Expand All @@ -362,8 +385,11 @@ sub rewrite_func ($$$$$) {
}

# Append argument
$trace .= "$_";
$len += length; # Add length of appended argument name
$trace .= "$arg_name[$i]";
$argtrace .= ", $arg_name[$i]";

# Add length of appended argument name
$len += length($arg_name[$i]);
}

# Append final ');' for macro
Expand Down
31 changes: 16 additions & 15 deletions c++/test/tarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ test_array_compound_array()
// Check the array dimensions
for (ii = 0; ii < ndims; ii++)
if (rdims1[ii] != tdims1[ii]) {
TestErrPrintf(
"Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii,
rdims1[ii], ii, tdims1[ii]);
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
", tdims1[%d]=%" PRIuHSIZE "\n",
ii, rdims1[ii], ii, tdims1[ii]);
continue;
} // end if

Expand All @@ -197,9 +197,9 @@ test_array_compound_array()
// Check the array dimensions
for (ii = 0; ii < ndims; ii++)
if (rdims1[ii] != tdims1[ii]) {
TestErrPrintf(
"Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii,
rdims1[ii], ii, tdims1[ii]);
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
", tdims1[%d]=%" PRIuHSIZE "\n",
ii, rdims1[ii], ii, tdims1[ii]);
continue;
} // end if

Expand Down Expand Up @@ -248,9 +248,9 @@ test_array_compound_array()
// Check the array dimensions
for (ii = 0; ii < ndims; ii++)
if (rdims1[ii] != tdims1[ii]) {
TestErrPrintf(
"Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii,
rdims1[ii], ii, tdims1[ii]);
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
", tdims1[%d]=%" PRIuHSIZE "\n",
ii, rdims1[ii], ii, tdims1[ii]);
continue;
} // end if

Expand All @@ -265,8 +265,9 @@ test_array_compound_array()
for (idxi = 0; idxi < SPACE1_DIM1; idxi++) {
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
if (wdata[idxi][idxj].i != rdata[idxi][idxj].i) {
TestErrPrintf("Array data information doesn't match!, wdata[%lld][%lld].i=%d, "
"rdata[%lld][%lld].i=%d\n",
TestErrPrintf("Array data information doesn't match!, wdata[%" PRIuHSIZE "][%" PRIuHSIZE
"].i=%d, "
"rdata[%" PRIuHSIZE "][%" PRIuHSIZE "].i=%d\n",
idxi, idxj, wdata[idxi][idxj].i, idxi, idxj, rdata[idxi][idxj].i);
continue;
} // end if
Expand Down Expand Up @@ -457,11 +458,11 @@ test_array_info()
// Check the array dimensions
for (ii = 0; ii < ndims; ii++)
if (rdims1[ii] != tdims1[ii]) {
TestErrPrintf(
"Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=z%llu\n", ii,
rdims1[ii], ii, tdims1[ii]);
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
", tdims1[%d]=%" PRIuHSIZE "\n",
ii, rdims1[ii], ii, tdims1[ii]);
continue;
} // end if
}
}

// Close all
Expand Down
60 changes: 36 additions & 24 deletions c++/test/tattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ test_attr_basic_write()
// Verify values read in
for (i = 0; i < ATTR1_DIM1; i++)
if (attr_data1[i] != read_data1[i])
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE
"]=%d,read_data1[%" PRIuHSIZE "]=%d\n",
__LINE__, i, attr_data1[i], i, read_data1[i]);

// Create two more attributes for this dataset, but only write to one.
Expand All @@ -185,7 +186,8 @@ test_attr_basic_write()
// Verify values read in
for (i = 0; i < ATTR1_DIM1; i++)
if (attr_data1a[i] != read_data1[i])
TestErrPrintf("%d: attribute data different: attr_data1a[%llu]=%d,read_data1[%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data1a[%" PRIuHSIZE
"]=%d,read_data1[%" PRIuHSIZE "]=%d\n",
__LINE__, i, attr_data1a[i], i, read_data1[i]);

// Close both attributes
Expand Down Expand Up @@ -448,7 +450,8 @@ test_attr_rename()
// Verify values read in
for (i = 0; i < ATTR1_DIM1; i++)
if (attr_data1[i] != read_data1[i])
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu%d\n",
TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE
"]=%d,read_data1[%" PRIuHSIZE "]=%d\n",
__LINE__, i, attr_data1[i], i, read_data1[i]);

// Close attribute
Expand All @@ -472,7 +475,8 @@ test_attr_rename()
// Verify values read in
for (i = 0; i < ATTR1_DIM1; i++)
if (attr_data1a[i] != read_data1[i])
TestErrPrintf("%d: attribute data different: attr_data1a[%llu]=%d,read_data1[%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data1a[%" PRIuHSIZE
"]=%d,read_data1[%" PRIuHSIZE "]=%d\n",
__LINE__, i, attr_data1a[i], i, read_data1[i]);

// Close attribute
Expand Down Expand Up @@ -537,7 +541,8 @@ test_attr_basic_read()
// Verify values read in
for (i = 0; i < ATTR1_DIM1; i++)
if (attr_data1[i] != read_data1[i])
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d, read_data1[%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE
"]=%d, read_data1[%" PRIuHSIZE "]=%d\n",
__LINE__, i, attr_data1[i], i, read_data1[i]);

/*
Expand Down Expand Up @@ -568,8 +573,9 @@ test_attr_basic_read()
for (i = 0; i < ATTR2_DIM1; i++)
for (j = 0; j < ATTR2_DIM2; j++)
if (attr_data2[i][j] != read_data2[i][j]) {
TestErrPrintf("%d: attribute data different: attr_data2[%llu][%llu]=%d, "
"read_data2[%llu][%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data2[%" PRIuHSIZE "][%" PRIuHSIZE
"]=%d, "
"read_data2[%" PRIuHSIZE "][%" PRIuHSIZE "]=%d\n",
__LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
}
PASSED();
Expand Down Expand Up @@ -772,14 +778,17 @@ test_attr_compound_read()
for (ii = 0; ii < ATTR4_DIM1; ii++)
for (jj = 0; jj < ATTR4_DIM2; jj++)
if (HDmemcmp(&attr_data4[ii][jj], &read_data4[ii][jj], sizeof(struct attr4_struct)) != 0) {
TestErrPrintf("%d:attribute data different: attr_data4[%llu][%llu].i=%d, "
"read_data4[%llu][%llu].i=%d\n",
TestErrPrintf("%d:attribute data different: attr_data4[%" PRIuHSIZE "][%" PRIuHSIZE
"].i=%d, "
"read_data4[%" PRIuHSIZE "][%" PRIuHSIZE "].i=%d\n",
__LINE__, ii, jj, attr_data4[ii][jj].i, ii, jj, read_data4[ii][jj].i);
TestErrPrintf("%d:attribute data different: attr_data4[%llu][%llu].d=%f, "
"read_data4[%llu][%llu].d=%f\n",
TestErrPrintf("%d:attribute data different: attr_data4[%" PRIuHSIZE "][%" PRIuHSIZE
"].d=%f, "
"read_data4[%" PRIuHSIZE "][%" PRIuHSIZE "].d=%f\n",
__LINE__, ii, jj, attr_data4[ii][jj].d, ii, jj, read_data4[ii][jj].d);
TestErrPrintf("%d:attribute data different: attr_data4[%llu][%llu].c=%c, "
"read_data4[%llu][%llu].c=%c\n",
TestErrPrintf("%d:attribute data different: attr_data4[%" PRIuHSIZE "][%" PRIuHSIZE
"].c=%c, "
"read_data4[%" PRIuHSIZE "][%" PRIuHSIZE "].c=%c\n",
__LINE__, ii, jj, attr_data4[ii][jj].c, ii, jj, read_data4[ii][jj].c);
} /* end if */

Expand Down Expand Up @@ -1042,10 +1051,10 @@ test_attr_mult_read()

// Get the dims of the dataspace and verify them
hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions
int ndims = space.getSimpleExtentDims(dims);
if ((long)dims[0] != (long)ATTR1_DIM1)
TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %llu\n", __LINE__,
(int)dims[0], ATTR1_DIM1);
(void)space.getSimpleExtentDims(dims);
if (dims[0] != ATTR1_DIM1)
TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %" PRIuHSIZE "\n",
__LINE__, static_cast<int>(dims[0]), ATTR1_DIM1);

/* Verify Datatype */

Expand All @@ -1072,7 +1081,8 @@ test_attr_mult_read()
// Verify values read in
for (i = 0; i < ATTR1_DIM1; i++)
if (attr_data1[i] != read_data1[i])
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE
"]=%d,read_data1[%" PRIuHSIZE "]=%d\n",
__LINE__, i, attr_data1[i], i, read_data1[i]);

// Verify Name
Expand All @@ -1095,7 +1105,7 @@ test_attr_mult_read()
verify_val(rank, ATTR2_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);

// Get the dims of the dataspace and verify them
ndims = space.getSimpleExtentDims(dims);
int ndims = space.getSimpleExtentDims(dims);

verify_val((long)dims[0], (long)ATTR2_DIM1, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
verify_val((long)dims[1], (long)ATTR2_DIM2, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
Expand Down Expand Up @@ -1127,8 +1137,9 @@ test_attr_mult_read()
for (i = 0; i < ATTR2_DIM1; i++)
for (j = 0; j < ATTR2_DIM2; j++)
if (attr_data2[i][j] != read_data2[i][j])
TestErrPrintf("%d: attribute data different: attr_data2[%llu][%llu]=%d, "
"read_data2[%llu][%llu]=%d\n",
TestErrPrintf("%d: attribute data different: attr_data2[%" PRIuHSIZE "][%" PRIuHSIZE
"]=%d, "
"read_data2[%" PRIuHSIZE "][%" PRIuHSIZE "]=%d\n",
__LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);

// Verify Name
Expand Down Expand Up @@ -1181,9 +1192,10 @@ test_attr_mult_read()
for (i = 0; i < ATTR3_DIM1; i++)
for (j = 0; j < ATTR3_DIM2; j++)
for (k = 0; k < ATTR3_DIM3; k++)
if (attr_data3[i][j][k] != read_data3[i][j][k])
TestErrPrintf("%d: attribute data different: attr_data3[%llu][%llu][%llu]=%f, "
"read_data3[%llu][%llu][%llu]=%f\n",
if (abs(attr_data3[i][j][k] - read_data3[i][j][k]) > DBL_EPSILON)
TestErrPrintf("%d: attribute data different: attr_data3[%" PRIuHSIZE "][%" PRIuHSIZE
"][%" PRIuHSIZE "]=%f, "
"read_data3[%" PRIuHSIZE "][%" PRIuHSIZE "][%" PRIuHSIZE "]=%f\n",
__LINE__, i, j, k, attr_data3[i][j][k], i, j, k, read_data3[i][j][k]);

// Verify Name
Expand Down
44 changes: 15 additions & 29 deletions config/cmake/H5pubconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
/* Define if dev_t is a scalar */
#cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@

/* Define if your system is IBM ppc64le and cannot convert some long double
values correctly. */
#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@

/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
#cmakedefine H5_FC_DUMMY_MAIN @H5_FC_DUMMY_MAIN@
Expand Down Expand Up @@ -111,7 +115,7 @@
#cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@

/* Define to 1 if you have the <curl/curl.h> header file. */
#cmakedefine H5_HAVE_CURL_H @H5_HAVE_CURL_H@
#cmakedefine H5_HAVE_CURL_CURL_H @H5_HAVE_CURL_H@

/* Define if Darwin or Mac OS X */
#cmakedefine H5_HAVE_DARWIN @H5_HAVE_DARWIN@
Expand Down Expand Up @@ -198,15 +202,9 @@
optimization operation */
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@

/* Define to 1 if you have the <inttypes.h> header file. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These removals are okay as far as binary compatibility?

#cmakedefine H5_HAVE_INTTYPES_H @H5_HAVE_INTTYPES_H@

/* Define to 1 if you have the `ioctl' function. */
#cmakedefine H5_HAVE_IOCTL @H5_HAVE_IOCTL@

/* Define to 1 if you have the <io.h> header file. */
#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@

/* Define to 1 if you have the `crypto' library (-lcrypto). */
#cmakedefine H5_HAVE_LIBCRYPTO @H5_HAVE_LIBCRYPTO@

Expand Down Expand Up @@ -358,21 +356,12 @@
/* Define to 1 if you have the `stat64' function. */
#cmakedefine H5_HAVE_STAT64 @H5_HAVE_STAT64@

/* Define if `struct stat' has the `st_blocks' field */
/* Define if struct stat has the st_blocks field */
#cmakedefine H5_HAVE_STAT_ST_BLOCKS @H5_HAVE_STAT_ST_BLOCKS@

/* Define to 1 if you have the <stdbool.h> header file. */
#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@

/* Define to 1 if you have the <stddef.h> header file. */
#cmakedefine H5_HAVE_STDDEF_H @H5_HAVE_STDDEF_H@

/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine H5_HAVE_STDINT_H @H5_HAVE_STDINT_H@

/* Define to 1 if you have the <stdint.h> header file for Cplusplus. */
#cmakedefine H5_HAVE_STDINT_H_CXX @H5_HAVE_STDINT_H_CXX@

/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine H5_HAVE_STDLIB_H @H5_HAVE_STDLIB_H@

Expand Down Expand Up @@ -508,9 +497,6 @@
with special algorithm. */
#cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@

/* Define if your system is power6 and cannot convert some long double values. */
#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@

Expand Down Expand Up @@ -716,9 +702,6 @@
/* The size of `__int64', as computed by sizeof. */
#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@

/* Define to 1 if you have the ANSI C header files. */
#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@

/* Define if strict file format checks are enabled */
#cmakedefine H5_STRICT_FORMAT_CHECKS @H5_STRICT_FORMAT_CHECKS@

Expand All @@ -729,18 +712,21 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine H5_TIME_WITH_SYS_TIME @H5_TIME_WITH_SYS_TIME@

/* Define using v1.6 public API symbols by default */
#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@

/* Define using v1.8 public API symbols by default */
#cmakedefine H5_USE_18_API_DEFAULT @H5_USE_18_API_DEFAULT@

/* Define using v1.10 public API symbols by default */
#cmakedefine H5_USE_110_API_DEFAULT @H5_USE_110_API_DEFAULT@

/* Define using v1.12 public API symbols by default */
#cmakedefine H5_USE_112_API_DEFAULT @H5_USE_112_API_DEFAULT@

/* Define using v1.14 public API symbols by default */
#cmakedefine H5_USE_114_API_DEFAULT @H5_USE_114_API_DEFAULT@

/* Define using v1.6 public API symbols by default */
#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@

/* Define using v1.8 public API symbols by default */
#cmakedefine H5_USE_18_API_DEFAULT @H5_USE_18_API_DEFAULT@

/* Define if the library will use file locking */
#cmakedefine H5_USE_FILE_LOCKING @H5_USE_FILE_LOCKING@

Expand Down
Loading