Cache file errors during parallel computing using simulink model

81 ビュー (過去 30 日間)
Suyash Agrawal
Suyash Agrawal 2023 年 8 月 1 日
回答済み: mana das 2024 年 11 月 19 日 7:21
I am trying to use PSO (particle swarm optimization) where the objectivefunction runs a simulink model and evalutes some parameters. However, the simulink file sometimes does not run and I get errors in the simulink simulation that look like the following:
  1. 'Cached model compile data may be stale. Delete any cached information such as 'slprj' directory and Simulink cache files. Suggested Actions: • Clear cached model compile data - Open'
  2. 'Simulink code generation folder in the current folder was created for a different release. The 'slprj' subfolder is not compatible with the current release. Manually remove the 'slprj' folder and generated code files that the folder contains.'
I tried using rmdir to remove this folder after each iteration of PSO, however, even that is not working as my simulation model is still throwing these errors. Kindly provide me with the resolution to this issue. Thank you.
  3 件のコメント
Ayush
Ayush 2023 年 8 月 21 日
If you are using older versions of MATLAB then try using temp directory to build the model to avoid error in current MATLAB.
Suyash Agrawal
Suyash Agrawal 2023 年 10 月 2 日
Thank you for your response. I am using Matlab 2023a, but I understand the reasoning behind your response.

サインインしてコメントする。

採用された回答

VINAYAK LUHA
VINAYAK LUHA 2023 年 8 月 30 日
Hi Suyash,
As per my understanding of the issue, the “rmdir” function is unable to delete the cached files in Simulink project(slprj) directory successfully, hence the persistence of the issue.
Follow the below steps to clear Simulink cache files-
  • Remove “slprj” directory and its subfolders irrespective of their writing permission using the following command-
rmdir('myfiles', 's');
  • Update generated cache files using the “rehash toolboxcache” command and restore the default MATLAB search path using “restoredefaultpath” command.
Find attached the MathWorks documentation for "rehash toolboxcache" command for your reference.
I hope it helps!
  1 件のコメント
Suyash Agrawal
Suyash Agrawal 2023 年 10 月 2 日
Thank you for your response. This definitely helped. I used mrdir for each instance of mu iteration and I haven't faced this error again.

サインインしてコメントする。

その他の回答 (1 件)

mana das
mana das 2024 年 11 月 19 日 7:21
Information cache folder or artifacts were missing. i am getting this error.how to fix it

カテゴリ

Help Center および File ExchangeDSP Algorithm Acceleration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by