How do you tell local workers to use the session of Simulink which is already open?

I am doing an asynchronous parameter sweep of a Simulink model. Each time the user adds another parameter set, a job is created to perform the frequency response, then added to the queue. Unfortunately, the worker reopens Simulink and reloads the models at every instance of the job.
How do you share a single Simulink session between jobs?
The jobs are not performed in parallel.

 Accepted Answer

MATLAB workers are completely separate processes, and as such, cannot share Simulink data.
One option you have is to use MATLABPOOL and PARFOR - that way, you could load the model once on each worker after opening the MATLABPOOL, and then run a PARFOR loop with the new parameters. Unfortunately, there is no option to run a PARFOR loop or an SPMD block asynchronously.

1 Comment

Thank you for the verification. Shame that. I was hoping not to have to write my own scheduler.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!