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

OpenBLAS requires additional casts due to header differences #116

Closed
Micket opened this issue May 14, 2018 · 2 comments
Closed

OpenBLAS requires additional casts due to header differences #116

Micket opened this issue May 14, 2018 · 2 comments

Comments

@Micket
Copy link

Micket commented May 14, 2018

Trying to link against OpenBLAS fails because cblas_cgemm, cblas_zgemm, cblas_zgemv, cblas_cgemv, cblas_zdot, cblas_cdot, uses const double * and const float * instead of const void *.

Any cast from std::complex<float/double> will fail.

Explicit downcasting to const double * and const float * would be a workaround.

@Micket
Copy link
Author

Micket commented May 14, 2018

I found that OpenBLAS had already resolved the inconsistency on their end: OpenMathLib/OpenBLAS#1322
though, there still aren't any releases with this fix.

Unfortunately, it also doesn't seem like it would be a nice workaround solution until then either, because of cblas_*dotu_sub forcing a openblas-specific struct as the output value parameter.
This would require a OpenBLAS specific check.

@shiozaki
Copy link
Member

I think this is OpenBlas problem (I think use of double* is simply wrong), and therefore, we do not make a workaround on the bagel side. In addition, OpenBlas should be compiled with ""-ff2c"" flag so that zdotu/zdotc signatures will be the same as what are assumed in BAGEL.

In general, we will not introduce any Blas-implementation-specific fixes in BAGEL. Let me close for the time being - if you have additional information, let me know.

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

2 participants