Why do I get a concatenation error when I try to use the remote parallel server?

1 visualización (últimos 30 días)
I'd like to use a remote Parallel Server to execute my code. I have a main script, that calls a function embedding a parfor loop. When I run this script on my computer, everything works smoothly. However, when I try to use to remote Parallel Server, I got the error
Error using parallel.internal.pool.FileManager/addAttachedFiles
Dimensions of arrays being concatenated are not consistent.
A minimal working example is
myCluster = parcluster;
parpool(myCluster, 'IdleTimeout', 180);
parfevalOnAll(@feval,0,@ExternalLibrary);
myfunction;
where ExternalLibrary is a function of an external library that loads some files in memory, and myfunction is a dummy function
function myfunction
parfor l = 1:10
for k = 1:5
end
end
end
I noticed that when I copy and paste the code of myfunction inside the main script, I do not receive the error.
Why do I get this error and how can I solve it?

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown 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