Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can segfault using lammps-update-style: fast #79

Open
ExpHP opened this issue Oct 17, 2018 · 1 comment
Open

can segfault using lammps-update-style: fast #79

ExpHP opened this issue Oct 17, 2018 · 1 comment

Comments

@ExpHP
Copy link
Owner

ExpHP commented Oct 17, 2018

lammps-update-style:
  fast:
    sync-positions-every: 1

was observed to segfault on some input where safe does not.

When sync-positions-every: 1, I don't think rsp2 does anything particularly special other than setting pre: no, and rsp2 uses neigh_modify delay 0 with the intent to ensure that pre: no is as safe as pre: yes. So... I'm not sure if this is an rsp2 bug or a lammps bug.

@colin-daniels
Copy link
Collaborator

colin-daniels commented Oct 17, 2018

Relevant inputs: test_sigseg.tar.gz
Command: OMP_NUM_THREADS=1 mpirun -np 4 rsp2 -c input.yaml -o test_sigseg gyroid10.vasp

Note: Does not occur when not using mpirun or with -np 1 .

Backtrace:

#0  0x00007fec5c9bed79 in LAMMPS_NS::NPairFullBinGhostOmp::build(LAMMPS_NS::NeighList*) [clone ._omp_fn.0] ()
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/USER-OMP/npair_full_bin_ghost_omp.cpp:105
#1  0x00007fec5b7b5fa3 in GOMP_parallel (
    fn=0x7fec5c9be990 <LAMMPS_NS::NPairFullBinGhostOmp::_ZN9LAMMPS_NS20NPairFullBinGhostOmp5buildEPNS_9NeighListE._omp_fn.0(void)>, data=0x7ffe8d1234b0, num_threads=1, flags=0) at /build/gcc/src/gcc/libgomp/parallel.c:168
#2  0x00007fec5c9be900 in LAMMPS_NS::NPairFullBinGhostOmp::build (this=0x7fec5af97c00, list=0x7fec5aea8340)
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/USER-OMP/npair_full_bin_ghost_omp.cpp:47
#3  0x00007fec5c759770 in LAMMPS_NS::Neighbor::build (this=0x7fec5af9e900, topoflag=1)
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/neighbor.cpp:2077
#4  0x00007fec5c831617 in LAMMPS_NS::Verlet::run (this=0x7fec577f6a00, n=1)
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/verlet.cpp:287
#5  0x00007fec5c803e46 in LAMMPS_NS::Run::command (this=this@entry=0x7ffe8d123730, narg=narg@entry=5, 
    arg=arg@entry=0x7fec5ae40ca0)
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/run.cpp:183
#6  0x00007fec5c7120ee in LAMMPS_NS::Input::command_creator<LAMMPS_NS::Run> (lmp=<optimized out>, narg=5, 
    arg=0x7fec5ae40ca0) at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/input.cpp:870
#7  0x00007fec5c71b165 in LAMMPS_NS::Input::execute_command (this=0x7fec5af7cec0)
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/input.cpp:856
#8  0x00007fec5c71bb3c in LAMMPS_NS::Input::one (this=0x7fec5af7cec0, single=0x7fec5af40ef0 "run 1 pre no post no")
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/input.cpp:311
#9  0x00007fec5c7292a9 in lammps_command (ptr=<optimized out>, str=<optimized out>)
    at /home/cc/.cargo/git/checkouts/lammps-sys-2addabf2ac48c959/6bba3ad/lammps/src/library.cpp:231
#10 0x000055e082926278 in <rsp2_lammps_wrap::low_level::plain::LammpsOwner as rsp2_lammps_wrap::low_level::LowLevelApi>::command::{{closure}} (cmd=0x549 <error: Cannot access memory at address 0x549>) at src/io/lammps/low_level/plain.rs:141
#11 rsp2_lammps_wrap::low_level::plain::with_temporary_c_str (s=..., f=...) at src/io/lammps/low_level/plain.rs:603
#12 <rsp2_lammps_wrap::low_level::plain::LammpsOwner as rsp2_lammps_wrap::low_level::LowLevelApi>::command (
    self=0x7fec5ae40ae0, cmd=...) at src/io/lammps/low_level/plain.rs:140
#13 0x000055e08292f871 in rsp2_lammps_wrap::low_level::mpi::InputCommand::invoke_method (lammps=<optimized out>, self=...)
    at src/io/lammps/low_level/mpi.rs:196
#14 <rsp2_lammps_wrap::low_level::mpi::LammpsDispatch as rsp2_lammps_wrap::low_level::mpi_helper::DispatchMultiProcess>::dispatch (self=<optimized out>, root=<optimized out>, input=...) at src/io/lammps/low_level/mpi.rs:469
#15 0x000055e08293177b in <rsp2_lammps_wrap::low_level::mpi_helper::MpiOnDemandInner<D>>::root_dispatch (
    self=0x7fec5af42e30, arg=..., root=<optimized out>) at src/io/lammps/low_level/mpi_helper.rs:220
#16 <rsp2_lammps_wrap::low_level::mpi_helper::MpiOnDemand<D>>::invoke::{{closure}} (root=...)
    at src/io/lammps/low_level/mpi_helper.rs:157
#17 rsp2_lammps_wrap::low_level::mpi_helper::with_default_root (continuation=...)
    at src/io/lammps/low_level/mpi_helper.rs:211
#18 <rsp2_lammps_wrap::low_level::mpi_helper::MpiOnDemand<D>>::invoke (self=<optimized out>, arg=...)
    at src/io/lammps/low_level/mpi_helper.rs:157
#19 0x000055e082930b57 in <rsp2_lammps_wrap::low_level::mpi::MpiLammpsOwner as rsp2_lammps_wrap::low_level::LowLevelApi>::command (self=0x549, cmd=...) at src/io/lammps/low_level/mpi.rs:207
#20 0x000055e082758874 in <rsp2_lammps_wrap::Lammps<P>>::update_lammps_with_command (self=<optimized out>, 
    iter=<optimized out>, command=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/lib.rs:1072
#21 <rsp2_lammps_wrap::Lammps<P>>::update_computation (self=<optimized out>)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/lib.rs:1061
#22 0x000055e082748874 in <rsp2_lammps_wrap::Lammps<P>>::compute_value (self=<optimized out>)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/lib.rs:1258
#23 <<rsp2_tasks::potential::lammps::Builder<P>>::lammps_diff_fn::MyDiffFn<Mm> as rsp2_tasks::potential::DiffFn<Mm>>::compute (self=0x7fec54f45b00, coords=<optimized out>, meta=...) at src/tasks/potential/lammps.rs:155
#24 0x000055e0827476e5 in rsp2_tasks::potential::DiffFn::compute_value (self=0x549, coords=0x7fec5764b800, meta=...)
    at src/tasks/potential/mod.rs:273
#25 0x000055e082743be7 in <alloc::boxed::Box<(dyn rsp2_tasks::potential::DiffFn<Meta> + 'd)> as rsp2_tasks::potential::DiffFn<Meta>>::compute_value (coords=0x7fec5ae40b80, meta=..., self=<optimized out>) at src/tasks/potential/mod.rs:296
#26 rsp2_tasks::cmd::relaxation::warn_on_improvable_lattice_params (pot=..., coords=<optimized out>, meta=...)
    at src/tasks/cmd/relaxation.rs:402
#27 0x000055e08270ab0c in rsp2_tasks::cmd::relaxation::<impl rsp2_tasks::cmd::trial::TrialDir>::do_ev_loop_stuff_after_diagonalization (self=<optimized out>, settings=<optimized out>, pot=..., meta=..., iteration=..., coords=..., 
    evals=<optimized out>, evecs=<optimized out>) at src/tasks/cmd/relaxation.rs:189
#28 0x000055e08270bf5e in rsp2_tasks::cmd::relaxation::<impl rsp2_tasks::cmd::trial::TrialDir>::do_main_ev_loop (
    self=<optimized out>, settings=<optimized out>, pot=..., diagonalizer=..., original_coords=..., 
    stop_after_dynmat=<optimized out>, meta=...) at src/tasks/cmd/relaxation.rs:98
#29 rsp2_tasks::cmd::<impl rsp2_tasks::cmd::trial::TrialDir>::run_relax_with_eigenvectors (self=..., on_demand=..., 
    settings=0x7ffe8d125650, file_format=<optimized out>, input=<optimized out>, stop_after_dynmat=<optimized out>)
    at src/tasks/cmd/mod.rs:192
#30 0x000055e08269c119 in rsp2_tasks::entry_points::_rsp2_acgsd::{{closure}} (mpi_on_demand=..., logfile=...)
    at src/tasks/entry_points.rs:281
#31 rsp2_tasks::entry_points::wrap_main::{{closure}}::{{closure}} () at src/tasks/entry_points.rs:52
#32 rsp2_tasks::entry_points::wrap_main::{{closure}} (on_demand=...) at src/tasks/entry_points.rs:44
#33 rsp2_tasks::entry_points::wrap_main_with_lammps_on_demand::{{closure}}::{{closure}} (on_demand=...)
    at src/tasks/entry_points.rs:81
#34 rsp2_lammps_wrap::LammpsOnDemand::install::{{closure}} (on_demand=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/lib.rs:643
#35 <rsp2_lammps_wrap::low_level::mpi_helper::MpiOnDemand<D>>::install::{{closure}} (root=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/low_level/mpi_helper.rs:133
#36 rsp2_lammps_wrap::low_level::mpi_helper::with_default_root (continuation=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/low_level/mpi_helper.rs:211
#37 <rsp2_lammps_wrap::low_level::mpi_helper::MpiOnDemand<D>>::install (dispatch=..., func=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/low_level/mpi_helper.rs:130
#38 0x000055e082783019 in rsp2_lammps_wrap::LammpsOnDemand::install (continuation=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/lib.rs:641
#39 rsp2_tasks::entry_points::wrap_main_with_lammps_on_demand::{{closure}} () at src/tasks/entry_points.rs:81
#40 std::panicking::try::do_call (data=<optimized out>) at /checkout/src/libstd/panicking.rs:310
#41 0x000055e082aa5c5a in __rust_maybe_catch_panic () at libpanic_unwind/lib.rs:105
#42 0x000055e082691662 in std::panicking::try (f=...) at /checkout/src/libstd/panicking.rs:289
#43 std::panic::catch_unwind (f=...) at /checkout/src/libstd/panic.rs:392
#44 rsp2_lammps_wrap::low_level::mpi_helper::with_mpi_abort_on_unwind::{{closure}} (root=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/low_level/mpi_helper.rs:189
#45 rsp2_lammps_wrap::low_level::mpi_helper::with_default_root (continuation=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/low_level/mpi_helper.rs:211
#46 rsp2_lammps_wrap::low_level::mpi_helper::with_mpi_abort_on_unwind (func=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/low_level/mpi_helper.rs:188
#47 0x000055e08268d592 in rsp2_lammps_wrap::LammpsOnDemand::with_mpi_abort_on_unwind (func=...)
    at /run/media/cc/31b7ba32-4e18-4c56-bcc5-c904490446b5/build/rsp2-orig/src/io/lammps/lib.rs:652
#48 rsp2_tasks::entry_points::wrap_main_with_lammps_on_demand (continuation=...) at src/tasks/entry_points.rs:80
#49 0x000055e08268d4ea in rsp2_tasks::entry_points::wrap_main (version=..., main=...) at src/tasks/entry_points.rs:42
#50 0x000055e08268eb68 in rsp2_tasks::entry_points::_rsp2_acgsd (stop_after_dynmat=false, bin_name=..., 
    version=<error reading variable: Cannot access memory at address 0x4b>) at src/tasks/entry_points.rs:263
#51 0x000055e08268eb27 in rsp2_tasks::entry_points::rsp2 (bin_name=..., version=...) at src/tasks/entry_points.rs:249
#52 0x000055e082678c85 in rsp2::main () at src/binary-shims/rsp2.rs:7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants