opensim-moco
opensim-moco copied to clipboard
OPENSIM_MOCO_PARALLEL must be set before opening MATLAB
Tested on Win10 with MATLAB R2014b (can test a later version of MATLAB too).
OPENSIM_MOCO_PARALLEL
environment variable only works if it's set prior to opening MATLAB. Subsequent changes using (for instance) setenv('OPENSIM_MOCO_PARALLEL, '4')
will change the value shown by getenv(OPENSIM_MOCO_PARALLEL)
, but the number of threads used will not change.
Workaround can be done using solver.set_parallel(num_threads)
and seems to take precedence over the environment variable (I think this is good and sufficient).
Thanks for reporting. I think this is mostly just something to document, maybe in the FAQ.