I had a similar problem a couple of days ago (Correct usage of SharedArray and @parallel?).
Basically, you need to add @sync
in front of @parallel
to force the available threads wait for the end of loop operations before doing something else.
I had a similar problem a couple of days ago (Correct usage of SharedArray and @parallel?).
Basically, you need to add @sync
in front of @parallel
to force the available threads wait for the end of loop operations before doing something else.