From a65440cb4ea4c654f665ed2355235500b84007d3 Mon Sep 17 00:00:00 2001 From: bcumming <bcumming@cscs.ch> Date: Thu, 23 Jun 2016 09:23:14 +0200 Subject: [PATCH] small fixes for gcc 4.9.3 on Cray --- CMakeLists.txt | 1 + src/cell_group.hpp | 2 +- src/communication/communicator.hpp | 3 +-- src/threading/tbb.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c988ae1a..1e9838b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ set( WITH_TBB "OFF" CACHE BOOL "use TBB for on-node threading" ) if( "${WITH_TBB}" STREQUAL "ON" ) find_package(TBB REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_TBB ${TBB_DEFINITIONS}") + link_directories(${TBB_LIBRARY}) endif() diff --git a/src/cell_group.hpp b/src/cell_group.hpp index d9ea4551..767a483b 100644 --- a/src/cell_group.hpp +++ b/src/cell_group.hpp @@ -52,7 +52,7 @@ class cell_group { void splat(std::string fname) { char buffer[128]; - auto fid = std::ofstream(fname); + std::ofstream fid(fname); for(auto i=0u; i<tt.size(); ++i) { sprintf(buffer, "%8.4f %16.8f %16.8f\n", tt[i], vs[i], vd[i]); fid << buffer; diff --git a/src/communication/communicator.hpp b/src/communication/communicator.hpp index 1951143c..2a759385 100644 --- a/src/communication/communicator.hpp +++ b/src/communication/communicator.hpp @@ -10,7 +10,6 @@ #include <algorithms.hpp> #include <event_queue.hpp> - #include "connection.hpp" namespace nest { @@ -205,7 +204,7 @@ private: // thread private storage for accumulating spikes using local_spike_store_type = - nest::mc::threading:: enumerable_thread_specific<std::vector<spike_type>>; + nest::mc::threading::enumerable_thread_specific<std::vector<spike_type>>; /* #ifdef WITH_TBB using local_spike_store_type = diff --git a/src/threading/tbb.hpp b/src/threading/tbb.hpp index 56c09913..32097586 100644 --- a/src/threading/tbb.hpp +++ b/src/threading/tbb.hpp @@ -15,7 +15,7 @@ namespace mc { namespace threading { template <typename T> -class enumerable_thread_specific; +using enumerable_thread_specific = tbb::enumerable_thread_specific<T>; struct parallel_for { template <typename F> -- GitLab