Parallel Matrix Multiplication on a Distributed Computing System
Mostrar comentarios más antiguos
Hi,
Some functions in MATLAB like matrix multiplication are parallelized by default. I was wondering if matrix multiplication would still be parallelized by default when such operations are performed on a cluster using the Distributed computing toolbox. Will MATLAB automatically recognize how many workers are available and parallelize matrix operations accordingly?
The reason I ask is because I am trying to speed up my code which has a lot of matrix operations being performed. Switching to computers with a larger number of cores has dramatically reduced the runtime. However, I have never tested if such an effect persists in a cluster.
I use the batch command to send a job to the cluster and within the batch command I open several workers using {'matlabpool', numberofWorkers}. Will matrix multiplication be parallelized automatically using this method?
Thanks for your help!
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 1 de Nov. de 2011
1 voto
I have not seen a clear answer on this, but perhaps I am just being stubborn in not understanding this previous Question which seems to say Yes.
My answer to the above was a link to an earlier discussion which I would have always interpreted as seeming to say No.
Somewhere around here I wrote an Answer that discussed using multiple levels of matlabpool calls, but I am having difficulty tracking down that earlier response.
2 comentarios
Nicholas
el 2 de Nov. de 2011
Walter Roberson
el 2 de Nov. de 2011
Unfortunately I have not been able to tell by reading the documentation. The answer I linked to above seems to say that the automatic thread use for matrix multiplication and so on, will happen even in single-threaded mode, but that you will not have any control over it. That is the only place I have seen that possibility described, and in my mind it seems contradictory to what I have understood of how threading works.
I will send a note to Konrad pointing him to this Question.
Categorías
Más información sobre Parallel Computing Fundamentals en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!