Skip to content

Commit

Permalink
Avoid attempted use of NULL pointer in parallel compression code (HDF…
Browse files Browse the repository at this point in the history
…Group#3786)

The parallel compression test code tests for the case where all MPI ranks have no selection in a dataset when writing to it. Add an early exit to the code to avoid attempting to use a NULL pointer due to there being no work to do.
  • Loading branch information
jhendersonHDF authored Oct 28, 2023
1 parent 1bcef50 commit edb5cff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/H5Dmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3782,6 +3782,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
counts_disps_array = H5MM_xfree(counts_disps_array);
}

/* No useful work to do - exit */
if (coll_chunk_list_num_entries == 0)
HGOTO_DONE(SUCCEED);

/*
* Phase 2 - Involved ranks now redistribute any shared chunks to new
* owners as necessary.
Expand Down

0 comments on commit edb5cff

Please sign in to comment.