Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f77blas.h not found (Ubuntu, Octave) #17

Closed
catch22 opened this issue Jul 7, 2015 · 8 comments
Closed

f77blas.h not found (Ubuntu, Octave) #17

catch22 opened this issue Jul 7, 2015 · 8 comments

Comments

@catch22
Copy link

catch22 commented Jul 7, 2015

The fix I found was to install libopenblas-dev and replace the include statement in blksdp.h to #include <openblas/f77blas.h> (cf. 44fe8cc).

rdzman added a commit to MATPOWER/mx-sdp_pf that referenced this issue Jan 15, 2019
rdzman added a commit to MATPOWER/mx-sdp_pf that referenced this issue Jan 15, 2019
@nvitucci
Copy link
Contributor

Since there are many files having the same problem, I found it easier to add a flag -I/usr/include/openblas in the install_sedumi.m script (in the need_rebuild/ISOCTAVE section).

This worked on Fedora, but I am not sure about other systems (hence why I am not 100% sure this is PR-worthy). What do you think?

@siko1056
Copy link
Member

sedumi/blksdp.h

Lines 40 to 47 in d559b73

#ifdef OCTAVE
#include "f77blas.h"
#define FORT(x) BLASFUNC(x)
#else
#include "blas.h"
#define FORT(x) FORTRAN_WRAPPER(x)
typedef ptrdiff_t blasint;
#endif

f77blas.h is a pure OpenBLAS header. If you are using a different BLAS/LAPACK implementation, SeDuMi is not likely to work with Octave today. Unfortunately, Octave does not distribute the BLAS/LAPACK function prototypes in the blas.h header, like Matlab does. Octave currently only exposes a subset of these function in the C++ headers lo-blas-proto.h and lo-lapack-proto.h that cannot be included for compilation with mex (only C). This made the change 44fe8cc necessary, as many Octave users use OpenBLAS anyway.

The change proposed by @catch22 would break the current Octave 5.1.0 Windows installations. The header f77blas.h is deployed in the C:\Octave\Octave-5.1.0.0\mingw64\include directory.

The change proposed by @nvitucci is not the cleanest solution to hardcode a directory, but it might cover several default configured GNU/Linux distributions.

You can provide a PR @nvitucci and if there are no different opinions, it is likely to get merged.

@nvitucci
Copy link
Contributor

Thanks @siko1056 , will do. I think we can add this as a parameter in the install script, so that the exact location will not be hardcoded.

@nvitucci
Copy link
Contributor

@siko1056 Done on #49.

@catch22
Copy link
Author

catch22 commented Jan 24, 2020

The hardcoded directory does not seem to work with Ubuntu - see the error log at https://travis-ci.org/catch22/quantbox/builds/641260667#L968 and the travis config at https://github.com/catch22/quantbox/blob/master/.travis.yml. Please let me know if you need any further information.

@siko1056
Copy link
Member

siko1056 commented Jan 24, 2020

Do you rely for current software development on Ubuntu (14.04 LTS) "Trusty Tahr", which ran out of standard support last year and OpenBLAS 0.2.8 from 2013?

https://github.com/catch22/quantbox/blob/4c07cb8090996ecdee8c0b69aecc7c8e9750ea3f/.travis.yml#L2

My impression is, that the OpenBLAS headers were not installed in Ubuntu 14.04 https://launchpad.net/ubuntu/trusty/amd64/libopenblas-dev/0.2.8-6ubuntu1

Can you verify this on an Ubuntu 14.04 machine with "libopenblas-dev" installed, what is the output of

find /usr -iname "f77blas.h"

You can easily upgrade your Travis CI check to a more recent Ubuntu (16.04 LTS) "Xenial Xerus" for which this path will work (as for almost any other current Linux distribution).

https://packages.ubuntu.com/xenial/amd64/libopenblas-dev/filelist

@siko1056 siko1056 reopened this Jan 24, 2020
@catch22
Copy link
Author

catch22 commented Jan 24, 2020

Yikes, great catch. Thanks!

@siko1056
Copy link
Member

siko1056 commented Jan 24, 2020

You're welcome, thanks for using this repo and reporting issues. Can this item be closed again?

https://travis-ci.org/catch22/quantbox/builds/641277190#L990

Off-topic: "quantbox" looks interesting to me 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants