I want to write a small program in MPI (Java implementation) A variable x (double variable) is declared. Threads try to modify the variable (let's say a random modification). When a thread i finds a new value of X which is smaller than the older one, a broadcasting to other threads is done so that they can update the value of their variable X
I have looked at the Bcast function in MPI ... but in all examples it was called by all threads whether the variable is modified or not.
mpi_gather
,mpi_scatter
ormpi_allgather
. There are others too. – High Performance Mark