Minimize MDCS Data Transfer

1 visualización (últimos 30 días)
Philip
Philip el 27 de Oct. de 2014
Comentada: Philip el 31 de Oct. de 2014
I am using MDCS on a Linux cluster. I repeatedly for a parfor loop in the following spirit:
while
parfor i=1:n
x(i) = a(i,:)*b;
end
end
Here the vector b is used on all cores, every time I call parfor. However, I believe each time I call parfor, b is being sent to all the cores, which slows down the code. How can I repeatedly use parfor with constant data such that I do not have to keep resending the same data each time I call a parfor loop? Thank you.

Respuesta aceptada

Edric Ellis
Edric Ellis el 29 de Oct. de 2014
You could use the Worker Object Wrapper which is designed for this sort of situation.
  1 comentario
Philip
Philip el 31 de Oct. de 2014
Thank you! This is exactly what I needed- it really sped up my code.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Parallel Server en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by