AtChem / AtChem2

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

Speed of the simulation on HPC #477

Closed zyh929 closed 1 year ago

zyh929 commented 2 years ago

Hello The model takes 13 hours to run a 2-hours simulation on HPC when the entire MCM chemical mechanism is used. I’m not sure whether this simulation speed is normal. I was wondering if there are some methods to improve the simulation speed. Thank you very much for your kind consideration. I would appreciate any help you can offer.

rs028 commented 2 years ago

HI @zyh929 that does seem unusually long. Are you using any constraints?

zyh929 commented 2 years ago

Hi @rs028 I plan to identify the mechanisms’ effect on O3 by using a concentration sensitivity analysis, so I don’t use any constrains. I submit job scripts on HPC systems and the computing resource is only 1 core that seems unmodifiable. I notice that you mention “considering parallelization” in #479. I was wondering if the computing resource can be improved by parallelization. Thank you for your attention to this matter. image

rs028 commented 2 years ago

@zyh929 constraints are usually what slows down the model. A runtime of 13 hours for a 2 hours model with no contraints is definitely unusual. What happens if you run the tests? How long does it take to complete the testsuite?

Parallelization is not implemented at the moment. The note in #479 is a reminder for future work. It is quite possibe that performance will improve with parallelization but it's likely to be quite a bit of work to do and I can't give a timeline of when it is going to happen unfortunately. Of course if you have the capability and/or the resources to look into that, it would be wonderful :)

zyh929 commented 2 years ago

Hi @rs028 I am sorry for the late reply. I didn't install optional dependencies (numdiff, FRUIT) , so the Test Suite was not run. Could that be one of the reasons for low simulation speed?

rs028 commented 2 years ago

No but it could provide some information on the problem. The testsuite runs in 1-2 minutes on a normal machine. If the testsuite runs fast on your machine then the problem is the particular model you are using and we need to look at that. If the testsuite takes a long time as well then the problem is most likely somewhere else, either the Atchem installation or the machine itself.

You should only need numdiff and not run the unit tests, if you don't wnat to install FRUIT.

zyh929 commented 2 years ago

@rs028 I really appreciate that you answer my mind of doubt. It takes just 1-2 seconds to run the testsuite on my machine. So I try to modify “maximum solver step size”, but it doesn't seem to improve the simulation speed.

rs028 commented 2 years ago

Then I would think it is the model you are trying to run that is the problem. Can you share the configuration files? you can send to me by email rob.sommariva @ gmail.com

rs028 commented 2 years ago

@zyh929 your configuration looks okay. I think this is a known issue. See #436. Unfortunately, I don't have a short term solution to this problem. What I can suggest is to try with a subset of the MCM, if you don't need the whole mechanism. That should speed up things considerably.

zyh929 commented 2 years ago

@rs028 I get it now, Thank you for all your assistance.

rs028 commented 1 year ago

Closed, because it is a duplicate. See issues #436 and #479 for more info.