diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-27 17:28:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 17:28:11 (GMT) |
commit | a0a1959c58973095194f2d9ac5f9b13bb7b14fb4 (patch) | |
tree | 3f36cbd14d9ede9f00c4c26affb9ecab5d1a860f /src/H5Dmpio.c | |
parent | f0690f13fb914ff39a32d88801eabcef759a0163 (diff) | |
download | hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.zip hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.tar.gz hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.tar.bz2 |
clang 13 format #1933 (#1939)
Diffstat (limited to 'src/H5Dmpio.c')
-rw-r--r-- | src/H5Dmpio.c | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 1877f3d..beb7810 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -260,7 +260,7 @@ typedef struct H5D_filtered_collective_io_info_t { int orig_owner; int new_owner; int num_writers; - void * buf; + void *buf; UT_hash_handle hh; } H5D_filtered_collective_io_info_t; @@ -294,7 +294,7 @@ static herr_t H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_in H5D_chunk_map_t *fm); static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, int mpi_rank, int mpi_size); -static herr_t H5D__multi_chunk_filtered_collective_io(H5D_io_info_t * io_info, +static herr_t H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, int mpi_rank, int mpi_size); static herr_t H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, @@ -312,9 +312,9 @@ static herr_t H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm, haddr_t chunk_addr[], int mpi_rank, int mpi_size); static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, int *sum_chunkf); -static herr_t H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t * io_info, - const H5D_type_info_t * type_info, - const H5D_chunk_map_t * fm, +static herr_t H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, + const H5D_type_info_t *type_info, + const H5D_chunk_map_t *fm, H5D_filtered_collective_io_info_t **chunk_list, size_t *num_entries, int mpi_rank); static herr_t H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_list, @@ -323,54 +323,54 @@ static herr_t H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_in int mpi_rank, int mpi_size, size_t **rank_chunks_assigned_map); static herr_t H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chunk_list, - size_t * num_chunks_assigned_map, + size_t *num_chunks_assigned_map, hbool_t all_ranks_involved, - const H5D_io_info_t * io_info, + const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, int mpi_rank, int mpi_size); static herr_t H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk_list, size_t *chunk_list_num_entries, H5D_io_info_t *io_info, const H5D_type_info_t *type_info, int mpi_rank, int mpi_size, H5D_filtered_collective_io_info_t **chunk_hash_table, - unsigned char *** chunk_msg_bufs, - int * chunk_msg_bufs_len); + unsigned char ***chunk_msg_bufs, + int *chunk_msg_bufs_len); static herr_t H5D__mpio_collective_filtered_chunk_common_io(H5D_filtered_collective_io_info_t *chunk_list, size_t chunk_list_num_entries, - const H5D_io_info_t * io_info, + const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, int mpi_size); static herr_t H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chunk_list, size_t chunk_list_num_entries, - const H5D_io_info_t * io_info, + const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, int mpi_rank, int mpi_size); static herr_t H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *chunk_list, size_t chunk_list_num_entries, H5D_filtered_collective_io_info_t *chunk_hash_table, - unsigned char ** chunk_msg_bufs, + unsigned char **chunk_msg_bufs, int chunk_msg_bufs_len, const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, int mpi_rank, int mpi_size); static herr_t H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t *chunk_list, size_t chunk_list_num_entries, - size_t * num_chunks_assigned_map, - H5D_io_info_t * io_info, + size_t *num_chunks_assigned_map, + H5D_io_info_t *io_info, H5D_chk_idx_info_t *idx_info, int mpi_rank, int mpi_size); static herr_t H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *chunk_list, size_t chunk_list_num_entries, - size_t * num_chunks_assigned_map, - H5D_io_info_t * io_info, + size_t *num_chunks_assigned_map, + H5D_io_info_t *io_info, H5D_chk_idx_info_t *idx_info, int mpi_rank, int mpi_size); static herr_t H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, - hbool_t * contig_type_derived, + hbool_t *contig_type_derived, MPI_Datatype *resized_type, - hbool_t * resized_type_derived); + hbool_t *resized_type_derived); static herr_t H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived, MPI_Datatype *resized_type, hbool_t *resized_type_derived); static herr_t H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived, MPI_Datatype *resized_type, - hbool_t * resized_type_derived); + hbool_t *resized_type_derived); static herr_t H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_list, size_t num_entries, H5D_io_op_type_t op_type, MPI_Datatype *new_mem_type, hbool_t *mem_type_derived, @@ -432,7 +432,7 @@ static hbool_t H5D_mpio_debug_inited = FALSE; static const char *const trace_in_pre = "-> "; static const char *const trace_out_pre = "<- "; static int debug_indent = 0; -static FILE * debug_stream = NULL; +static FILE *debug_stream = NULL; /* Determine if this rank should output debugging info */ #define H5D_MPIO_DEBUG_THIS_RANK(rank) \ @@ -789,7 +789,7 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c nbits = 8 * sizeof(local_no_coll_cause); for (int bit_pos = 0; bit_pos < nbits; bit_pos++) { H5D_mpio_no_collective_cause_t cur_cause; - const char * cause_str; + const char *cause_str; size_t buf_space_left; cur_cause = (H5D_mpio_no_collective_cause_t)(1 << bit_pos); @@ -1099,7 +1099,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf H5FD_mpio_chunk_opt_t chunk_opt_mode; #ifdef H5Dmpio_DEBUG hbool_t log_file_flag = FALSE; - FILE * debug_log_file = NULL; + FILE *debug_log_file = NULL; #endif #ifdef H5_HAVE_INSTRUMENTED_LIBRARY htri_t temp_not_link_io = FALSE; @@ -1215,7 +1215,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf else /* Perform unfiltered link chunk collective IO */ if (H5D__link_chunk_collective_io(io_info, type_info, fm, sum_chunk, mpi_rank, mpi_size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO") break; case H5D_MULTI_CHUNK_IO: /* direct request to do multi-chunk IO */ @@ -1229,7 +1229,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf else /* Perform unfiltered multi chunk collective IO */ if (H5D__multi_chunk_collective_io(io_info, type_info, fm, mpi_rank, mpi_size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO") break; } /* end switch */ @@ -1335,16 +1335,16 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ hbool_t chunk_final_ftype_is_derived = FALSE; H5D_storage_t ctg_store; /* Storage info for "fake" contiguous dataset */ size_t total_chunks; - MPI_Datatype * chunk_mtype = NULL; - MPI_Datatype * chunk_ftype = NULL; - MPI_Aint * chunk_disp_array = NULL; - MPI_Aint * chunk_mem_disp_array = NULL; - hbool_t * chunk_mft_is_derived_array = + MPI_Datatype *chunk_mtype = NULL; + MPI_Datatype *chunk_ftype = NULL; + MPI_Aint *chunk_disp_array = NULL; + MPI_Aint *chunk_mem_disp_array = NULL; + hbool_t *chunk_mft_is_derived_array = NULL; /* Flags to indicate each chunk's MPI file datatype is derived */ hbool_t *chunk_mbt_is_derived_array = NULL; /* Flags to indicate each chunk's MPI memory datatype is derived */ - int * chunk_mpi_file_counts = NULL; /* Count of MPI file datatype for each chunk */ - int * chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */ + int *chunk_mpi_file_counts = NULL; /* Count of MPI file datatype for each chunk */ + int *chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */ int mpi_code; /* MPI return code */ herr_t ret_value = SUCCEED; @@ -1373,8 +1373,8 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ */ if (total_chunks == 1) { H5SL_node_t *chunk_node; /* Pointer to chunk node for selection */ - H5S_t * fspace; /* Dataspace describing chunk & selection in it */ - H5S_t * mspace; /* Dataspace describing selection in memory corresponding to this chunk */ + H5S_t *fspace; /* Dataspace describing chunk & selection in it */ + H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */ /* Check for this process having selection in this chunk */ chunk_node = H5SL_first(fm->sel_chunks); @@ -1694,13 +1694,13 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in { H5D_filtered_collective_io_info_t *chunk_list = NULL; /* The list of chunks being read/written */ H5D_filtered_collective_io_info_t *chunk_hash_table = NULL; - unsigned char ** chunk_msg_bufs = NULL; + unsigned char **chunk_msg_bufs = NULL; H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */ MPI_Datatype mem_type = MPI_BYTE; MPI_Datatype file_type = MPI_BYTE; hbool_t mem_type_is_derived = FALSE; hbool_t file_type_is_derived = FALSE; - size_t * rank_chunks_assigned_map = NULL; + size_t *rank_chunks_assigned_map = NULL; size_t chunk_list_num_entries; size_t i; int chunk_msg_bufs_len = 0; @@ -1895,8 +1895,8 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty H5D_io_info_t cpt_io_info; /* Compact I/O info object */ H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */ hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */ - uint8_t * chunk_io_option = NULL; - haddr_t * chunk_addr = NULL; + uint8_t *chunk_io_option = NULL; + haddr_t *chunk_addr = NULL; H5D_storage_t store; /* union of EFL and chunk pointer in file space */ H5FD_mpio_collective_opt_t last_coll_opt_mode = H5FD_MPIO_COLLECTIVE_IO; /* Last parallel transfer with independent IO or collective IO with this mode @@ -1950,8 +1950,8 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty /* Loop over _all_ the chunks */ for (u = 0; u < total_chunk; u++) { H5D_chunk_info_t *chunk_info; /* Chunk info for current chunk */ - H5S_t * fspace; /* Dataspace describing chunk & selection in it */ - H5S_t * mspace; /* Dataspace describing selection in memory corresponding to this chunk */ + H5S_t *fspace; /* Dataspace describing chunk & selection in it */ + H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */ #ifdef H5Dmpio_DEBUG H5D_MPIO_DEBUG_VA(mpi_rank, "mpi_rank = %d, chunk index = %zu", mpi_rank, u); @@ -2144,7 +2144,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i { H5D_filtered_collective_io_info_t *chunk_list = NULL; /* The list of chunks being read/written */ H5D_filtered_collective_io_info_t *chunk_hash_table = NULL; - unsigned char ** chunk_msg_bufs = NULL; + unsigned char **chunk_msg_bufs = NULL; H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */ H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */ MPI_Datatype mem_type = MPI_BYTE; @@ -2742,7 +2742,7 @@ static herr_t H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, H5D_chunk_addr_info_t chunk_addr_info_array[], int sum_chunk, int mpi_rank, int mpi_size) { - H5SL_node_t * chunk_node; /* Current node in chunk skip list */ + H5SL_node_t *chunk_node; /* Current node in chunk skip list */ H5D_chunk_info_t *chunk_info; /* Current chunking info. of this node. */ haddr_t chunk_addr; /* Current chunking address of this node */ haddr_t *total_chunk_addr_array = NULL; /* The array of chunk address for the total number of chunk */ @@ -2928,12 +2928,12 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm, uint8_t assig { size_t total_chunks; unsigned percent_nproc_per_chunk, threshold_nproc_per_chunk; - uint8_t * io_mode_info = NULL; - uint8_t * recv_io_mode_info = NULL; - uint8_t * mergebuf = NULL; - uint8_t * tempbuf; - H5SL_node_t * chunk_node; - H5D_chunk_info_t * chunk_info; + uint8_t *io_mode_info = NULL; + uint8_t *recv_io_mode_info = NULL; + uint8_t *mergebuf = NULL; + uint8_t *tempbuf; + H5SL_node_t *chunk_node; + H5D_chunk_info_t *chunk_info; H5P_coll_md_read_flag_t md_reads_file_flag; hbool_t md_reads_context_flag; hbool_t restore_md_reads_state = FALSE; @@ -3108,7 +3108,7 @@ done: */ static herr_t H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - const H5D_chunk_map_t * fm, + const H5D_chunk_map_t *fm, H5D_filtered_collective_io_info_t **chunk_list, size_t *num_entries, int mpi_rank) { @@ -3135,7 +3135,7 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const /* Each rank builds a local list of the chunks they have selected */ if ((num_chunks_selected = H5SL_count(fm->sel_chunks))) { H5D_chunk_info_t *chunk_info; - H5SL_node_t * chunk_node; + H5SL_node_t *chunk_node; hsize_t select_npoints; hbool_t need_sort = FALSE; @@ -3467,7 +3467,7 @@ done: static herr_t H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chunk_list, size_t *num_chunks_assigned_map, hbool_t all_ranks_involved, - const H5D_io_info_t * io_info, + const H5D_io_info_t *io_info, const H5D_chunk_map_t H5_ATTR_NDEBUG_UNUSED *fm, int mpi_rank, int mpi_size) { @@ -3477,10 +3477,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun hbool_t packed_type_derived = FALSE; size_t i; size_t coll_chunk_list_num_entries = 0; - void * coll_chunk_list = NULL; - int * counts_disps_array = NULL; - int * counts_ptr = NULL; - int * displacements_ptr = NULL; + void *coll_chunk_list = NULL; + int *counts_disps_array = NULL; + int *counts_ptr = NULL; + int *displacements_ptr = NULL; int num_chunks_int; int mpi_code; herr_t ret_value = SUCCEED; @@ -3805,11 +3805,11 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk { #if MPI_VERSION >= 3 H5D_filtered_collective_io_info_t *chunk_table = NULL; - H5S_sel_iter_t * mem_iter = NULL; - unsigned char ** msg_send_bufs = NULL; - unsigned char ** msg_recv_bufs = NULL; - MPI_Request * send_requests = NULL; - MPI_Request * recv_requests = NULL; + H5S_sel_iter_t *mem_iter = NULL; + unsigned char **msg_send_bufs = NULL; + unsigned char **msg_recv_bufs = NULL; + MPI_Request *send_requests = NULL; + MPI_Request *recv_requests = NULL; MPI_Request ibarrier = MPI_REQUEST_NULL; hbool_t mem_iter_init = FALSE; hbool_t ibarrier_posted = FALSE; @@ -3901,7 +3901,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk } else { H5D_chunk_info_t *chunk_info = chunk_entry->chunk_info; - unsigned char * mod_data_p = NULL; + unsigned char *mod_data_p = NULL; hsize_t iter_nelmts; size_t mod_data_size = 0; size_t space_size = 0; @@ -4332,7 +4332,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun const H5D_type_info_t *type_info, int mpi_rank, int mpi_size) { H5D_fill_buf_info_t fb_info; - H5D_chunk_info_t * chunk_info = NULL; + H5D_chunk_info_t *chunk_info = NULL; H5D_io_info_t coll_io_info; H5Z_EDC_t err_detect; /* Error detection info */ H5Z_cb_t filter_cb; /* I/O filter callback function */ @@ -4342,8 +4342,8 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun hbool_t fb_info_init = FALSE; hbool_t index_empty = FALSE; size_t i; - H5S_t * fill_space = NULL; - void * base_read_buf = NULL; + H5S_t *fill_space = NULL; + void *base_read_buf = NULL; herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC @@ -4552,8 +4552,8 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch int H5_ATTR_NDEBUG_UNUSED mpi_rank, int mpi_size) { H5D_fill_buf_info_t fb_info; - H5D_chunk_info_t * chunk_info = NULL; - H5S_sel_iter_t * sel_iter = NULL; /* Dataspace selection iterator for H5D__scatter_mem */ + H5D_chunk_info_t *chunk_info = NULL; + H5S_sel_iter_t *sel_iter = NULL; /* Dataspace selection iterator for H5D__scatter_mem */ H5D_io_info_t coll_io_info; H5Z_EDC_t err_detect; /* Error detection info */ H5Z_cb_t filter_cb; /* I/O filter callback function */ @@ -4564,9 +4564,9 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch hbool_t sel_iter_init = FALSE; hbool_t index_empty = FALSE; size_t i; - H5S_t * dataspace = NULL; - H5S_t * fill_space = NULL; - void * base_read_buf = NULL; + H5S_t *dataspace = NULL; + H5S_t *fill_space = NULL; + void *base_read_buf = NULL; herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC @@ -4771,7 +4771,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch /* Now process all received chunk message buffers */ for (i = 0; i < (size_t)chunk_msg_bufs_len; i++) { H5D_filtered_collective_io_info_t *chunk_entry = NULL; - const unsigned char * msg_ptr = chunk_msg_bufs[i]; + const unsigned char *msg_ptr = chunk_msg_bufs[i]; hsize_t chunk_idx; if (msg_ptr) { @@ -4903,10 +4903,10 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t size_t collective_num_entries = 0; size_t num_local_chunks_processed = 0; size_t i; - void * gathered_array = NULL; - int * counts_disps_array = NULL; - int * counts_ptr = NULL; - int * displacements_ptr = NULL; + void *gathered_array = NULL; + int *counts_disps_array = NULL; + int *counts_ptr = NULL; + int *displacements_ptr = NULL; int mpi_code; herr_t ret_value = SUCCEED; @@ -5093,10 +5093,10 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t * hsize_t scaled_coords[H5O_LAYOUT_NDIMS]; size_t collective_num_entries = 0; size_t i; - void * gathered_array = NULL; - int * counts_disps_array = NULL; - int * counts_ptr = NULL; - int * displacements_ptr = NULL; + void *gathered_array = NULL; + int *counts_disps_array = NULL; + int *counts_ptr = NULL; + int *displacements_ptr = NULL; int mpi_code; herr_t ret_value = SUCCEED; @@ -5704,7 +5704,7 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l { MPI_Aint *io_buf_array = NULL; /* Relative displacements of filtered chunk data buffers */ MPI_Aint *file_offset_array = NULL; /* Chunk offsets in the file */ - int * length_array = NULL; /* Filtered Chunk lengths */ + int *length_array = NULL; /* Filtered Chunk lengths */ int mpi_code; herr_t ret_value = SUCCEED; |