Random Parfor iterations missing
Mostrar comentarios más antiguos
Was just curious as to whether anyone else had encountered something like this.
I'm running a designed experiment. There are 33 treatments in the design, so the simulation runs each one and writes out a file with 33 lines, one per design point. The parfor loop is at the level, as each treatment level runs independently from the others.
This whole process is then iterated in order to provide replications at each design point.
I just ran 600 replications over night to generate a bunch of data for variance characterization. When I imported the data, I found that of my 600 output files, 8 of them had only 32 lines instead of 33. Each one was missing one treatment level...only one treatment was missing twice, and there's no identifiable pattern, or at least none that I can discern:
Run --- Missing Treatment
272 --- 10
273 --- 3
278 --- 1
319 --- 21
329 --- 20
367 --- 21
424 --- 19
487 --- 8
Just wondering if anyone else had encountered something similar...and if they maybe found a way to mitigate it.
7 comentarios
José-Luis
el 16 de Jul. de 2014
Sounds like a race condition. What function writes the offending lines?
Sean de Wolski
el 16 de Jul. de 2014
What happens if you run a regular for-loop over the failed iterations? Do you get 33 treatments?
Sean de Wolski
el 16 de Jul. de 2014
The fclose('all') worries me. I don't think that it should have an effect but I can't say for sure. fclose(fid) is a much smaller hammer approach that should be fine.
And what about just running a regular for-loop over the simulations that failed to see if they fail again serially?
Jeremy
el 16 de Jul. de 2014
Sean de Wolski
el 16 de Jul. de 2014
Just rerun the failed iterations to see if it's something with them specifically.
Jeremy
el 16 de Jul. de 2014
Respuestas (0)
Categorías
Más información sobre Parallel for-Loops (parfor) en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!