From 99942ab5bd536e7fff45c5595ba89dc8bcd38ddd Mon Sep 17 00:00:00 2001
From: "w.klijn" <nonoice@gmail.com>
Date: Thu, 11 Aug 2016 16:53:05 +0200
Subject: [PATCH] File only created on rank 0

---
 src/communication/export_manager.hpp | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/communication/export_manager.hpp b/src/communication/export_manager.hpp
index 2a05ba19..90d4bace 100644
--- a/src/communication/export_manager.hpp
+++ b/src/communication/export_manager.hpp
@@ -68,11 +68,15 @@ public:
         }
 
         // single file per simulation exporters
-        if (!single_file_per_rank) { 
-            single_exporters_.push_back(
-                nest::mc::util::make_unique<
-                    nest::mc::communication::exporter_spike_file<Time, CommunicationPolicy> >(
-                        file_name, output_path, file_extention, over_write));
+        if (!single_file_per_rank) {  // TODO: When we add more exporters and 
+            //agreed on the parameter input this should be cleanup up.
+            if (communication_policy_.id() == 0) {
+                single_exporters_.push_back(
+                    nest::mc::util::make_unique<
+                        nest::mc::communication::exporter_spike_file<Time, CommunicationPolicy> >(
+                            file_name, output_path, file_extention, over_write));
+
+            }
         }
     }
 
-- 
GitLab