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
first the code encounters several problematic models (instabilities, etc...)
the last few errors correspond to class_alloc problems ("could not allocate pth->thermodynamics_table with size 1966272"), then Montepython stops the execution.
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.
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