uncomplicate / neanderthal

Fast Clojure Matrix Library
http://neanderthal.uncomplicate.org
Eclipse Public License 1.0
1.06k stars 56 forks source link

install error on ubuntu 17.04 #27

Closed aaelony closed 7 years ago

aaelony commented 7 years ago

project.clj contains :dependencies [[org.clojure/clojure "1.8.0"] [uncomplicate/neanderthal "0.10.0"] ]

user=> (ns example

_=> (:use [uncomplicate.neanderthal core native]))

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

CompilerException java.lang.UnsatisfiedLinkError: /tmp/libneanderthal-mkl-0.9.09155295397512166145.so: libmkl_rt.so: cannot open shared object file: No such file or directory, compiling:(uncomplicate/neanderthal/internal/host/mkl.clj:98:5) user=>

I'm on Ubuntu 17.04 (64-bit) with a 6 GB GTX 1060 with 1280 CUDA Cores.

Any advice?

blueberry commented 7 years ago

do you have intel mkl on your path? the message complains that neanderthal can't fond libmkl_rt.so

aaelony commented 7 years ago

that's right. Looking for docs on how to install libmkl_rt.so

MrEbbinghaus commented 7 years ago

@aaelony You can get it here: https://software.intel.com/en-us/intel-mkl

aaelony commented 7 years ago

thanks

aaelony commented 7 years ago

actually perhaps ubuntu 17.04 is not yet supported by Intel?

--------------------------------------------------------------------------------
There are one or more optional unresolved issues. It is highly recommended to
resolve them all before you continue. You can fix them without exiting the setup
program and re-check. Or you can exit the setup program, fix them and run the
setup program again.
--------------------------------------------------------------------------------
Missing optional prerequisites
-- Unsupported OS
--------------------------------------------------------------------------------
1. Skip missing optional prerequisites [default]
2. Show the detailed info about issue(s)
3. Re-check the prerequisites

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 
blueberry commented 7 years ago

Most linux distributions are "unsupported", but it installs on them just fine. Moreover, you do not even need to i stall it properly - since you do not need to compile any binaries with mkl (I already did that) it is enough to obtain te libXXX.so anyhow add put them on your machine. It is all explained in the Gettimg atarted guide on the neanderthal website.

additionally, ubunty may have some shenanigans on its own when it comes to setting LD_LIBRARY_PATH for java, but that is solvable (see the previous issus related to ubumtu and atlas - Goran Jovic wrote a blogpost and put a link to it in that github issue thread).

blueberry commented 7 years ago

iphone keyboard :) it seems there is no editing option in mobile...

MrEbbinghaus commented 7 years ago

@blueberry I had to install the MKL libraries. I don't know exactly why, but my REPL wouldn't work correctly.

blueberry commented 7 years ago

@mroerni just to be clear: when you installed mkl, everything works fine?

btw i tested that: removed mkl installation, everything works fine with library files at the right place...

MrEbbinghaus commented 7 years ago

@blueberry I removed the mkl libs and started a repl. Following error:

formons.core=> (require 'uncomplicate.neanderthal.native)
CompilerException java.lang.UnsatisfiedLinkError: /private/var/folders/bn/bktfqcr12q3610c1s16tv06h0000gn/T/libneanderthal-mkl-0.9.05214075906423401063.jnilib: dlopen(/private/var/folders/bn/bktfqcr12q3610c1s16tv06h0000gn/T/libneanderthal-mkl-0.9.05214075906423401063.jnilib, 1): Library not loaded: @rpath/libmkl_intel_lp64.dylib
  Referenced from: /private/var/folders/bn/bktfqcr12q3610c1s16tv06h0000gn/T/libneanderthal-mkl-0.9.05214075906423401063.jnilib
  Reason: image not found, compiling:(uncomplicate/neanderthal/internal/host/mkl.clj:98:5) 

I reinstalled the libs and restarted the repl. (require 'uncomplicate.neanderthal.native) => works.

blueberry commented 7 years ago

hey, wait! when you remove mkl, you have to place (copy) mkl's libxxx.so files in a folder, and add that folder to LD_LIBRARY_PATH, of course. This is nothing mkl specific, that's how linux dynamic libraries work..

blueberry commented 7 years ago

now i see that you're on osx. in that case, you should add that folder to DYLD_LIBRARY_PATH. see the getting started guide.

MrEbbinghaus commented 7 years ago

Ah nevermind. I was confused because you said, that you removed mkl.

blueberry commented 7 years ago

I removed the installation and tested the manual way. I have to keep the installatiom though because it is required for neanderthal-mkl compilation. you,the user, have more options.

blueberry commented 7 years ago

@aaelony What happened? Did you succeed setting it up?