baudren / montepython_public

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

Running Montepython with PLANCK 2015 data #94

Closed akhileshnautiyal closed 7 years ago

akhileshnautiyal commented 7 years ago

Hello. I am trying to run montepython using PLANCK 2015 data. My settings in default.conf are like root = '/home/akhilesh/cmbsofts'

path['cosmo'] = root+'/class_public-2.6.0' path['clik'] = root+'/planck_2015/plc-2.0'

Now since planck 2015 data is in separate folder named plc_2.0 as higl_l, low_l, lensing folders, I copied all the .clik files and .clik_lensing files to /home/akhilesh/cmbsofts/planck_2015 but while runnign monteython with command

python montepython/MontePython.py -o planck/ -p base2015.param -c covmat/base.covmat --conf default.conf -f 1.5

I am getting the following error.

Testing likelihoods for: -> Planck_highl, Planck_lowl, Planck_lensing

Cannot use clik wrapper (cause = 'libirc.so: cannot open shared object file: No such file or directory') Cannot use clik_lensing wrapper (cause = 'libirc.so: cannot open shared object file: No such file or directory') Traceback (most recent call last): File "montepython/MontePython.py", line 40, in sys.exit(run()) File "/home/akhilesh/cmbsofts/montepython_public-2.2.2/montepython/run.py", line 31, in run custom_command) File "/home/akhilesh/cmbsofts/montepython_public-2.2.2/montepython/run.py", line 188, in safe_initialisation cosmo, data, command_line, success = initialise(custom_command) File "/home/akhilesh/cmbsofts/montepython_public-2.2.2/montepython/initialise.py", line 66, in initialise data = Data(command_line, path) File "/home/akhilesh/cmbsofts/montepython_public-2.2.2/montepython/data.py", line 340, in init self.initialise_likelihoods(self.experiments) File "/home/akhilesh/cmbsofts/montepython_public-2.2.2/montepython/data.py", line 460, in initialise_likelihoods elem, elem, folder, elem) File "", line 1, in File "/home/akhilesh/cmbsofts/montepython_public-2.2.2/montepython/likelihood_class.py", line 865, in init except clik.lkl.CError: AttributeError: 'module' object has no attribute 'lkl'

I will be rateful if you can kindly help me. Canb we also modify the code to directly access .clik files inside their respective folders in plc_2.0

Thanks, akhilesh

borisbolliet commented 7 years ago

Hi Akhilesh,

You should not copy paste or modify anything from plc-2.0 and plc_2.0 folders.

To chose between lowl and highl likelihood, you do this in the param file.

For a clean installation of the planck likelihood and data, follow instructions in issue #68.

I hope this helps, Boris

akhileshnautiyal commented 7 years ago

Dear Boris,

              thanks for the reply. the problem was in installation of PLANCK 2015. 
ghost commented 7 years ago

I am getting a similar problem , but I am quite sure about my installation of PLANCK 2015. When I type

python montepython/MontePython.py -o planck/ -p base2015.param -c covmat/base.covmat --conf default.conf -f 1.5

this is what I am getting

Defaulting to the 'run' command. Please update the call of MontePython. For
     more info, see the help string and/or the documentation
Running Monte Python v2.2.2

with CLASS v2.6.0
 /!\ Detecting empty folder, logging the parameter file

Testing likelihoods for:
 -> Planck_highl, Planck_lowl, lowlike

Cannot use clik wrapper (cause = '/home/riccardo/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/riccardo/Documenti/Projects/KiDS/MP/Planck_likelihood/plc-2.0/lib/libclik.so)')
Cannot use clik_lensing wrapper (cause = '/home/riccardo/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/riccardo/Documenti/Projects/KiDS/MP/Planck_likelihood/plc-2.0/lib/libclik.so)')
Traceback (most recent call last):
  File "montepython/MontePython.py", line 40, in <module>
    sys.exit(run())
  File "/home/riccardo/Documenti/Projects/KiDS/MP/montepython_public/montepython/run.py", line 31, in run
    custom_command)
  File "/home/riccardo/Documenti/Projects/KiDS/MP/montepython_public/montepython/run.py", line 188, in safe_initialisation
    cosmo, data, command_line, success = initialise(custom_command)
  File "/home/riccardo/Documenti/Projects/KiDS/MP/montepython_public/montepython/initialise.py", line 66, in initialise
    data = Data(command_line, path)
  File "/home/riccardo/Documenti/Projects/KiDS/MP/montepython_public/montepython/data.py", line 340, in __init__
    self.initialise_likelihoods(self.experiments)
  File "/home/riccardo/Documenti/Projects/KiDS/MP/montepython_public/montepython/data.py", line 460, in initialise_likelihoods
    elem, elem, folder, elem)
  File "<string>", line 1, in <module>
  File "/home/riccardo/Documenti/Projects/KiDS/MP/montepython_public/montepython/likelihood_class.py", line 883, in __init__
    except clik.lkl.CError:
AttributeError: 'module' object has no attribute 'lkl'
purba13194 commented 6 years ago

Dear Sir,

    I need your help. The error I'm getting while running the code is given below :

[pm14ip011@hpc code]$ python montepython/MontePython.py run -p base2015.param -o outdir/ -b bestfit/base2015.bestfit -c covmat/base2015.covmat --conf my.conf Running Monte Python v2.2.2

with CLASS v2.6.3

Testing likelihoods for: -> Planck_highl, Planck_lowl, Planck_lensing

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7 Traceback (most recent call last): File "montepython/MontePython.py", line 40, in sys.exit(run()) File "/home/pm14ip011/MontePy_Workspace/code/montepython/run.py", line 31, in run custom_command) File "/home/pm14ip011/MontePy_Workspace/code/montepython/run.py", line 188, in safe_initialisation cosmo, data, command_line, success = initialise(custom_command) File "/home/pm14ip011/MontePy_Workspace/code/montepython/initialise.py", line 66, in initialise data = Data(command_line, path) File "/home/pm14ip011/MontePy_Workspace/code/montepython/data.py", line 340, in init self.initialise_likelihoods(self.experiments) File "/home/pm14ip011/MontePy_Workspace/code/montepython/data.py", line 460, in initialise_likelihoods elem, elem, folder, elem) File "", line 1, in File "/home/pm14ip011/MontePy_Workspace/code/montepython/likelihood_class.py", line 863, in init self.clik = clik.clik(self.path_clik) AttributeError: 'Planck_highl' object has no attribute 'path_clik'

dchooper commented 6 years ago

Hi Purba, This sounds like a problem with the Planck2015 installation. A few things to check:

The Planck likelihood can be tricky to install, I would suggest doing a fresh install using the instructions in issue #68. Let us know if the error is still there after this. Deanna

hastikh commented 6 years ago

Dear Sir

I have also the same problem that I can not run Montepython using Planck likelihood. Actually my installation was successful but there is also this error. I would be thankful if you help me to solve it.

I also modified the path in default.conf of montepython as:

root = '/Users/hastikhoraminezhad'

path['cosmo'] = root+'/class' path['clik'] = root+'/planck/plc-2.0'

The configuration and installation of Planck likelihood was successful I also sourced the binaries after installation and also before running the code as:

source /Users/hastikhoraminezhad/planck/plc-2.0/bin/clik_profile.sh

and I am running:

$ python montepython/MontePython.py run -p base2015.param -o planck-result/ -N 10000

And the error is this:

Running Monte Python v2.2.2

with CLASS v2.6.3

Testing likelihoods for: -> Planck_highl, Planck_lowl, Planck_lensing

Cannot use clik wrapper (cause = 'No module named lkl') Cannot use clik_lensing wrapper (cause = 'No module named lkl_lensing') Traceback (most recent call last): File "montepython/MontePython.py", line 40, in sys.exit(run()) File "/Users/hastikhoraminezhad/montepython_public/montepython/run.py", line 31, in run custom_command) File "/Users/hastikhoraminezhad/montepython_public/montepython/run.py", line 188, in safe_initialisation cosmo, data, command_line, success = initialise(custom_command) File "/Users/hastikhoraminezhad/montepython_public/montepython/initialise.py", line 66, in initialise data = Data(command_line, path) File "/Users/hastikhoraminezhad/montepython_public/montepython/data.py", line 340, in init self.initialise_likelihoods(self.experiments) File "/Users/hastikhoraminezhad/montepython_public/montepython/data.py", line 460, in initialise_likelihoods elem, elem, folder, elem) File "", line 1, in File "/Users/hastikhoraminezhad/montepython_public/montepython/likelihood_class.py", line 861, in init "and try again.") montepython.io_mp.MissingLibraryError:

Missing Library Error: /|\ You must first activate the binaries from the Clik distribution. Please /o\ run : ]$ source /path/to/clik/bin/clik_profile.sh and try again.

Would you please help me with it? Thanks in advance Hasti

ivandebono commented 6 years ago

Try commenting this line: path['clik'] = root+'/planck/plc-2.0'

Run Montepython (it will give you an error, as expected), then uncomment and run again. It worked for me.

purba13194 commented 6 years ago

Thank You!

Will try this out and let you know.

Regards, Purba

On Mon, Oct 22, 2018, 9:24 PM Ivan Debono notifications@github.com wrote:

Try commenting this line: path['clik'] = root+'/planck/plc-2.0'

Run Montepython (it will give you an error, as expected), then uncomment and run again. It worked for me.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/baudren/montepython_public/issues/94#issuecomment-431876720, or mute the thread https://github.com/notifications/unsubscribe-auth/AjCK5BT6yqd3wWETuzPY5T1pATJxqe2eks5uneosgaJpZM4NfKwt .

Amelkeddachi commented 5 years ago

hi am trying to run montepython using PLANCK 2015 data. may problème is Waf: The wscript in '/home/amel/Desktop/plc-2.0' is unreadable Waf:: command not found

MarisolJC commented 4 years ago

Dear Sir

I have also the same problem that I can not run Montepython using Planck likelihood. Actually my installation was successful but there is also this error. I would be thankful if you help me to solve it.

I also modified the path in default.conf of montepython as:

root = '/Users/hastikhoraminezhad'

path['cosmo'] = root+'/class' path['clik'] = root+'/planck/plc-2.0'

The configuration and installation of Planck likelihood was successful I also sourced the binaries after installation and also before running the code as:

source /Users/hastikhoraminezhad/planck/plc-2.0/bin/clik_profile.sh

and I am running:

$ python montepython/MontePython.py run -p base2015.param -o planck-result/ -N 10000

And the error is this:

Running Monte Python v2.2.2

with CLASS v2.6.3

Testing likelihoods for: -> Planck_highl, Planck_lowl, Planck_lensing

Cannot use clik wrapper (cause = 'No module named lkl') Cannot use clik_lensing wrapper (cause = 'No module named lkl_lensing') Traceback (most recent call last): File "montepython/MontePython.py", line 40, in sys.exit(run()) File "/Users/hastikhoraminezhad/montepython_public/montepython/run.py", line 31, in run custom_command) File "/Users/hastikhoraminezhad/montepython_public/montepython/run.py", line 188, in safe_initialisation cosmo, data, command_line, success = initialise(custom_command) File "/Users/hastikhoraminezhad/montepython_public/montepython/initialise.py", line 66, in initialise data = Data(command_line, path) File "/Users/hastikhoraminezhad/montepython_public/montepython/data.py", line 340, in init self.initialise_likelihoods(self.experiments) File "/Users/hastikhoraminezhad/montepython_public/montepython/data.py", line 460, in initialise_likelihoods elem, elem, folder, elem) File "", line 1, in File "/Users/hastikhoraminezhad/montepython_public/montepython/likelihood_class.py", line 861, in init "and try again.") montepython.io_mp.MissingLibraryError:

Missing Library Error: /|\ You must first activate the binaries from the Clik distribution. Please /o\ run : ]$ source /path/to/clik/bin/clik_profile.sh and try again.

Would you please help me with it? Thanks in advance Hasti

Hi! Did you solve the problem? I'm having the same problem now...

aaronvincent commented 4 years ago

In case this helps anyone stuck with the problem above: in my case it turned out that astropy was needed but not properly installed. You can try import clik in a python shell to see any errors returned by python but not reported by MontePython.

ivandebono commented 4 years ago

I get the astropy error, but Montepython still runs.

aaronvincent commented 4 years ago

You need either astropy or pyFITS. Having neither of those can cause the issue reported above.