summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2024-03-10 04:30:34 (GMT)
committerGitHub <noreply@github.com>2024-03-10 04:30:34 (GMT)
commit6cb4b2f6d793796d37ba8e53723d21f257aab516 (patch)
treed762f978f2f5822d6b362e1d5604a115747884dc
parent08cf031588639d19cac989fc68be418e3b930851 (diff)
downloadhdf5-6cb4b2f6d793796d37ba8e53723d21f257aab516.zip
hdf5-6cb4b2f6d793796d37ba8e53723d21f257aab516.tar.gz
hdf5-6cb4b2f6d793796d37ba8e53723d21f257aab516.tar.bz2
Remove printf debugging from H5Smpio.c (#4098)
-rw-r--r--config/cmake/HDFCompilerFlags.cmake1
-rw-r--r--configure.ac4
-rw-r--r--src/H5Smpio.c91
3 files changed, 14 insertions, 82 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 8f9e2a1..007747a 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -377,7 +377,6 @@ if (HDF5_ENABLE_DEBUG_APIS)
H5F_DEBUG
H5MM_DEBUG
H5O_DEBUG
- H5S_DEBUG
H5T_DEBUG
H5Z_DEBUG
)
diff --git a/configure.ac b/configure.ac
index df49390..4646ba7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2572,8 +2572,8 @@ AC_SUBST([INTERNAL_DEBUG_OUTPUT])
## too specialized or have huge performance hits. These
## are not listed in the "all" packages list.
##
-## all_packages="AC,B2,D,F,FA,FL,FS,MM,O,S,T,Z"
-all_packages="AC,B2,CX,D,F,MM,O,S,T,Z"
+## all_packages="AC,B2,CX,D,F,FA,FL,FS,MM,O,T,Z"
+all_packages="AC,B2,CX,D,F,MM,O,T,Z"
case "X-$INTERNAL_DEBUG_OUTPUT" in
X-yes|X-all)
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 46e6c33..96b2040 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -645,10 +645,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
if (sel_iter->u.hyp.iter_rank != 0 && sel_iter->u.hyp.iter_rank < space->extent.rank) {
/* Flattened selection */
rank = sel_iter->u.hyp.iter_rank;
-#ifdef H5S_DEBUG
- if (H5DEBUG(S))
- fprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__);
-#endif
+
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t);
d[u].start = (hssize_t)diminfo[u].start + sel_iter->u.hyp.sel_off[u];
@@ -657,32 +654,16 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
d[u].count = diminfo[u].count;
d[u].xtent = sel_iter->u.hyp.size[u];
-#ifdef H5S_DEBUG
- if (H5DEBUG(S)) {
- fprintf(H5DEBUG(S),
- "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
- " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
- if (u == 0)
- fprintf(H5DEBUG(S), " rank=%u\n", rank);
- else
- fprintf(H5DEBUG(S), "\n");
- }
-#endif
-
/* Sanity check */
assert(d[u].block > 0);
assert(d[u].count > 0);
assert(d[u].xtent > 0);
- } /* end for */
- } /* end if */
+ }
+ }
else {
/* Non-flattened selection */
rank = space->extent.rank;
-#ifdef H5S_DEBUG
- if (H5DEBUG(S))
- fprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__);
-#endif
+
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t);
d[u].start = (hssize_t)diminfo[u].start + space->select.offset[u];
@@ -691,25 +672,12 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
d[u].count = diminfo[u].count;
d[u].xtent = space->extent.size[u];
-#ifdef H5S_DEBUG
- if (H5DEBUG(S)) {
- fprintf(H5DEBUG(S),
- "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
- " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
- if (u == 0)
- fprintf(H5DEBUG(S), " rank=%u\n", rank);
- else
- fprintf(H5DEBUG(S), "\n");
- }
-#endif
-
/* Sanity check */
assert(d[u].block > 0);
assert(d[u].count > 0);
assert(d[u].xtent > 0);
- } /* end for */
- } /* end else */
+ }
+ }
/**********************************************************************
Compute array "offset[rank]" which gives the offsets for a multi-
@@ -717,22 +685,11 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
**********************************************************************/
offset[rank - 1] = 1;
max_xtent[rank - 1] = d[rank - 1].xtent;
-#ifdef H5S_DEBUG
- if (H5DEBUG(S)) {
- i = ((int)rank) - 1;
- fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i,
- max_xtent[i]);
- }
-#endif
+
for (i = ((int)rank) - 2; i >= 0; --i) {
offset[i] = offset[i + 1] * d[i + 1].xtent;
max_xtent[i] = max_xtent[i + 1] * d[i].xtent;
-#ifdef H5S_DEBUG
- if (H5DEBUG(S))
- fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i],
- i, max_xtent[i]);
-#endif
- } /* end for */
+ }
/* Create a type covering the selected hyperslab.
* Multidimensional dataspaces are stored in row-major order.
@@ -740,16 +697,9 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
* fastest-changing (i.e., inner) dimension * to the slowest (outer).
*/
-/*******************************************************
- * Construct contig type for inner contig dims:
- *******************************************************/
-#ifdef H5S_DEBUG
- if (H5DEBUG(S)) {
- fprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size);
- for (i = ((int)rank) - 1; i >= 0; --i)
- fprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
- }
-#endif
+ /*******************************************************
+ * Construct contig type for inner contig dims:
+ *******************************************************/
/* LARGE_DATATYPE::
* Check if the number of elements to form the inner type fits into a 32 bit integer.
@@ -773,19 +723,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
* from the inside out:
*******************************************************/
for (i = ((int)rank) - 1; i >= 0; --i) {
-#ifdef H5S_DEBUG
- if (H5DEBUG(S))
- fprintf(H5DEBUG(S),
- "%s: Dimension i=%d \n"
- "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE
- ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n",
- __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
-#endif
-
-#ifdef H5S_DEBUG
- if (H5DEBUG(S))
- fprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i);
-#endif
+
/****************************************
* Build vector type of the selection.
****************************************/
@@ -919,11 +857,6 @@ done:
sel_iter = H5FL_FREE(H5S_sel_iter_t, sel_iter);
}
-#ifdef H5S_DEBUG
- if (H5DEBUG(S))
- fprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count,
- (*is_derived_type) ? "TRUE" : "FALSE");
-#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__mpio_reg_hyper_type() */