Sharing information between processors

Forwarded.

Axel,
What I am attempting to do is have certain monomers that are either
bonded
or not bonded. At a certain timestep, I want to pause the simulation,
randomly select a pair of those monomers and then perform the following
MC. If the monomers are bonded, perform a Metropolis MC. If the energy
of
the unbonded state is lower than the bonded state, the bond breaks. If
not, it stays the same. If the pair of monomers are not bonded and the
distance between them is less than a cutoff, perform a Metropolis MC
comparing the energies. Lowest energy state wins. If not bonded and
distance is greater than the cutoff, nothing happens.Resume MD. Does
this
sound feasible to do by updating the information on the MPI as you
suggest?

could be possible. it depends on the nature of the non-bonded interactions.
if they are short-ranged, you could come up with a scheme where you
could have MPI rank 0 generate random selection of monomers, broadcast
that information to all MPI ranks, have those identify whether they own
those monomers and can compute how the energy would change due to
adding/deleting a bond. that would require much less communication.

if you *do* have long-range interactions, then things get more complicated.

but the philosophy would remain the same. rather than collecting the
information about the entire system, you just do the singular step on
rank 0 and then send around that information to all ranks and then
have them compute the impact of the change and then report it back.
this way you only have to do some (partial) energy/force calculations
and collect the energy differentials. it is a somewhat inverted procedure,
but just like in "MapReduce" type algorithms, you want to bind the
task to the data and not the other way.

hope that helps,
     axel.