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

sage with 64 bit openblas #26000

Open
timokau opened this issue Aug 4, 2018 · 12 comments
Open

sage with 64 bit openblas #26000

timokau opened this issue Aug 4, 2018 · 12 comments

Comments

@timokau
Copy link
Contributor

timokau commented Aug 4, 2018

By default, openblas compiles with a 32 bit interface (even when the binary is 64 bit). To build with the 64 bit interface, you have to set the INTERFACE64 environment variable. Here is some discussion about the differences.

When just naively enabling 64 bit openblas in sage, we get various segfaults. First during docbuild and then more during testing (see attached logs).
On nix I even get those failures if only flint is compiled with openblas64, even though flint doesn't even really need openblas.

Component: packages: standard

Keywords: openblas

Branch/Commit: public/26000 @ e3ddaf8

Issue created by migration from https://trac.sagemath.org/ticket/26000

@timokau timokau added this to the sage-8.4 milestone Aug 4, 2018
@timokau
Copy link
Contributor Author

timokau commented Aug 4, 2018

Attachment: tests.log

@timokau
Copy link
Contributor Author

timokau commented Aug 4, 2018

comment:1

Attachment: dochtml.log

@timokau

This comment has been minimized.

@timokau
Copy link
Contributor Author

timokau commented Aug 5, 2018

Commit: e3ddaf8

@timokau
Copy link
Contributor Author

timokau commented Aug 5, 2018

Branch: public/26000

@timokau
Copy link
Contributor Author

timokau commented Aug 5, 2018

New commits:

e3ddaf8Enable 64 bit interface for openblas

@jdemeyer
Copy link

jdemeyer commented Aug 7, 2018

Replying to @timokau:

By default, openblas compiles with a 32 bit interface (even when the binary is 64 bit). To build with the 64 bit interface, you have to set the INTERFACE64 environment variable. Here is some discussion about the differences.

After reading that page, I don't think that we should enable INTERFACE64. An environment variable to change the API? That makes no sense to me...

So why should we do this?

@timokau
Copy link
Contributor Author

timokau commented Aug 7, 2018

comment:4

Did you maybe misunderstand that? Its a configure-time variable, nothing unusual. Not runtime.

The advantages would be higher precision data types and higher compatibility with system openblas.

@jdemeyer
Copy link

jdemeyer commented Aug 7, 2018

comment:5

Replying to @timokau:

higher compatibility with system openblas.

Do distros set INTERFACE64?

@timokau
Copy link
Contributor Author

timokau commented Aug 7, 2018

comment:6

In nix we have two versions, openblas and openblasCompat. openblas uses INTERFACE64 on 64 bit machines while openblasCompat always uses 32.

Its harder for other distros to have multiple variants of the same library though, so maybe they just use the Compat version all the time. I don't know for sure. Either way, if we figure out where the INTERFACE64 failures are coming from we would keep compatibility for 32 bit anyways. So it would be a win-win.

@jdemeyer
Copy link

comment:7

Replying to @timokau:

In nix we have two versions, openblas and openblasCompat. openblas uses INTERFACE64 on 64 bit machines while openblasCompat always uses 32.

So then use openblasCompat.

It's still not clear which bug this ticket is supposed to fix...

@timokau
Copy link
Contributor Author

timokau commented Aug 10, 2018

comment:8

Replying to @jdemeyer:

It's still not clear which bug this ticket is supposed to fix...

Its an enhancement. Nix specific, using openblasCompat means we also have to build two versions of flint and two versions of all the sage dependencies that depend on flint. Thats a bit annoying.

In general, 64 bit is not only the future, I would argue it is the present. I don't know how long other distros will keep INTERFACET64=0 (if they currently do that). And ignoring distros for the moment, the main reason for 64 bit are 64 bit datatypes of course.

@mkoeppe mkoeppe removed this from the sage-8.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants