baudren / montepython_public

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

KeyError: 'current' #82

Open bhorowitz opened 7 years ago

bhorowitz commented 7 years ago

I'm trying to run a chain using the multinest option, but I run into the following error right when sampling begins.

`Traceback (most recent call last): File "_ctypes/callbacks.c", line 314, in 'calling callback function' File "/global/homes/b/bhorowit/.local/edison/2.7.9/lib/python2.7/site-packages/pymultinest-2.1-py2.7.egg/pymultinest/run.py", line 211, in loglike

File "/scratch1/scratchdirs/bhorowit/montepython_public/montepython/nested_sampling.py", line 268, in loglike data.update_cosmo_arguments() File "/scratch1/scratchdirs/bhorowit/montepython_public/montepython/data.py", line 758, in update_cosmo_arguments self.mcmc_parameters[elem]['current'] *\ KeyError: 'current' `

brinckmann commented 7 years ago

Hi Benjamin,

This is a known issue to do with pymultinest and multinest. A workaround is to hardcode the number of dimensions in montepython/nested_sampling.py in the prior and loglike functions, i.e. add: ndim = 6 before the first loop, where you need to replace 6 with your number of dimensions (don't forget to update the number for new runs). Sorry about the inconvenience!

For more details see: https://github.com/baudren/montepython_public/issues/53

Regards, Thejs