LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Problem with create_bonds and MPI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Problem with create_bonds and MPI


From: Robert Meißner <robert.meissner@...4427...>
Date: Wed, 2 May 2018 14:19:41 +0200

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?

Best

R

--
Prof Dr.-Ing Robert Horst Meißner

Institute of Polymer and Composites
Denickestr. 15
D-21073 Hamburg
Tel.:  +49 (0)40 42878 2580
E-mail: robert.meissner@...4427...
Homepage: www.tuhh.de/alt/kvweb

# 3d Lennard-Jones melt

units		lj
atom_style	full

lattice		fcc 0.8442
region		box block 0 3 0 3 0 3
create_box	1 box extra/bond/per/atom 1 extra/special/per/atom 1 bond/types 1
create_atoms	1 box
mass		1 1.0

velocity	all create 3.0 87287

pair_style	lj/cut 2.5
pair_coeff	1 1 1.0 1.0 2.5
bond_style  harmonic
bond_coeff  1 100.0 1.0

special_bonds lj 0.0 0.0 0.5

neighbor	0.3 bin
neigh_modify	every 1 delay 0 check no

fix		1 all nve

# here it works
#create_bonds single/bond 1 1 2 special yes

thermo		50
run		250

# here it won't work anymore
create_bonds single/bond 1 1 2 special yes

run 250