47 #define MAX_TIME_MARKS 100
48 #define MAX_DESC_LENGTH 60
60 #define __FUNC__ "TimeLog_dhCreate"
72 strcpy (tmp->
desc[i],
"X");
76 #define __FUNC__ "TimeLog_dhDestroy"
86 #define __FUNC__ "TimeLog_dhStart"
94 #define __FUNC__ "TimeLog_dhStop"
102 #define __FUNC__ "TimeLog_dhMark"
118 #define __FUNC__ "TimeLog_dhReset"
126 for (i = first; i <
last; ++i)
128 t->
time[last] = total;
129 sprintf (t->
desc[last],
"========== totals, and reset ==========\n");
138 #define __FUNC__ "TimeLog_dhPrint"
146 static bool wasSummed =
false;
154 sprintf (t->
desc[t->
last],
"========== totals, and reset ==========\n");
157 MPI_Allreduce (t->
time, timeMax, t->
last, MPI_DOUBLE, MPI_MAX,
comm_dh);
158 MPI_Allreduce (t->
time, timeMin, t->
last, MPI_DOUBLE, MPI_MIN,
comm_dh);
167 "\n----------------------------------------- timing report\n");
168 fprintf (fp,
"\n self max min\n");
169 for (i = 0; i < t->
last; ++i)
171 fprintf (fp,
"%7.3f %7.3f %7.3f #%s\n", t->
time[i],
172 timeMax[i], timeMin[i], t->
desc[i]);
char desc[MAX_TIME_MARKS][MAX_DESC_LENGTH]
double Timer_dhReadWall(Timer_dh t)
void TimeLog_dhReset(TimeLog_dh t)
void TimeLog_dhCreate(TimeLog_dh *t)
void TimeLog_dhStart(TimeLog_dh t)
void TimeLog_dhDestroy(TimeLog_dh t)
void Timer_dhDestroy(Timer_dh t)
void Timer_dhStop(Timer_dh t)
void Timer_dhCreate(Timer_dh *t)
void TimeLog_dhStop(TimeLog_dh t)
double time[MAX_TIME_MARKS]
void Timer_dhStart(Timer_dh t)
void TimeLog_dhMark(TimeLog_dh t, char *desc)
void TimeLog_dhPrint(TimeLog_dh t, FILE *fp, bool allPrint)