Comments (7)
Hi Maxim,
When building atlas, have you specified that it should include a full lapack library? Atlas then combines both its own routines and those from liblapack. That should do the trick. Sorry don't remember how exactly that is done with the atlas build scripts.
-M
----- Ursprüngliche Nachricht -----
Von: "Maxim Mai" [email protected]
Gesendet: 23.07.2015 11:16
An: "mikiobraun/jblas" [email protected]
Betreff: [jblas] Unable to run configure: Could not locate libraries for thefollowing symbols: dsyev_. (#66)
Hi, I keep getting this error on x86_64 Ubuntu when I try to build jblas from source. I looked at the config file located in config/config_libs.rb to see why dsyev_ is needed, but the part dsyev_ is a required symbol, but not yet included in ATLAS/LAPACK confuses me:
ATLAS_REQUIRED_SYMBOLS = [
'dsyev_', # eigenvalue function not yet included in ATLAS/LAPACK
'ATL_dgemm',
'dgemm_', # matrix-matrix multiplication
'daxpy_', # blas-related function
'cblas_daxpy', # atlas itself often uses cblas
'ATL_caxpy'
]
I downloaded ATLAS 3.10.2 from http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2 then compiled it using the default build parameters.
In the jblas working directory, I run ./configure --libpath=$HOME/jblas/dep/ATLAS/build/lib --static-libs
In my $HOME/jblas/dep/ATLAS/build/lib, it contains the following libraries:
libatlas.a libcblas.a libf77blas.a libf77refblas.a liblapack.a libptcblas.a libptf77blas.a libptlapack.a libtstatlas.a
I checked all the .a files there with nm:
nm $HOME/jblas/dep/ATLAS/build/lib/.a | grep "dsyev_"
Found nothing in those libraries that has this symbol.
Please clarify if this is an intended requirement for the build.
Environment: Ubuntu 14.04, [email protected] x86_64
—
Reply to this email directly or view it on GitHub.
from jblas.
Hello Mikio,
I am still not able to configure jblas with ATLAS, however, I was able to manage get it configured with LAPACK through the option of "./configure --download-lapack".
However, the LAPACK comes with the configure program has a bug for the 64bit Linux I have on IBM's z System. in config/config_libs.rb
:
if CONFIG['OS_NAME'] == 'Linux' and CONFIG['OS_ARCH'] == 'amd64'
CONFIG['LOADLIBES'] += ['-lgfortran']
puts <<EOS
elsif CONFIG['OS_NAME'] == 'Mac\ OS\ X'
print "Looking for where libgfortran.a is... "
libgfortran_path = %x(gfortran -print-file-name=libgfortran.a).strip
puts "(#{libgfortran_path})"
CONFIG['LOADLIBES'] += [libgfortran_path]
else
CONFIG['LOADLIBES'] += ['-l:libgfortran.a']
There is a warning in this code block:
WARNING: on 64bit Linux, I cannot link the gfortran library into the shared library
because it's usually not compiled with -fPIC. This means that you need to
have libgfortran.so installed on your target system. Sorry for the inconvenience!
EOS.
This config_libs.rb result a configure.out for Linux on z that contains:
LOADLIBES=-Wl,-z,muldefs ./lapack-lite-3.1.1/liblapack.a ./lapack-lite-3.1.1/libblas.a -l:libgfortran.a
This is problematic because we found that when we use this jblas in Spark, it's failing the MLlib test because init_integer from libgfortran can not find the return address (simply because the jblas wasn't configured with -fPIC
and -lgfortran
).
The correct LOADLIBES should be:
LOADLIBES=-Wl,-z,muldefs ./lapack-lite-3.1.1/liblapack.a ./lapack-lite-3.1.1/libblas.a -lgfortran
Do you suggest to use this work item to update config_libs.rb to cover Linux on z (OS_NAME=LINUX and OS_ARCH=s390x)?
Thanks!
from jblas.
Hi Maxim,
if that fixes the issue on s390x, I have no problems to add that to the
config file.
Yeah, I should probably rethink the whole libgfortran binding policies in
64bit Linux. Back when I started jblas, 64 bit systems weren't the norm,
but now I think probably everyone uses them, and the handling should be
more streamlined!
If you could add the right rules to the config_libs.rb and send me a pull
request, I can merge your fix!
Best,
-M
On Mon, Oct 5, 2015 at 11:52 PM, Maxim Mai [email protected] wrote:
Hello Mikio,
I am still not able to configure jblas with ATLAS, however, I was able to
manage get it configured with LAPACK through the option of "./configure
--download-lapack".However, the LAPACK comes with the configure program has a bug for the
64bit Linux I have on IBM's z System. in config/config_libs.rb:if CONFIG['OS_NAME'] == 'Linux' and CONFIG['OS_ARCH'] == 'amd64' CONFIG['LOADLIBES'] += ['-lgfortran'] puts <<EOS elsif CONFIG['OS_NAME'] == 'Mac\ OS\ X' print "Looking for where libgfortran.a is... " libgfortran_path = %x(gfortran -print-file-name=libgfortran.a).strip puts "(#{libgfortran_path})" CONFIG['LOADLIBES'] += [libgfortran_path] else CONFIG['LOADLIBES'] += ['-l:libgfortran.a']
There is a warning in this code block:
WARNING: on 64bit Linux, I cannot link the gfortran library into the
shared library
because it's usually not compiled with -fPIC. This means that you need to
have libgfortran.so installed on your target system. Sorry for the
inconvenience!
EOS.This config_libs.rb result a configure.out for Linux on z that contains:
LOADLIBES=-Wl,-z,muldefs ./lapack-lite-3.1.1/liblapack.a ./lapack-lite-3.1.1/libblas.a -l:libgfortran.a
This is problematic because we found that when we use this jblas in Spark,
it's failing the MLlib test because init_integer from libgfortran can not
find the return address (simply because the jblas wasn't configured with
-fPIC and -lgfortran).The correct LOADLIBES should be:
LOADLIBES=-Wl,-z,muldefs ./lapack-lite-3.1.1/liblapack.a ./lapack-lite-3.1.1/libblas.a -lgfortran
Do you suggest to use this work item to update config_libs.rb to cover
Linux on z (OS_NAME=LINUX and OS_ARCH=s390x)?Thanks!
—
Reply to this email directly or view it on GitHub
#66 (comment).
Mikio Braun - http://blog.mikiobraun.de, http://twitter.com/mikiobraun
from jblas.
Sorry, finally getting back to this project, let me have a look.
from jblas.
Trying to build jblas from source per #115, but running into this same issue around the missing symbols. --download-lapack doesn't seem to do anything.
from jblas.
from jblas.
Yup, that worked perfectly. I updated the other issue as well, but wanted to express thanks on here and note that it works when following your instructions.
from jblas.
Related Issues (20)
- GPU-support for JBLAS
- Compiling 64 bit windows is now possible using cygwin? HOT 2
- Name of automatic module 'jblas' is unstable, it is derived from the module's file name. HOT 3
- Why jblas in different platform has huge different performance HOT 4
- Add xGETRF/xGETRS HOT 1
- Update dependency on libgfortran3 HOT 12
- LAPACK 3.3.0 Bug: "XERBLA: Error on argument -1 for *unknown function* DLASD8 (how odd!)" HOT 4
- Move every platform to openblas
- Get FORTRAN function signatures from files, not lapack-lite
- JAR download for JBLAS 1.2.5 HOT 8
- Logical error of function nei HOT 2
- Implement four-quadrant inverse tangent HOT 1
- I did some benchmark somehow the matrix mul performs consistently slower than java ojalgo. HOT 7
- [FreeBSD] `mmul` and Execution error (UnsatisfiedLinkError) at org.jblas.NativeBlas/dgemm HOT 24
- Must use GetPrimitiveArrayCritical instead of Get<type>ArrayElements for better performance HOT 1
- Add rmmuli
- Cannot compile with latest version of LAPACK (3.10) on Windows 10 HOT 1
- JDK crash multithreading HOT 1
- Can't Compile With Latest Version 3.10.0 On Mac Monterey With M1 HOT 3
- mat-mul error on an M3 HOT 1
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 jblas.