How to send files from worker to client in MDSC?

1 visualización (últimos 30 días)
raym
raym el 9 de Sept. de 2018
Comentada: raym el 10 de Sept. de 2018
In the client I opened several workers by MDSC with MJS cluster "MyMJScluster" using multiple computers as node PC.
parpool('MyMJScluster')
Then I run a function which has a spmd block.
spmd
...
end
During the running of job, several files are generated on the local hard drive of each node PC. These files are under the same path of each node, such as "D:\data1\output\*.*", but filenames are different and unpredicatble, but could be dir from worker PC.
I want these files to transfered to the client under the same path to pool them together and do further combined small-scale analysis of these files at client.
Is there a way to do such a transfer? The addAttachedFiles only transfer the specified files from client to workers, but not the reverse.
Thanks.

Respuesta aceptada

Edric Ellis
Edric Ellis el 10 de Sept. de 2018
There's no facility to transfer files from the workers back to the client. If you can, I would suggest reading the files into memory on the workers, and then transferring the variables back from your spmd block as Composite objects. Something like
spmd
... do stuff ...
myData = loadAllOutputs('D:\data1\output\*.*');
end
% Pull all the data back from the workers
localData = myData(:);
% localData is now a cell array of length 'numlabs'
% containing all the data loaded on each worker
  1 comentario
raym
raym el 10 de Sept. de 2018
I also come up with the same idea last night. Thanks.

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.

Community Treasure Hunt

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

Start Hunting!

Translated by