Skip to content
Snippets Groups Projects
Commit c820a2f68858 authored by Pierre Augier's avatar Pierre Augier
Browse files

Add citations

parent fe740f102e65
No related branches found
No related tags found
No related merge requests found
......@@ -48,4 +48,6 @@
fluidfft_final/Pyfig/fig_classes.svg
reply_Zwart2020/paper.tex
reply_Zwart2020/correspondence.tex
\ No newline at end of file
reply_Zwart2020/correspondence.tex
*.cpt
\ No newline at end of file
......@@ -18,8 +18,8 @@
letter_contact_NatureAstronomy.pdf: letter_contact_NatureAstronomy.md figs/fig_bench_nbabel_parallel.png header.tex
pandoc -V fontsize=12pt -s letter_contact_NatureAstronomy.md -o letter_contact_NatureAstronomy.pdf
correspondence.tex: correspondence.md figs/fig_bench_nbabel_parallel.png header.tex
pandoc -V fontsize=12pt --natbib -s correspondence.md -o correspondence.tex
correspondence.tex: correspondence.md figs/fig_bench_nbabel_parallel.png header.tex pubs.bib
pandoc -V fontsize=12pt -s correspondence.md -o correspondence.tex
correspondence.pdf: correspondence.tex
$(LATEXMK) correspondence.tex
\ No newline at end of file
......@@ -10,9 +10,9 @@
- \include{header}
---
\cite{Zwart2020} recently published in Nature Astronomy a comment on **The
ecological impact of high-performance computing in astrophysics**. His main
claim is that the Python programming language represents an issue for the
Zwart recently published in Nature Astronomy a comment on **The ecological
impact of high-performance computing in astrophysics** \cite{Zwart2020}. His
main claim is that the Python programming language represents an issue for the
climate and should be avoided. We will show that scientific programs written in
Python can be very efficient and energy friendly. We argue that human factors
and education are much more important than the choice of languages.
......@@ -54,7 +54,8 @@
this inefficiency of the interpreter has a weak effect on the overall
performance of most programs. The total elapsed time and the energy consumption
are dominated by hard work done in optimized and efficient libraries. This is
the basic principle of all the scientific Python ecosystem using Numpy.
the basic principle of all the scientific Python ecosystem using Numpy
\cite{Numpy}.
This is a very usual situation for which only very few lines of code dominate
the total computation. It is usually known as the 80/20 rule and associated
......@@ -70,10 +71,10 @@
$N=16384$, so the program is dominated by 1,342,177,280,000 executions of a
simple and inexpensive computation. Using CPython for this very hot loop makes
the whole program very inefficient. Good news for Python, it's very easy to use
efficient alternatives. For this benchmark, we use 3 tools: (i) Pythran, a
Python-Numpy AOT compiler transpiling to C++, (ii) Numba, a Python-Numpy JIT
compiler based on LLVM and (iii) PyPy, an alternative Python interpreter with a
JIT.
efficient alternatives. For this benchmark, we use 3 tools: (i) Pythran
\cite{guelton2015pythran}, a Python-Numpy AOT compiler transpiling to C++, (ii)
Numba \cite{lam2015numba}, a Python-Numpy JIT compiler based on LLVM and (iii)
PyPy \cite{bolz2009tracing}, an alternative Python interpreter with a JIT.
\begin{figure}[ht]
\centerline{\includegraphics[width=0.65\textwidth]{figs/fig_bench_nbabel_parallel}}
......@@ -83,7 +84,9 @@
measurements were carried out on Grid'5000 clusters with 2.30 GHz Intel Xeon
E5-2630 processors and converted from kWh to CO$_2$ using 283 g CO$_2$ / kWh.
Optimizations were activated for all implementations with flags like
\verb!-OFast!, \verb!-march=native! and \verb!--check-bounds=no!.}
\verb!-OFast!, \verb!-march=native! and \verb!--check-bounds=no!. We use a not
released version of PyPy including optimizations described in
\cite{cheng2020type}. }
\end{figure}
......@@ -103,10 +106,10 @@
Numpy is only used for its arrays as a data-structure and not for advanced
high-level functions. (2) Four implementations in Python are fastest than the
C++ implementation. The simple implementation labelled "Pythran naive" (simple
Numpy code accelerated only by decorating one function with `@transonic.jit`)
is only 5.7 times slower than the optimized version in Julia. (3) All Python
implementations are simpler to reason, read and write than the C++ and Fortran
implementations.
Numpy code accelerated only by decorating one function with `@transonic.jit`
\cite{transonic}) is only 5.7 times slower than the optimized version in Julia.
(3) All Python implementations are simpler to reason, read and write than the
C++ and Fortran implementations.
[^4]: https://discourse.julialang.org/t/nbabel-nbody-integrator-speed-up/
......@@ -127,3 +130,6 @@
obtain good performance with simple and readable codes. Therefore, teaching
efficient Python to scientists and engineers can be profitable to minimize the
overall ecological impact of computing.
\bibliographystyle{naturemag}
\bibliography{./pubs}
\ No newline at end of file
......@@ -47,4 +47,4 @@
\usepackage{titling}
\setlength{\droptitle}{-10mm}
\usepackage{cprotect}
\ No newline at end of file
\usepackage{cprotect}
......@@ -34,3 +34,61 @@
location = {Vancouver, BC, Canada},
series = {SLE 2017}
}
@inproceedings{bolz2009tracing,
title={Tracing the meta-level: PyPy's tracing JIT compiler},
author={Bolz, Carl Friedrich and Cuni, Antonio and Fijalkowski, Maciej and Rigo, Armin},
booktitle={Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems},
pages={18--25},
year={2009}
}
@inproceedings{cheng2020type,
title={Type freezing: exploiting attribute type monomorphism in tracing JIT compilers},
author={Cheng, Lin and Ilbeyi, Berkin and Bolz-Tereick, Carl Friedrich and Batten, Christopher},
booktitle={Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization},
pages={16--29},
year={2020}
}
@article{guelton2015pythran,
title={Pythran: Enabling static optimization of scientific python programs},
author={Guelton, Serge and Brunet, Pierrick and Amini, Mehdi and Merlini,
Adrien and Corbillon, Xavier and Raynaud, Alan},
journal={Computational Science \& Discovery},
volume={8},
number={1},
pages={014001},
year={2015},
publisher={IOP Publishing}
}
@inproceedings{lam2015numba,
title={Numba: A llvm-based python jit compiler},
author={Lam, Siu Kwan and Pitrou, Antoine and Seibert, Stanley},
booktitle={Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC},
pages={1--6},
year={2015}
}
@article{harris2020array,
title={Array programming with NumPy},
author={Harris, Charles R and Millman, K Jarrod and van der Walt, St{\'e}fan J and Gommers, Ralf and Virtanen, Pauli and Cournapeau, David and Wieser, Eric and Taylor, Julian and Berg, Sebastian and Smith, Nathaniel J and others},
journal={Nature},
volume={585},
number={7825},
pages={357--362},
year={2020},
publisher={Nature Publishing Group}
}
@article{transonic,
doi = {10.5334/jors.237},
year = {2019},
publisher = {Ubiquity Press, Ltd.},
volume = {7},
author = {Pierre Augier and Ashwin Vishnu Mohanan and Cyrille Bonamy},
title = {{FluidDyn}: A Python Open-Source Framework for Research and Teaching in Fluid Dynamics
by Simulations, Experiments and Data Processing},
journal = {Journal of Open Research Software}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment