jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

Add support for openblas #51

Closed etrain closed 9 years ago

etrain commented 10 years ago

This change adds support for openblas - works if you build openblas and install with make install PREFIX=/root/openblas

Then configure jblas like so: ./configure --static-libs --libpath="/root/openblas/lib" --download-lapack --lapack-build

cc @shivaram

mikiobraun commented 10 years ago

Looks interesting. Have you tested whether it still works when building against ATLAS?

shivaram commented 10 years ago

We haven't tried building this with ATLAS -- Since open blas allows you to control the number of threads to use, we have been using this in place of parallel ATLAS builds.

mikiobraun commented 10 years ago

Yeah I know. I just need to check whether the config script would still work with atlas. Am 29.08.2014 19:11 schrieb "Shivaram Venkataraman" < notifications@github.com>:

We haven't tried building this with ATLAS -- Since open blas allows you to control the number of threads to use, we have been using this in place of parallel ATLAS builds.

— Reply to this email directly or view it on GitHub https://github.com/mikiobraun/jblas/pull/51#issuecomment-53903991.

etrain commented 10 years ago

I've luckily got an ATLAS build sitting on the same node - I'll try it out and update this thread.

ghost commented 9 years ago

This results on very interesting performance results. I will now be able to use multi-cored instances in my cluster with much better processing capabilities.

Thanks for this addition.

mikiobraun commented 9 years ago

Hi,

very cool. Sorry, took me forever to look at this pull request.

Very nice. Looks like peak performance is similar, but openblas performs much better already for small matrix sizes.

Thanks!

-M

lipiji commented 8 years ago

In the version on and after 1.2.4, use --build-type is ok.

./configure --static-libs --libpath=$HOME/openblas/lib --build-type=openblas

osmanbaskaya commented 8 years ago

Hi, I'd like to create a jar file wrapped with openblas.

Here is what I did:

  1. Cloned the master branch of this project
  2. ./configure --libpath=/usr/lib --libs=openblas,lapack --download-lapack --build-type=openblas configure.log can be seen here: http://pastebin.com/mzSwwZVD
  3. make
  4. make all-jars Unfortunately, I got error. Here is the log: http://pastebin.com/qFL9BneJ

(variations1: I also tried --static-libs option in step 2 but got the same error in step 4 variations2: I also tried make all-static-jars option in step 2 and this time error was: Target "static-jar" does not exist in the project "java-blas". )

java-blas project in build.xml doesn't have lean-jar (or static-jar). Any idea?

osmanbaskaya commented 8 years ago

I managed the make use of openblas by doing the step 1, 2, 3 and then ant dynamic-lean-jar. This last command provides a jar file (whose name is jblas-dynamic-{OS}-{ARCH}-{VERSION}.jar. This jar file can provide parallel processing (of course you have to export necessary environmental variable (most likely: OPENBLAS_NUM_THREADS).

But please help me understand these:

  1. why neither make all-jars nor make all-static-jar didn't work (except lean-jar does not exist in the java-blas project)?
  2. the jar file created by ant dynamic-lean-jar works but why the jar file which is built by ant static-lean-jar doesn't use other CPUs?

Thanks!

mikiobraun commented 8 years ago

Hi Osman,

Sorry, the ant stuff is pretty old and probably doesn't work anymore.

Preferred way to build it now is to use make for the native part and maven for the java part.

-M Osman Başkaya notifications@github.com schrieb am Fr., 23. Okt. 2015 um 23:03:

I managed the make use of openblas by doing the step 1, 2, 3 and then ant dynamic-lean-jar. This last command provides a jar file (whose name is jblas-dynamic-{OS}-{ARCH}-{VERSION}.jar. This jar file uses the other CPU in the machine (of course you have to export necessary environmental variable (most likely: OPENBLAS_NUM_THREADS).

But please help me understand these:

  1. why neither make all-jars nor make all-static-jar didn't work (except lean-jar does not exist in the java-blas project)?
  2. the jar file created by ant dynamic-lean-jar works but why the jar file which is built by ant static-lean-jar doesn't work?

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/mikiobraun/jblas/pull/51#issuecomment-150692151.