From c1d94e4b21e49499ffdd42855b724495f6a650e3 Mon Sep 17 00:00:00 2001
From: Kepa Cantero <cantero@fortiss.org>
Date: Mon, 23 Sep 2019 14:14:29 +0000
Subject: [PATCH] Merged in CSC_distributed_not_working (pull request #11)

[NRPJP-94] MapCSVRecorder does not work in MPI mode

Approved-by: Eloy Retamino <retamino@ugr.es>
Approved-by: Ugo Albanese <ugo.albanese@santannapisa.it>
---
 .../launch/DistributedCLEProcess.py                       | 8 ++++++--
 .../hbp_nrp_distributed_nest/launch/NestLauncher.py       | 4 +++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py
index 808f221..9267a67 100644
--- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py
+++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py
@@ -66,6 +66,10 @@ def launch_cle(argv): # pragma: no cover
                             help='the global experiment RNG seed', required=True)
         parser.add_argument('-v', '--verbose', action='store_true',
                             help='increase output verbosity')
+        parser.add_argument('--token', dest='token',
+                            help='specify the user Token', required=True)
+        parser.add_argument('--experiment_id', dest='experiment_id',
+                            help='specify the experiment id', required=True)
 
         args = parser.parse_args(argv)
 
@@ -100,8 +104,8 @@ def launch_cle(argv): # pragma: no cover
                                timeout_type="real",
                                playback_path=None,
                                context_id=None,
-                               token=None,
-                               experiment_id="test",
+                               token=args.token,
+                               experiment_id=args.experiment_id,
                                brain_processes=None,
                                rng_seed=int(args.rng_seed))
 
diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py
index ca00e3d..d8e97a1 100644
--- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py
+++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py
@@ -102,7 +102,9 @@ class NestLauncher(object):
                 '--reservation={}'.format(reservation_str),
                 '--sim-id={}'.format(self._sim_config._sim_id),
                 '--timeout={}'.format(timeout_str),
-                '--rng-seed={}'.format(rng_str)]
+                '--rng-seed={}'.format(rng_str),
+                '--token={}'.format(self._sim_config._token),
+                '--experiment_id={}'.format(self._sim_config.experiment_id)]
 
         exe = '{python} -m hbp_nrp_distributed_nest.launch.main {args}'\
               .format(python=sys.executable, args=' '.join(args))
-- 
GitLab