Why is job submit time code dependent?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have set up a test program to evaluate the batch job/task capability of the PCT. I set it up to run using this:
parallel.defaultClusterProfile('local');
clust = parcluster();
batchJob = createJob(clust);
createTask(batchJob, @itersum, 2, {1,1});
createTask(batchJob, @itersum, 2, {2,1});
tic;
submit(batchJob);
toc;
wait(batchJob)
batchout = fetchOutputs(batchJob);
My task function just adds one of the inputs to itself a number of times in a loop. There are 5 lines in the code. This takes ~.2 seconds to initialize in the submit function. If I substitute A much more lengthy function for my task function it takes ~10 seconds to initialize. If I comment out some of the code in my task function it takes less time to intialize. Why is this the case? Doesn't the submit function just set up matlab workers and some other settings?
3 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!