baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 115 forks source link

Execution errors and memory leaks in MCMC for modified CLASS #40

Closed miguelzuma closed 8 years ago

miguelzuma commented 9 years ago

Hi,

I am working with Montepython with a modified version of CLASS that computes predictions for modified gravity theories. These models often have pathological features for certain values of the parameters (ghosts, instabilities in the perturbations...). The code runs some class_tests so when a problem happens, CLASS throws an error and stops execution. Although this works fine for normal use, I've found problems when running MCMCs.

Specifically, when I run a chain in the cluster, the code finishes much earlier than expected. Examination of the output shows that

It seems that these errors produce memory leaks in the code, possibly because after class_test stops the execution of a model, the modules are not free (e.g. background_free, etc... are not called).

Please let me know if you have any hint on how to solve this problem.

I would also suggest for Montepython to keep a record of the problematic parameter values, together with the errors that they produced. This would be very useful for debugging and understanding certain models better.

Thanks, Miguel

miguelzuma commented 8 years ago

This issue is not with MontePython, but rather with Classy, see: https://github.com/lesgourg/class_public/issues/51