Segmentation Violation with Parallel Toolbox on

2 次查看(过去 30 天)
Hi everyone,
I am writing to ask you help with handling of Parallel Matlab Toolbox. I have created a main script that calls another one with a library of .m files that, in sequence, will be executed step-by-step (So that: Script1 -> Script2 -> .m files in sequence). Once finished, .m file passes calculated data to Script2 that calls next .m file and so on till end. If I try to execute the script without Parallel it works perfectly but if I want to speed up the process and include Parallel function spmd it returns an error of Segmentation Violation and forces Matlab closing. All the .m files that I wrote with spmd have in common that spmd function is above a for loop so that it could be split between my 2 CPU Cores and take less time. Strange thing (at least for me) is that if I run only the .m file, without being called from other 2 scripts, it works! Another thing that I have noticed is that when it crashes it doesn't activate parpool while, again, if I run .m file from its own it starts automatically parpool and finishes calculations. I have also tried to start parpool at the beginning of the main script but it crashes anyway.
My PC configuration is:
  • Matlab 2014b
  • Macbook Pro 2013 Retina
  • CPU: Intel Core i5 Dual Core 2.5 Ghz 64bit
  • OS: OS X 10.10.3 Yosemite
  • Java Version: Version 8 Update 45 (1.8.0_45-b14)
Anyone has some ideas?
Thank you in advance!
Leo
* UPDATE *
After some trials I have discovered and cleared that main problem is when there is a Parallel process inside a script being called with "run" command. Anyone can suggest me how to handle it (without take "run" off)?
  1 个评论
Rob
Rob 2017-5-11
Run matlab and your script from the command line:
matlab -r name_of_your_script_without_extension -logfile name_of_logfile.out

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by