-
-
Notifications
You must be signed in to change notification settings - Fork 620
OpenBLAS - alterations for TARGET #23272
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
Comments
Author: Aram Dermenjian |
Commit: |
comment:3
I'm setting the status to needs review mainly to get people's attention. I assume there will be things that need to be changed. |
comment:5
We discussed a bit. In the long run, we would like OpenBlas to provide a short mantra For now, I wondered about separating somewhat more the configuration part from the compilation, by adding a new dependency in OpenBlas makefile like:
and then, in spkg-install / spkg-check do first a call to
do the additional logic if needed, and then just call make as usual. Just throwing ideas in the air; not sure this is the right thing to do. Insights anyone? |
comment:6
I don't really like that we are just guessing Also, if you add a patch, you should bump the version number of openblas (from |
Branch pushed to git repo; I updated commit sha1. New commits:
|
New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:9
So the reason we are just guessing "ATOM" is because that was the recommended fall-back by the openblas team. (You can see the conversation I had in the link I posted) THe problem with just letting the build fail is that as new computers come out with new CPUs these CPUs will not be included in the openblas config which tests against CPU. In other words all future computers will start having problems when new CPUs get introduced. Since OpenBLAS doesn't update regularly, we can't rely on us to "remember" every time a new CPU gets released. The point of this ticket is to upgrade the openblas script through a patch so that new CPUs that have been added in the last year will now properly be able to get a target. Additionally, it will protect us for future CPUs by defaulting to ATOM until we get an update to OpenBLAS. Note that the version is already |
comment:10
Typo: OpenBAS -> OpenBLAS I agree that it would be best if OpenBLAS would just default to something sensible if it can't detect the CPU. But, unless thats implemented, we should just try a second time with TARGET=ATOM. I'd prefer if we just unconditionally try that a second time and not rely on the spelling of the logged error message, or the location of the log file. OpenBLAS 0.2.20 should be released really soon now... |
comment:11
PS: the patchlevel should be increased 0.2.19.p0 -> 0.2.19.p1 to trigger recompilation. |
comment:12
I just received a notice that openblas 0.2.20 has been released
While some of the improvements in this ticket should be kept, I think it would be best if it became an upgrade ticket. |
comment:13
Upgrading should also get rid of us of all the current patches except for |
This comment has been minimized.
This comment has been minimized.
comment:14
alive and kicking: https://github.com/xianyi/OpenBLAS/commits/develop |
comment:15
This isn't going to work for a number reasons; for one the log files are usually appended to so this will be true for builds that failed but then later succeeded if the log files were not deleted first. Better to explicitly tee the configure command to a separate log file and grep that. |
comment:17
So in this update I've gone ahead and updated the version and removed the unnecessary patches (keeping the one mentioned by fbissey). I've not worked with packages before so I don't know how I'm supposed to actually get the package itself onto the servers? I personally added it directly into my personal upstream, but not sure if that is a viable solution? I've also removed the documentation test and instead went with a TARGET test like I had done before. I've gone to my old method of just retrying with "TARGET=ATOM" as was also suggested by vbraun. |
comment:18
Where is the updated tarball (the one with
How does one get it? |
comment:27
I think this needs updating for openblas-0.2.19-cygwin.patch |
comment:28
I had removed all of the patches except for one. If the cygwin patch is required I can re-add it in. |
comment:29
It was recently added; please merge in the latest beta |
comment:30
@vbraun I don't know what you mean by the latest beta. Can you be a little more specific? (Do you have a link? I can try mergeing it in and making sure it works. Alternatively, if you've already access to the beta on your machine you can try integrating it and then I can pull and test it on mine as well?) |
comment:31
I just mean the latest develop branch, e.g. on trac: |
comment:33
I kept having problems merging in the cygwin patch (kept failing on my build for some reason) I fixed it and have merged again with the latest develop. It should be ready for testing now. |
comment:34
I don't have much time to look into the ticket, but just wanted to confirm, that it worked for me. sage 8.1.beta7 didn't compile on a debian box with a kaby lake i7-7500U CPU, because of the 'missing target' openblas error. After loading this patch it worked like a charm (All tests passed). I guess it is useful to have a fix even after the problem for my specific cpu will be fixed upstream; there always will be newer cpus... |
comment:35
In sage 8.1.beta8, I simply compiled with |
Reviewer: Volker Braun |
comment:37
On two 32-bit buildbots:
|
comment:39
OK, I'll increase the tolerance to 2e-03 there. |
Changed branch from u/aram.dermenjian/openblas___alterations_for_target to public/openblas___alterations_for_target |
Changed reviewer from Volker Braun to Volker Braun, Dima Pasechnik |
comment:41
This fixed the build under error I was having on Ubuntu 17.10. The /proc/cpuinfo identifies the CPU as: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz |
Changed branch from public/openblas___alterations_for_target to |
Changed commit from |
This comment has been minimized.
This comment has been minimized.
comment:43
(Minor fix to ticket description formatting.) |
On purchasing a new laptop, I attempted to MAKE sage as I normally have and ran into the following error:
The error seemed to be really coming from:
It turned out that this error has been seen multiple times in Sage:
etc.
I noticed that updating the config (as mentioned in the threads above) accurately solved the problem, but I wanted to try and fix the problem head on rather than just temporarily solve it. With that in mind, I conversed with the OpenBLAS people:
OpenMathLib/OpenBLAS#1204
and they suggested I update the cpu file for the build, which I have included.
Additionally, I wanted to fix this problem for future users and thus I wanted to add a fail-safe for the code so that if this error happens again, then we automatically try the TARGET=ATOM method. But, I want to create this with the caveat that a user can change the method.
Before finalizing these changes, we should note a few things, but as I've not worked that long with sage I don't know how to address them. In essence:
If there are any questions feel free to ask, and if you believe this is not necessarily or if something else is better practice, let me know. I've never done a bash alteration so not sure what the details for that.
The tarball is here https://github.com/xianyi/OpenBLAS/archive/v0.2.20.tar.gz
(using the browser to download it will give it correct name)
CC: @jpflori @vbraun @jdemeyer @mo271
Component: packages: standard
Keywords: openblas
Author: Aram Dermenjian
Branch:
895b48f
Reviewer: Volker Braun, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/23272
The text was updated successfully, but these errors were encountered: