TuckermanGroup / PINY

PINY cleanup and new feature integration.
Other
13 stars 5 forks source link

COM velocity zeroing fails in parallel #57

Open OndrejMarsalek opened 10 years ago

OndrejMarsalek commented 10 years ago

The run hangs during initialization with PIMD and both bead and force parallelization enabled if COM velocity zeroing is set in the input file. I have tracked it down to this chunk of code:

https://github.com/TuckermanGroup/PINY/blob/cb875c00da62467c33aba7ba6c3d6b43b82e705c/src/interface/parse/parse.c#L735-741

which only calls zero_com_vx on the master and therefore the MPI communication inside of it (Allreduce) hangs.

OndrejMarsalek commented 10 years ago

I think the condition just needs to use myid_bead_prime == 0 rather than myid_bead == 0, but I am not sure. My reading of the code also suggests that as the centering only acts on the first mode in the PIMD case, it should only be allowed with normal modes.

Can you please confirm these, @mtuckerman?