Error running parallel simulations

2 ビュー (過去 30 日間)
Umesh
Umesh 2012 年 12 月 26 日
I am trying to parallelly run a simulink model(contains embedded matlab functions) several times on my intel i5 based PC. After much debugging, I am stuck at below error.
Starting matlabpool using the 'local' profile ... connected to 2 labs.
<path>\MultiAUV_sfun.mexw64 could not be deleted. Trying to delete again.
Two attempts to delete <path>\MultiAUV_sfun.mexw64 have failed.
This file is either not writable or is locked by another process.
Error using parallel_function (line 589)
Error using targetman>throw_make_error (line 588)
(SLSF Diagnostic)
Error stack:
(No remote error stack)
Error in par_Multi_Simulate_2 (line 52)
parfor index = 1:3737
>> _

回答 (2 件)

Sarah Wait Zaranek
Sarah Wait Zaranek 2012 年 12 月 27 日
It looks like your mex file is still being used in MATLAB memory. You can try to see if clearing mex files will help,
clear mex

Guy Rouleau
Guy Rouleau 2012 年 12 月 28 日
It might be because both workers are trying to build/access/delete the mex-file a the same time.
Look at the documentation page titled "Run Parallel Simulations":
At the bottom, you will find a section titled "A Model with Stateflow, MATLAB Function Block, or Model Block"
There you will find an example code showing you how to create a temporary directory for each worker to handle its own mex-file.

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by