brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
93 stars 77 forks source link

path['clik'] error #294

Closed lpttprnc closed 9 months ago

lpttprnc commented 2 years ago

hello,

i'm testing if i can use Planck likelihood by running base2018TTTEEE.param, then i get this error: NameError: name 'Planck_highl_TT' is not defined image

it seems that Montepython couldn't read the "path['clik']" part of my default.conf file. i've checked #174 and tried to run ./waf configure -v to see what the problem is: image

but cfitsio is already in the planck/code/plc_3.0/plc-3.1/build/cfitsio-4.1.0 directory. i do ./waf configuration with --cfitsio_install and the error insists. does anyone know how to fix this issue?

thank you (:

brinckmann commented 1 year ago

I'm not very great with these things, but if it's not finding cfitsio maybe you can try to export the path to PATH, CPATH, LD_LIBRARY_PATH in your .bashrc (or equivalent)? E.g. export PATH=path_to_cfitsio${PATH:+:$PATH} export CPATH=path_to_cfitsio${CPATH:+:$CPATH} export LD_LIBRARY_PATH=path_to_cfitsio${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

I'm also a little confused why the error is talking about "Planck_highl_TT" when that likelihood isn't being called by base2018TTTEEE.param , did you change the param file or are you running in an output chains directory that already has a log.param ?

Best, Thejs

lpttprnc commented 1 year ago

Hello Mr. Brinckmann, thank you for the answer and I am sorry for the late response. I don't change anything from base2018TTTEEE.param file since I tend to check whether it can be run, and it's the file from input directory (default file with original code, nothing's changed). I think it's because I don't configure something inside plc directory.

dchooper commented 1 year ago

Hi,

If the Planck likelihood is not installed properly, you will get this error message the first time the Planck likelihoods are referenced in the code, regardless of which ones you are calling. The problem comes from cfitsio, without that the likelihoods won't work.

When you installed cfitsio, did you use the make --shared option? Otherwise planck can't find it. You can check out the cfitsio part of the readme in the Planck likelihood code for detailed instructions on how to install this.

Let us know if this helps!

Cheers, Deanna

lpttprnc commented 1 year ago

thanks deanna! i'll inform you after i check it.