gem / oq-engine

OpenQuake's Engine for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
374 stars 272 forks source link

Think about disabling numba in same places #9733

Closed micheles closed 1 month ago

micheles commented 1 month ago

In particular look at geo.multiline.get_tuw and similar functions: the compilation times are long, but it is not clear there is a significant benefit. Calculation to run: San Francisco.

EDIT: after running San Francisco with source_id=ufc3mean I checked that there is indeed a significant benefit in preclassical (28% speedup) and overall (10%):

# master
| calc_105617, maxmem=15.8 GB | time_sec  | memory_mb | counts  |
|-----------------------------+-----------+-----------+---------|
| total classical             | 3_936     | 56.9      | 33      |
| nonplanar contexts          | 1_911     | 0.0       | 390     |
| iter_ruptures               | 1_643     | 0.0       | 195     |
| total preclassical          | 1_478     | 13.6      | 195     |
| setting msparams            | 1_429     | 0.0       | 208     |
| ClassicalCalculator.run     | 444.5     | 863.1     | 1       |
| PreClassicalCalculator.run  | 163.5     | 827.9     | 1       |

# disabled numba
| calc_105616, maxmem=14.7 GB | time_sec  | memory_mb | counts  |
|-----------------------------+-----------+-----------+---------|
| total classical             | 4_134     | 47.9      | 33      |
| total preclassical          | 2_056     | 14.1      | 195     |
| setting msparams            | 2_005     | 0.0       | 208     |
| nonplanar contexts          | 1_899     | 0.0       | 390     |
| iter_ruptures               | 1_847     | 0.0       | 195     |
| ClassicalCalculator.run     | 496.6     | 863.0     | 1       |
| PreClassicalCalculator.run  | 203.1     | 825.7     | 1       |