Skip to content

Commit

Permalink
Ensure Python waits until pyccel-clean has finished (#32)
Browse files Browse the repository at this point in the history
* Ensure Python waits until pyccel-clean has finished

* Benchmark of pyccel

* Update performance comparison

* Update README and version

---------

Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent e1b5b84 commit 0d1f2cb
Show file tree
Hide file tree
Showing 5 changed files with 867 additions and 747 deletions.
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,38 +89,38 @@ Solves a 2D Laplace problem using Finite Differences methods. The code is adapte

Runs a molecular dynamics simulation. The code is adapted from examples written by [J. Burkardt](https://people.sc.fsu.edu/~jburkardt/py_src/py_src.html)
## Development branch results
### Performance Comparison (as of Wed Apr 17 11:46:04 UTC 2024)
### Performance Comparison (as of Wed Apr 17 12:46:51 UTC 2024)
## Compilation time
Algorithm | python | pythran_gnu | pythran_intel | numba | pyccel_fortran_gnu | pyccel_c_gnu | pyccel_fortran_intel | pyccel_c_intel
------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -------------------------
Ackermann | - | 2.45 | - | 0.33 | 1.27 | - | 2.07 | 1.15
Bellman Ford | - | 4.35 | - | 1.09 | 3.59 | - | 4.46 | -
Dijkstra | - | 2.50 | - | 1.60 | 3.69 | 3.72 | 3.63 | -
Euler | - | 2.80 | - | 2.04 | 3.57 | 3.71 | - | 5.12
Midpoint Explicit | - | 4.02 | - | 3.03 | 3.82 | - | 4.67 | 4.35
Midpoint Fixed | - | 4.46 | - | 3.29 | 3.88 | - | 4.85 | -
RK4 | - | 3.88 | - | 3.81 | 4.44 | - | 5.26 | 4.98
FD - L Convection | - | 3.28 | - | 0.86 | 3.54 | 3.64 | 3.59 | 4.15
FD - NL Convection | - | 4.31 | - | 0.89 | 3.55 | - | 4.50 | -
FD - Poisson | - | 3.44 | - | 1.35 | 3.66 | - | 4.93 | -
FD - Laplace | - | 6.70 | - | 3.10 | 4.02 | - | 5.00 | 4.68
M-D | - | 7.31 | - | 4.09 | 4.36 | - | 5.29 | 5.13
Ackermann | - | 2.41 | - | 0.32 | 1.26 | 1.22 | 1.34 | 1.32
Bellman Ford | - | 3.47 | - | 1.08 | 3.59 | 3.86 | 3.71 | 4.34
Dijkstra | - | 2.44 | - | 1.59 | 3.67 | 3.87 | 3.79 | 4.38
Euler | - | 2.76 | - | 2.03 | 3.56 | 3.84 | 3.70 | 4.31
Midpoint Explicit | - | 3.13 | - | 3.03 | 3.81 | 4.13 | 3.97 | 4.54
Midpoint Fixed | - | 3.59 | - | 3.22 | 3.88 | 4.19 | 4.02 | 4.63
RK4 | - | 3.82 | - | 3.78 | 4.44 | 4.68 | 4.54 | 5.15
FD - L Convection | - | 2.41 | - | 0.86 | 3.53 | 3.83 | 3.70 | 4.28
FD - NL Convection | - | 3.40 | - | 0.89 | 3.55 | 3.86 | 3.69 | 4.28
FD - Poisson | - | 3.41 | - | 1.34 | 3.65 | 3.94 | 4.21 | 4.33
FD - Laplace | - | 6.62 | - | 3.07 | 3.97 | 4.30 | 4.21 | 4.83
M-D | - | 6.35 | - | 4.05 | 4.34 | 4.48 | 4.52 | 5.26

## Execution time
Algorithm | python | pythran_gnu | pythran_intel | numba | pyccel_fortran_gnu | pyccel_c_gnu | pyccel_fortran_intel | pyccel_c_intel
------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -------------------------
Ackermann (ms) | 299.00 | 2.95 | - | 9.90 | 1.50 | - | 9.54 | 3.92
Bellman Ford (ms) | 1870.00 | 4.21 | - | 3.86 | 2.98 | - | 4.34 | -
Dijkstra (ms) | 4920.00 | 24.70 | - | 19.40 | 18.10 | 30.90 | 24.00 | -
Euler (ms) | 3870.00 | 28.30 | - | 39.90 | 15.60 | 142.00 | - | 128.00
Midpoint Explicit (ms) | 7940.00 | 59.00 | - | 83.70 | 23.80 | - | 16.20 | 252.00
Midpoint Fixed (ms) | 40100.00 | 255.00 | - | 403.00 | 75.40 | - | 59.30 | -
RK4 (ms) | 20000.00 | 163.00 | - | 143.00 | 33.20 | - | 39.10 | 405.00
FD - L Convection (ms) | 2250.00 | 1.63 | - | 2.64 | 1.51 | 1.85 | 1.52 | 3.69
FD - NL Convection (ms) | 2790.00 | 1.89 | - | 2.78 | 1.66 | - | 1.38 | -
FD - Poisson (ms) | 6210.00 | 3.00 | - | 7.11 | 2.82 | - | 2.66 | -
FD - Laplace (ms) | 581.00 | 67.50 | - | 246.00 | 58.00 | - | 59.20 | 327.00
M-D (ms) | 15000.00 | 15.20 | - | 59.00 | 53.90 | - | 77.70 | 62.30
Ackermann (ms) | 291.00 | 2.95 | - | 9.77 | 1.50 | 1.54 | 8.18 | 4.33
Bellman Ford (ms) | 1900.00 | 4.15 | - | 3.78 | 3.01 | 6.05 | 4.18 | 18.40
Dijkstra (ms) | 5180.00 | 22.90 | - | 18.50 | 18.30 | 30.40 | 23.10 | 22.10
Euler (ms) | 3980.00 | 28.20 | - | 39.70 | 14.50 | 142.00 | 13.80 | 128.00
Midpoint Explicit (ms) | 8060.00 | 58.90 | - | 79.50 | 24.00 | 281.00 | 15.30 | 251.00
Midpoint Fixed (ms) | 40600.00 | 256.00 | - | 401.00 | 74.40 | 1400.00 | 65.10 | 1240.00
RK4 (ms) | 20200.00 | 162.00 | - | 146.00 | 34.10 | 487.00 | 38.60 | 405.00
FD - L Convection (ms) | 2290.00 | 1.71 | - | 2.69 | 1.48 | 1.84 | 1.51 | 3.69
FD - NL Convection (ms) | 2800.00 | 1.97 | - | 2.83 | 1.68 | 2.19 | 1.38 | 3.74
FD - Poisson (ms) | 6380.00 | 2.87 | - | 7.10 | 2.78 | 3.78 | 2.65 | 7.76
FD - Laplace (ms) | 574.00 | 67.40 | - | 248.00 | 62.00 | 255.00 | 62.00 | 334.00
M-D (ms) | 15000.00 | 15.20 | - | 59.00 | 54.30 | 59.20 | 76.50 | 61.70

![Development compilation results](./version_specific_results/devel_performance_310_compilation.svg)
![Development execution results](./version_specific_results/devel_performance_310_execution.svg)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def run_process(cmd: "List[str]", time_compilation: "bool"=False, env = None):
run_units.append(possible_units.index(units))

if create_shared_lib:
subprocess.Popen([shutil.which('pyccel-clean'), '-s'])
subprocess.run([shutil.which('pyccel-clean'), '-s'])

if time_compilation:
row = cell_splitter[output_format].join('{0: <25}'.format(s) for s in comp_times)
Expand Down
Loading

0 comments on commit 0d1f2cb

Please sign in to comment.