From 53bd7a2924a87b9cd81022a186e1bb31db3e8981 Mon Sep 17 00:00:00 2001
From: Wolfgang Ludwig <wolfgang.ludwig@esrf.fr>
Date: Fri, 13 May 2016 07:58:15 +0200
Subject: [PATCH] small fixes to re-enable parallel Thresholding via OAR and
 gtChangeThreshold3D

Signed-off-by: Wolfgang Ludwig <wolfgang.ludwig@esrf.fr>
---
 5_reconstruction/gtChangeThreshold3D.m   | 2 +-
 5_reconstruction/gtSetupReconstruction.m | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/5_reconstruction/gtChangeThreshold3D.m b/5_reconstruction/gtChangeThreshold3D.m
index 29a9e876..dcbe41bd 100644
--- a/5_reconstruction/gtChangeThreshold3D.m
+++ b/5_reconstruction/gtChangeThreshold3D.m
@@ -1,4 +1,4 @@
-function [varargout] = gtChangeThreshold3D(firstID, lastID, ~, phaseID, varargin)
+function [varargout] = gtChangeThreshold3D(firstID, lastID, ~, phaseID, parameters, varargin)
 % GTCHANGETHRESHOLD3D
 %     seg = gtChangeThreshold3D(firstID, lastID, ~, phaseID, varargin)
 %     ----------------------------------------------------------------
diff --git a/5_reconstruction/gtSetupReconstruction.m b/5_reconstruction/gtSetupReconstruction.m
index 48b28c5c..1a835904 100644
--- a/5_reconstruction/gtSetupReconstruction.m
+++ b/5_reconstruction/gtSetupReconstruction.m
@@ -162,9 +162,9 @@ if (~rec_on_OAR)
         check = inputwdefault('Launch grain segmentation via OAR? [y/n]', 'y');
         if (strcmpi(check, 'y'))
             launch_on_OAR('gtChangeThreshold3D', first, last, ...
-                phaseID_str, parameters, 'core', 4);
+                phaseID_str, parameters, 'core', 4, 'distribute', false);
         else
-            gtChangeThreshold3D(first, last, parameters.acq.dir, phaseID);
+            gtChangeThreshold3D(first, last, [], phaseID);
         end
     end
 end
@@ -203,6 +203,6 @@ function launch_on_OAR(func_name, first, last, phaseID_str, parameters, varargin
         [parameters.acq.dir ' ' phaseID_str ' '''''], true, ...
         'walltime', OAR_parameters.walltime, 'mem', OAR_parameters.mem, ...
         'cpu', [], 'core', oar.core, 'gpu', OAR_parameters.gpu, ...,
-        'distribute', true);
+        'distribute', oar.distribute);
 end
 
-- 
GitLab