spirit-code / spirit

Atomistic Spin Simulation Framework

Home Page:http://spirit-code.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault when disabling DDI during simulation

FinnHoller opened this issue · comments

I have downloaded the new Spirit-2.2.0 release (revision b739e4e06f31c) and noticed a bug in the cpp-ui (qt). Previously it was possible to tweak the Heisenberg Hamiltonian parameters, while running a simulation (tested for LLG and MC). In this new version this still seems possible, although less responsive. Only when enabling or disabling the dipole-dipole interaction, the program crashes with a segmentation fault.

I have compiled the code from source, with following options: cmake -DSPIRIT_USE_OPENMP=OFF ..

System information:

  • OS: Linux Mint 21.1 Vera
  • CMAKE: cmake version 3.22.1
  • CPP: cpp (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  • CPU: Intel Core i5-6400T

I just tested and this does not happen in LLG when openMP is enabled. It still happens with MC.

I have the suspicion that the GUI might be passing a nullptr to the C API somewhere.
Not sure when, but a few misuses of the C API in the GUIs seem to have crept in. On the develop branch I added a bunch of throw_if_nullptr checks around the arguments of the C API functions, which will generate a decent log message if the API is used incorrectly.

Could you try the develop branch to see whether the issue persists for you there?

I have cloned and built the develop branch, but there are no logs when the segmentation fault happens, should these appear in the spirit log or on the standard output?

So the segfault still happens?

I'll try to reproduce this as soon as I can. In case it might be helpful please attach your input-config.

Yes it does still happen.

This is the configuration I am using:
test_cfg.txt

I also got this error while changing the exchange interation during an LLG (solver: LBFGS_Atlas) simulation:

malloc(): unsorted double linked list corrupted
Segmentation fault