Skip to content

Commit

Permalink
temporarily set number of threads in octave to one, known issue shogu…
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Apr 22, 2017
1 parent 0c79949 commit 8aebf07
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/interfaces/octave_modular/swig_typemaps.i
Expand Up @@ -24,6 +24,10 @@
#include <octave/Cell.h>

#include <shogun/lib/DataType.h>

// this is for the hack that sets the number of threads to 1 below
// see #3772
#include <shogun/io/SGIO.h>
%}

/* One dimensional input arrays */
Expand Down Expand Up @@ -486,3 +490,10 @@ TYPEMAP_SPARSEFEATURES_IN(float64_t, Matrix)

TYPEMAP_SPARSEFEATURES_OUT(float64_t, NPY_FLOAT64)
#undef TYPEMAP_SPARSEFEATURES_OUT

%init %{
// set number of threads to 1
// see issue #3772
SG_SWARNING("Using Shogun single-threaded. Multi-threaded Octave is currently broken. See https://github.com/shogun-toolbox/shogun/issues/3772\n");
shogun::get_global_parallel()->set_num_threads(1);
%}

0 comments on commit 8aebf07

Please sign in to comment.