From a14a74852296396454fe201b9e165a267b6aa965 Mon Sep 17 00:00:00 2001
From: bcumming <bcumming@cscs.ch>
Date: Tue, 28 Jun 2016 15:52:03 +0200
Subject: [PATCH] small fix when profiler is turned off

---
 miniapp/io.cpp             | 2 +-
 miniapp/miniapp.cpp        | 2 +-
 src/profiling/profiler.hpp | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/miniapp/io.cpp b/miniapp/io.cpp
index e6fba802..887848b5 100644
--- a/miniapp/io.cpp
+++ b/miniapp/io.cpp
@@ -8,7 +8,7 @@ namespace io {
 // for now this is just a placeholder
 options read_options(std::string fname) {
     // 10 cells, 1 synapses per cell, 10 compartments per segment
-    return {1000, 1, 100};
+    return {200, 1, 100};
 }
 
 std::ostream& operator<<(std::ostream& o, const options& opt) {
diff --git a/miniapp/miniapp.cpp b/miniapp/miniapp.cpp
index e3ad9b92..d99e43e5 100644
--- a/miniapp/miniapp.cpp
+++ b/miniapp/miniapp.cpp
@@ -150,7 +150,7 @@ int main(int argc, char** argv) {
     //
     //  time stepping
     //
-    auto tfinal = 200.;
+    auto tfinal = 20.;
     auto dt = 0.01;
 
     auto id = m.communicator.domain_id();
diff --git a/src/profiling/profiler.hpp b/src/profiling/profiler.hpp
index c6f5244e..7230697b 100644
--- a/src/profiling/profiler.hpp
+++ b/src/profiling/profiler.hpp
@@ -218,8 +218,10 @@ void profiler_enter(const char* n);
 /// enter nested profiler regions in a single call
 template <class...Args>
 void profiler_enter(const char* n, Args... args) {
+#ifdef WITH_PROFILING
     get_profiler().enter(n);
     profiler_enter(args...);
+#endif
 }
 
 /// move up one level in the profiler
-- 
GitLab