Problem with create_bonds and MPI

Dear lammps-users,

I'm using the new create_bonds single/... commands to create on the fly new bonds, angles and dihedrals in a loop and continue the simulation. If I'm running the simulation on only one CPU everything works fine. Running it on multiple cores it creates an error message that some of the atoms don't exist. I've checked the source code and found that sometimes the allcount variable (in line 331) is 4 (and should be 2) since some atoms may be found on multiple processes and MPI_Allreduce(...,MPI_SUM,...) sums thus up to more than two atoms. However, this happens only if I place the create_bonds command after a previous run command. I've attached a small (quite random script) which reproduces this behavior. It runs for simulations with one core and crashes for simulations with more than one core giving the previously mentioned error.

I was not able to track down the error, maybe you know a solution for this?



in.lj (602 Bytes)

Please report this as an issue on GitHub and include a suitable input deck to reproduce it.

Thanks, Axel.