compute msd in prd

I would like to compute mean square displacements of the system of atoms using parallel replica dynamics. I found the advise on the internet about dumping msd results but for regular computations.

compute		msd all msd com yes
fix		msd all ave/time 1 1 8000 c_msd[4] file msddumpfile

and when I use the same lines with prd the dump file is jumbled, probably because of the replica switch after an event has occured. could you please give me a hint what would be the best way to apply msd function to prd computations?

The file is likely jumbled b/c multiple replicas
are writing to the same file. You can use a variable
name for the file, so that each replicas writes to
its own unique filename. Just as you would for
a dump file.

Steve