question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segfault when trying to run tests locally

See original GitHub issue

I’m trying to run qutip’s test suite locally on my Macbook.

From a clean checkout of the master branch, I’m doing the following:

conda create -q -n qutip_testing_env -y python=3.7
conda install -n qutip_testing_env -y blas=*=openblas numpy scipy nose cython ipython pytest
mkdir qutip_testing
cd qutip_testing
rm -rf /Users/goerz/.pyenv/versions/miniconda3-latest/envs/qutip_testing_env/lib/python3.7/site-packages/qutip*
rm -rf ../build ../dist/ ../qutip.egg-info/
(cd ../ && /Users/goerz/.pyenv/versions/miniconda3-latest/envs/qutip_testing_env/bin/python setup.py install)
/Users/goerz/.pyenv/versions/miniconda3-latest/envs/qutip_testing_env/bin/python -m qutip.about
/Users/goerz/.pyenv/versions/miniconda3-latest/envs/qutip_testing_env/bin/nosetests --verbosity=2 --with-coverage --cover-package=qutip qutip

The resulting output is:

...
QuTiP: Quantum Toolbox in Python
================================
Copyright (c) QuTiP team 2011 and later.
Original developers: R. J. Johansson & P. D. Nation.
Current admin team: Alexander Pitchford, Paul D. Nation, Nathan Shammah, Shahnawaz Ahmed, Neill Lambert, and Eric Giguère.
Project Manager: Franco Nori.
Currently developed through wide collaboration. See https://github.com/qutip for details.

QuTiP Version:      4.5.0.dev0+d377c997
Numpy Version:      1.17.2
Scipy Version:      1.3.1
Cython Version:     0.29.13
Matplotlib Version: None
Python Version:     3.7.4
Number of CPUs:     2
BLAS Info:          OPENBLAS
OPENMP Installed:   False
INTEL MKL Ext:      False
Platform Info:      Darwin (x86_64)
Installation path:  /Users/goerz/.pyenv/versions/miniconda3-latest/envs/qutip_testing_env/lib/python3.7/site-packages/qutip-4.5.0.dev0+
d377c997-py3.7-macosx-10.9-x86_64.egg/qutip
==============================================================================
Please cite QuTiP in your publication.
==============================================================================
For your convenience a bibtex reference can be easily generated using `qutip.cite()`
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
/Users/goerz/.pyenv/versions/miniconda3-latest/envs/qutip_testing_env/lib/python3.7/site-packages/qutip-4.5.0.dev0+d377c997-py3.7-macos
x-10.9-x86_64.egg/qutip/__init__.py:161: UserWarning: matplotlib not found: Graphics will not work.
  warnings.warn("matplotlib not found: Graphics will not work.")
Transform 2-level to eigenbasis and back ... ok
Transform 10-level real-values to eigenbasis and back ... ok
Transform 10-level to eigenbasis and back ... ok
Transform 10-level imag to eigenbasis and back ... ok
Consistency between transformations of kets and density matrices ... ok
Check diagonalization via eigenbasis transformation ... ok
Check Qobj eigs and direct eig solver transformations match ... ok
Check Qobj eigs and direct eig solver reverse transformations match ... ok
brmesolve: simple qubit ... ok
brmesolve: c_ops alone ... ok
brmesolve: c_ops with a_ops ... ok
brmesolve: harmonic oscillator, zero temperature ... ok
brmesolve: harmonic oscillator, finite temperature ... ok
brmesolve: harmonic oscillator, finite temperature, states ... ok
brmesolve: Jaynes-Cummings model, zero temperature ... ok
brmesolve: Check for #572 bug. ... ok
brmesolve: input list of Qobj ... ok
td_brmesolve: passes all brmesolve tests ... ok
td_brmesolve: time-dependent a_ops ... ok
td_brmesolve: time-dependent a_ops tuple of strings ... ok
td_brmesolve: time-dependent a_ops tuple interp ... ok                                                                                 td_brmesolve: time-dependent a_ops & c_ops interp ... ok
td_brmesolve: non-Hermitian e_ops check ... ok
td_brmesolve: states check ... ok
td_brmesolve: split ops #1 ... ok
td_brmesolve: split ops #2 ... ok
td_brmesolve: split ops, Cubic_Spline td-terms ... ok
td_brmesolve: split ops, multiple ... ok
td_brmesolve: Hamiltonian args ... ok
BR Tools : zheevr ... Segmentation fault: 11

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nathanshammahcommented, Oct 9, 2019

Let me just mention that there are ongoing discussions on switching to / partly introducing Numba.

0reactions
jakelishmancommented, Mar 29, 2021

This particular segfault is solved by #1288 - it’s related to a bust zheevr implementation in the Mac OpenBLAS stack somewhere or another (may even be in scipy’s binding, we never tracked it down exactly). This doesn’t mean all segfaults on Mac are fixed - see also #1160, which I believe still occasionally rears its head and we have no idea about.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segfault when trying to run tests locally #1197 - qutip ... - GitHub
Setting up the testing environment with conda avoids the segfault, but hangs indefinitely while running the tests. I'm using the following run_tests_conda.sh :....
Read more >
Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >
Segmentation fault while running Google test - Stack Overflow
I had a similar issue - segmentation fault on instantiation of mock classes. I build gmock and gtest as static libraries.
Read more >
Sqlite segmentation fault regression when running tests (since ...
The segmentation fault occurs regardless of whether an in-memory or file-based database is used. When the file-based run crashes, the DB is around...
Read more >
GTest handling of Segmentation Faults - Google Groups
The common answer is "use a runner" but that means the runner must duplicate things that gtest should do best: collecting and reporting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found