09-30-2016 11:00 AM - edited 09-30-2016 11:02 AM
I would caution that IIRC, parallelizing the For loop where you write your data can *NOT* be depended upon to write the data in the proper order. The execution order of the parallel instances isn't prescribed and is probably unpredictable to mortals.
-Kevin P
<EDIT> Dang, did it again. Had a tab open to reply, didn't get around to it immediately, forgot to refresh before posting, found that I was just repeating what was already said. Oh well, maybe two answers reinforces the point...
09-30-2016 11:11 AM
@altenbach wrote:
@mcduff wrote:
I did not know writing to an ASCII file could be done in parallel. Did you check that everything is written in the right order?
I would expect that the right order is not guaranteed using a parallel FOR loop.
Yes, definite oversight.
The code is still slightly faster even without the parallelism.
10-10-2016 05:02 AM
Sorry, i've been a little busy these last days.
Thank you all for your answers and explanations. Your answers helped me a lot, and I was able to update my application and save time during its execution.