brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
92 stars 78 forks source link

Problem with Planck Likelihood and clik wrapper #350

Closed Physics-16 closed 8 months ago

Physics-16 commented 8 months ago

I am facing an error during the run of MontePython with Planck likelihood. The structure of the error is something like the following:--

** /!\ PyMultiNest detected but MultiNest likely not installed correctly. You can safely ignore this if not running with option -m NS Running Monte Python v3.6.0

with CLASS v3.2.1

Testing likelihoods for: ->Planck_highl_TTTEEE, Planck_lowl_EE, Planck_lowl_TT

Cannot use clik wrapper (cause = '/home/pamu/Documents/Aurindam/Planck/code/plc_3.0/plc-3.01/lib/python/site-packages/clik/lkl.so: undefined symbol: _Py_FalseStruct') Cannot use clik_lensing wrapper (cause = '/home/pamu/Documents/Aurindam/Planck/code/plc_3.0/plc-3.01/lib/python/site-packages/clik/lkl_lensing.so: undefined symbol: _Py_FalseStruct') /!\ PyFITS is deprecated, please use astropy.io.fits

Traceback (most recent call last): File "montepython/MontePython.py", line 40, in sys.exit(run()) File "/home/pamu/Documents/Aurindam/montepython_public-3.6.0/montepython/run.py", line 32, in run custom_command) File "/home/pamu/Documents/Aurindam/montepython_public-3.6.0/montepython/run.py", line 191, in safe_initialisation cosmo, data, command_line, success = initialise(custom_command) File "/home/pamu/Documents/Aurindam/montepython_public-3.6.0/montepython/initialise.py", line 67, in initialise data = Data(command_line, path) File "/home/pamu/Documents/Aurindam/montepython_public-3.6.0/montepython/data.py", line 362, in init self.initialise_likelihoods(self.experiments) File "/home/pamu/Documents/Aurindam/montepython_public-3.6.0/montepython/data.py", line 499, in initialise_likelihoods elem, elem, folder, elem)) File "", line 1, in File "/home/pamu/Documents/Aurindam/montepython_public-3.6.0/montepython/likelihood_class.py", line 895, in init

except clik.lkl.CError:

AttributeError: 'module' object has no attribute 'lkl' **

Can anybody give me solution for this problem ?

brinckmann commented 8 months ago

Hi,

It looks like your Planck installation wasn't done correctly or isn't properly sourced, you'll want to make sure that's working first before trying something more complicated like running a sampler. This is not a MontePython issue. Here are ways to get further information on installing Planck: 1) The MontePython README: https://github.com/brinckmann/montepython_public#the-planck-likelihood-part 2) The Planck README found in your Planck directory at code/plc_3.0/plc-3.01/readme.md 3) Searching for Planck in open and closed MontePython issues as common problems have been addressed many times: https://github.com/brinckmann/montepython_public/issues?q=is%3Aissue+Planck 4) Searching for answered Planck issues on the CosmoCoffee forums https://cosmocoffee.info/

Best, Thejs

Physics-16 commented 7 months ago

Hi Thejs,

After the installation of Planck, I did all the things like configuration, installation and sourcing of the file "clik_profile.sh" in a way similar to those written in the readme file of MontePython. All of these have been done successfully, but the problem appears only during the run of MontePython with Planck (which shows the above attribute error). That's the reason why I am asking for some help.

dchooper commented 7 months ago

Hi,

Can you try opening a python environment (ideally the same python version you use to run MontePython) and importing clik (with import clik). If that gives you the same error message, then the problem is indeed with the Planck installation. To me it looks like it might be related to installing planck with one python version and running MontePython with a different python version.

Cheers, Deanna