Unable to make parpool work

2 次查看(过去 30 天)
Emmanuel
Emmanuel 2017-5-5
I have 6 scripts that save images in different directories. I am not able to make parpool work or actually, maybe I don't understand how to make it work. To just test it, I wrote a file say a.m, that just had
varA=5 and b.m that just had
varB = 10
I then said
parpool('AttachedFiles',{'a.m','b.m'})
I got this output Starting parallel pool (parpool) using the 'local' profile ... connected to 4 workers.
ans =
Pool with properties:
Connected: true
NumWorkers: 4
Cluster: local
AttachedFiles: /home/scripts/matlab_dir/a.m
/home/scripts/matlab_dir/b.m
IdleTimeout: 30 minute(s) (30 minutes remaining)
SpmdEnabled: true
What I don't understand is why is not printing the output? Am I missing out something? Should I make some changes if I am writing a for loop for iterating through the images and storing them?
Is there any other alternative to run four .m files paralelly in matlab?

回答(1 个)

Walter Roberson
Walter Roberson 2017-5-5
You created the parallel pool but you have not given it any work.
See spmd and see parfeval and see batch

类别

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