angles cannot all be removed when bond is broken

Hi Lammps Users:

I coded my own quartic style bond to let it be usable with harmonic angle. However, while running on multiple processors, it sometimes happens that when a bond is broken, not all angles associated with the bond can be removed (angle type set to zero). I tried to find the bug but due to my limited knowledge of parallel computing I haven’t been able to fig out. I am attaching the “compute” subroutine of my bond_my_quartic.cpp. I would really appreciate it if some one could kindly point out what my mistake is. Should you have a chance to take a look, please pay attention to the part commented as “ADDED to remove angles in temporal and permanent list”. Thanks very much.

Regards

Shaorui

bond_my_quartic_compute.txt (8.51 KB)

Just to clarify, is this a problem which only occurs in parallel?

If it helps, there was a discussion a few months ago, where I was
asking other lamps users how to debug code running on multiple
processors. Axel and Enrique replied with suggestions:
http://lammps.sandia.gov/threads/msg29120.html
http://lammps.sandia.gov/threads/msg29122.html
The entire thread is interesting.

Cheers
Andrew

Hello Andrew:

Thanks for the reply. I confirm that this is a problem only occurs in parallel. If possible, can I take a look at your code, especially the part doing update of bonding information? Many thanks.

Best
Shaorui