Comments (12)
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.
I'm getting the same error when running lein expectations
but runs fine when lein repl
from clatrix.
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.
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.
This seems to be an OSX issue. On linux, using the standard package, I don't observe the problem :(
from clatrix.
Yes, I looked at jblas source and this happens because of an extra IF statement for OSX which loads ArchFlavor.
from clatrix.
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.
@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.
@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.
@cbilson: Can you please update the docs with the solution you found and then we can close the issue ?
from clatrix.
jblas 1.2.2 fixed this issue
from clatrix.
Great, thanks Paul.
from clatrix.
Related Issues (20)
- 0987 HOT 1
- Make as-vec work consistently on all matrix sizes
- Make as-vec work consistently on all matrix sizes
- NPE when comparing 2 empty matrices
- rank calculated incorrectly
- first, map, ... don't work correctly for 1 row matrices HOT 21
- Would you consider a pr for get and submatrix? (:Question) HOT 4
- Can't reshape matrix
- Element map (emap) on matrix returns LazySeq HOT 4
- Race condition in loading implementation
- reshape still not working clatrix 0.3.0? HOT 8
- Inconsistency in handling seq/map/filter, etc.
- Jblas SVD incorrect result HOT 1
- 0 and 1 argument results not working for + HOT 1
- Documentation HOT 2
- Clatrix not transposing V* matrix in correctly in SVD return HOT 9
- thought about switching to neanderthal HOT 1
- Missing support for PMatrixProducts HOT 1
- svd return value doesn't match Vectorz's svd
- warning related to `abs` function when using Clojure 1.11 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clatrix.