Skip to content

Build LAPACK #2657

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

Closed
ViralBShah opened this issue Mar 7, 2021 · 9 comments · Fixed by #5172
Closed

Build LAPACK #2657

ViralBShah opened this issue Mar 7, 2021 · 9 comments · Fixed by #5172
Labels
builder request 🙏 Request for a new builder

Comments

@ViralBShah
Copy link
Member

ViralBShah commented Mar 7, 2021

Now that we have LBT, we have situations where some libraries provide both BLAS and LAPACK (OpenBLAS, MKL) and we can have situations where we only have a BLAS provider (Accelerate, BLIS, AmdBLIS). For situations, where we only have a BLAS provider, we should build the reference LAPACK and provide it through Yggdrasil.

cc @staticfloat

@ViralBShah ViralBShah added the builder request 🙏 Request for a new builder label Mar 7, 2021
@ViralBShah
Copy link
Member Author

Also worth looking at: https://github.com/HPAC/ReLAPACK

@DilumAluthge
Copy link
Member

@ViralBShah can this be closed now that #2658 is merged?

@ViralBShah
Copy link
Member Author

ViralBShah commented Mar 27, 2021

We need to update the LAPACK build to have 64_ suffixes for ILP64 platforms and also call our ilp64_ BLAS. Leaving this open for now.

@ViralBShah ViralBShah reopened this Mar 27, 2021
@ViralBShah
Copy link
Member Author

@giordano What would be the easiest way to add 64_ suffixes for ILP64 platforms in LAPACK_jll? We need to ship it separately in cases where we have a vendor BLAS but not a good vendor LAPACK - like Accelerate.

It would be nice to have M1 switch over to Accelerate.

@giordano
Copy link
Member

I guess remapping the symbols with macros?

@ViralBShah
Copy link
Member Author

ViralBShah commented Jan 30, 2022

Anything in the LBT infrastructure I can reuse for that? While compiling fortran files, I can always do -Ddpotrf=dpotrf_64 and construct a huge list of command line flags. Is there a better way to do it, like pass in a header file during compilation of individual .f files?

@giordano
Copy link
Member

Strictly speaking, the fortran standard doesn't require preprocessor directives like #define, although some compilers do allow them (I know gfortran does that, I presume most common would do the same). I'm away from computer right now, I can't check whether #include directives would work. You can always use fortran's own include statement.

@ViralBShah
Copy link
Member Author

I was trying to think about ways of doing this without having to edit the fortran files.

@giordano
Copy link
Member

Then redefining the symbols on the command line with -D is your best bet. We haven't it yet, but we should provide a utility to generate the list of -D arguments to remap all BLAS symbols, we already do this in many places and it's cumbersome to do it manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder request 🙏 Request for a new builder
Projects
None yet
3 participants