-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiles with MKL on OS X, but 'make testall' fails calling mkl_blas_zdotc and elsewhere #359
Comments
Hi @y9KAaixxegjR, thank you for providing so much information. I've edited your OP to be a little easier to read. |
So you're trying to use MKL with clang and gfortran instead of the Intel compilers? I think there are Fortran calling convention differences depending on whether it uses the |
Thanks for the prompt response! Intel MKL is free on OS X through the community license, but the icc and ifort compilers are not. In fact, the compilers are each sold separately. Using 30-day free trials for the compilers, all permutations of USEICC = 0/1 and USEIFC = 0/1 are failing for me. If USEICC=1, I cannot run make and get this error.
Setting USE_LIBCPP=0 in the Make.user file does not change the result. If USEICC = 0 and USEIFC = 1, then I get the attached output from 'make testall' |
It appears I have the same issue on Linux, Ubuntu 16.04 with MKL 2017.0.098 with today's master of Julia 0.6 (but also before). The failing call appears to be happening from the Julia bundled libarpack.so to libmkl_rt.so, although everything is compiled with same MKL settings and linked properly to same libmkl_rt.so. |
You would need to rebuild with the same fortran calling convention that mkl uses. |
Here's the explanation for this somewhat common problem when linking gfortran with MKL: There are two solutions if such a segfault occurs: See e.g. scipy/scipy#3193 (comment) or https://software.intel.com/en-us/articles/mkl-single-dynamic-library-libmkl-rtso-does-not-conform-to-the-gfortran-calling-convention Is there interest in a PR, either as change of documentation or possibly to autodetect this unlucky combination, or both? |
using mkl along with gfortran built libraries has never really been supported with julia. if you're using mkl, will have better chances of things working if you build all fortran libraries with ifort. libmkl_gf_ilp64 does not link to its dependencies and isn't suited for using dynamically with ccall the way the single file libmkl_rt is. If mkl provided a single file libmkl_rt_gf that could potentially work. |
It appears the Julia arpack tests _ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0-pre.alpha.250 (2017-03-25 05:22 UTC)
_/ |\__'_|_|_|\__'_| | Commit 43fb9f0* (0 days old master)
|__/ | x86_64-linux-gnu
julia> Base.LinAlg.BLAS.vendor()
:mkl
julia> Base.LinAlg.BlasInt
Int64
julia> Base.runtests("linalg/arnoldi")
Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
linalg/arnoldi (1) | 24.50 | 0.43 | 1.8 | 1201.37 | 324.24
Test Summary: | Pass Total
Overall | 76 76
SUCCESS The tests Thus, a possible fix could be to add to
|
I am using OS X and followed the MKL installation instructions for the 0.5 release (Version 0.5.0-rc1+1 (2016-08-05 15:23 UTC), Commit acfd04c (5 days old release-0.5)). The build completed (output attached), but several tests failed (also attached). I also tried this with the 0.4.6 release, and I get the same mkl_blas_zdotc error in the arnoldi code.
My bash profile contains:
My Maker.user file is:
My environment variables are:
MakeTestallOutput.txt
The text was updated successfully, but these errors were encountered: