-
Notifications
You must be signed in to change notification settings - Fork 240
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
M2 not finding openblas? #2767
Comments
It's a long-standing issue (#475) that the autotools build doesn't have the facilities to link with openblas. Try using the cmake build instead. |
Hi,
The path /usr/lib/x86_64-linux-gnu/libblas.so is created by update-alternatives and points to whatever blas that is set to default (right now the default is intel-mkl) So would M2 be dynamically linked to whatever blas set to be default at runtime? Do I need to build it specially against openblas by updating alternatives to openblas for building? Also I get this error
My cmake version is 3.22.1 Edited: fix the cmake error by switching to cmake3.25.2 |
That should work; you can also try running |
Hi I run ninja build-programs
I find the instructions very confusing. the sections "quick start" and "building Macaulay2" are not exactly the same. In step 3, where do you run the cmake -DBUILD_LIBRARIES ..., is it in step2 along with cmake -DINSTALL_PREFIX etc or separately before ninja-build ..? and then in the same section "To enforce building certain libraries, for instance BDWGC and MPIR,...: Where is a list of all libraries? Is there anything like ./configure --help in autoconf where you are shown what options are availiable? (like to build with or without whatever libs, to enable or disable stuffs...) Thanks. |
Please feel free to improve any part that's not clear. There is also a a less formal guide here.
Yes, they aren't meant to be the same. It might help to check out a cmake tutorial.
Whenever you run any
At the top of the instructions. Here is everything M2 itself needs: M2/M2/cmake/check-libraries.cmake Lines 12 to 14 in 048c777
Is there a reason you want to build the libraries yourself rather than use the ones provided by Ubuntu or linuxbrew? |
Hi, Can you help me resolve this? I ran teps 1 -4 in the instructions but ninja build-programs errored out Here are my steps:
3)ninja build-libraries 4)ninja M2-binary M2-core Then 5) njnja build-programs failed.
I can't use the ubuntu version because it tries to remove Singular. Also I want to build against a fast blas. I never use the system blas, it is too slow. An operation in R or octave that takes 1.5 to 2 seconds with mkl or openblas takes almost a minute in system blas. |
The command you run in step 2 has some missing spaces, for instance here:
which leads to:
hence the error. |
Hi, thanks for your help! It was a stupid mistake on my part. It is now built and installed successfully. However there are a bunch of errors in running the ctests (39 failed)
Not sure how concerning that is. Again thanks. |
No worries. Again, feel free to make a pull request to improve the instructions if there are any changes that would improve clarity.
I believe most of those are known issues (e.g. engine tests that broke after a change in the engine), see #1213. |
OS is Ubuntu 22.04
I am trying to build M2 with openblas.
I have a copy of openblas in /opt/OpenBLAS. I have made symlinks to /usr/local/lib/pkgconfig, /usr/local/lib/openblas and /usr/local/include/openblas. I also created a file openblas.conf in /etc/ld.so.config.d with path to openblas's lib.
I also built sage from source, the configurations above were enough for sage to find openblas and build with it (actually it didn't even need all the symlinks, just linking openblas.pc to /usr/local/lib/pkgconfig and creating the conf file in /etc/ld.so.config.d were enough)
However M2's configure script apparently can't find openblas
I then did this and ran configure again, still no difference
What did I do wrong?
The text was updated successfully, but these errors were encountered: