diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-02-13 15:13:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 15:13:38 (GMT) |
commit | c240856c8a9dabc734e507b786fa8f021de8759d (patch) | |
tree | fce59b179d9eb311f8cbf313c5b79dca070e40a2 | |
parent | 972c8833c6658a29f63ea3dc3730ee2dfcc1260b (diff) | |
download | hdf5-c240856c8a9dabc734e507b786fa8f021de8759d.zip hdf5-c240856c8a9dabc734e507b786fa8f021de8759d.tar.gz hdf5-c240856c8a9dabc734e507b786fa8f021de8759d.tar.bz2 |
Fix parallel warnings in H5Dmpio.c (#2457)
* Mark a parameter as unused when not using a special debug define
* Check for a chunk_entry NULL pointer after using HASH_FIND
These should be the last parallel warnings so we can start building
parallel with -Werror.
-rw-r--r-- | src/H5Dmpio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 1e66f80..8e413c1 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -1404,7 +1404,11 @@ done: *------------------------------------------------------------------------- */ static herr_t +#ifdef H5Dmpio_DEBUG H5D__link_piece_collective_io(H5D_io_info_t *io_info, int mpi_rank) +#else +H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_rank) +#endif { MPI_Datatype chunk_final_mtype; /* Final memory MPI datatype for all chunks with selection */ hbool_t chunk_final_mtype_is_derived = FALSE; @@ -4697,8 +4701,10 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch /* Find the chunk entry according to its chunk index */ HASH_FIND(hh, chunk_hash_table, &chunk_idx, sizeof(hsize_t), chunk_entry); - HDassert(chunk_entry); - HDassert(mpi_rank == chunk_entry->new_owner); + if (chunk_entry == NULL) + HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find chunk entry") + if (mpi_rank != chunk_entry->new_owner) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk owner set to incorrect MPI rank") /* * Only process the chunk if its data buffer is allocated. |