-
Notifications
You must be signed in to change notification settings - Fork 668
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
Fix arch option in setup.py to work properly + not trigger on MSVC #3429
Conversation
Tagging @IAlibay for CI question. :) Also @tylerjereddy, how is the MSVC check done upstream in numpy/scipy? I couldn't see if there was a consistent and compact way it is done. General question: test for compiler identity or flag support? |
Codecov Report
@@ Coverage Diff @@
## develop #3429 +/- ##
========================================
Coverage 93.77% 93.77%
========================================
Files 176 176
Lines 23219 23219
Branches 3308 3308
========================================
Hits 21773 21773
Misses 1395 1395
Partials 51 51 Continue to review full report at Codecov.
|
SciPy is on the verge of switching to That seems to be a mixture of both approaches (looking for compiler by name and also using a NumPy seems to have bunch of stuff--after all, it provides the That appears to be in response to problems with |
So I know the march option existed, albeit undocumented & broken, but I do have to query its need / existence:
The latter is pretty important, if there's no benefits then maybe we should kill off the option rather than try to fix it? |
Fair enough to question whether worth fixing. AFAIK The use of instructions shouldn't change the level of accuracy on most things. AFAIK no standard breaking or unsafe floating point arithmetic is allowed by AVX or SSE or whatever. Let me do some tests on my work computer RE speed improvements and get back to you. |
Thanks @tylerjereddy and @IAlibay :) |
@tylerjereddy @IAlibay Apologies for screenshot rather than graph, but appears as though performance gains are significant, esp for distances when you can use AVX/AVX2. This mirrors what I found last time and also what @richardjgowers and I have found over at distopia, that the compiler autovectorisation is a significant improvement. Here we can see that some of the distance calculations are almost 3X faster with With that in mind I would probably advocate for continued life of the |
Do all the tests still pass? |
Only a single Encore failure on Ubuntu MacOS and Win appears fine (see most recent CI). Tests are flakier on my local attempts but can try and get to bottom of that. |
Was a problem with my test env, all tests seem to pass. :) |
@IAlibay thanks for the heads up, removing |
I suspect even with this you would still trigger failures on aarch64 and ppc64le, but we run CI for those on a weekly cron job. As long as you don't end up doing a lot of commits, if you want to temporarily change the travis yaml file to remove the cron job limitation, I think it should trigger a build. |
Thats a great idea @IAlibay, I will try and find the right thingo and confirm with you. Once enable I won't add any more commits until people have had a chance to discuss. |
ARM = OK but flags have different meaning, prefers mcpu=native see: https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu. PowerPC=no build needs "mcpu=native mtune=native" instead |
Fixed by adding x86 and arm specific paths only. |
Did we reach a consensus on supporting this option? 3x speedup for distances is quite attractive (to me). Key will be documenting an "advanced" install option, which I am happy to do, just need to know either way. |
Definitely writing a guide on how to achieve this with a manual install is
an easy win.
…On Fri, Oct 15, 2021 at 06:59, Hugo MacDermott-Opeskin < ***@***.***> wrote:
Did we reach a consensus on supporting this option? 3x speedup for
distances is quite attractive (to me). Key will be documenting an
"advanced" install option, which I am happy to do, just need to know either
way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3429 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGSGB5FZAEIOWVGV62KGETUG6YJ5ANCNFSM5E3XIAHA>
.
|
I will add an example to the user guide, and update the installation wiki page post merge. |
See MDAnalysis/UserGuide#177 for docs. Also note that changes to CI and actual enabling of the march=native option will be removed, but are here for now to show CI passing. |
Can you raise an issue about this? I'll eventually add it to our weekly cron job at some point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two small things and this should be done
There's something wrong with codecov at the moment but I'm not seeing what anything in either actions or codecov's status updates.. I restarted the runners we'll see what happens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming CI returns green lgtm, thanks @hmacdope !
Fixes #3428
Changes made in this Pull Request:
fixesremoves march option in setup.cfgchecks for MSVC (WIP??)only allows if not on MSVCQuestions:
Do we want to check if the flagmarch
is accepted rather than using the compiler identity? E.g what about icc, pgi etc etcDo we want to improve documentation of this option?PR Checklist