zward / Amua

An open source modeling framework
GNU General Public License v3.0
33 stars 11 forks source link

PSA #42

Closed MariaLuna20 closed 4 years ago

MariaLuna20 commented 4 years ago

Hello, I'm trying to run a PSA but it is running extremely slowly (10 iterations were going to take ~1 hour) and once I stopped the PSA then the model is not longer checking correctly (even though it was checking ok before the PSA). Do you know why the PSA is so slow and is there something happening internally for an aborted PSA to alter the model?

Thank you!! L.

zward commented 4 years ago

The model check after cancelled PSA might be due to a variable checking issue - if so, this should be fixed in the next version, coming soon, so you can see if that solves the problem once it is released. The PSA just loops the model and samples from parameters for each iteration, so unless you have a lot of constraints which affect parameter sampling, the PSA time should scale linearly with the number of model iterations. How long does one run of the model take? To speed it up, you could try reducing the number of Monte Carlo simulations (i.e. number of individuals to simulate), or you could try using multi-threading to see if you get better performance.

MariaLuna20 commented 4 years ago

Thank you for your response, I tried reducing the simulations and multi-threading but that didn’t help. The model runs instantly when clicking on the green arrow at the top of the screen but it is when I try to run the PSA that is extremely slow. Do you have any other suggestions? When is the next version coming out? Thanks!

On Dec 31, 2019, at 13:54, Zach Ward notifications@github.com wrote:

The model check after cancelled PSA might be due to a variable checking issue - if so, this should be fixed in the next version, coming soon, so you can see if that solves the problem once it is released. The PSA just loops the model and samples from parameters for each iteration, so unless you have a lot of constraints which affect parameter sampling, the PSA time should scale linearly with the number of model iterations. How long does one run of the model take? To speed it up, you could try reducing the number of Monte Carlo simulations (i.e. number of individuals to simulate), or you could try using multi-threading to see if you get better performance.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zward/Amua/issues/42?email_source=notifications&email_token=AL6MFPCPH5TV5MVS6ULMQLTQ3OIPJA5CNFSM4KBCQYQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH4R3GQ#issuecomment-569974170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6MFPBDJJKBRXWXQYSSKXTQ3OIPJANCNFSM4KBCQYQQ.

zward commented 4 years ago

The new version should be out next week. That seems strange that one run of the model is quick but that PSA is so slow. Can you send me a copy of the model (zward@hsph.harvard.edu) so that I can test it on my system? Also, can you check how much memory you have available in Amua? (Go to Help -> Error Log and find the line near the bottom that says "Heap - Max Memory")

zward commented 4 years ago

I think this was due to an issue with dependent parameter re-sampling that was slowing things down. This should be fixed now as of 0.2.7.