diff --git a/Grid/util/FlightRecorder.h b/Grid/util/FlightRecorder.h new file mode 100644 index 00000000..d9f6250a --- /dev/null +++ b/Grid/util/FlightRecorder.h @@ -0,0 +1,43 @@ +#pragma once + +NAMESPACE_BEGIN(Grid); +class FlightRecorder { + public: + enum LoggingMode_t { + LoggingModeNone, + LoggingModePrint, + LoggingModeRecord, + LoggingModeVerify + }; + + static int LoggingMode; + static uint64_t ErrorCounter; + static int32_t XmitLoggingCounter; + static int32_t RecvLoggingCounter; + static int32_t CsumLoggingCounter; + static int32_t NormLoggingCounter; + static int32_t ReductionLoggingCounter; + static std::vector XmitLogVector; + static std::vector RecvLogVector; + static std::vector CsumLogVector; + static std::vector NormLogVector; + static std::vector ReductionLogVector; + static int ContinueOnFail; + static int PrintEntireLog; + static int ChecksumComms; + static int ChecksumCommsSend; + static void SetLoggingModePrint(void); + static void SetLoggingModeRecord(void); + static void SetLoggingModeVerify(void); + static void SetLoggingMode(LoggingMode_t mode); + static void NormLog(double value); + static void CsumLog(uint64_t csum); + static void ReductionLog(double lcl, double glbl); + static void Truncate(void); + static void ResetCounters(void); + static uint64_t ErrorCount(void); + static void xmitLog(void *,uint64_t bytes); + static void recvLog(void *,uint64_t bytes,int rank); +}; +NAMESPACE_END(Grid); +