[pythran] Re: Preliminary results benchmark NBabel CO2 production + OpenMP implementation?

  • From: Serge Guelton <serge.guelton@xxxxxxxxxxxxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Tue, 26 Jan 2021 17:53:23 +0100

On Tue, Jan 26, 2021 at 02:07:43PM +0100, PIERRE AUGIER wrote:

Hi,

Here are some preliminary results of an experiment on energy consumption 
measurement at Grid'5000 
(https://www.grid5000.fr/w/Energy_consumption_monitoring_tutorial). The goal 
is to have enough to be able to submit a serious comment to a recent article 
published in Nature Astronomy (Zwart, 2020) which recommends to stop using 
and teaching Python because of the ecological impact of computing.

2 figures are attached (the code is here https://github.com/paugier/nbabel):

1. fig_bench_nbabel.png: CO2 production versus elapsed time for different 
implementations. This figure can be compared with 
https://raw.githubusercontent.com/paugier/nbabel/master/py/fig/fig_ecolo_impact_transonic.png
 taken from Zwart (2020).

The implementations labeled "nbabel.org" have been found on 
https://www.nbabel.org/ and have recently been used in the article by Zwart ;
(2020). Note that these C++, Fortran and Julia implementations are not well 
optimized. However, I think they are representative of many C++, Fortran and 
Julia codes written by scientists.

There is one simple Pythran implementation which is really fast (slightly 
slower than the fastest implementation in Julia but it is not a big deal).

Note that of course these results do not show that Python is faster that 
C++!! We just show here that it's easy to write in Python **very** efficient 
implementations of numerically intensive problems.

2. fig_bench_nbabel_parallel_julia.png shows similar results as a function of 
the number of threads for a parallel Julia implementation.

The scaling is not very good but parallelization can of course decrease 
elapsed time and CO2 production.

If the scaling is not very good, then is parallelization good in terms of CO2
production? Imean, if using 1 core, you spend 10s and using 2 cores you spend
15s, then overall, what's the energy consumed in the first and second case? If
the nergy spent is linear to the number of core, then the single-threaded option
is better, energy-wise?

Other related posts: