Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

MATLAB Parallel Toolbox parfor: using mphstart() more than once

Please login with a confirmed email address before reporting spam

Hi,
my problem is that a MATLAB instance refuses to use mphstart() more than once in its lifetime.
I need to reconnect because I want to use the MATLAB Parallel Computing Toolbox with parfor to run lots of Comsol models in parallel. Unfortunately if a MATLAB worker is re-assigned with a new Comsol task, it cannot connect to a Comsol server although its workspace is cleared completely.
Has anyone an explaination for this or knows how to fix this?
Best,
Chris

1 Reply Last Post Aug 1, 2017, 4:50 a.m. EDT
COMSOL Moderator

Hello Chris Shor

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 7 years ago Aug 1, 2017, 4:50 a.m. EDT
connect each worker only once in the first function call.
this can be done for example with isempty(variable)
connect each worker only once in the first function call. this can be done for example with isempty(variable)

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.