-
Notifications
You must be signed in to change notification settings - Fork 194
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
NBabel benchmark - Ecological Impact of HPC ... #1669
Comments
The description you give sounds super interesting, and I 100% agree with the goal. I'll try to have a look at your implementation soon :-) |
Good news. I added an implementation of the most important function with loops (paugier/nbabel#1). It's now faster than the C++ and Fortran implementations. The elapsed times in second:
Note that there are no tests for https://www.nbabel.org/ problem, so I'm not sure about the correctness. I will try to parallelize with OpenMP. @CyrilleBonamy, it would be interesting to measure the energy consumption for this algorithm too and to replot the Nature figure. I wonder if some people have thought about submitting a reply to this article. |
That's great news! I commented in the PR to rip some extra perf but indeed, one need to be cautious with the actual result ;-) |
BTW, you should compile fortran and C++ code with |
When doing so, I get Fortran down to 39 which is still not as good as Pythran, but significantly closer. |
I confirm! Really nice! Other thing about this code: Pythran gives wrong results (no modification of the arrays when doing inplace assignation) in two cases.
A bad thing it that in both cases, it runs without error but only the results are completely wrong. |
Did you read this paper published in Nature: The Ecological Impact of High-performance Computing in Astrophysics ?
One of the few figures show that Python-Numpy is very inefficient for a particular problem (N-Body). The code used should be available here https://www.nbabel.org/.
I played a bit on this problem (https://github.com/paugier/nbabel) since it would be interesting to show what can be done with Pythran on this case (published in Nature!) and some people in my lab work on the subject of the impact of computing on environment (@CyrilleBonamy).
The Pythran code is in this file https://github.com/paugier/nbabel/blob/master/py/bench.py Do you see some possible improvements in this code?
On my machine, the speedup compared to Python without acceleration is huge (~ x180) but it is still ~ 4 times slower than the Fortran and C++ implementations (which are not that crazy). Also, the 3 implementations do not give the same results 🙂 (the C++ implementation seems to be less accurate) and I don't understand why.
Moreover, I don't understand why
-DUSE_XSIMD
does not seem to give any speed up. Is it expected?The text was updated successfully, but these errors were encountered: