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

NimBLAS should always use the cblas API #4

Merged
merged 1 commit into from
Feb 11, 2019
Merged

NimBLAS should always use the cblas API #4

merged 1 commit into from
Feb 11, 2019

Conversation

mratsim
Copy link
Contributor

@mratsim mratsim commented Feb 10, 2019

Currently nimblas try to use cblas_ddot (in nimblas CI) and cblas_dgemm (in Arraymancer CI).

Unfortunately those functions are not available in the default libblas.so shipped in Linux distributions.

Instead nimblas should always dlopen libcblas.so

cc @narimiran @Araq for popular repos testing.

edit: fix #3

@andreaferretti andreaferretti merged commit 3101da4 into SciNim:master Feb 11, 2019
@andreaferretti
Copy link
Collaborator

Thank you. All distrubutions I usually use ship cblas with blas itself, I did not know about a separate cblas

andreaferretti added a commit that referenced this pull request Feb 11, 2019
@andreaferretti
Copy link
Collaborator

Sorry, I had to revert the PR. I assumed you had tested on various distributions, but this already fails on Ubuntu. Since the previous version works on Debian, Rad Hat and their derivatives, I am going back. I assume the issue only appears in Manjaro

@mratsim
Copy link
Contributor Author

mratsim commented Feb 11, 2019

It fails on Arch as well (which Manjaro is a derivative of).

Looking into http://nicolas.limare.net/pro/notes/2014/10/31_cblas_clapack_lapacke/ and https://discuss.mxnet.io/t/build-failure-with-use-blas-blas-in-arch-linux/618

It seems like Archlinux choose to split the C and Fortran interface while other distros do not.

@andreaferretti
Copy link
Collaborator

What could be a good way to handle this? Can we use detectOs or is it just a nimble thing? For now, the workaround is just to pass -d:blas=cblas on Arch and derivatives

@mratsim
Copy link
Contributor Author

mratsim commented Feb 12, 2019

I don't think there is a proper way besides documentation.

@andreaferretti
Copy link
Collaborator

I added some in the README

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

Successfully merging this pull request may close these issues.

Tests are not passing with blas+cblas
2 participants