I would like to have the same array called hist(1:1000)
on different processors using OpenMPI, such that when one processor modifies hist
this modification is updated in the rest of the processors.
I have written a code and declared hist(1:1000)
but the problem is that hist
is updated independently on each processor, then what I do is to send the data to a "master node" in order to update another histogram based on the information of the slaves but this is what I don't want. I would like to have the same histogram updated on each of the processors.
Is it possible to do this with OpenMPI?