diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2017-01-27 16:52:17 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2017-01-27 16:52:17 (GMT) |
commit | 5ed72c3d4138bc0b42123abc9735767e3dfc3e22 (patch) | |
tree | 924dfcb0fca220440185ca1ee14b5c48330dbdce | |
parent | 0a93759774152869a123c12fe766f6c13530217a (diff) | |
download | hdf5-5ed72c3d4138bc0b42123abc9735767e3dfc3e22.zip hdf5-5ed72c3d4138bc0b42123abc9735767e3dfc3e22.tar.gz hdf5-5ed72c3d4138bc0b42123abc9735767e3dfc3e22.tar.bz2 |
Remove Debugging Statements for Code Review
-rw-r--r-- | src/H5Dmpio.c | 315 |
1 files changed, 5 insertions, 310 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 72f880b..c5a3fae 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -86,12 +86,6 @@ #define H5D_CHUNK_SELECT_IRREG 2 #define H5D_CHUNK_SELECT_NONE 0 -#define PARALLEL_COMPRESS_DEBUG - -#ifdef PARALLEL_COMPRESS_DEBUG -FILE *debug_file; -#endif - /******************/ /* Local Typedefs */ /******************/ @@ -409,18 +403,6 @@ H5D__mpio_array_gather(const H5D_io_info_t *io_info, void *local_array, *_gathered_array = gathered_array; *_gathered_array_num_entries = gathered_array_num_entries; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, " Contents of gathered array:\n"); - HDfprintf(debug_file, "------------------------------\n"); - for (size_t j = 0; j < (size_t) gathered_array_num_entries; j++) { - HDfprintf(debug_file, "| Chunk Entry %zd:\n", j); - HDfprintf(debug_file, "| - Chunk Address: %a\n", ((H5D_filtered_collective_io_info_t *) gathered_array)[j].old_chunk.offset); - HDfprintf(debug_file, "| - Chunk Length: %zd\n", ((H5D_filtered_collective_io_info_t *) gathered_array)[j].old_chunk.length); - HDfprintf(debug_file, "| - Address of mspace: %x\n", ((H5D_filtered_collective_io_info_t *) gathered_array)[j].chunk_info.mspace); - } - HDfprintf(debug_file, "------------------------------\n\n"); -#endif - done: if (receive_counts_array) H5MM_free(receive_counts_array); @@ -913,14 +895,6 @@ H5D__chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_ FUNC_ENTER_PACKAGE -#ifdef PARALLEL_COMPRESS_DEBUG - char name[10]; - - snprintf(name, 10, "out - %d", H5F_mpi_get_rank(io_info->dset->oloc.file)); - - debug_file = fopen(name, "w"); -#endif - /* Call generic selection operation */ if(H5D__chunk_collective_io(io_info, type_info, fm) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") @@ -1266,8 +1240,6 @@ if(H5DEBUG(D)) * Purpose: Routine for one collective IO with one MPI derived datatype * to link with all filtered chunks * - * XXX: Update later to reflect changes in structure - * * 1. Construct a list of selected chunks in the collective IO * operation * A. If any chunk is being written to by more than 1 @@ -1355,16 +1327,6 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in if (H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "couldn't construct filtered I/O info list") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Incoming messages from other processes:\n"); - HDfprintf(debug_file, "-----------------------------------------\n"); - for (size_t j = 0; j < chunk_list_num_entries; j++) { - HDfprintf(debug_file, "| Owner of chunk at address %a is expecting messages from %d other processes.\n", - chunk_list[j].old_chunk.offset, chunk_list[j].num_writers - 1); - } - HDfprintf(debug_file, "-----------------------------------------\n\n"); -#endif - if (io_info->op_type == H5D_IO_OP_WRITE) { /* Filtered collective write */ H5D_chk_idx_info_t index_info; H5D_chunk_ud_t udata; @@ -1382,12 +1344,6 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in udata.common.storage = index_info.storage; udata.filter_mask = 0; - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Processing chunks:\n"); - HDfprintf(debug_file, "---------------------------------------------------\n"); -#endif - /* Iterate through all the chunks in the collective write operation, * updating each chunk with the data modifications from other processes, * then re-filtering the chunk. @@ -1397,10 +1353,6 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "couldn't process chunk entry") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "---------------------------------------------------\n\n"); -#endif - /* Gather the new chunk sizes to all processes for a collective reallocation * of the chunks in the file. */ @@ -1409,32 +1361,15 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in (void **) &collective_chunk_list, &collective_chunk_list_num_entries, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "couldn't gather new chunk sizes") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Reallocing chunks:\n"); - HDfprintf(debug_file, "------------------------------\n"); -#endif - /* Collectively re-allocate the modified chunks (from each process) in the file */ for (i = 0; i < collective_chunk_list_num_entries; i++) { hbool_t insert; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Reallocing chunk at address %a with new length of %zd.\n", collective_chunk_list[i].new_chunk.offset, collective_chunk_list[i].new_chunk.length); -#endif - if (H5D__chunk_file_alloc(&index_info, &collective_chunk_list[i].old_chunk, &collective_chunk_list[i].new_chunk, &insert, collective_chunk_list[i].chunk_info.scaled) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk") - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Chunk now at address %a.\n|\n", collective_chunk_list[i].new_chunk); -#endif } /* end for */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "------------------------------\n\n"); -#endif - if (NULL == (num_chunks_selected_array = (size_t *) H5MM_malloc((size_t) mpi_size * sizeof(*num_chunks_selected_array)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate num chunks selected array") @@ -1442,15 +1377,6 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in 1, MPI_UNSIGNED_LONG_LONG, io_info->comm))) HMPI_GOTO_ERROR(FAIL, "MPI_Allgather failed", mpi_code) -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, " Num Chunks Selected Array\n"); - HDfprintf(debug_file, "------------------------------------\n"); - for (size_t j = 0; j < (size_t) mpi_size; j++) { - HDfprintf(debug_file, "| Process %d has %zd chunks selected.\n", j, num_chunks_selected_array[j]); - } - HDfprintf(debug_file, "------------------------------------\n\n"); -#endif - /* If this process has any chunks selected, create a MPI type for collectively * writing out the chunks to file. Otherwise, the process contributes to the * collective write with a none type. @@ -1499,10 +1425,6 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in /* Participate in the collective re-insertion of all chunks modified * in this iteration into the chunk index */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Reinserting chunks into chunk index.\n"); - HDfprintf(debug_file, "---------------------------------------\n"); -#endif for (i = 0; i < collective_chunk_list_num_entries; i++) { udata.chunk_block = collective_chunk_list[i].new_chunk; @@ -1510,15 +1432,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in if ((index_info.storage->ops->insert)(&index_info, &udata, io_info->dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk address into index") - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Successfully inserted chunk at address %a into the chunk index.\n", udata.chunk_block.offset); -#endif } /* end for */ - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "---------------------------------------\n"); -#endif } /* end if */ done: @@ -1765,8 +1679,6 @@ done: * Purpose: To do filtered collective IO per chunk to save on memory, * as opposed to collective IO of every chunk at once * - * XXX: Update later to reflect changes in structure - * * 1. Construct a list of selected chunks in the collective IO * operation * A. If any chunk is being written to by more than 1 @@ -1790,19 +1702,19 @@ done: * III. Receive any modification data from other * processes and update the chunk data with these * modifications - * III. Filter the chunk - * IV. Contribute the chunk to an array gathered by + * IV. Filter the chunk + * V. Contribute the chunk to an array gathered by * all processes which contains every chunk * modified in this iteration (up to one chunk * per process, some processes may not have a * selection/may have less chunks to work on than * other processes) - * II. All processes collectively re-allocate each + * VI. All processes collectively re-allocate each * chunk from the gathered array with their new * sizes after the filter operation - * IV. Proceed with the collective write operation + * VII. Proceed with the collective write operation * for the chunks modified on this iteration - * V. All processes collectively re-insert each + * VIII. All processes collectively re-insert each * chunk from the gathered array into the chunk * index * @@ -1893,19 +1805,6 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i udata.common.storage = index_info.storage; udata.filter_mask = 0; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Incoming messages from other processes:\n"); - HDfprintf(debug_file, "-----------------------------------------\n"); - for (size_t k = 0; k < chunk_list_num_entries; k++) { - HDfprintf(debug_file, "| Owner of chunk at address %a is expecting messages from %d other processes.\n", - chunk_list[k].old_chunk.offset, chunk_list[k].num_writers - 1); - } - HDfprintf(debug_file, "-----------------------------------------\n\n"); - - HDfprintf(debug_file, "Processing chunks:\n"); - HDfprintf(debug_file, "---------------------------------------------------\n"); -#endif - /* Retrieve the maximum number of chunks being written among all processes */ if (MPI_SUCCESS != (mpi_code = MPI_Allreduce(&chunk_list_num_entries, &max_num_chunks, 1, MPI_UNSIGNED_LONG_LONG, MPI_MAX, io_info->comm))) @@ -1948,35 +1847,17 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i (void **) &collective_chunk_list, &collective_chunk_list_num_entries, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "couldn't gather new chunk sizes") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Reallocing chunks:\n"); - HDfprintf(debug_file, "------------------------------\n"); -#endif - /* Participate in the collective re-allocation of all chunks modified * in this iteration. */ for (j = 0; j < collective_chunk_list_num_entries; j++) { hbool_t insert = FALSE; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Re-allocing chunk at address %a with new length of %llu bytes.\n", - collective_chunk_list[j].new_chunk.offset, collective_chunk_list[j].new_chunk.length); -#endif - if (H5D__chunk_file_alloc(&index_info, &collective_chunk_list[j].old_chunk, &collective_chunk_list[j].new_chunk, &insert, chunk_list[j].chunk_info.scaled) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk") - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Chunk now at address %a.\n|\n", collective_chunk_list[j].new_chunk); -#endif } /* end for */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "------------------------------\n\n"); -#endif - /* If this process has a chunk to work on, create a MPI type for the * memory and file for writing out the chunk */ @@ -1988,11 +1869,6 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i /* XXX: offset could be wrong if a process runs out of chunks */ HDmemcpy(&chunk_list[i].new_chunk, &collective_chunk_list[mpi_rank].new_chunk, sizeof(chunk_list[i].new_chunk)); -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "New chunk record after memcpy back to local:\n"); - HDfprintf(debug_file, " - Chunk offset: %a, Chunk length: %lld\n", chunk_list[i].new_chunk.offset, chunk_list[i].new_chunk.length); -#endif - H5_CHECKED_ASSIGN(mpi_type_count, int, chunk_list[i].new_chunk.length, hsize_t); /* Create MPI memory type for writing to chunk */ @@ -2031,27 +1907,14 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i /* Participate in the collective re-insertion of all chunks modified * in this iteration into the chunk index */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "Reinserting chunks into chunk index.\n"); - HDfprintf(debug_file, "---------------------------------------\n"); -#endif - for (j = 0; j < collective_chunk_list_num_entries; j++) { udata.chunk_block = collective_chunk_list[j].new_chunk; udata.common.scaled = collective_chunk_list[j].chunk_info.scaled; if ((index_info.storage->ops->insert)(&index_info, &udata, io_info->dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk address into index") - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Successfully inserted chunk at address %a into the chunk index.\n", udata.chunk_block.offset); -#endif } /* end for */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "---------------------------------------\n"); -#endif - if (collective_chunk_list) collective_chunk_list = (H5D_filtered_collective_io_info_t *) H5MM_free(collective_chunk_list); } /* end for */ @@ -2736,39 +2599,6 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ chunk_node = H5SL_next(chunk_node); } /* end for */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, " Contents of local info array\n"); - HDfprintf(debug_file, "------------------------------\n"); - for (size_t j = 0; j < (size_t) num_chunks_selected; j++) { - HDfprintf(debug_file, "| Chunk Entry %zd:\n", j); - HDfprintf(debug_file, "| - Chunk Address: %a\n", local_info_array[j].old_chunk.offset); - HDfprintf(debug_file, "| - Chunk Length: %zd\n", local_info_array[j].old_chunk.length); - HDfprintf(debug_file, "| - Address of mspace: %x\n", local_info_array[j].chunk_info.mspace); - HDfprintf(debug_file, "| - Chunk Selection Type: %d\n", H5S_GET_SELECT_TYPE(local_info_array[j].chunk_info.mspace)); - HDfprintf(debug_file, "| - Chunk Num Elmts Sel.: %zd\n", H5S_GET_SELECT_NPOINTS(local_info_array[j].chunk_info.mspace)); - } - HDfprintf(debug_file, "------------------------------\n\n"); - - HDfprintf(debug_file, "Testing mem/file space addresses:\n"); - HDfprintf(debug_file, "-----------------------------------\n"); - - for (size_t j = 0; j < num_chunks_selected; j++) { - HDfprintf(debug_file, "| Testing chunk at address %a.\n", local_info_array[j].old_chunk.offset); - HDfprintf(debug_file, "| Mem Space:\n"); - HDfprintf(debug_file, "| - Extent Num elements: %zd\n", H5S_GET_EXTENT_NPOINTS(local_info_array[j].chunk_info.mspace)); - HDfprintf(debug_file, "| - Extent type: %d\n", H5S_GET_EXTENT_TYPE(local_info_array[j].chunk_info.mspace)); - HDfprintf(debug_file, "| - Selection Num elements: %zd\n", H5S_GET_SELECT_NPOINTS(local_info_array[j].chunk_info.mspace)); - HDfprintf(debug_file, "| - Selection type: %d\n", H5S_GET_SELECT_TYPE(local_info_array[j].chunk_info.mspace)); - HDfprintf(debug_file, "| File Space:\n"); - HDfprintf(debug_file, "| - Extent Num elements: %zd\n", H5S_GET_EXTENT_NPOINTS(local_info_array[j].chunk_info.fspace)); - HDfprintf(debug_file, "| - Extent type: %d\n", H5S_GET_EXTENT_TYPE(local_info_array[j].chunk_info.fspace)); - HDfprintf(debug_file, "| - Selection Num elements: %zd\n", H5S_GET_SELECT_NPOINTS(local_info_array[j].chunk_info.fspace)); - HDfprintf(debug_file, "| - Selection type: %d\n|\n", H5S_GET_SELECT_TYPE(local_info_array[j].chunk_info.fspace)); - } - - HDfprintf(debug_file, "-----------------------------------\n\n"); -#endif - /* Redistribute shared chunks to new owners as necessary */ if (!no_overlap && (io_info->op_type == H5D_IO_OP_WRITE)) { size_t i; @@ -2846,10 +2676,6 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ /* Determine size of serialized chunk memory dataspace plus the size * of the data being written */ - /* XXX: Using the file dataspace seems to work here, presumably because the file - * space reflects how the data is actually stored in the file, not in memory. e.g. - * it reflects the chunking setup - */ if (H5S_encode(chunk_entry.chunk_info.fspace, &mod_data, &mod_data_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "unable to get encoded dataspace size") @@ -2858,10 +2684,6 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ mod_data_size += (size_t) iter_nelmts * type_info->src_type_size; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Allocing %zd bytes for mod. data buffer.\n", (size_t) mod_data_size); -#endif - if (NULL == (mod_data = (unsigned char *) H5MM_malloc(mod_data_size))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk modification send buffer") @@ -2875,27 +2697,11 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information") mem_iter_init = TRUE; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Iterating over %lld elements.\n", iter_nelmts); -#endif - /* Collect the modification data into the buffer */ if (!H5D__gather_mem(io_info->u.wbuf, chunk_entry.chunk_info.mspace, mem_iter, (size_t) iter_nelmts, io_info->dxpl_cache, mod_data_p)) HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "couldn't gather from write buffer") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Mod. Data Buffer:\n"); - HDfprintf(debug_file, "| - ["); - for (size_t j = 0; j < (size_t) iter_nelmts; j++) { - if (j > 0) HDfprintf(debug_file, ", "); - HDfprintf(debug_file, "%lld", ((long *) mod_data_p)[j]); - } - HDfprintf(debug_file, "]\n|\n"); - - HDfprintf(debug_file, "| Sending modification data for chunk at address %a to process %d.\n", chunk_entry.old_chunk.offset, new_owner); -#endif - /* Send modification data to new owner */ H5_CHECK_OVERFLOW(mod_data_size, size_t, int) H5_CHECK_OVERFLOW(chunk_entry.chunk_info.index, hsize_t, int) @@ -2903,19 +2709,12 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ (int) chunk_entry.chunk_info.index, io_info->comm, &send_requests[num_send_requests++]))) HMPI_GOTO_ERROR(FAIL, "MPI_Isend failed", mpi_code) -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Mod. data sent.\n|\n"); -#endif if (mod_data) mod_data = (unsigned char *) H5MM_free(mod_data); if (mem_iter_init && H5S_SELECT_ITER_RELEASE(mem_iter) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release selection iterator") mem_iter_init = FALSE; } /* end else */ - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Chunk at address %a re-assigned to process %d.\n|\n", chunk_addr, new_owner); -#endif } /* end for */ /* Release old list */ @@ -2924,22 +2723,6 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ /* Local info list becomes modified (redistributed) chunk list */ local_info_array = overlap_info_array; - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "This process now has %d chunks selected after redistribution.\n\n", num_chunks_selected); - - HDfprintf(debug_file, " Contents of local info array (after redistribution)\n"); - HDfprintf(debug_file, "------------------------------\n"); - for (size_t j = 0; j < (size_t) num_chunks_selected; j++) { - HDfprintf(debug_file, "| Chunk Entry %zd:\n", j); - HDfprintf(debug_file, "| - Chunk Address: %a\n", local_info_array[j].old_chunk.offset); - HDfprintf(debug_file, "| - Chunk Length: %zd\n", local_info_array[j].old_chunk.length); - HDfprintf(debug_file, "| - Address of mspace: %x\n", local_info_array[j].chunk_info.fspace); - HDfprintf(debug_file, "| - Chunk Selection Type: %d\n", H5S_GET_SELECT_TYPE(local_info_array[j].chunk_info.fspace)); - HDfprintf(debug_file, "| - Chunk Num Elmts Sel.: %zd\n", H5S_GET_SELECT_NPOINTS(local_info_array[j].chunk_info.fspace)); - } - HDfprintf(debug_file, "------------------------------\n\n"); -#endif } /* end if */ *chunk_list = local_info_array; @@ -3022,11 +2805,6 @@ H5D__mpio_filtered_collective_write_type(H5D_filtered_collective_io_info_t *chun /* Ensure the list is sorted in ascending order of offset in the file */ HDqsort(chunk_list, num_entries, sizeof(*chunk_list), H5D__cmp_filtered_collective_io_info_entry); -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "MPI Write type entries:\n"); - HDfprintf(debug_file, "---------------------------------\n"); -#endif - base_buf = chunk_list[0].buf; for (i = 0; i < num_entries; i++) { /* Set up the offset in the file, the length of the chunk data, and the relative @@ -3035,22 +2813,8 @@ H5D__mpio_filtered_collective_write_type(H5D_filtered_collective_io_info_t *chun file_offset_array[i] = (MPI_Aint) chunk_list[i].new_chunk.offset; length_array[i] = (int) chunk_list[i].new_chunk.length; write_buf_array[i] = (MPI_Aint) chunk_list[i].buf - (MPI_Aint) base_buf; - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Type Entry %zd:\n", i); - HDfprintf(debug_file, "| - Offset: %a; Length: %zd\n", file_offset_array[i], length_array[i]); - HDfprintf(debug_file, "| - Write buffer:\n| ["); - for (size_t j = 0; j < (size_t) length_array[i]; j++) { - HDfprintf(debug_file, "%c, ", ((char *) chunk_list[i].buf)[j]); - } - HDfprintf(debug_file, "]\n|\n"); -#endif } /* end for */ -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "---------------------------------\n\n"); -#endif - /* Create memory MPI type */ if (MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int) num_entries, length_array, write_buf_array, MPI_BYTE, new_mem_type))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code) @@ -3113,10 +2877,6 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk HDassert(io_info); HDassert(type_info); -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Chunk at address %a:\n", chunk_entry->old_chunk.offset); -#endif - /* XXX: Determine if a chunk is being fully overwritten by looking at the total selection * in the dataspace */ @@ -3131,12 +2891,6 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk : (hsize_t) H5S_GET_EXTENT_NPOINTS(chunk_entry->chunk_info.fspace) * type_info->src_type_size; chunk_entry->new_chunk.length = buf_size; -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Allocing %zd bytes for chunk data buffer.\n", buf_size); - if (io_info->op_type == H5D_IO_OP_WRITE) - HDfprintf(debug_file, "| - Write type is: %s.\n", (full_overwrite) ? "overwrite" : "non-overwrite"); -#endif - if (NULL == (chunk_entry->buf = H5MM_malloc(buf_size))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer") @@ -3152,17 +2906,6 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk io_info->dxpl_cache->err_detect, io_info->dxpl_cache->filter_cb, (size_t *) &chunk_entry->new_chunk.length, &buf_size, &chunk_entry->buf) < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "couldn't unfilter chunk for modifying") - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - After decompression: Nbytes=%zd; Buf_size=%zd.\n", chunk_entry->new_chunk.length, buf_size); - - HDfprintf(debug_file, "| - Read buf:\n| - ["); - for (size_t j = 0; j < chunk_entry->new_chunk.length / type_info->src_type_size; j++) { - if (j > 0) HDfprintf(debug_file, ", "); - HDfprintf(debug_file, "%lld", ((long *) chunk_entry->buf)[j]); - } - HDfprintf(debug_file, "]\n|\n"); -#endif } /* end if */ /* Initialize iterator for memory selection */ @@ -3212,18 +2955,10 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk io_info->comm, &status))) HMPI_GOTO_ERROR(FAIL, "MPI_Probe failed", mpi_code) -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Found message from source %d with tag %d.\n", status.MPI_SOURCE, status.MPI_TAG); -#endif - /* Retrieve the message size */ if (MPI_SUCCESS != (mpi_code = MPI_Get_count(&status, MPI_BYTE, &count))) HMPI_GOTO_ERROR(FAIL, "MPI_Get_count failed", mpi_code) -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Message size is %d bytes.\n", count); -#endif - if (NULL == (mod_data = (unsigned char *) H5MM_malloc((size_t) count))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate modification data receive buffer") mod_data_p = mod_data; @@ -3232,23 +2967,10 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk (int) chunk_entry->chunk_info.index, io_info->comm, &status))) HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mpi_code) -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Received the message.\n"); -#endif - /* Decode the process' chunk file dataspace */ if (NULL == (dataspace = H5S_decode(&mod_data_p))) HGOTO_ERROR(H5E_DATASET, H5E_CANTDECODE, FAIL, "unable to decode dataspace") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Deserialized selection info:\n"); - HDfprintf(debug_file, "| Mem Space:\n"); - HDfprintf(debug_file, "| - Extent Num elements: %zd\n", H5S_GET_EXTENT_NPOINTS(dataspace)); - HDfprintf(debug_file, "| - Extent type: %d\n", H5S_GET_EXTENT_TYPE(dataspace)); - HDfprintf(debug_file, "| - Selection Num elements: %zd\n", H5S_GET_SELECT_NPOINTS(dataspace)); - HDfprintf(debug_file, "| - Selection type: %d\n", H5S_GET_SELECT_TYPE(dataspace)); -#endif - if (H5S_select_iter_init(mem_iter, dataspace, type_info->dst_type_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information") mem_iter_init = TRUE; @@ -3256,20 +2978,6 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk if ((iter_nelmts = H5S_GET_SELECT_NPOINTS(dataspace)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "dataspace is invalid") -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Contents of message:\n| ["); - for (size_t j = 0; j < iter_nelmts; j++) { - if (j > 0) HDfprintf(debug_file, ", "); - HDfprintf(debug_file, "%lld", ((long *) mod_data_p)[j]); - } - HDfprintf(debug_file, "]\n"); -#endif - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| Iter nelmts=%lld.\n", iter_nelmts); - HDfprintf(debug_file, "| Mem space selected points: %zd.\n| \n", H5S_GET_SELECT_NPOINTS(dataspace)); -#endif - /* Update the chunk data with the received modification data */ if (H5D__scatter_mem(mod_data_p, dataspace, mem_iter, (size_t) iter_nelmts, io_info->dxpl_cache, chunk_entry->buf) < 0) @@ -3289,19 +2997,6 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk mem_iter_init = FALSE; } /* end while */ - -#ifdef PARALLEL_COMPRESS_DEBUG - HDfprintf(debug_file, "| - Chunk Data Buffer:\n"); - HDfprintf(debug_file, "| - ["); - for (size_t j = 0; j < chunk_entry->new_chunk.length / type_info->src_type_size; j++) { - if (j > 0) HDfprintf(debug_file, ", "); - HDfprintf(debug_file, "%lld", ((long *) chunk_entry->buf)[j]); - } - HDfprintf(debug_file, "]\n|\n"); - - HDfprintf(debug_file, "| - About to filter %zd bytes in buffer of size %zd.\n|\n", chunk_entry->new_chunk.length, buf_size); -#endif - /* Filter the chunk */ if (H5Z_pipeline(&io_info->dset->shared->dcpl_cache.pline, 0, &filter_mask, io_info->dxpl_cache->err_detect, io_info->dxpl_cache->filter_cb, |