I've attached the input scripts to reproduce the error. First I run in0.script which will generate restart files. Then I grab 100.restart and run in1.script (which is the same as in0.script except for a read_restart command instead of the read_data command). This gives me a segmentation fault error.
Let me know if you need anything else.
Ben Jensen
Computational Mechanics & Materials Research Laboratory
Mechanical Engineering - Engineering Mechanics
Michigan Technological University
Houghton, MI
I've attached the input scripts to reproduce the error. First I run in0.script which will generate restart files. Then I grab 100.restart and run in1.script (which is the same as in0.script except for a read_restart command instead of the read_data command). This gives me a segmentation fault error.
ok. thanks. that is _perfect_!
i have been able to identify the reason for the segfault
(despite never having used reax/c before myself).
there is a simple but unelegant workaround:
just insert a
reset_timestep 0
before the run statement. there is a heuristic in pair_reax_c.cpp
that determines whether it needs to allocate memory, that doesn't
work if the initial timestep number is not 0.
i'll see if there is a simple way to fix this properly without having
to dig too deep into the internals of the code.
I've attached the input scripts to reproduce the error. First I run in0.script which will generate restart files. Then I grab 100.restart and run in1.script (which is the same as in0.script except for a read_restart command instead of the read_data command). This gives me a segmentation fault error.
ok. thanks. that is _perfect_!
i have been able to identify the reason for the segfault
(despite never having used reax/c before myself).
there is a simple but unelegant workaround:
just insert a
reset_timestep 0
before the run statement. there is a heuristic in pair_reax_c.cpp
that determines whether it needs to allocate memory, that doesn't
work if the initial timestep number is not 0.
ok. here is my suggestion for a change.
overall it looks a bit suspicious to have this in ::compute()
and particularly to only run the guessed allocate once and
not the reallocate throughout the run. even without knowing
much about the actual implementation, i would be expecting
this to lead to memory corruption or worse for some inputs.
I changed the restart2data tool to add support for reax/c.
I'll have Aidan work with the Reax/C developer on the
restart crash issue. I agree with Axel that the setup
code shouldn't be in compute() and it shouldn't be
assuming the timestep = 0. But I don't know
what all he is expecting to (re)initialize, so I'll let
them work it out.
I added a setup function that is only called the first time. I also added a
check for non-existent requested types. It is valgrind-clean. I committed to
svn.