lab id within parfor

I'm running a simulation that goes through an experimental design (33 design points) and runs 100 iterations at each point. I write all the data out to text files for analysis later. Everything has been working fine when all I wanted were the end results, but now I'm trying to log some of the activities that take place within each run so that I can examine the timing. Since parfor runs things in an unpredictable fashion this is a little more complicated...
The approach I've tried is to use
t = getCurrentTask();
and then have all my file writes include t.id
Here's my issue: I'm running on a quad-core computer, and I have four workers. So I should have four unique task id's right? When I look at the text files that I write out, there are 100 unique task id's. The vast majority (36353 out of 44357 to be precise) are from task id's 1-4....what's the deal with the others?

1 Commento

Edric Ellis
Edric Ellis il 31 Mar 2015
How are you creating the job that's running here?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Parallel Server in Centro assistenza e File Exchange

Richiesto:

il 30 Mar 2015

Modificato:

il 31 Mar 2015

Community Treasure Hunt

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

Start Hunting!

Translated by