Giter Site home page Giter Site logo

Comments (12)

prismofeverything avatar prismofeverything commented on August 28, 2024

Actually, simply cloning the clatrix repo and running lein test gives me this:

java.lang.UnsatisfiedLinkError: Couldn't find the resource libjblas_arch_flavor.jnilib/
/bin/
/lib/static/Mac OS X/x86_64/
/lib/static/Mac OS X/x86_64/
/lib/dynamic/Mac OS X/x86_64/
/lib/dynamic/Mac OS X/x86_64/
/lib/Mac OS X/x86_64/
/Mac OS X/x86_64/
.

    at org.jblas.util.LibraryLoader.loadLibrary(LibraryLoader.java:100)
    at org.jblas.util.ArchFlavor.<clinit>(ArchFlavor.java:50)
    at org.jblas.util.LibraryLoader.loadLibrary(LibraryLoader.java:75)
    at org.jblas.NativeBlas.<clinit>(NativeBlas.java:84)
    at org.jblas.SimpleBlas.gemm(SimpleBlas.java:245)
    at org.jblas.DoubleMatrix.mmuli(DoubleMatrix.java:1674)
    at org.jblas.DoubleMatrix.mmul(DoubleMatrix.java:3005)
    at clatrix.core$_STAR_.invoke(core.clj:615)
    at clatrix.core_test$eval1153.invoke(core_test.clj:16)

I have atlas installed, is this a path issue? Is libjblas_arch_flavor.jnilib/ a directory or a file, (it seems like it would be a file) and if so, is that trailing slash messing it up?

from clatrix.

Quantisan avatar Quantisan commented on August 28, 2024

I'm getting the same error when running lein expectations but runs fine when lein repl

from clatrix.

cbilson avatar cbilson commented on August 28, 2024

I get a similar error as well, in a project that uses clatrix:

$ lein repl                                                                                                                                                                
nREPL server started on port 57272                                                                                                                                                  
REPL-y 0.1.0-beta10                                                                                                                                                                 
Clojure 1.4.0                                                                                                                                                                       
...
user=> (require '[clatrix.core :as m])                                                                                                                                              
nil                                                                                                                                                                                 
user=> (m/rnorm 5 5)                                                                                                                                                                
#<Matrix [5 5]>                                                                                                                                                                     
user=> (m/* (m/rnorm 5 5) (m/rnorm 5 5))                                                                                                                                            
-- org.jblas ERROR Couldn't load copied link file: java.lang.UnsatisfiedLinkError: /private/var/folders/p4/ykgp4h_973q9z3j0v_m1r8jc0000gn/T/jblas55269708383826120libjblas_arch_fla\
vor.jnilib:  Library not loaded: /usr/local/lib/libgfortran.3.dylib   Referenced from: /private/var/folders/p4/ykgp4h_973q9z3j0v_m1r8jc0000gn/T/jblas55269708383826120libjblas_arch\
_flavor.jnilib   Reason: image not found.                                                                                                                                           

UnsatisfiedLinkError org.jblas.util.ArchFlavor.SSELevel()I  org.jblas.util.ArchFlavor.SSELevel (ArchFlavor.java:-2)                                                                 

user=> quit                                                                                                                                                                         
Bye for now!$

Is this just a jblas issue that I should talk to them about, or is there some workaround?

from clatrix.

Quantisan avatar Quantisan commented on August 28, 2024

I found a solution. If you download and unzip the pre-built jblas native libraries, find the files that it's complaining about, then just copy it into native directory within the project. It works for me on OS X 10.8.2. Note that I already have gfortran and apple developer command line tools installed.

from clatrix.

ejackson avatar ejackson commented on August 28, 2024

This seems to be an OSX issue. On linux, using the standard package, I don't observe the problem :(

from clatrix.

Quantisan avatar Quantisan commented on August 28, 2024

Yes, I looked at jblas source and this happens because of an extra IF statement for OSX which loads ArchFlavor.

from clatrix.

cbilson avatar cbilson commented on August 28, 2024

Thanks for the help guys! I was able to get my project working by putting the two files it wanted out of the prebuilt jblas jar (lib/static/Mac OS X/x86_64/libjblas_arch_flavor.jnilib and sse3/libjblas.jnilib) into some place on my project's class path (I just put them in resources for now.)

from clatrix.

cbilson avatar cbilson commented on August 28, 2024

@Quantisan: Where did you see the code in jblas that has an extra IF statement for OSX? I glanced at ArchFlavor and LibraryLoader and it looks right based on the paths in the resources folder. Is it somewhere in the native code?

If you know where the problem is, maybe we can make a pull request for jblas?

It looks like it may actually preferable to have these libraries on the path somewhere (https://github.com/mikiobraun/jblas/blob/master/src/main/java/org/jblas/util/ArchFlavor.java#L47-49) anyway so maybe we should mention this in the clatrix readme?

from clatrix.

Quantisan avatar Quantisan commented on August 28, 2024

@cbilson It works for me when I did lein run before. So I'm thinking it might be leiningen not expanding native folder during lein test. I don't know exactly where's the problem so couldn't patch it.

from clatrix.

ejackson avatar ejackson commented on August 28, 2024

@cbilson: Can you please update the docs with the solution you found and then we can close the issue ?

from clatrix.

Quantisan avatar Quantisan commented on August 28, 2024

jblas 1.2.2 fixed this issue

from clatrix.

ejackson avatar ejackson commented on August 28, 2024

Great, thanks Paul.

from clatrix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.