PME implementation using getmem

Requires barriers before and after the index calculation to ensure
that the count array is safe to be read.
Requires also a barrier after computing the atom_count array in the
dme_redist routine.