lab id within parfor
2 views (last 30 days)
Show older comments
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 Comment
Answers (0)
See Also
Categories
Find more on MATLAB Parallel Server in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!