Skip to content

Commit 8f769f3

Browse files
committed
fix #156
again :)
1 parent 9bb7eb2 commit 8f769f3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

phasta/phiotimer.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
#include <phiotimer.h>
44
#include <PCU.h>
55

6-
#define __STDC_FORMAT_MACROS
7-
#include <inttypes.h> /* PRIu64 */
6+
#include <iostream> /* cerr */
87
#include <time.h> /* clock_gettime */
98
#include <unistd.h> /* usleep */
109

@@ -141,8 +140,8 @@ static void printMinMaxAvgSzt(const char* key, size_t v) {
141140
size_t tot = PCU_Add_SizeT(v);
142141
double avg = ((double)tot)/PCU_Comm_Peers();
143142
if(!PCU_Comm_Self())
144-
fprintf(stderr, "%s_%s min max avg %" PRIu64 " %" PRIu64 " %f\n",
145-
getFileName(), key, (long long)min, (long long)max, avg);
143+
std::cerr << getFileName() << "_" << key << "min max avg"
144+
<< min << " " << max << " " << avg << "\n";
146145
}
147146

148147
static void printMinMaxAvgDbl(const char* key, double v) {
@@ -214,8 +213,7 @@ void phastaio_printStats() {
214213
usleep(us);
215214
phastaio_time(&t1);
216215
elapsed = phastaio_time_diff(&t0,&t1);
217-
fprintf(stderr, "%" PRIu64 " us measured as %" PRIu64 " us\n",
218-
(long long)us, (long long)elapsed);
216+
std::cerr << us << " us measured as " << elapsed << "us\n";
219217
}
220218
for(int chefFile=0; chefFile<NUM_PHASTAIO_MODES; chefFile++) {
221219
size_t totalus = 0;

0 commit comments

Comments
 (0)