MAX/MIN_LOC operations have an (albeit odd) atomic compare and replace semantic. They operate on a pair type that has <value, location> components. The user provides the data for both value and location. The min/max comparison (i.e. less-than/greater-than) is done on the value. If the comparison is true, then the remote <value, location> is atomically replaced with the supplied data.
These operations can be useful for one-sided reductions. I think PetSC uses them for this. In MPI-2 (there are, of course better ways in MPI-3) you can also use these operations to implement a spinlock. The value is a boolean indicating if the mutex is taken and the location is the rank that hold the mutex. The mutex initially contains the unlocked value <0, MPI_PROC_NULL>. You do a MAX_LOC accumulate of <1, me> to try to claim the mutex then do a get to see if you succeeded (exclusive epochs because of mixing accumulates and gets and the same op restriction). To unlock, you write the unlocked value back to the mutex.
I have a test case that implements this, that's been queued up for a while waiting to go out to MPICH. Should be able to push it out soon.
~Jim.