Publish & Snapnow issue in parallel jobs
2 ビュー (過去 30 日間)
古いコメントを表示
Hi
Context: In order to generate measurement reports (pdf) from my models, I use the publish function. I also use the snapnow function to force the correct positioning of the figures with the display of the measurements.
I work on Linux (Centos7) and on the r2021b version of Matlab.
Problem: when I run a single job, it works fine. But when I run several jobs in parallel on the same machine, it seems that the snapnow function mixes the figures of the different jobs.
Question: any idea on how to handle this problem? I can serialize the jobs and/or run the jobs on several machines in parallel, but it is not practical.
Thanks,
Lionel
0 件のコメント
回答 (1 件)
Vidip
2023 年 11 月 2 日
I understand that you are facing an issue with ‘snapnow’ function mixing figures from different parallel jobs, this could be related to the way it interacts with the underlying display and graphics system.
Using ‘parpool’ in MATLAB can be a helpful approach to manage parallel processing and potentially mitigate issues related to parallel figure rendering. Inside a ‘parfor’ loop or using other parallel constructs, perform your computations in parallel. Ensure that each parallel worker creates and renders figures independently. Use unique figure handles or separate figure names to distinguish figures.
For further information, refer to the documentation link below:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Parallel Computing Fundamentals についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!