Segfault with Julia MKL build (library conflict)
- Langage dominant
- Julia
- Étoiles
- 1.5k
- Forks
- 186
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
With a recent upgrade of anaconda I'm getting seg faults with PyCall (and PyPlot). Reading the other recent issues it appears some are having the same problem but my output is a bit different and the workarounds for those don't seem to be helping any. Hope I'm not adding noise to something that is already known.
If I run the code from [6423](https://github.com/ContinuumIO/anaconda-issues/issues/6423) I just get a straight seg fault.
```julia
julia> using PyCall
julia> pyimport("numpy.linalg")["inv"]([2 1; 1 2])
Segmentation fault: 11
```
calling directly from python works fine.
```python
Python 3.6.2 |Anaconda, Inc.| (default, Sep 21 2017, 18:29:43)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.linalg.inv(np.matrix('2 1; 1 2'))
matrix([[ 0.66666667, -0.33333333],
[-0.33333333, 0.66666667]])
```
I've tried to work around it with what appears to work for some people. However I'm still getting seg faults. In particular, I tried the following without success.
```
julia> Libdl.dlopen("/Users/ethananderes/Software/anaconda3/lib/libiomp5.dylib")
julia> Libdl.dlopen("/Users/ethananderes/Software/anaconda3/lib/libmkl_intel_thread.dylib")
```
```
install_name_tool -change @rpath/libiomp5.dylib @loader_path/libiomp5.dylib /Users/ethananderes/Software/anaconda3/lib/libmkl_intel_thread.dylib
install_name_tool -change @rpath/libiomp5.dylib @loader_path/libiomp5.dylib /Users/ethananderes/Software/anaconda3/lib/libiomp5.dylib
```
Any ideas what is going on here?
Some possibly relevant info:
```
julia> using PyCall
julia> PyCall.libpython
"/Users/ethananderes/Software/anaconda3/lib/libpython3.6m"
julia> versioninfo()
Julia Version 0.6.1-pre.92
Commit 389b23cf6e* (2017-10-07 01:18 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin17.0.0)
CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
WORD_SIZE: 64
BLAS: libmkl_rt
LAPACK: libmkl_rt
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par reproduire le crash dans la REPL Julia avec `using PyCall` et `pyimport("numpy.linalg")`, puis examinez `PyCall.libpython` et la configuration BLAS/LAPACK signalée. Aucun fichier source ni test n’est indiqué ; le travail ne serait terminé qu’après avoir identifié le conflit de bibliothèques et établi une correction ou une solution de contournement confirmée et adaptée au projet.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- julia, numpy, python
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100