issue regarding parallel lammps

The previously posted message on “parallel PDLAMMPS issue” seems to be an have a problem in viewing so its being posted again:

Hello everyone,

I have been working on PDLAMMPS to store some state variable (e.g. bond extension) throughout the runs. PDLAMMPS already stores r0 (initial bond length). I am trying to initialize and store r1 in a same manner (Fix_peri_neigh.cpp) and update in function: compute (int efla, int vflag) in pair_peri_lps.cpp. The code runs fine on a single processor. But on multiple processors (lammps compiled with MPICH2 on OSX 10.8.2) lammps either crashes or gets stuck. The memory_usage(), grow_arrays(), copy_arrays(), pack_exchange() and unpack_exchange() was also updated by adding r1. I tried to debug in the Fix_peri_neigh.cpp. During debugging it seems like the code gets stuck at copy_arrays(), pack/unpack_exchange(). I believe there may be some indexing issue that I’m missing (e.g. buff[m++]) but was not able to figure out what exactly it is that causing this problem. Some hint will be really helpful in this case. The Fix_peri_neigh.cpp, pair_peri_lps.cpp and the PDLAMMPS input file is attached.

Thanks in advance.


fix_peri_neigh.cpp (15 KB)

fix_peri_neigh.h (2.32 KB)

pair_peri_lps.cpp (22.4 KB)

pair_peri_lps.h (2.74 KB)

in.PD_cylinderElastic (1.07 KB)