Ryan, what if you uncomment the barrier before printf ?
I can see a scenario in which printf is invoked on rank 0 before all shmem_long_add have started/completed on rank 1 Cheers, Gilles On Wednesday, April 20, 2016, RYAN RAY <ryan....@rediffmail.com> wrote: > While executing the code in the file *exp4.c* (Attached) we faced > undesired result. This code allows all PEs to *add a 'quantum' value to a > variable on a particular host*. But in some cases few of these *'quantum' > values are lost*. I have attached the file and a screenshot of the > output. In the screenshot the last execution is missing 49 quantums. I will > be obliged if you could explain to me why this is happenning. > > Regards, > Ryan Ray > Get your own *FREE* website, *FREE* domain & *FREE* mobile app with > Company email. > *Know More >* > <http://track.rediff.com/click?url=___http://businessemail.rediff.com?sc_cid=sign-1-10-13___&cmp=host&lnk=sign-1-10-13&nsrv1=host>