Closed cindytsai closed 2 years ago
libyt
Turn on SUPPORT_TIMER flag in Makefile:
Makefile
# libyt/src/Makefile # turn on the timer in each libyt substep. #OPTIONS := -DSUPPORT_TIMER
This option is closed by default.
// include/yt_global.h #ifdef SUPPORT_TIMER #include "Timer.h" SET_GLOBAL( Timer, *g_timer, NULL ); // Timer for recording performance. #endif // #ifdef SUPPORT_TIMER
char filename[50]; sprintf(filename, "RecordTime_%d", MyRank); g_timer = new Timer(filename);
g_timer->record_time("yt_init", 0);
g_timer->record_time("yt_init", 1);
g_timer->print_all_time();
RecordTime_*
*
import pandas as pd df = pd.read_csv("RecordTime_0")
Add Timer To Help Monitor Performance
50
Compile
libyt
with This FeatureTurn on SUPPORT_TIMER flag in
Makefile
:This option is closed by default.
Set
libyt
Timer to GlobalTimer Class
View Result
libyt
sets record time file name in each MPI rank toRecordTime_*
. With*
represents MPI rank.