Netlib-java allows fast linear algebra in native mode with BLAS/LAPACK libraries. Breeze is for Scala and is based on netlib as well. The problem is where to get binaries and how to set up netlib-java. So, which libraries are needed?
You need to place the needed dlls into the project folder or to some folder that is in PATH. Your maven pom project must have the following entry if you use only netlib-java:
libquadmath-0.dll //MINGW libwinpthread-1.dll //MINGW libgcc_s_seh-1.dll //MINGW libgfortran-3.dll //MINGW liblapack3.dll //OpenBLAS copy of libopeblas.dll libblas3.dll //OpenBLAS copy of libopenblas.dll netlib-native_system-win-x86_64.dll //netlib-java
- MINGW64: http://cznic.dl.sourceforge.net/project/mingwbuilds/host-windows/releases/4.8.0/64-bit/threads-posix/seh/x64-4.8.0-release-posix-seh-rev2.7z (or http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/ or http://sourceforge.net/projects/mingw-w64/?source=typ_redirect (dlls are in bin)
- OpenBLAS: http://www.openblas.net/
- Netlib-java: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22netlib-native_system-win-x86_64%22 (dll is inside the jar)
You need to place the needed dlls into the project folder or to some folder that is in PATH. Your maven pom project must have the following entry if you use only netlib-java:
<dependency> <groupId>com.github.fommil.netlib</groupId> <artifactId>all</artifactId> <version>1.1.2</version> </dependency>
<dependency> <groupId>org.scalanlp</groupId> <artifactId>breeze_${scala.binary.version}</artifactId> <version>0.9</version> </dependency> <dependency> <groupId>com.github.fommil.netlib</groupId> <artifactId>all</artifactId> <version>1.1.2</version> </dependency>
- unzip OpenBLAS sources
- extract MINGW and MSYS in the same folder,
- run msys.bat from MINGW/MSYS folder
- cd to OpenBLAS sources dir and run "make BINARY=64". After a while you'll get libopenblas.dll
What abut this but on Linux (Redhat)?
ReplyDeleteThere is nothing specific for Linux. You need to install (or better compile) OpenBlas and make a symlink from libopenblas.so to libblas.so.3. Before using netlib you need to and specify the OpenBlas folder in LD_LIBRARY_PATH.
ReplyDeletei tried the above given steps, but still i am facing same problem
ReplyDeleteThis comment has been removed by the author.
ReplyDelete