MATLAB Answers

Is it okay to use matlabpool in multiple matlab sessions?

12 views (last 30 days)
Peng
Peng on 14 Jan 2013
I'm sharing a server with someone else in my lab. To reduce executive time, I use the matlab parallel toolbox. However, matlab gives me this warning:
Warning: Found 1 pre-existing parallel job(s) created by matlabpool that are running.
This is because another person is also using the matlabpool. Should I ignore this warning? Or should I better use matlabpool when others don't? Need some help here!

  4 Comments

Show 1 older comment
Peng
Peng on 14 Jan 2013
I'm pretty sure. I just did what you said and the warning came up again.
Matt J
Matt J on 14 Jan 2013
Can you ask that person to close his/her matlabpool to test whether the problem goes away?
Peng
Peng on 14 Jan 2013
I tried that too. Everything is fine as long as there is just one matlab session which is using the matlabpool.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 14 Jan 2013
OK. Well, since you're sharing parallel computing resources with others, you'll obviously get better performance if you're the only one using the pool. I can't imagine it will affect the validity of your computations, though, if that's what you're worried about, and the fact that you're getting a warning vs. an error seems to reinforce that.
You can always try and see what happens.

  0 Comments

Sign in to comment.

More Answers (2)

Peng
Peng on 14 Jan 2013
Problem solved! Higher version of matlab doesn't have this warning. Maybe its time to use r2012b.

  0 Comments

Sign in to comment.


Thomas Ibbotson
Thomas Ibbotson on 14 Jan 2013
By default matlabpool will try and use all the workers available in a cluster. For example if you have 16 workers in a cluster and open a matlabpool:
>> matlabpool open myClusterProfile
Starting matlabpool ... connected to 16 workers.
Now the entire cluster is busy with your interactive matlabpool session. Someone in another MATLAB session will not be able to use the cluster (including opening their own matlabpool) until you close yours. It is not possible to share a single matlabpool between matlab sessions.
You can however share the cluster, by not using all the available workers, e.g.
>> matlabpool open myClusterProfile 8
Starting matlabpool ... connected to 8 workers.
Now there are still 8 workers available for someone else to use. Either with their own matlabpool or with batch jobs.
HTH, Tom

  0 Comments

Sign in to comment.

Sign in to answer this question.