diff options
Diffstat (limited to 'testpar/t_cache.c')
-rw-r--r-- | testpar/t_cache.c | 1129 |
1 files changed, 563 insertions, 566 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 4d3aff5..b374a48 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -480,13 +480,13 @@ static hbool_t trace_file_check(int metadata_write_strategy); static void print_stats(void) { - HDfprintf(stdout, "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n", world_mpi_rank, - datum_clears, datum_pinned_clears, datum_destroys); - HDfprintf(stdout, "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n", world_mpi_rank, - datum_flushes, datum_pinned_flushes, datum_loads); - HDfprintf(stdout, "%d: pins: global / global dirty / local = %ld / %ld / %ld\n", world_mpi_rank, - global_pins, global_dirty_pins, local_pins); - HDfflush(stdout); + fprintf(stdout, "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n", world_mpi_rank, + datum_clears, datum_pinned_clears, datum_destroys); + fprintf(stdout, "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n", world_mpi_rank, + datum_flushes, datum_pinned_flushes, datum_loads); + fprintf(stdout, "%d: pins: global / global dirty / local = %ld / %ld / %ld\n", world_mpi_rank, + global_pins, global_dirty_pins, local_pins); + fflush(stdout); return; @@ -560,8 +560,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -577,8 +577,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -592,8 +592,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, - __func__, mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } else { @@ -605,8 +605,7 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, __func__); } } } @@ -619,8 +618,7 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, __func__); } } } @@ -636,8 +634,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -651,8 +649,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -747,8 +745,8 @@ init_data(void) haddr_t addr = BASE_ADDR; /* this must hold so moves don't change entry size. */ - HDassert((NUM_DATA_ENTRIES / 2) % 20 == 0); - HDassert((virt_num_data_entries / 2) % 20 == 0); + assert((NUM_DATA_ENTRIES / 2) % 20 == 0); + assert((virt_num_data_entries / 2) % 20 == 0); for (i = 0; i < NUM_DATA_ENTRIES; i++) { data[i].base_addr = addr; @@ -770,7 +768,7 @@ init_data(void) data_index[i] = i; addr += addr_offsets[j]; - HDassert(addr > data[i].base_addr); + assert(addr > data[i].base_addr); j = (j + 1) % num_addr_offsets; } @@ -823,7 +821,7 @@ do_express_test(void) nerrors++; max_express_test = -1; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); } } @@ -871,7 +869,7 @@ do_sync(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -882,7 +880,7 @@ do_sync(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != SYNC_ACK_CODE) || (mssg.src != world_server_mpi_rank) || @@ -890,7 +888,7 @@ do_sync(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__); } } } @@ -927,7 +925,7 @@ get_max_nerrors(void) nerrors++; max_nerrors = -1; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); } } @@ -970,7 +968,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__); } } else { @@ -987,7 +985,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__); } } else if (mssg_ptr->magic != MSSG_MAGIC) { @@ -995,7 +993,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__); } } else if (mssg_ptr->src != status.MPI_SOURCE) { @@ -1003,7 +1001,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__); } } } @@ -1043,7 +1041,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1063,7 +1061,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__); } } } @@ -1098,7 +1096,7 @@ setup_derived_types(void) MPI_Aint displs[9]; struct mssg_t sample; /* used to compute displacements */ - HDmemset(&sample, 0, sizeof(struct mssg_t)); + memset(&sample, 0, sizeof(struct mssg_t)); /* setup the displacements array */ if ((MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0])) || @@ -1114,7 +1112,7 @@ setup_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__); } } else { @@ -1134,7 +1132,7 @@ setup_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__); } } } @@ -1148,7 +1146,7 @@ setup_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__); } } } @@ -1187,7 +1185,7 @@ takedown_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__); } } @@ -1240,8 +1238,8 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__, - actual_total_reads, total_reads); + fprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__, + actual_total_reads, total_reads); } } @@ -1250,8 +1248,8 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__, - actual_total_writes, total_writes); + fprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__, + actual_total_writes, total_writes); } } @@ -1293,7 +1291,7 @@ server_main(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__); } } @@ -1310,7 +1308,7 @@ server_main(void) case WRITE_REQ_ACK_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received write ack?!?.\n", __func__); + fprintf(stdout, "%s: Received write ack?!?.\n", __func__); break; case READ_REQ_CODE: @@ -1320,7 +1318,7 @@ server_main(void) case READ_REQ_REPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received read req reply?!?.\n", __func__); + fprintf(stdout, "%s: Received read req reply?!?.\n", __func__); break; case SYNC_REQ_CODE: @@ -1330,7 +1328,7 @@ server_main(void) case SYNC_ACK_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received sync ack?!?.\n", __func__); + fprintf(stdout, "%s: Received sync ack?!?.\n", __func__); break; case REQ_TTL_WRITES_CODE: @@ -1340,7 +1338,7 @@ server_main(void) case REQ_TTL_WRITES_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received total writes reply?!?.\n", __func__); + fprintf(stdout, "%s: Received total writes reply?!?.\n", __func__); break; case REQ_TTL_READS_CODE: @@ -1350,7 +1348,7 @@ server_main(void) case REQ_TTL_READS_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received total reads reply?!?.\n", __func__); + fprintf(stdout, "%s: Received total reads reply?!?.\n", __func__); break; case REQ_ENTRY_WRITES_CODE: @@ -1360,7 +1358,7 @@ server_main(void) case REQ_ENTRY_WRITES_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__); + fprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__); break; case REQ_ENTRY_READS_CODE: @@ -1370,7 +1368,7 @@ server_main(void) case REQ_ENTRY_READS_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__); + fprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__); break; case REQ_RW_COUNT_RESET_CODE: @@ -1380,7 +1378,7 @@ server_main(void) case REQ_RW_COUNT_RESET_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__); + fprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__); break; case DONE_REQ_CODE: @@ -1393,7 +1391,7 @@ server_main(void) nerrors++; success = FALSE; if (verbose) - HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__); break; } } @@ -1435,7 +1433,7 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1449,8 +1447,8 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1458,8 +1456,8 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, - data[target_index].len, mssg_ptr->len); + fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, + data[target_index].len, mssg_ptr->len); } } else if (!(data[target_index].valid)) { @@ -1467,11 +1465,10 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, - "%d:%s: proc %d read invalid entry. " - "idx/base_addr = %d/%" PRIuHADDR ".\n", - world_mpi_rank, __func__, mssg_ptr->src, target_index, - data[target_index].base_addr); + fprintf(stdout, + "%d:%s: proc %d read invalid entry. " + "idx/base_addr = %d/%" PRIuHADDR ".\n", + world_mpi_rank, __func__, mssg_ptr->src, target_index, data[target_index].base_addr); } } else { @@ -1502,15 +1499,15 @@ serve_read_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } else { - HDfprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } } @@ -1551,7 +1548,7 @@ serve_sync_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1578,11 +1575,11 @@ serve_sync_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d sync.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d sync.\n", (int)(mssg_ptr->src)); } else { - HDfprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src)); } } @@ -1625,7 +1622,7 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1639,8 +1636,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1648,8 +1645,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, - data[target_index].len, mssg_ptr->len); + fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, + data[target_index].len, mssg_ptr->len); } } } @@ -1664,8 +1661,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__, - new_ver_num, data[target_index].ver); + fprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__, + new_ver_num, data[target_index].ver); } } } @@ -1703,15 +1700,15 @@ serve_write_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } else { - HDfprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } } @@ -1750,7 +1747,7 @@ serve_total_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1777,11 +1774,11 @@ serve_total_writes_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes); + fprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes); } else { - HDfprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes); + fprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes); } } @@ -1820,7 +1817,7 @@ serve_total_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1847,11 +1844,11 @@ serve_total_reads_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads); + fprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads); } else { - HDfprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads); + fprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads); } } @@ -1892,7 +1889,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1906,8 +1903,8 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else { @@ -1934,13 +1931,13 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); + fprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); } else { - HDfprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); + fprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); } } @@ -1981,7 +1978,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1995,8 +1992,8 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else { @@ -2023,13 +2020,13 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); + fprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); } else { - HDfprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); + fprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); } } @@ -2067,7 +2064,7 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -2099,11 +2096,11 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request R/W counter reset.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d request R/W counter reset.\n", (int)(mssg_ptr->src)); } else { - HDfprintf(stdout, "%d request R/w counter reset FAILED.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d request R/w counter reset FAILED.\n", (int)(mssg_ptr->src)); } } @@ -2134,25 +2131,25 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr) int idx; struct datum *entry_ptr; - HDassert(udata_ptr); - HDassert(image_len_ptr); + assert(udata_ptr); + assert(image_len_ptr); idx = addr_to_datum_index(addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(addr == entry_ptr->base_addr); - HDassert(!entry_ptr->global_pinned); - HDassert(!entry_ptr->local_pinned); + assert(addr == entry_ptr->base_addr); + assert(!entry_ptr->global_pinned); + assert(!entry_ptr->local_pinned); if (callbacks_verbose) { - HDfprintf(stdout, "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, - idx, (long)addr, (int)entry_ptr->local_len); + fprintf(stdout, "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, + (long)addr, (int)entry_ptr->local_len); fflush(stdout); } @@ -2183,26 +2180,26 @@ datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr, H5_ATTR_UNUSED si int idx; struct datum *entry_ptr = NULL; - HDassert(image_ptr != NULL); + assert(image_ptr != NULL); idx = addr_to_datum_index(addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(addr == entry_ptr->base_addr); - HDassert(!entry_ptr->global_pinned); - HDassert(!entry_ptr->local_pinned); + assert(addr == entry_ptr->base_addr); + assert(!entry_ptr->global_pinned); + assert(!entry_ptr->local_pinned); - HDassert(dirty_ptr); + assert(dirty_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", - world_mpi_rank, idx, (long)addr, (int)len, (int)(entry_ptr->header.is_dirty)); + fprintf(stdout, "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", world_mpi_rank, + idx, (long)addr, (int)len, (int)(entry_ptr->header.is_dirty)); fflush(stdout); } @@ -2238,27 +2235,27 @@ datum_image_len(const void *thing, size_t *image_len) int idx; const struct datum *entry_ptr; - HDassert(thing); - HDassert(image_len); + assert(thing); + assert(image_len); entry_ptr = (const struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); - HDassert(entry_ptr->local_len > 0); - HDassert(entry_ptr->local_len <= entry_ptr->len); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); + assert(entry_ptr->local_len > 0); + assert(entry_ptr->local_len <= entry_ptr->len); if (callbacks_verbose) { - HDfprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, - (long)(entry_ptr->base_addr), (int)(entry_ptr->local_len)); + fprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, + (long)(entry_ptr->base_addr), (int)(entry_ptr->local_len)); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); + assert(entry_ptr->header.addr == entry_ptr->base_addr); *image_len = entry_ptr->local_len; @@ -2285,49 +2282,49 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le struct datum *entry_ptr; struct H5AC_aux_t *aux_ptr; - HDassert(thing_ptr); - HDassert(image_ptr); + assert(thing_ptr); + assert(image_ptr); entry_ptr = (struct datum *)thing_ptr; - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->cache); - HDassert(f->shared->cache->magic == H5C__H5C_T_MAGIC); - HDassert(f->shared->cache->aux_ptr); + assert(f); + assert(f->shared); + assert(f->shared->cache); + assert(f->shared->cache->magic == H5C__H5C_T_MAGIC); + assert(f->shared->cache->aux_ptr); aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); - HDassert(aux_ptr); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + assert(aux_ptr); + assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); entry_ptr->aux_ptr = aux_ptr; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: serialize() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr, (int)len); + fprintf(stdout, "%d: serialize() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr, (int)len); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); - HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); + assert(entry_ptr->header.addr == entry_ptr->base_addr); + assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(entry_ptr->header.is_dirty == entry_ptr->dirty); + assert(entry_ptr->header.is_dirty == entry_ptr->dirty); datum_flushes++; if (entry_ptr->header.is_pinned) { datum_pinned_flushes++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } return (ret_value); @@ -2357,39 +2354,39 @@ datum_notify(H5C_notify_action_t action, void *thing) struct mssg_t mssg; int idx; - HDassert(thing); + assert(thing); entry_ptr = (struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", world_mpi_rank, (int)action, - idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", world_mpi_rank, (int)action, idx, + (long)entry_ptr->header.addr); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); + assert(entry_ptr->header.addr == entry_ptr->base_addr); /* Skip this check when the entry is being dirtied, since the resize * operation sends the message before the len/local_len is updated * (after the resize operation completes successfully) (QAK - 2016/10/19) */ if (H5AC_NOTIFY_ACTION_ENTRY_DIRTIED != action) - HDassert((entry_ptr->header.size == entry_ptr->len) || - (entry_ptr->header.size == entry_ptr->local_len)); + assert((entry_ptr->header.size == entry_ptr->len) || + (entry_ptr->header.size == entry_ptr->local_len)); switch (action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = insert, idx = %d, addr = %ld.\n", world_mpi_rank, - idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = insert, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } /* do nothing */ @@ -2398,8 +2395,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = load, idx = %d, addr = %ld.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = load, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } @@ -2419,7 +2416,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } @@ -2430,7 +2427,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -2445,41 +2442,41 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); } #if 0 /* This has been useful debugging code -- keep it for now. */ if ( mssg.req != READ_REQ_REPLY_CODE ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n", world_mpi_rank, __func__); - HDfprintf(stdout, "%d:%s: mssg.req = %d.\n", + fprintf(stdout, "%d:%s: mssg.req = %d.\n", world_mpi_rank, __func__, (int)(mssg.req)); } if ( mssg.src != world_server_mpi_rank ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.src != world_server_mpi_rank.\n", world_mpi_rank, __func__); } if ( mssg.dest != world_mpi_rank ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.dest != world_mpi_rank.\n", world_mpi_rank, __func__); } if ( mssg.base_addr != entry_ptr->base_addr ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n", world_mpi_rank, __func__); - HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n", + fprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n", world_mpi_rank, __func__, mssg.base_addr); - HDfprintf(stdout, + fprintf(stdout, "%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n", world_mpi_rank, __func__, entry_ptr->base_addr); @@ -2487,23 +2484,23 @@ datum_notify(H5C_notify_action_t action, void *thing) if ( mssg.len != entry_ptr->len ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n", world_mpi_rank, __func__); - HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n", + fprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n", world_mpi_rank, __func__, mssg.len); } if ( mssg.ver < entry_ptr->ver ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.ver < entry_ptr->ver.\n", world_mpi_rank, __func__); } if ( mssg.magic != MSSG_MAGIC ) { - HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n", + fprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n", world_mpi_rank, __func__); } #endif /* JRM */ @@ -2520,24 +2517,24 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5C_NOTIFY_ACTION_AFTER_FLUSH: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = flush, idx = %d, addr = %ld.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = flush, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } - HDassert(entry_ptr->aux_ptr); - HDassert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + assert(entry_ptr->aux_ptr); + assert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); aux_ptr = entry_ptr->aux_ptr; entry_ptr->aux_ptr = NULL; - HDassert(entry_ptr->header.is_dirty); /* JRM */ + assert(entry_ptr->header.is_dirty); /* JRM */ if ((file_mpi_rank != 0) && (entry_ptr->dirty) && (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY)) { ret_value = FAIL; - HDfprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank, + __func__); } if (ret_value == SUCCEED) { @@ -2564,7 +2561,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } else { @@ -2583,7 +2580,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != WRITE_REQ_ACK_CODE) || (mssg.src != world_server_mpi_rank) || @@ -2594,7 +2591,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); } } } @@ -2606,15 +2603,15 @@ datum_notify(H5C_notify_action_t action, void *thing) if (entry_ptr->header.is_pinned) { datum_pinned_flushes++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } break; case H5AC_NOTIFY_ACTION_BEFORE_EVICT: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = evict, idx = %d, addr = %ld.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = evict, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } @@ -2624,8 +2621,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = entry dirty, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = entry dirty, idx = %d, addr = %ld.\n", world_mpi_rank, + idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2635,8 +2632,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_ENTRY_CLEANED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = entry clean, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = entry clean, idx = %d, addr = %ld.\n", world_mpi_rank, + idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2647,7 +2644,7 @@ datum_notify(H5C_notify_action_t action, void *thing) if (entry_ptr->header.is_pinned) { datum_pinned_clears++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } /* end if */ break; @@ -2655,8 +2652,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_DIRTIED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2666,8 +2663,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_CLEANED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry clean, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry clean, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2677,8 +2674,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry unserialized, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry unserialized, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2688,8 +2685,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_SERIALIZED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry serialized, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry serialized, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2700,7 +2697,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__); } break; } @@ -2731,31 +2728,31 @@ datum_free_icr(void *thing) int idx; struct datum *entry_ptr; - HDassert(thing); + assert(thing); entry_ptr = (struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: free_icr() idx = %d, dirty = %d.\n", world_mpi_rank, idx, - (int)(entry_ptr->dirty)); + fprintf(stdout, "%d: free_icr() idx = %d, dirty = %d.\n", world_mpi_rank, idx, + (int)(entry_ptr->dirty)); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); - HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); + assert(entry_ptr->header.addr == entry_ptr->base_addr); + assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(!(entry_ptr->header.is_dirty)); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_dirty)); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); + assert(!(entry_ptr->header.is_pinned)); datum_destroys++; @@ -2787,15 +2784,15 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) herr_t result; struct datum *entry_ptr; - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); + assert(!(entry_ptr->locked)); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); entry_ptr->dirty = FALSE; @@ -2807,12 +2804,12 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__); } } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!((entry_ptr->header).is_dirty)); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!((entry_ptr->header).is_dirty)); result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr, NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL, NULL); @@ -2821,14 +2818,14 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__); } } else if (in_cache) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__); } } } @@ -2858,14 +2855,14 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) herr_t result; struct datum *entry_ptr; - HDassert(cache_ptr); - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(cache_ptr); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); + assert(!(entry_ptr->locked)); insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0); @@ -2882,7 +2879,7 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__); } } @@ -2903,26 +2900,26 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, - idx, (int)(data[idx].header.is_dirty)); + fprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, idx, + (int)(data[idx].header.is_dirty)); } } } if (insert_pinned) { - HDassert(entry_ptr->header.is_pinned); + assert(entry_ptr->header.is_pinned); entry_ptr->global_pinned = TRUE; global_pins++; } else { - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_pinned)); entry_ptr->global_pinned = FALSE; } - /* HDassert( entry_ptr->header.is_dirty ); */ - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + /* assert( entry_ptr->header.is_dirty ); */ + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -2954,18 +2951,18 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in int i; int idx; - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); - HDassert(0 <= min_count); - HDassert(min_count < max_count); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); + assert(0 <= min_count); + assert(min_count < max_count); count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); for (i = 0; i < count; i++) { local_pin_random_entry(file_ptr, min_idx, max_idx); @@ -2973,8 +2970,8 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); i = 0; idx = 0; @@ -3013,16 +3010,16 @@ local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx) if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); do { idx = (HDrand() % (max_idx - min_idx)) + min_idx; - HDassert(min_idx <= idx); - HDassert(idx <= max_idx); + assert(min_idx <= idx); + assert(idx <= max_idx); } while (data[idx].global_pinned || data[idx].local_pinned); pin_entry(file_ptr, idx, FALSE, FALSE); @@ -3053,7 +3050,7 @@ local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect) int idx; - HDassert(file_ptr); + assert(file_ptr); idx = 0; @@ -3090,10 +3087,10 @@ local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprot if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= start_idx); - HDassert(start_idx < NUM_DATA_ENTRIES); - HDassert(start_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= start_idx); + assert(start_idx < NUM_DATA_ENTRIES); + assert(start_idx < virt_num_data_entries); idx = start_idx; @@ -3142,14 +3139,14 @@ lock_and_unlock_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int mi if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_count); - HDassert(min_count < max_count); + assert(file_ptr); + assert(0 <= min_count); + assert(min_count < max_count); count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); for (i = 0; i < count; i++) { lock_and_unlock_random_entry(file_ptr, min_idx, max_idx); @@ -3181,16 +3178,16 @@ lock_and_unlock_random_entry(H5F_t *file_ptr, int min_idx, int max_idx) if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); idx = (HDrand() % (max_idx - min_idx)) + min_idx; - HDassert(min_idx <= idx); - HDassert(idx <= max_idx); + assert(min_idx <= idx); + assert(idx <= max_idx); lock_entry(file_ptr, idx); unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET); @@ -3221,12 +3218,12 @@ lock_entry(H5F_t *file_ptr, int32_t idx) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); + assert(!(entry_ptr->locked)); cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, &(types[0]), entry_ptr->base_addr, &entry_ptr->base_addr, H5AC__NO_FLAGS_SET); @@ -3238,7 +3235,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__); } } else { @@ -3246,7 +3243,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx) entry_ptr->locked = TRUE; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -3274,13 +3271,13 @@ mark_entry_dirty(int32_t idx) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked || entry_ptr->global_pinned); - HDassert(!(entry_ptr->local_pinned)); + assert(entry_ptr->locked || entry_ptr->global_pinned); + assert(!(entry_ptr->local_pinned)); (entry_ptr->ver)++; entry_ptr->dirty = TRUE; @@ -3291,7 +3288,7 @@ mark_entry_dirty(int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__); } } else if (!(entry_ptr->locked)) { @@ -3324,15 +3321,15 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty) if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); - HDassert(!(dirty && (!global))); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); + assert(!(dirty && (!global))); lock_entry(file_ptr, idx); @@ -3343,8 +3340,8 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty) unlock_entry(file_ptr, idx, flags); - HDassert((entry_ptr->header).is_pinned); - HDassert((!dirty) || ((entry_ptr->header).is_dirty)); + assert((entry_ptr->header).is_pinned); + assert((!dirty) || ((entry_ptr->header).is_dirty)); if (global) { @@ -3384,12 +3381,12 @@ pin_protected_entry(int32_t idx, hbool_t global) herr_t result; struct datum *entry_ptr; - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked); + assert(entry_ptr->locked); if (nerrors == 0) { @@ -3402,7 +3399,7 @@ pin_protected_entry(int32_t idx, hbool_t global) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__); } } @@ -3419,7 +3416,7 @@ pin_protected_entry(int32_t idx, hbool_t global) local_pins++; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -3455,19 +3452,19 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) if ((nerrors == 0) && (old_idx != new_idx)) { - HDassert(file_ptr); - HDassert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES)); - HDassert(old_idx < virt_num_data_entries); - HDassert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES)); - HDassert(new_idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES)); + assert(old_idx < virt_num_data_entries); + assert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES)); + assert(new_idx < virt_num_data_entries); old_entry_ptr = &(data[old_idx]); new_entry_ptr = &(data[new_idx]); - HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!(old_entry_ptr->header.is_protected)); - HDassert(!(old_entry_ptr->locked)); - HDassert(old_entry_ptr->len == new_entry_ptr->len); + assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!(old_entry_ptr->header.is_protected)); + assert(!(old_entry_ptr->locked)); + assert(old_entry_ptr->len == new_entry_ptr->len); old_addr = old_entry_ptr->base_addr; new_addr = new_entry_ptr->base_addr; @@ -3506,12 +3503,12 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__); } } else { - HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); if (!(old_entry_ptr->header.is_dirty)) { @@ -3530,14 +3527,14 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, - new_idx, (int)(data[new_idx].header.is_dirty)); + fprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, + new_idx, (int)(data[new_idx].header.is_dirty)); } } } else { - HDassert(old_entry_ptr->header.is_dirty); + assert(old_entry_ptr->header.is_dirty); } } } @@ -3582,7 +3579,7 @@ reset_server_counts(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -3594,7 +3591,7 @@ reset_server_counts(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != REQ_RW_COUNT_RESET_RPLY_CODE) || (mssg.src != world_server_mpi_rank) || @@ -3604,8 +3601,8 @@ reset_server_counts(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank, + __func__); } } } @@ -3637,18 +3634,18 @@ resize_entry(int32_t idx, size_t new_size) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!(entry_ptr->locked)); - HDassert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned)); - HDassert((entry_ptr->header.size == entry_ptr->len) || - (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(new_size > 0); - HDassert(new_size <= entry_ptr->len); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!(entry_ptr->locked)); + assert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned)); + assert((entry_ptr->header.size == entry_ptr->len) || + (entry_ptr->header.size == entry_ptr->local_len)); + assert(new_size > 0); + assert(new_size <= entry_ptr->len); result = H5AC_resize_entry((void *)entry_ptr, new_size); @@ -3656,14 +3653,14 @@ resize_entry(int32_t idx, size_t new_size) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__); } } else { - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->header.size == new_size); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->header.size == new_size); entry_ptr->dirty = TRUE; entry_ptr->local_len = new_size; @@ -3709,9 +3706,9 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr H5C_t *cache_ptr = NULL; haddr_t actual_base_addr; - HDassert(fid_ptr != NULL); - HDassert(file_ptr_ptr != NULL); - HDassert(cache_ptr_ptr != NULL); + assert(fid_ptr != NULL); + assert(file_ptr_ptr != NULL); + assert(cache_ptr_ptr != NULL); fid = H5Fcreate(filenames[0], H5F_ACC_TRUNC, H5P_DEFAULT, fapl); @@ -3721,13 +3718,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (fid < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__); } } else if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } else { @@ -3737,7 +3734,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (file_ptr == NULL) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__); } } else { @@ -3747,13 +3744,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (cache_ptr == NULL) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__); } } else if (cache_ptr->magic != H5C__H5C_T_MAGIC) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__); } } else { @@ -3771,8 +3768,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank, + __func__); } else { @@ -3781,12 +3778,12 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { - HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } else if (enable_rpt_fcn) { - HDfprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__); } } } @@ -3802,23 +3799,23 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__); } } else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n", - world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n", + world_mpi_rank, __func__); } } else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy != metadata_write_strategy) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank, + __func__); } } } @@ -3833,8 +3830,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5AC_get_cache_auto_resize_config(cache_ptr, &test_config) != SUCCEED) { - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank, + __func__); } else if (test_config.metadata_write_strategy != metadata_write_strategy) { @@ -3842,7 +3839,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (verbose) { - HDfprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__); } } } @@ -3862,7 +3859,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__); } } else if (actual_base_addr > BASE_ADDR) { @@ -3875,7 +3872,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__); } } } @@ -3886,7 +3883,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__); } } } @@ -3899,7 +3896,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__); } } } @@ -3912,8 +3909,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, + __func__); } } } @@ -3956,8 +3953,8 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) hbool_t proceed = TRUE; unsigned u = 0; - HDassert(world_mpi_rank != world_server_mpi_rank); - HDassert((num_writes == 0) || (written_entries_tbl != NULL)); + assert(world_mpi_rank != world_server_mpi_rank); + assert((num_writes == 0) || (written_entries_tbl != NULL)); /* barrier to ensure that all other processes are ready to leave * the sync point as well. @@ -3969,7 +3966,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) proceed = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); } } } @@ -3992,7 +3989,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) proceed = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); } } } @@ -4007,11 +4004,11 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) if (proceed) { - HDfprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes); + fprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes); } else { - HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes); + fprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes); } } @@ -4028,7 +4025,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) proceed = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); } } } @@ -4062,11 +4059,11 @@ setup_rand(void) if ((use_predefined_seeds) && (world_mpi_size == num_predefined_seeds)) { - HDassert(world_mpi_rank >= 0); - HDassert(world_mpi_rank < world_mpi_size); + assert(world_mpi_rank >= 0); + assert(world_mpi_rank < world_mpi_size); seed = predefined_seeds[world_mpi_rank]; - HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed); + fprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed); fflush(stdout); HDsrand(seed); } @@ -4076,13 +4073,13 @@ setup_rand(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__); } } else { seed = (unsigned)tv.tv_usec; if (verbose) { - HDfprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed); + fprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed); fflush(stdout); } HDsrand(seed); @@ -4122,7 +4119,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -4138,8 +4135,8 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, + __func__); } } } @@ -4150,7 +4147,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__); } } @@ -4166,7 +4163,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__); } } } @@ -4228,7 +4225,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4240,7 +4237,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4254,7 +4251,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__); } } else { @@ -4270,8 +4267,8 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n", - world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads); + fprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n", + world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads); } } } @@ -4325,7 +4322,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4337,7 +4334,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4351,7 +4348,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__); } } else { @@ -4367,8 +4364,8 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank, - __func__, (long long)addr, reported_entry_writes, expected_entry_writes); + fprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank, + __func__, (long long)addr, reported_entry_writes, expected_entry_writes); } } } @@ -4421,7 +4418,7 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4433,7 +4430,7 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != REQ_TTL_READS_RPLY_CODE) || (mssg.src != world_server_mpi_rank) || @@ -4443,7 +4440,7 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); } } else { @@ -4459,8 +4456,8 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank, - __func__, reported_total_reads, expected_total_reads); + fprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank, + __func__, reported_total_reads, expected_total_reads); } } } @@ -4513,7 +4510,7 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4525,7 +4522,7 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != REQ_TTL_WRITES_RPLY_CODE) || (mssg.src != world_server_mpi_rank) || @@ -4535,7 +4532,7 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); } } else { @@ -4551,8 +4548,8 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank, - __func__, reported_total_writes, expected_total_writes); + fprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank, + __func__, reported_total_writes, expected_total_writes); } } } @@ -4583,13 +4580,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked); + assert(entry_ptr->locked); dirtied = ((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG); @@ -4609,7 +4606,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__); } } else { @@ -4617,13 +4614,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) entry_ptr->locked = FALSE; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); if (((flags & H5AC__DIRTIED_FLAG) != 0) && ((flags & H5C__DELETED_FLAG) == 0) && (!(((world_mpi_rank == 0) && (entry_ptr->flushed)) || ((world_mpi_rank != 0) && (entry_ptr->cleared))))) { - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->dirty); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->dirty); } } @@ -4653,16 +4650,16 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert((entry_ptr->header).is_pinned); - HDassert(!(entry_ptr->global_pinned && entry_ptr->local_pinned)); - HDassert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned)); - HDassert(!(dirty && (!global))); + assert((entry_ptr->header).is_pinned); + assert(!(entry_ptr->global_pinned && entry_ptr->local_pinned)); + assert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned)); + assert(!(dirty && (!global))); if (via_unprotect) { @@ -4688,12 +4685,12 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__); } } } - HDassert(!((entry_ptr->header).is_pinned)); + assert(!((entry_ptr->header).is_pinned)); if (global) { @@ -4749,7 +4746,7 @@ server_smoke_check(void) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -4770,7 +4767,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); } } @@ -4785,7 +4782,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4801,7 +4798,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); } } } @@ -4816,7 +4813,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); } } @@ -4848,7 +4845,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); } } @@ -4871,7 +4868,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); } } } @@ -4885,7 +4882,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4901,7 +4898,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); } } } @@ -4912,7 +4909,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); } } @@ -4943,7 +4940,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__); } } @@ -4959,7 +4956,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__); } } @@ -4990,7 +4987,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__); } } @@ -5013,7 +5010,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5096,7 +5093,7 @@ smoke_check_1(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5108,7 +5105,7 @@ smoke_check_1(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5141,7 +5138,7 @@ smoke_check_1(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5151,8 +5148,8 @@ smoke_check_1(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5174,7 +5171,7 @@ smoke_check_1(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5260,7 +5257,7 @@ smoke_check_2(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5272,7 +5269,7 @@ smoke_check_2(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5339,7 +5336,7 @@ smoke_check_2(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5349,8 +5346,8 @@ smoke_check_2(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5372,7 +5369,7 @@ smoke_check_2(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5465,7 +5462,7 @@ smoke_check_3(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5477,7 +5474,7 @@ smoke_check_3(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5510,10 +5507,10 @@ smoke_check_3(int metadata_write_strategy) pin_entry(file_ptr, i, TRUE, dirty); - HDassert(!dirty || data[i].header.is_dirty); - HDassert(data[i].header.is_pinned); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(!dirty || data[i].header.is_dirty); + assert(data[i].header.is_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); } if (i > 100) { @@ -5531,7 +5528,7 @@ smoke_check_3(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -5548,8 +5545,8 @@ smoke_check_3(int metadata_write_strategy) hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0); hbool_t dirty = ((((unsigned)i) & 0x04) == 0); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } @@ -5624,7 +5621,7 @@ smoke_check_3(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5634,8 +5631,8 @@ smoke_check_3(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5657,7 +5654,7 @@ smoke_check_3(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5750,7 +5747,7 @@ smoke_check_4(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5762,7 +5759,7 @@ smoke_check_4(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5807,10 +5804,10 @@ smoke_check_4(int metadata_write_strategy) pin_entry(file_ptr, i, TRUE, dirty); - HDassert(!dirty || data[i].header.is_dirty); - HDassert(data[i].header.is_pinned); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(!dirty || data[i].header.is_dirty); + assert(data[i].header.is_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); } if (i > 100) { @@ -5828,7 +5825,7 @@ smoke_check_4(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -5841,8 +5838,8 @@ smoke_check_4(int metadata_write_strategy) hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0); hbool_t dirty = ((((unsigned)i) & 0x04) == 0); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } @@ -5908,7 +5905,7 @@ smoke_check_4(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5918,8 +5915,8 @@ smoke_check_4(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5941,7 +5938,7 @@ smoke_check_4(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -6025,7 +6022,7 @@ smoke_check_5(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -6038,7 +6035,7 @@ smoke_check_5(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -6050,7 +6047,7 @@ smoke_check_5(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -6100,7 +6097,7 @@ smoke_check_5(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -6110,8 +6107,8 @@ smoke_check_5(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6133,7 +6130,7 @@ smoke_check_5(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -6310,7 +6307,7 @@ trace_file_check(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } else { @@ -6322,7 +6319,7 @@ trace_file_check(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } if (nerrors == 0) { @@ -6331,8 +6328,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } else { config.open_trace_file = TRUE; @@ -6340,8 +6337,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } } } /* end if */ @@ -6376,7 +6373,7 @@ trace_file_check(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } if (nerrors == 0) { @@ -6384,8 +6381,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } else { config.open_trace_file = FALSE; @@ -6394,8 +6391,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } } } /* end if */ @@ -6405,7 +6402,7 @@ trace_file_check(int metadata_write_strategy) nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } /* end if */ @@ -6414,8 +6411,8 @@ trace_file_check(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6435,18 +6432,18 @@ trace_file_check(int metadata_write_strategy) if (!success) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } /* end if */ if (nerrors == 0) { HDsnprintf(trace_file_name, sizeof(trace_file_name), "t_cache_trace.txt.%d", (int)file_mpi_rank); - if ((trace_file_ptr = HDfopen(trace_file_name, "r")) == NULL) { + if ((trace_file_ptr = fopen(trace_file_name, "r")) == NULL) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: HDfopen failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: fopen failed.\n", world_mpi_rank, __func__); } } /* end if */ @@ -6474,22 +6471,22 @@ trace_file_check(int metadata_write_strategy) /* One ran out before the other - BADNESS */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, - __func__, i); + fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, + __func__, i); if (expected_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, - "<EMPTY>", expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, - buffer, actual_line_len); + fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, + "<EMPTY>", expected_line_len); + fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, + buffer, actual_line_len); } if (actual_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, - (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, - "<EMPTY>", actual_line_len); + fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, + (*expected_output)[i], expected_line_len); + fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, + "<EMPTY>", actual_line_len); } } - HDfprintf(stdout, "BADNESS BADNESS BADNESS\n"); + fprintf(stdout, "BADNESS BADNESS BADNESS\n"); } } /* We directly compare the header line (line 0) */ @@ -6499,12 +6496,12 @@ trace_file_check(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, - __func__, i); - HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, - (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer, - actual_line_len); + fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, + __func__, i); + fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, + (*expected_output)[i], expected_line_len); + fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer, + actual_line_len); } } } @@ -6520,11 +6517,11 @@ trace_file_check(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, - __func__, i); - HDfprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__, - (*expected_output)[i]); - HDfprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok); + fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, + __func__, i); + fprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__, + (*expected_output)[i]); + fprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok); } } } /* end else */ @@ -6617,7 +6614,7 @@ smoke_check_6(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -6631,7 +6628,7 @@ smoke_check_6(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -6651,14 +6648,14 @@ smoke_check_6(int metadata_write_strategy) if (TRUE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank, + __func__); } } /* Make sure coll entries do not cross the 80% threshold */ H5_CHECK_OVERFLOW(cache_ptr->max_cache_size, size_t, double); - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6676,13 +6673,13 @@ smoke_check_6(int metadata_write_strategy) if (FALSE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", - world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", + world_mpi_rank, __func__); } } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6691,7 +6688,7 @@ smoke_check_6(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -6708,13 +6705,13 @@ smoke_check_6(int metadata_write_strategy) if (TRUE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank, + __func__); } } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6732,13 +6729,13 @@ smoke_check_6(int metadata_write_strategy) if (FALSE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", - world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", + world_mpi_rank, __func__); } } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6753,7 +6750,7 @@ smoke_check_6(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -6763,8 +6760,8 @@ smoke_check_6(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6786,7 +6783,7 @@ smoke_check_6(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -6851,7 +6848,7 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0) - HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); + printf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); H5open(); @@ -6862,32 +6859,32 @@ main(int argc, char **argv) virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES; if (MAINPROCESS) { - HDprintf("===================================\n"); - HDprintf("Parallel metadata cache tests\n"); - HDprintf(" mpi_size = %d\n", mpi_size); - HDprintf(" express_test = %d\n", express_test); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("Parallel metadata cache tests\n"); + printf(" mpi_size = %d\n", mpi_size); + printf(" express_test = %d\n", express_test); + printf("===================================\n"); } if (mpi_size < 3) { if (MAINPROCESS) - HDprintf(" Need at least 3 processes. Exiting.\n"); + printf(" Need at least 3 processes. Exiting.\n"); goto finish; } - if (NULL == (data = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data)))) { - HDprintf(" Couldn't allocate data array. Exiting.\n"); + if (NULL == (data = malloc(NUM_DATA_ENTRIES * sizeof(*data)))) { + printf(" Couldn't allocate data array. Exiting.\n"); MPI_Abort(MPI_COMM_WORLD, -1); } - if (NULL == (data_index = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) { - HDprintf(" Couldn't allocate data index array. Exiting.\n"); + if (NULL == (data_index = malloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) { + printf(" Couldn't allocate data index array. Exiting.\n"); MPI_Abort(MPI_COMM_WORLD, -1); } - HDmemset(filenames, 0, sizeof(filenames)); + memset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { - HDprintf("couldn't allocate filename array\n"); + if (NULL == (filenames[i] = malloc(PATH_MAX))) { + printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } } @@ -6907,13 +6904,13 @@ main(int argc, char **argv) if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__); } if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__); } /* fix the file names */ @@ -6921,7 +6918,7 @@ main(int argc, char **argv) if (h5_fixname(FILENAME[u], fapl, filenames[u], PATH_MAX) == NULL) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__); break; } } @@ -6930,7 +6927,7 @@ main(int argc, char **argv) if (H5Pclose(fapl) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__); } /* now create the fapl again, excluding the server process. */ @@ -6940,13 +6937,13 @@ main(int argc, char **argv) if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__); } if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__); } } @@ -6957,7 +6954,7 @@ main(int argc, char **argv) /* errors in setup -- no point in continuing */ if (world_mpi_rank == 0) - HDfprintf(stdout, "Errors in test initialization. Exiting.\n"); + fprintf(stdout, "Errors in test initialization. Exiting.\n"); goto finish; } @@ -6991,8 +6988,8 @@ main(int argc, char **argv) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank, + __func__); } } } @@ -7008,9 +7005,9 @@ main(int argc, char **argv) finish: if (data_index) - HDfree(data_index); + free(data_index); if (data) - HDfree(data); + free(data); /* make sure all processes are finished before final report, cleanup * and exit. @@ -7021,14 +7018,14 @@ finish: MPI_Barrier(MPI_COMM_WORLD); if (MAINPROCESS) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrors || failures) { - HDprintf("***metadata cache tests detected %d failures***\n", nerrors + failures); + printf("***metadata cache tests detected %d failures***\n", nerrors + failures); } else { - HDprintf("metadata cache tests finished with no failures\n"); + printf("metadata cache tests finished with no failures\n"); } - HDprintf("===================================\n"); + printf("===================================\n"); } takedown_derived_types(); |