Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Segmentation fault for test_krr_bob on macOS #119

Closed
RMeli opened this issue Sep 16, 2019 · 2 comments
Closed

Segmentation fault for test_krr_bob on macOS #119

RMeli opened this issue Sep 16, 2019 · 2 comments

Comments

@RMeli
Copy link

RMeli commented Sep 16, 2019

The test test_krr_bob produces a segmentation fault on macOS (10.14):

================================================================================== test session starts ===================================================================================
platform darwin -- Python 3.6.9, pytest-5.1.2, py-1.8.0, pluggy-0.13.0 -- /Users/rmeli/miniconda3/envs/qml/bin/python
cachedir: .pytest_cache
rootdir: /Users/rmeli/Documents/git/software/qml
collected 90 items                                                                                                                                                                       

test/test_acsf.py::test_acsf_1 PASSED                                                                                                                                              [  1%]
test/test_acsf.py::test_acsf_2 PASSED                                                                                                                                              [  2%]
test/test_acsf_linear_angles.py::test_fchl_acsf PASSED                                                                                                                             [  3%]
test/test_acsf_linear_angles.py::test_acsf PASSED                                                                                                                                  [  4%]
test/test_arad.py::test_arad PASSED                                                                                                                                                [  5%]
test/test_armp.py::test_set_representation PASSED                                                                                                                                  [  6%]
test/test_armp.py::test_set_properties PASSED                                                                                                                                      [  7%]
test/test_armp.py::test_set_descriptor PASSED                                                                                                                                      [  8%]
test/test_armp.py::test_fit_1 PASSED                                                                                                                                               [ 10%]
test/test_armp.py::test_fit_2 PASSED                                                                                                                                               [ 11%]
test/test_armp.py::test_fit_3 PASSED                                                                                                                                               [ 12%]
test/test_armp.py::test_fit_4 PASSED                                                                                                                                               [ 13%]
test/test_armp.py::test_score_3 PASSED                                                                                                                                             [ 14%]
test/test_armp.py::test_predict_3 PASSED                                                                                                                                           [ 15%]
test/test_armp.py::test_predict_fromxyz PASSED                                                                                                                                     [ 16%]
test/test_armp.py::test_retraining PASSED                                                                                                                                          [ 17%]
test/test_compound.py::test_compound PASSED                                                                                                                                        [ 18%]
test/test_distance.py::test_manhattan PASSED                                                                                                                                       [ 20%]
test/test_distance.py::test_l2 PASSED                                                                                                                                              [ 21%]
test/test_distance.py::test_p PASSED                                                                                                                                               [ 22%]
test/test_energy_krr_atomic_cmat.py::test_krr_gaussian_local_cmat PASSED                                                                                                           [ 23%]
test/test_energy_krr_atomic_cmat.py::test_krr_laplacian_local_cmat PASSED                                                                                                          [ 24%]
test/test_energy_krr_bob.py::test_krr_bob Fatal Python error: Segmentation fault

Thread 0x000070000e7bf000 (most recent call first):
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/threading.py", line 295 in wait
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/queue.py", line 164 in get
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/tensorflow/python/summary/writer/event_file_writer.py", line 159 in run
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/threading.py", line 884 in _bootstrap

Current thread 0x0000000113a955c0 (most recent call first):
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/qml/representations/representations.py", line 314 in generate_bob
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/qml/utils/compound.py", line 249 in generate_bob
  File "/Users/rmeli/Documents/git/software/qml/test/test_energy_krr_bob.py", line 74 in test_krr_bob
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/python.py", line 170 in pytest_pyfunc_call
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/python.py", line 1423 in runtest
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 117 in pytest_runtest_call
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 192 in <lambda>
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 220 in from_call
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 192 in call_runtest_hook
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 167 in call_and_report
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 87 in runtestprotocol
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/runner.py", line 72 in pytest_runtest_protocol
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/main.py", line 256 in pytest_runtestloop
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/main.py", line 235 in _main
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/main.py", line 191 in wrap_session
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/main.py", line 228 in pytest_cmdline_main
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/rmeli/miniconda3/envs/qml/lib/python3.6/site-packages/_pytest/config/__init__.py", line 78 in main
  File "/Users/rmeli/miniconda3/envs/qml/bin/pytest", line 10 in <module>
[1]    18142 segmentation fault  pytest -v

The segmentation fault comes from subroutine fgenerate_bob in frepresentations.f90 when called by def generate_bob in representations.py.

Installation

Installation on develop branch.

conda create -n qml python=3.6 ipython
conda activate qml
pip install numpy scipy pandoc ase pandas scikit-learn tensorflow pytest
python setup.py build
python setup.py install
@andersx
Copy link
Member

andersx commented Sep 16, 2019

Thanks for the report, I'll investigate the reason for the segfault!

Also, thanks for the PR! Really useful addition for the build matrix!

@andersx
Copy link
Member

andersx commented Sep 19, 2019

I am trying to find someone with a mac that I can borrow in order to get this fixed, likely won't happen this week, unfortunately.

cstein added a commit to cstein/qml that referenced this issue Nov 12, 2019
When declaring a variable as out in fortran the value
is not defined. The function get_indices used the old
value and thus redeclared as inout
andersx pushed a commit that referenced this issue Nov 13, 2019
When declaring a variable as out in fortran the value
is not defined. The function get_indices used the old
value and thus redeclared as inout
@RMeli RMeli closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants