opensim-moco icon indicating copy to clipboard operation
opensim-moco copied to clipboard

OPENSIM_MOCO_PARALLEL must be set before opening MATLAB

Open carmichaelong opened this issue 5 years ago • 1 comments

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).

carmichaelong avatar Dec 06 '19 22:12 carmichaelong

Thanks for reporting. I think this is mostly just something to document, maybe in the FAQ.

chrisdembia avatar Dec 06 '19 22:12 chrisdembia