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
Install blas pkgconfig files #17075
Comments
comment:1
This is not yet finished, but if you have any design input then now would be the time ;-) |
comment:2
Are we doing stages? First install a pc file for atlas (and OS X make it point to accelerate) and convert to that? Then work out how we replace ATLAS. Or do you plan to switch hard to something like openblas straight away? My current patch for module_list.py and misc/cython.py live here https://github.com/cschwan/sage-on-gentoo/blob/master/sci-mathematics/sage/files/sage-6.4-blas.patch I considered that we basically needed two things:
We could also want a cblas_inc for headers but that is probably not necessary. |
comment:3
I don't want to do too much at once. For now ATLAS should stay the default. Though this ticket should work with at least one other BLAS implementation ;-) There is no guarantee that all cblas libraries are in the same directory. What do you need |
comment:4
In module_list.py, at least, we need to separate the two. We get code of the form
As far as I can tell shoving everything into "libraries=" won't work. But pkg-config will helpfully give us all the directories that we need. So at least to build sage or any extensions you won't be able to just use pkgconfig --libs because distutils wouldn't grok it properly. |
comment:5
My only comment so far is that we should take care of the strange variable LINBOX_BLAS set up by linbox/fflas-ffpack, written in share/cblas_config, and used in modules_list.py IIRC. |
comment:6
Replying to @jpflori:
yes so the file is created by the fflas-ffpack spkg for consumption in linbox. fflas-ffpack provides a fflas-ffpack-config which you would think would help...
And the problem with that output is lapack. My foggy memory tells me that configuring linbox with lapack leads to troubles in sage-on-gentoo (needs re-checking). If we move to .pc we can forget about the whole LINBOX_BLAS business. In sage-on-gentoo I patched fflas-ffpack to use pkg-config directly to find blas/cblas (but I commented lapack out) |
comment:7
As far as I'm aware:
|
comment:8
Replying to @jpflori:
liblinbox doesn't but liblinboxsage does!
Note that we don't link anything in the sage library to lapack - it is not in module_list.py. So anything using lapack in linboxsage is well contained. |
comment:9
cblas_config is read by the linbox spkg
When fflas-ffpack got split from linbox, fflas-ffpack inherited the variable LINBOX_BLAS, it is not present anymore in the linbox spkg. |
comment:10
And I have just done a build of 6.4.beta4 with a linbox in which I removed the above two lines.
I will check on a OS X machine but I think the whole cblas_config can be safely removed. |
comment:11
Interesting on OS X I get
with or without these lines and we have
At this stage there may be something to do to fflas-ffpack. |
comment:12
Yes if I replace
by
I get
so we end up with blas in both liblinbox and liblinboxsage. Most curious. |
comment:13
I see I had restored linbox to its original state. If I remove the two lines reading cblas_config. blas disapear from liblinbox.dylib. I guess if there was --as-needed option for OS X we could check that it is indeed not needed for liblinbox. I checked the Makefile.am for liblinbox and liblinboxsage and it is clearly the intent that only the sage interface depends on blas. So for linbox I think we should make a small change in fflas-ffpack for OS X, remove the cblas_config file and update the linbox spkg accordingly. |
comment:14
Preliminary clean up of fflas-ffpack+linbox is now #17087. |
comment:15
For info, an old ticket I opened is at #14390. |
comment:16
Was looking at integrating coinor-cbc in sage-on-gentoo and then I noticed that in this one and only place we have a reference to lapack in module_list.py. So if we continue to support that particular binding we need to pull lapack as well. |
Author: Jean-Pierre Flori, François Bissey |
comment:17
Putting the conversion of ATLAS to New commits:
|
Branch: u/fbissey/17075 |
Commit: |
comment:18
Cannot this get in by itself? |
comment:19
I am fine with that, nice and progressive. I am putting to need review then and you can play with it. I have only tried on OS X and my linux box will be off soon because the university has some power outage planned for the week end. No sage-on-gentoo development until Monday either because of that. Hum, will have to change the description at some point. |
comment:20
Replying to @jpflori:
It doesn't really make sense to test just this ticket by itself. There should be at least one package using the new |
comment:21
You can easily test it using pkgconfig. Its a strategic goal for us to clean up *blas linking. We should do what gets us fastest to that goal. How does doing more here or stacking tickets help us achieve that goal faster? |
comment:22
I can import the sage-on-gentoo bits for sage quite easily (depends if we want to keep the |
comment:23
Replying to @kiwifb:
I think in the end we want to allow users to use strange BLAS implems in strange places. And for the numpy and scipy bits, can we work on top of what was done at #17630? As Volker, I propose to merge this ticket asap and work on using the produced pc files for our spkg in follow up tickets and maybe make #17630 a task to be closed when everything is ported. |
comment:24
I am sorry I am not more active on this, I have a collection of issue pestering and I have trouble keeping any at the top. I'll add the stuff in question because it will be quick and easy but sage side I am more worried about fixing numpy 1.9.x to get it in. I have a number of Gentoo issue also pestering me (well for starter the blas infrastructure is broken in a Gentoo prefix coincidence I guess). |
comment:25
Replying to @jpflori:
By increasing the chances of somebody reviewing this ticket if they can actually see that it works. The goal of Sage tickets is not just to write code, but to get it reviewed. A ticket without a working use-case is hard to test and therefore hard to review. |
comment:26
The ticket description doesn't seem to correspond with the code in the branch, can you please update the description? |
comment:27
Bumpy comment. |
comment:28
Well, I have commented in a related ticket that I had been somewhat demotivated to work on this. I think most stuff has to be thrown away or re-based. Jeroen was working on an ATLAS upgrade more recently because of power8. But really the plan is to get something like the functionality I have now in sage-on-gentoo:
So the first step is get ATLAS to install .pc files, then migrate spkg to use them including the sage library. Then we can start writing alternative blas/lapack spkg. |
comment:29
Replying to @kiwifb:
Right, but there are issues with the new ATLAS... In any case, that upgrade does not involve the build system, so it's independent of this ticket here. |
Changed branch from u/fbissey/17075 to u/vbraun/17075 |
comment:31
Rebased onto latest beta This seems to work so lets merge it New commits:
|
This comment has been minimized.
This comment has been minimized.
Reviewer: Volker Braun |
Changed branch from u/vbraun/17075 to |
Install blas.pc file when building atlas
CC: @kiwifb @jpflori
Component: build
Author: Jean-Pierre Flori, François Bissey
Branch/Commit:
432eb25
Reviewer: Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/17075
The text was updated successfully, but these errors were encountered: