add the sampler.

sampler preserves the sequence of the data points for
any give r, even ran in MPI.
expose the checksum interface