Segmentation fault when read_restart

copying the mailing list again, so that the conclusion to this issue is included in the mailing list archives.

Dear Dr. Kohlmeyer,

I also found that if the buck_coul_cut is replaced by the lj_cut style,
this read_restart issue will not happen.
So most probably, the issue can be from the pair buck_coul_cut,
however, I already used the unmodified one.

your observation is correct. there is an uninitialized memory access in pair style buck/coul/cut. the following change is needed. this (and some related updates) will be included in the next LAMMPS patch release.

diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp
index 7eecb6212…f9e7c9492 100644
— a/src/pair_buck_coul_cut.cpp
+++ b/src/pair_buck_coul_cut.cpp
@@ -42,7 +42,9 @@ PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp)


  • if (!copymode) {
  • if (copymode) return;

Dear Dr. Kohlmeyer,

Thank you so much!
Your recommended revision did solve the problem.

Best regards,
Xiao Jia