diff options
Diffstat (limited to 'src/H5FDsubfiling')
-rw-r--r-- | src/H5FDsubfiling/H5FDioc.c | 9 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDioc_int.c | 6 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDsubfile_int.c | 25 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDsubfiling.c | 4 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDsubfiling_priv.h | 2 |
5 files changed, 27 insertions, 19 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index 39766de..80771c0 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -32,8 +32,6 @@ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ -#define CANBE_UNUSED(X) (void)(X) - /* The driver identification number, initialized at runtime */ static hid_t H5FD_IOC_g = H5I_INVALID_HID; @@ -1219,13 +1217,14 @@ static herr_t H5FD__ioc_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, void *buf) { - H5FD_ioc_t *file = (H5FD_ioc_t *)_file; - herr_t ret_value = SUCCEED; +#ifndef NDEBUG + H5FD_ioc_t *file = (H5FD_ioc_t *)_file; +#endif + herr_t ret_value = SUCCEED; H5FD_IOC_LOG_CALL(__func__); assert(file && file->pub.cls); - CANBE_UNUSED(file); assert(buf); /* Check for overflow conditions */ diff --git a/src/H5FDsubfiling/H5FDioc_int.c b/src/H5FDsubfiling/H5FDioc_int.c index 674b08d..5528fc8 100644 --- a/src/H5FDsubfiling/H5FDioc_int.c +++ b/src/H5FDsubfiling/H5FDioc_int.c @@ -423,8 +423,14 @@ ioc__async_completion(MPI_Request *mpi_reqs, size_t num_reqs) assert(mpi_reqs); H5_CHECK_OVERFLOW(num_reqs, size_t, int); + + /* Have to supppress gcc warnings regarding MPI_STATUSES_IGNORE + * with MPICH (https://github.com/pmodels/mpich/issues/5687) + */ + H5_GCC_DIAG_OFF("stringop-overflow") if (MPI_SUCCESS != (mpi_code = MPI_Waitall((int)num_reqs, mpi_reqs, MPI_STATUSES_IGNORE))) H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Waitall failed", mpi_code); + H5_GCC_DIAG_ON("stringop-overflow") done: H5_SUBFILING_FUNC_LEAVE; diff --git a/src/H5FDsubfiling/H5FDsubfile_int.c b/src/H5FDsubfiling/H5FDsubfile_int.c index cb210b6..a7dd864 100644 --- a/src/H5FDsubfiling/H5FDsubfile_int.c +++ b/src/H5FDsubfiling/H5FDsubfile_int.c @@ -143,17 +143,19 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof, } /* Wait for truncate operations to complete */ + H5_GCC_DIAG_OFF("stringop-overflow") if (MPI_SUCCESS != (mpi_code = MPI_Waitall(num_subfiles_owned, recv_reqs, MPI_STATUSES_IGNORE))) H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Waitall", mpi_code); - - /* sanity check -- compute the file eof using the same mechanism used to - * compute the subfile eof. Assert that the computed value and the - * actual value match. - * - * Do this only for debug builds -- probably delete this before release. - * - * JRM -- 12/15/21 - */ + H5_GCC_DIAG_ON("stringop-overflow") + + /* sanity check -- compute the file eof using the same mechanism used to + * compute the subfile eof. Assert that the computed value and the + * actual value match. + * + * Do this only for debug builds -- probably delete this before release. + * + * JRM -- 12/15/21 + */ #ifndef NDEBUG { @@ -339,15 +341,18 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr) } /* Wait for EOF communication to complete */ + H5_GCC_DIAG_OFF("stringop-overflow") if (MPI_SUCCESS != (mpi_code = MPI_Waitall(num_subfiles, recv_reqs, MPI_STATUSES_IGNORE))) H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Waitall", mpi_code); + H5_GCC_DIAG_ON("stringop-overflow") for (int i = 0; i < num_subfiles; i++) { +#ifndef NDEBUG int ioc_rank = (int)recv_msg[3 * i]; +#endif assert(ioc_rank >= 0); assert(ioc_rank < n_io_concentrators); - CANBE_UNUSED(ioc_rank); assert(sf_eofs[i] == -1); sf_eofs[i] = recv_msg[(3 * i) + 1]; diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c index d8616c8..a2daba0 100644 --- a/src/H5FDsubfiling/H5FDsubfiling.c +++ b/src/H5FDsubfiling/H5FDsubfiling.c @@ -1556,7 +1556,7 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %" PRIuHADDR, addr); if (REGION_OVERFLOW(addr, size)) H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, - "addr overflow, addr = %" PRIuHADDR ", size = %" PRIuHADDR, addr, size); + "addr overflow, addr = %" PRIuHADDR ", size = %zu", addr, size); /* Temporarily reject collective I/O until support is implemented (unless types are simple MPI_BYTE) */ { @@ -1789,7 +1789,7 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_ H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %" PRIuHADDR, addr); if (REGION_OVERFLOW(addr, size)) H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, - "addr overflow, addr = %" PRIuHADDR ", size = %" PRIuHADDR, addr, size); + "addr overflow, addr = %" PRIuHADDR ", size = %zu", addr, size); /* Temporarily reject collective I/O until support is implemented (unless types are simple MPI_BYTE) */ { diff --git a/src/H5FDsubfiling/H5FDsubfiling_priv.h b/src/H5FDsubfiling/H5FDsubfiling_priv.h index 9cc32f1..08fef7d 100644 --- a/src/H5FDsubfiling/H5FDsubfiling_priv.h +++ b/src/H5FDsubfiling/H5FDsubfiling_priv.h @@ -63,6 +63,4 @@ H5_DLL herr_t H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_e } #endif -#define CANBE_UNUSED(X) (void)(X) - #endif /* H5FDsubfiling_priv_H */ |