Incorrect reverse_com_fix

Dear LAMMPS users,

I’m sorry to trouble you again, especially to Axel, Steve and Ray who helped me a lot and answered my silly questions. But I met a problem with comm->reverse_comm_fix. As I have mentioned before, my fix requests a full neighbor list and adds force to atoms by post_force method. I use reverse_comm_fix to send additional force of ghost atoms back to the process owning the ghost atom. During debugging, I found a weird thing. If I run the code with neighbor_modify check yes, the summation of force is zero, which is correct since the additional force added by my fix is interaction force satisfying Newton’s 3rd law. But If I change to neighbor_modify no, on a specific time step, an atom moves from process 7 to process 3 but reverse_comm_fix sends the additional force to the ghost copy of the atom in process 7 but not the local copy of the atom on process 3. (I found this by adding some printout statement to the packing and unpacking function). I think it’s the problem of my code but I have no idea about where to start debugging. My fix requests neighborlist in a way similar to fix_orient_fcc and communicates information as fix_qeq_dynamic.

Hope you can give me some advice. Thanks!

Both the forward and reverse comm methods use the current neighbor lists

and assignment of atoms-to-processors to determine what atom values to send where.

Every time atoms migrate, the data structs used by forward/reverse comm

are re-built. So there should be no way they get out of sync.