Skip to content

Segmentation fault with scipy

This issue was encountered by @mfraser and we managed to track and clean it up. Somehow a segmentation fault occur when a callback calls a fit using scipy.optimize which itself uses the Levenberg-Marquardt algorithm, and deeper some binaries form old algorithms. Changing the fitting method also removes the error.

The problem is that I do not get a traceback. I then tried (all on my TN machine)

  • to run with the debugger but the backtrace only lists Jpype, and not at the lowest level
  • to compile scipy from sources but I got an related to libraries
  • to run with the old acc-py 2020.1 but I get an MKL library error

You can find the minimal example in the bug branch of this repo

This bug does NOT occur with the latest acc-py sourced from base, here is what I did

source /acc/local/share/python/acc-py/pro/setup.sh
acc-py venv pro_env
source pro_env/bin/activate
pip install pyjapc
python simpleBug.py

This one works just fine but the environment is very riach with lots of packages.

now to get the fault I use what I think is the normal acc-py sourcing link

source /acc/local/share/python/acc-py/base/pro/setup.sh
acc-py venv accpy_new
source accpy_new/bin/activate
pip install pyjapc
python simpleBug.py

which then promptly crashed.

Could you take a look into it and let me know what you think ? I am not accusing pyjapc, but I though you would be the best suited to find some more about that issue since on our side we did what we could. I also link @fvelotti who had a look too

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information