Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change printf to PDC logger #232

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/C_plus_plus_example/H5Timing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ static int record_timer(std::vector<H5Timer> *timer, const char* filename) {

static int output_results() {
#ifdef PDC_PATCH
printf("total PDCwrite calls = %d, PDCread calls = %d\n", timer_class->PDCwrite_count, timer_class->PDCread_count);
LOG_INFO("total PDCwrite calls = %d, PDCread calls = %d\n", timer_class->PDCwrite_count, timer_class->PDCread_count);
#else
printf("total H5Dwrite calls = %d, H5Dread calls = %d\n", timer_class->H5Dwrite_count, timer_class->H5Dread_count);
LOG_INFO("total H5Dwrite calls = %d, H5Dread calls = %d\n", timer_class->H5Dwrite_count, timer_class->H5Dread_count);
#endif
if ( timer_class->dataset_timers->size() ) {
record_timer(timer_class->dataset_timers, "dataset_write_record.csv");
Expand All @@ -211,10 +211,10 @@ int finalize_timers() {
gettimeofday(&temp_time, NULL);
timer_class->total_end_time = (temp_time.tv_usec + temp_time.tv_sec * 1000000) + .0;
#ifdef PDC_PATCH
printf("total program time is %lf, PDCstart time = %lf, PDCwait time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->PDCstart_time / 1000000.0, timer_class->PDCwait_time / 1000000.0);
LOG_INFO("total program time is %lf, PDCstart time = %lf, PDCwait time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->PDCstart_time / 1000000.0, timer_class->PDCwait_time / 1000000.0);
#else
printf("total program time is %lf, H5Dwrite time = %lf, H5Dread time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->H5Dwrite_time / 1000000.0, timer_class->H5Dread_time / 1000000.0);
printf("merge requests time = %lf, wrap requests time = %lf, H5Dclose = %lf\n", timer_class->merge_requests_time / 1000000.0, timer_class->wrap_requests_time / 1000000.0, timer_class->H5Dclose_time / 1000000.0);
LOG_INFO("total program time is %lf, H5Dwrite time = %lf, H5Dread time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->H5Dwrite_time / 1000000.0, timer_class->H5Dread_time / 1000000.0);
LOG_INFO("merge requests time = %lf, wrap requests time = %lf, H5Dclose = %lf\n", timer_class->merge_requests_time / 1000000.0, timer_class->wrap_requests_time / 1000000.0, timer_class->H5Dclose_time / 1000000.0);
#endif
free(timer_class);

Expand Down
6 changes: 3 additions & 3 deletions examples/C_plus_plus_example/multidataset_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int flush_multidatasets() {
double start_time;
#endif
i = 0;
//printf("Rank %d number of datasets to be written %d\n", rank, dataset_size);
LOG_DEBUG("Rank %d number of datasets to be written %d\n", rank, dataset_size);
#if ENABLE_MULTIDATASET==1
#ifdef H5_TIMING_ENABLE
increment_H5Dwrite();
Expand Down Expand Up @@ -319,7 +319,7 @@ int flush_multidatasets() {

free(multi_datasets_temp);
#else
//printf("rank %d has dataset_size %lld\n", rank, (long long int) dataset_size);
LOG_DEBUG("rank %d has dataset_size %lld\n", rank, (long long int) dataset_size);
#ifdef PDC_PATCH

if (cached_objs.size()) {
Expand Down Expand Up @@ -362,7 +362,7 @@ int flush_multidatasets() {
offset_length = new_end[j] - new_start[j];
pdcid_t reg = PDCregion_create(1, &offset, &offset_length);
pdcid_t transfer_request_id = PDCregion_transfer_create(ptr, PDC_WRITE, it->second->did, reg, reg);
//printf("did = %lu, starting request offset = %lu, size = %lu, j = %d\n", it->second->did, offset, offset_length, j);
LOG_DEBUG("did = %lu, starting request offset = %lu, size = %lu, j = %d\n", it->second->did, offset, offset_length, j);
PDCregion_transfer_start(transfer_request_id);
PDCregion_transfer_wait(transfer_request_id);

Expand Down
4 changes: 2 additions & 2 deletions examples/C_plus_plus_example/region_transfer_1D_append.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ main(int argc, char **argv)
}
sprintf(data_name, "data0_%d", rank);

printf("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
LOG_INFO("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
for ( i = 0; i < ARRAY_SIZE; ++i ) {
register_multidataset_request_append(data_name, 0, data, sizeof(int) * DATA_SIZE, H5T_NATIVE_CHAR);
}

sprintf(data_name, "data1_%d", rank);

printf("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
LOG_INFO("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
for ( i = 0; i < ARRAY_SIZE; ++i ) {
register_multidataset_request_append(data_name, 0, data, sizeof(int) * DATA_SIZE, H5T_NATIVE_CHAR);
}
Expand Down
Loading
Loading