AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
59 stars 22 forks source link

Speed of calculations #479

Open rs028 opened 1 year ago

rs028 commented 1 year ago

The model is noticeably slower (compared to version pre-1.0). Need to do

  1. profiling to identify the bottlenecks and see how they can be eliminated.
  2. Is it worth considering parallelization?

Known to affect model performance:

Unclear if affect model performance:

rs028 commented 1 year ago

Results from a rough evaluation of the problem. Model running on HPC system (30 GB memory), no constraints, 24 hours simulation.

n. species n. reactions runtime
51 137 15 sec
2575 7779 10 min
5833 17224 5.5 days

Increasing the memory to 120 GB or decreasing the output frequency do not affect significantly the outcome.

ZhuJFDU commented 1 year ago

entire mechanism = low efficiency

rs028 commented 9 months ago

Changing the solver type in solver.parameters may help with this issue. The default choice is spgmr + banded preconditioner. The other choices (spgmr or dense) may result in better performance.

Note: Could this be related to #436? When lots of species have zero concentration the matrix is sparse and the use of preconditioner makes it inefficient?