Skip to content
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

Implemented parallel tiling #8886

Merged
merged 17 commits into from
Jul 12, 2023
Merged

Implemented parallel tiling #8886

merged 17 commits into from
Jul 12, 2023

Conversation

micheles
Copy link
Contributor

@micheles micheles commented Jul 10, 2023

Closes #8878. Here is the performance on the spot machine for EUR with 1% of the sources:

# master, 6 tiles
| calc_2, maxmem=223.0 GB    | time_sec | memory_mb | counts     |
|----------------------------+----------+-----------+------------|
| total classical            | 57_831   | 10.2      | 24_882     |
| get_poes                   | 32_622   | 0.0       | 28_062_228 |
| computing mean_std         | 14_299   | 0.0       | 262_240    |
| composing pnes             | 7_965    | 0.0       | 28_062_228 |
| total postclassical        | 7_113    | 3_365     | 86         |
| combine pmaps              | 4_661    | 0.0       | 176_738    |
| total preclassical         | 2_084    | 151.2     | 616        |
| ClassicalCalculator.run    | 1_724    | 5_931     | 1          |
| read PoEs                  | 1_040    | 3_365     | 86         |

# parallel tiling
| calc_3, maxmem=232.6 GB    | time_sec | memory_mb | counts    |
|----------------------------+----------+-----------+-----------|
| total classical            | 38_351   | 3.44085   | 5_856     |
| get_poes                   | 22_403   | 0.0       | 8_064_162 |
| total postclassical        | 8_586    | 3_163     | 86        |
| composing pnes             | 7_048    | 0.0       | 8_064_162 |
| computing mean_std         | 6_958    | 0.0       | 60_315    |
| combine pmaps              | 4_164    | 0.0       | 176_738   |
| read PoEs                  | 3_422    | 3_137     | 86        |
| total preclassical         | 2_046    | 148.7     | 616       |
| ClassicalCalculator.run    | 1_262    | 17_292    | 1         |

The performance is much better, as expected (21 minutes instead of 29 minutes overall) and the improvement is even better on an HPC (expected more than 2x overall). read PoEs becomes 3x worse, but it is a minor issue at the moment (in this example only 68.5 GB of PoEs are stored).
The task distribution is much better:

| operation-duration | counts | mean    | stddev | min     | max     | slowfac |
|--------------------+--------+---------+--------+---------+---------+---------|
| classical          | 2_088  | 27.7    | 44%    | 0.13246 | 58.9    | 2.12525 |
| classical          | 298    | 128.7   | 36%    | 0.38588 | 185.4   | 1.44099 |

The data transfer it much better too:

| task              | sent                                         | received  |
|-------------------+----------------------------------------------+-----------|
| classical         | sitecol=4.67 GB cmaker=11.65 MB srcs=7.34 MB | 81.17 GB  |
| classical         | sitecol=3.82 GB srcs=59.47 MB cmaker=9.98 MB | 48.85 GB  |

For small calculations the performance is expected to be much worse, I have seen even 3x worse in the test share_small.ini:

# master
| calc_69835, maxmem=5.3 GB | time_sec | memory_mb | counts  |
|---------------------------+----------+-----------+---------|
| total classical           | 492.6    | 114.8     | 31      |
| planar contexts           | 337.0    | 0.0       | 401_125 |
| iter_ruptures             | 166.6    | 0.15766   | 27_787  |
| ClassicalCalculator.run   | 96.4     | 1_210     | 1       |

# parallel tiling
| calc_69834, maxmem=7.7 GB | time_sec | memory_mb | counts  |
|---------------------------+----------+-----------+---------|
| total classical           | 1_230    | 74.3      | 31      |
| planar contexts           | 903.9    | 0.0       | 830_540 |
| iter_ruptures             | 532.4    | 0.14874   | 82_659  |
| ClassicalCalculator.run   | 179.9    | 1_234     | 1       |

@micheles micheles added this to the Engine 3.18.0 milestone Jul 10, 2023
@micheles micheles requested a review from mmpagani July 10, 2023 06:23
@micheles micheles self-assigned this Jul 10, 2023
@micheles micheles merged commit 2d2a6d9 into master Jul 12, 2023
5 checks passed
@micheles micheles deleted the classical branch July 12, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Try again to replace sequential tiling with parallel tiling
1 participant