Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cf63b42

Browse files
committedMar 20, 2025·
Changed all printf to use pdc logger
Also removed large blocks of comments and chanegd the pdc logger to print the file name, function, and line number.
1 parent 4b335f3 commit cf63b42

File tree

234 files changed

+6918
-8829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+6918
-8829
lines changed
 

‎examples/C_plus_plus_example/H5Timing.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ static int record_timer(std::vector<H5Timer> *timer, const char* filename) {
185185

186186
static int output_results() {
187187
#ifdef PDC_PATCH
188-
printf("total PDCwrite calls = %d, PDCread calls = %d\n", timer_class->PDCwrite_count, timer_class->PDCread_count);
188+
LOG_INFO("total PDCwrite calls = %d, PDCread calls = %d\n", timer_class->PDCwrite_count, timer_class->PDCread_count);
189189
#else
190-
printf("total H5Dwrite calls = %d, H5Dread calls = %d\n", timer_class->H5Dwrite_count, timer_class->H5Dread_count);
190+
LOG_INFO("total H5Dwrite calls = %d, H5Dread calls = %d\n", timer_class->H5Dwrite_count, timer_class->H5Dread_count);
191191
#endif
192192
if ( timer_class->dataset_timers->size() ) {
193193
record_timer(timer_class->dataset_timers, "dataset_write_record.csv");
@@ -211,10 +211,10 @@ int finalize_timers() {
211211
gettimeofday(&temp_time, NULL);
212212
timer_class->total_end_time = (temp_time.tv_usec + temp_time.tv_sec * 1000000) + .0;
213213
#ifdef PDC_PATCH
214-
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);
214+
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);
215215
#else
216-
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);
217-
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);
216+
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);
217+
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);
218218
#endif
219219
free(timer_class);
220220

‎examples/C_plus_plus_example/multidataset_plugin.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ int flush_multidatasets() {
276276
double start_time;
277277
#endif
278278
i = 0;
279-
//printf("Rank %d number of datasets to be written %d\n", rank, dataset_size);
279+
LOG_DEBUG("Rank %d number of datasets to be written %d\n", rank, dataset_size);
280280
#if ENABLE_MULTIDATASET==1
281281
#ifdef H5_TIMING_ENABLE
282282
increment_H5Dwrite();
@@ -319,7 +319,7 @@ int flush_multidatasets() {
319319

320320
free(multi_datasets_temp);
321321
#else
322-
//printf("rank %d has dataset_size %lld\n", rank, (long long int) dataset_size);
322+
LOG_DEBUG("rank %d has dataset_size %lld\n", rank, (long long int) dataset_size);
323323
#ifdef PDC_PATCH
324324

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

0 commit comments

Comments
 (0)
Please sign in to comment.