Skip to content

Workaround for julia compiled with MKL? #428

@Djoop

Description

@Djoop

I know that there are issues when both Julia and python use MKL (#100, #165, JuliaPy/PyCall.jl#443 ). I'm only using python for PyPlot, so using MKL is not critical, I thought I could just as a workaround link python libraries to openblas to avoid the problem. I tried ENV["PYTHON"]=""; Pkg.build("PyCall") (#165 (comment)), but it was still using MKL. So I manually installed nomkl in a clean environment:

julia> Conda.add("nomkl")

Now the packages indeed do not rely on MKL, e.g. for numpy:

julia> Pkg.build("PyCall")
julia> using PyCall
julia> np = pyimport("numpy")
julia> np.show_config()
lapack_opt_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/home/UNAME/.conda/envs/nomkl/lib']
    define_macros = [('HAVE_CBLAS', None)]
    language = c
blas_opt_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/home/UNAME/.conda/envs/nomkl/lib']
    define_macros = [('HAVE_CBLAS', None)]
    language = c
openblas_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/home/UNAME/.conda/envs/nomkl/lib']
    define_macros = [('HAVE_CBLAS', None)]
    language = c
blis_info:
  NOT AVAILABLE
openblas_lapack_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/home/UNAME/.conda/envs/nomkl/lib']
    define_macros = [('HAVE_CBLAS', None)]
    language = c
lapack_mkl_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE

but I still get a segfault when I try to use PyPlot:

julia> plot([1,2,3])
signal (11): Erreur de segmentation
in expression starting at no file:0
[1]    20255 segmentation fault (core dumped)  julia

Is it expected? Any idea how to set up with Conda an environment that can be used for PyPlot when julia is compiled with MKL (well, I guess that's the issue, but maybe there is another problem)?
Plotting works correctly when calling python directly.

For reference:

julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202* (2019-01-21 21:24 UTC)
Platform Info:
  OS: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions