Dear LAMMPS Users,
I am experiencing a segmentation fault when using the fix store/state command, and I have been unable to find a solution.
When I add the following lines to bench/in.lj, just before the run command:
variable a atom x
fix x0 all store/state 0 v_a
dump testdump all custom 10 test.dump id x v_a f_x0
the simulation crashes with a segfault at the run command. I expect these commands to cause a dump file to be written, containing the ids of all atoms, followed by their x-coordinates (twice) and their initial x-coordinates. I am running a freshly compiled 18 Feb 2011 version, and have tried both a red hat and an ubuntu machine.
I would appreciate any advice on how to resolve this issue.
Thank you very much,
Gene
ehc@…212…
There was a bug fix to fix store state a couple weeks back.
Can you check if you still have the problem w/ the most
current version?
Steve
Dear Steve,
I am using the version of 18 Feb 2011, which I believe is the most current version. I did notice the bug fix for store/state of 6 Feb 2011, however, I am still having my issue with the 18 Feb 2011 version. I also tried running on a single processor, since the bug fix mentions the issue applying to the case of a processor having no atoms, but it did not help.
Thank you very much for your advice.
Gene
ehc@…212…
gene,
please make a copy of you fix_store_state.cpp file and
try the attached version of fix_store_state.cpp instead.
this should make the case of an atom style variable work, i hope.
however, there are some parts of the code that look inconsistent
to me and need some further discussion with steve.
axel.
fix_store_state.cpp (36.5 KB)
Dear Axel,
The new fix_store_state.cpp file appears to fix the problem. Thank you very much for your help.
Best,
Gene
ehc@…1955…
Dear Axel,
The new fix_store_state.cpp file appears to fix the problem. Thank you very
much for your help.
it only works for your specific case. if you change the type of data
that you want to store, you'll be getting a segfault again and have to
switch back. the real solution would have to be different, but i have
trouble understanding some parts of the code.
axel.
I just posted a 7Mar patch that seems to work with all the
test cases Axel sent me. The change was a bit different than
what Axel sent however, so please try it out and see if there
are any further problems ...
Thanks,
Steve
Dear Steve and Axel,
I have downloaded and compiled with the 7Mar patch, and it appears to work for all of my simulations, which involve storing atom style variables. Thanks very much for the patch.
Best,
Gene
ehc@…212…