Hi,
I am using ATLAS in a cluster setting. Currently by following the
instructions in BUILDING_ATLAS, I have successfully compiled a static
binding jblas-1.2.0 jar file which allow me to run jblas on different
machines using the same copy of multithreaded ATLAS.
But as the machines in the cluster have different hardware setting, I
need to compile a single jblas jar file, but when called in different
machines, it will utilize the ATLAS tuned and installed in each
machine. In this case, is it Dynamic binding I should resort to?
In the static jblas package, there are two libraries called
"libjblas_arch_flavor.so" and "libjblas.so". What is the functionality
of them? Is it one for JNI library and one for ATLAS/BLAS library?
For dynamic binding, I get stuck in almost the last step, could you
help me with this. I am compiling these in a machine wiith Fedora OS,
amd64 archirecture. After I get the jar file and do a test run. But it
wouldn't pass the sanity check:
[root@ip-10-83-77-171 jblas]# java -server -jar jblas-dynamic-Linux-
amd64-1.2.1.jar --debug
Simple benchmark for jblas
Running sanity benchmarks.
checking vector addition... ok
-- org.jblas CONFIG BLAS native library not found in path. Copying
native library from the archive. Consider installing the library
somewhere in the path (for Windows: PATH, for Linux: LD_LIBRARY_PATH).
-- org.jblas DEBUG Preloading ArchFlavor library.
-- org.jblas CONFIG ArchFlavor native library not found in path.
Copying native library libjblas_arch_flavor from the archive. Consider
installing the library somewhere in the path (for Windows: PATH, for
Linux: LD_LIBRARY_PATH).
-- org.jblas DEBUG Attempting to load "libjblas_arch_flavor.so".
-- org.jblas DEBUG Trying path "/libjblas_arch_flavor.so".
-- org.jblas DEBUG Trying path "/bin/libjblas_arch_flavor.so".
-- org.jblas DEBUG Trying path "/lib/static/Linux/amd64/
libjblas_arch_flavor.so".
-- org.jblas DEBUG Trying path "/lib/static/Linux/amd64/
libjblas_arch_flavor.so".
-- org.jblas DEBUG Trying path "/lib/dynamic/Linux/amd64/
libjblas_arch_flavor.so".
-- org.jblas CONFIG Loading libjblas_arch_flavor.so from /lib/dynamic/
Linux/amd64/.
-- org.jblas DEBUG tempfile.getPath() = /tmp/
jblas5233815495294025615libjblas_arch_flavor.so
-- org.jblas DEBUG Copying took 0.0 seconds.
-- org.jblas DEBUG Attempting to load "libjblas.so".
-- org.jblas DEBUG Trying path "/libjblas.so".
-- org.jblas DEBUG Trying path "/bin/libjblas.so".
-- org.jblas DEBUG Trying path "/lib/static/Linux/amd64/sse3/
libjblas.so".
-- org.jblas DEBUG Trying path "/lib/static/Linux/amd64/sse3/
libjblas.so".
-- org.jblas DEBUG Trying path "/lib/dynamic/Linux/amd64/sse3/
libjblas.so".
-- org.jblas CONFIG Loading libjblas.so from /lib/dynamic/Linux/amd64/
sse3/.
-- org.jblas DEBUG tempfile.getPath() = /tmp/
jblas7487923993934332451libjblas.so
-- org.jblas DEBUG Copying took 0.0020 seconds.
checking matrix multiplication... ok
checking existence of dsyev...... ok
[-0.21065603010602588, -0.6404447607135406, -0.5071295294530739;
-0.5090854060895623, -0.11644450194791618, 0.7626214072101205;
-0.8075147820730988, 0.40755575681770734, -0.3813107036050603;
0.21065603010602574, 0.64044476071354, -0.12581882584801418]
[17.23368793961409; 1.4142135623730951; 1.2819751242557092E-16]
[-0.47060485181697004, 0.7822176211129874, 0.40824829046386313;
-0.571448748634892, 0.08233869695926208, -0.8164965809277259;
-0.6722926454528144, -0.6175402271944637, 0.408248290463863]
[17.23368793961409; 1.414213562373095; 1.2819751242557092E-16]
checking existence of dgesvd...... ok
Checking complex return values... (z = -21.0 + 88.0i)
Check whether we're catching XERBLA errors. If you see something like
"** On entry to DGEMM parameter number 4 had an illegal value", it
didn't work!
** On entry to DGEMM parameter number 4 had an illegal value
[root@ip-10-83-77-171 jblas]#
All the steps I type in the console are listed here in case you need
to double check:
wget
http://www.netlib.org/lapack/lapack-lite-3.1.1.tgz
wget
http://sourceforge.net/projects/math-atlas/files/Stable/3.8.3/atlas3.8.3.tar.bz2/download
git clone git://
github.com/mikiobraun/jblas.git
yum -y install gcc-gfortran
-------------------Lapack-----------------
untar lapack
cp INSTALL/make.inc.LINUX make.inc
vi make.inc
FORTRAN = gfortran
OPTS = -O2 -fPIC
DRVOPTS = $(OPTS)
NOOPT = -fPIC
LOADER = gfortran
LOADOPTS = -fPIC
make -k blaslib lapacklib
-------------------Atlas-------------------
tar xvf atlas3.8.3.tar.bz2
mkdir build
cd build
../configure --with-netlib-lapack=/root/lapack-lite-3.1.1/
lapack_LINUX.a -b 64 -Si cputhrchk 0 -Fa alg -fPIC
(removed "-A 21" before "-b 64")
make
make time
cd lib
make ptshared (to get the .so lib files. Without this jblas configure
would fail without --static-libs)
--------------------JBLAS------------------
./configure --libpath=/root/ATLAS/build/lib/ --ptatlas
yum -y install ant-nodeps
yum -y install lapack-devel
make
ant dynamic-lean-jar
---------------- Run ----------------------------
export LD_LIBRARY_PATH=/root/ATLAS/build/lib
java -server -jar jblas-dynamic-Linux-amd64-1.2.0.jar
Thanks for your help, and let me know if you need other detail
information.
Sincerely,
Botong