-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Building with MKL problems #6239
Comments
It looks like your
What does Why do you set |
Some of the stuff I have come up with by digging around ...
In response to your question, "What does icc -dumpmachine | sed "s/([^-]).$$/\1/" print for you?", when I put it into terminal, there is no response. Maybe icc is giving problems? I am not an expert in building or makefiles, by any means. My distant background is in engineering. |
My system specifications are the following: On a separate topic for building, is there a way to tell Julia to utilize the GPU as well? |
Also, on the same topic of building, the Julia gitHub source code page says this about using MKL ... I'm not sure I understand what it means to "set the MKL environment". Can you tell me where I do that? |
I should probably make a separate post for this question as well, but since it is about building and the issues I am having, I will just add it on here. The Julia gitHub source code page says this ..., "If you see build failures in OpenBLAS or if you prefer to experiment, you can use the Apple provided BLAS in vecLib by building with USE_SYSTEM_BLAS=1. Julia does not use the Apple provided LAPACK, as it is too old." What is the difference between Apple BLAS vs OpenBLAS vs Intel BLAS? And, which one should I use? |
One last question about building, The Julia gitHub source code page says this ..., "To perform a parallel build, use make -j N and supply the maximum number of concurrent processes" If my system, has 1 processor, but 4 cores, should I put N = 4? If my system profiler shows 8 CPUs (i.e. - 4 physical cores and 4 virtual cores), then should I put N = 8, instead? |
The build failure is definitely that |
I'll make an attempt to Number and answer your questions.
|
Thank you for your help. Now, I ran ... USE_INTEL_LIBM=1 and got this error ... checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /Users/esd100/julia/deps/libuv/missing: Unknown configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no amos/d1mach.f(80): remark #7922: The value was too small when converting to REAL(KIND=8); the result is in the denormalized range. checking if clang -stdlib=libc++ -mmacosx-version-min=10.7 supports -fno-rtti -fno-exceptions... yes checking for clang -stdlib=libc++ -mmacosx-version-min=10.7 option to produce PIC... -fno-common -DPIC checking if clang -stdlib=libc++ -mmacosx-version-min=10.7 PIC flag -fno-common -DPIC works... yes checking if clang -stdlib=libc++ -mmacosx-version-min=10.7 static flag -static works... no configure: creating ./config.status amos/zunk2.f(108): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [ZABS] config.status: creating Makefile amos/zsqrt.f(13): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [ZABS] config.status: executing depfiles commands amos/zuni2.f(88): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [ZABS] config.status: executing libtool commands amos/zlog.f(34): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [ZABS] ifort: command line warning #10006: ignoring unknown option '-shared' |
Interesting. So, I tried just removing the -j 4 and I got a different error... MacBook-Pro:julia esd100$ make patching file dSFMT.h icpc: command line warning #10006: ignoring unknown option '-shared' |
No surprise that you hit more issues when you use compilers that is not on the list of supported options. Why do you want to use the intel compiler toolchain? It seems like you run into silly problems that you are unable to solve. That is a poor starting point for doing trying to use different tools than everybody else. PS. I said in my comment above that |
Well, I don't think that it is too far from normal usage to want to use one of the industry's best compilers and math library for an intel processor. See for yourself, http://software.intel.com/en-us/c-compilers/, with nearly 50% boost for fortran and 100% boost for floating point calcs. Also, see the libraries available at http://software.intel.com/en-us/intel-mkl/, and how the performance scales. There is nearly 4-6x speed up in linear algebra routines for factorization in comparison to ATLAS (and I presume it also performs significantly better than OpenBLAS) and nearly 50x speed up in vectorized exponential calculations in comparison to GLIBC. Moreover, if those performance enhancements are not convincing enough, it seems that if Julia developers are discussing building with MKL on the front page, then they are endorsing the technology. It also seems that Intel developers are interested in Julia, as you can see from their website...http://software.intel.com/en-us/articles/julia-with-intel-mkl-for-improved-performance. So, there you go. I attempted to answer your questions. Now, maybe we can try and figure out the problems. |
It is a different case to use MKL, than to use the Intel compilers. As I understand the readme, the steps to use MKL is:
There is nothing about the Intel compilers in the readme, and because of the nature of the first error, I'm pretty sure nobody is actively using them for Julia. To do this, you will probably need someone who can change the makefile in all the places where gcc/clang and icc has different behaviour. Then he will have to go through and fix the C/C++/Fortran code so that it actually work with icc. To do that, it requires someone knowledgeable in makefiles with access to the Intel compiler to spend a unknown amount of time. Then he will have to fix problems every time something breaks, because most patches will not be tested with Intel compilers before they are merged. It would definitely be nice to support more compilers. |
Ah, okay. I was not aware of all of that. I thought most C/C++/Fortran code could be built by both GNU and Intel compilers. That seems awfully unintuitive. I agree, I think that it would be nice to support more compilers. As this one post showed, initially someone thought it would be rather easy, but then they had difficulty (https://groups.google.com/forum/#!topic/julia-dev/CMGE_KZyxIw). |
Even the simplest things gets really complicated when you require it to work on 3 platforms and that a automatic build script should be able to figure out everything without asking the user. When you add the requirement that it should be maintainable, it becomes next to impossible. C code are generally not portable between compilers and systems, unless it is written with care and regularly tested. |
I think this is a combination of closed (non-ICC issues) and a dup of #5473 (ICC-related issues). @esd100, please see #5473 (comment) and see if that works for you--if not, please continue discussion related to getting ICC working in that issue. |
It would definitely be nice to get Julia compiling under a full Intel toolchain, but it's a nontrivial task to port things to a different compiler. Even gcc vs. clang presents difficulties and clang has intentionally been designed to be as gcc-compatible as possible. @esd100, if you're willing to help slog through getting icc to work, that would be much appreciated – you can still get the benefits of MKL without it though. |
I doubt I will be very helpful because I am generally too busy with other things (I'm a physician with a background in engineering) and messing around with this kind of stuff is more of a hobby / pass time. If I can figure out #6244 , with just the basics, then I might move on to try and build with MKL. Then, if I can do that, then I might try the intel compilers. However, as I have done a little bit more exploration, I have found that between the three biggest compilers gcc / llvm-clang / intel, there are really difficult challenges to overcome but only mild to modest returns in performance. |
I'm not quite sure why there is not a LLVM-FLANG ("fortran language") but maybe in the future there will be. |
A preliminary one was developed as a LLVM GSoC project last year: http://llvm.1065342.n5.nabble.com/GSoC-Flang-s-end-of-GSoC-report-td61430.html It's not exactly production-ready, but with more work it may get there. I don't think Google or Apple have too much interest in Fortran, which is understandable but unfortunate for the scientific community. |
An update. After successful build with just the basics (see #6272 ), I went back and tried to build using MKL. The build process went on for a good amount of time, as you can see from the length of the gist, (https://gist.github.com/esd100/9905847) only to fail near the end. :-( libtool: link: ar cru .libs/libarpacksrc.a .libs/sgetv0.o .libs/slaqrb.o .libs/sstqrb.o .libs/ssortc.o .libs/ssortr.o .libs/sstatn.o .libs/sstats.o .libs/snaitr.o .libs/snapps.o .libs/snaup2.o .libs/snaupd.o .libs/snconv.o .libs/sneigh.o .libs/sngets.o .libs/ssaitr.o .libs/ssapps.o .libs/ssaup2.o .libs/ssaupd.o .libs/ssconv.o .libs/sseigt.o .libs/ssgets.o .libs/sneupd.o .libs/sseupd.o .libs/ssesrt.o .libs/dgetv0.o .libs/dlaqrb.o .libs/dstqrb.o .libs/dsortc.o .libs/dsortr.o .libs/dstatn.o .libs/dstats.o .libs/dnaitr.o .libs/dnapps.o .libs/dnaup2.o .libs/dnaupd.o .libs/dnconv.o .libs/dneigh.o .libs/dngets.o .libs/dsaitr.o .libs/dsapps.o .libs/dsaup2.o .libs/dsaupd.o .libs/dsconv.o .libs/dseigt.o .libs/dsgets.o .libs/dneupd.o .libs/dseupd.o .libs/dsesrt.o .libs/cnaitr.o .libs/cnapps.o .libs/cnaup2.o .libs/cnaupd.o .libs/cneigh.o .libs/cneupd.o .libs/cngets.o .libs/cgetv0.o .libs/csortc.o .libs/cstatn.o .libs/znaitr.o .libs/znapps.o .libs/znaup2.o .libs/znaupd.o .libs/zneigh.o .libs/zneupd.o .libs/zngets.o .libs/zgetv0.o .libs/zsortc.o .libs/zstatn.o |
There has usually been very rapid responses, so, because this is a little unusual, I am just wondering if anyone saw this last update. |
It's unclear (to me at least) what's going on at this point. Are you trying to make the build work with a broken version of gfortran? |
No, sorry I didn't make it clearer. As I referenced 2 posts up, I did have a successful build of Julia with gfortran (see #6272). But, as I also am interested in building other working versions of Julia (see 6 posts up), I decided to delete everything and try to see if I could build Julia another way. After I deleted everything, I downloaded Julia source again and tried make, but OpenBLAS 0.3.8 is still broken and the build failed (as expected. OpenBLAS 0.3.9rc2 minimum is needed for haswell processors. again see #6272). Then, I decided I would try to build Julia using MKL. Which is the experiment above (see 2 posts up), which made it far but failed with the error above. |
Perhaps I should just post a new issue. |
MacBook-Pro:julia esd100$ make -j 4 CC=icc CXX=icpc FC=ifort USE_INTEL_LIBM=1
Submodule 'deps/Rmath' (git://github.com/JuliaLang/Rmath.git) registered for path 'deps/Rmath'
Submodule 'deps/libuv' (git://github.com/JuliaLang/libuv.git) registered for path 'deps/libuv'
Submodule 'deps/openlibm' (git://github.com/JuliaLang/openlibm.git) registered for path 'deps/openlibm'
Submodule 'deps/openspecfun' (git://github.com/JuliaLang/openspecfun.git) registered for path 'deps/openspecfun'
Submodule 'doc/juliadoc' (git://github.com/JuliaLang/JuliaDoc.git) registered for path 'doc/juliadoc'
Cloning into 'deps/Rmath'...
Submodule path 'deps/Rmath': checked out '1864cf7d1fd77e21a9bf8b3a50db6a816f255a0f'
Cloning into 'deps/libuv'...
Submodule path 'deps/libuv': checked out '6649b84058e82f52adbc1a98f0b94b8aff8c467d'
Cloning into 'deps/openlibm'...
Submodule path 'deps/openlibm': checked out '5f4979e5d1ac985a5081a5de873ce42537c5a6ce'
Cloning into 'deps/openspecfun'...
Submodule path 'deps/openspecfun': checked out '13863b3f7dd67aa44cf042a62b740b011940133f'
Cloning into 'doc/juliadoc'...
Submodule path 'doc/juliadoc': checked out '88cb64ff33f25d50244c337cd3c865392a77400a'
Makefile:836: *** "unknown arch for openblas cross-compile: ". Stop.
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2
The text was updated successfully, but these errors were encountered: