From 57b442d0deb18d44a98322b52b54a3892f0fc9dc Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Fri, 1 Jul 2022 09:42:17 -0400 Subject: [PATCH] Log memory operations --- Grid/log/Log.cc | 6 ++++-- Grid/log/Log.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Grid/log/Log.cc b/Grid/log/Log.cc index 31f9a3f3..63bc454f 100644 --- a/Grid/log/Log.cc +++ b/Grid/log/Log.cc @@ -65,6 +65,7 @@ GridLogger GridLogSolver (1, "Solver", GridLogColours, "NORMAL"); GridLogger GridLogError (1, "Error" , GridLogColours, "RED"); GridLogger GridLogWarning(1, "Warning", GridLogColours, "YELLOW"); GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL"); +GridLogger GridLogMemory (1, "Memory", GridLogColours, "NORMAL"); GridLogger GridLogDebug (1, "Debug", GridLogColours, "PURPLE"); GridLogger GridLogPerformance(1, "Performance", GridLogColours, "GREEN"); GridLogger GridLogIterative (1, "Iterative", GridLogColours, "BLUE"); @@ -72,9 +73,10 @@ GridLogger GridLogIntegrator (1, "Integrator", GridLogColours, "BLUE"); GridLogger GridLogHMC (1, "HMC", GridLogColours, "BLUE"); void GridLogConfigure(std::vector &logstreams) { - GridLogError.Active(0); + GridLogError.Active(1); GridLogWarning.Active(0); GridLogMessage.Active(1); // at least the messages should be always on + GridLogMemory.Active(0); // at least the messages should be always on GridLogIterative.Active(0); GridLogDebug.Active(0); GridLogPerformance.Active(0); @@ -83,7 +85,7 @@ void GridLogConfigure(std::vector &logstreams) { GridLogHMC.Active(1); for (int i = 0; i < logstreams.size(); i++) { - if (logstreams[i] == std::string("Error")) GridLogError.Active(1); + if (logstreams[i] == std::string("Memory")) GridLogMemory.Active(1); if (logstreams[i] == std::string("Warning")) GridLogWarning.Active(1); if (logstreams[i] == std::string("NoMessage")) GridLogMessage.Active(0); if (logstreams[i] == std::string("Iterative")) GridLogIterative.Active(1); diff --git a/Grid/log/Log.h b/Grid/log/Log.h index b1696fee..4d512ff6 100644 --- a/Grid/log/Log.h +++ b/Grid/log/Log.h @@ -183,6 +183,7 @@ extern GridLogger GridLogPerformance; extern GridLogger GridLogIterative ; extern GridLogger GridLogIntegrator ; extern GridLogger GridLogHMC; +extern GridLogger GridLogMemory; extern Colours GridLogColours; std::string demangle(const char* name) ;