GithubHelp home page GithubHelp logo

Comments (7)

brinckmann avatar brinckmann commented on August 14, 2024 1

Glad you got it to work! MontePython doesn't hard code the path, but if you have more than one compiled version of class it might be taking the path of your most recently compiled class version, so another option might have been to recompile the version of class you wanted to use. On some systems it's a problem where it doesn't take the version from default.conf and instead takes the most recently compiled class version. I find it likely this was one of those issues.
Best,
Thejs

from montepython_public.

Kshitizpandey123 avatar Kshitizpandey123 commented on August 14, 2024

I am worried specifically about this line:
=>thermodynamics_helium_from_bbn(L:545) :could not open fA with name /home/kshitiz/class/external/bbn/sBBN_2017.dat and mode "r"
pls suggest how to deal with it

from montepython_public.

brinckmann avatar brinckmann commented on August 14, 2024

Hi,

Depending on your class version the BBN files have two different locations that you should specify through your input param file.

For newer class versions you need e.g.:
data.cosmo_arguments['sBBN file'] = data.path['cosmo']+'/external/bbn/sBBN_2017.dat '

For older class versions you need (if I remember correctly) e.g.:
data.cosmo_arguments['sBBN file'] = data.path['cosmo']+'/bbn/sBBN_2017.dat '

Or change the path to whatever the correct path is if these don't work. Look in your class directory to find the BBN files. For newer CLASS versions you find them in your_class/external/bbn/ and for older CLASS versions I think it was your_class/bbn/ . Note there are three different BBN files to choose from.

Best,
Thejs

from montepython_public.

Kshitizpandey123 avatar Kshitizpandey123 commented on August 14, 2024

Grateful for your quick reply.

I had created a default.conf file with these lines in them:
path['cosmo'] = '/home/kshitiz/class_public-3.2.3'
path['clik'] = '/home/kshitiz/montepython_public/code/plc_3.0/plc-3.01'

And as you said, in the example.param file, I added following line:
data.cosmo_arguments['sBBN file'] = data.path['cosmo']+'/external/bbn/sBBN_2017.dat'
(since I am using version 3.2.3)

But now it generates the following error msg, something about HyRec2020:

**** ERROR HAS OCCURRED in HYREC-2 ****
in allocate_and_read_atomic: could not open file /home/kshitiz/class/external/HyRec2020/Alpha_inf.dat
in allocate_and_read_fit: could not open file /home/kshitiz/class/external/HyRec2020/fit_swift.dat

10 1e+30 2.270224e+00 1.116459e-01 9.631547e-01 2.394928e+00 7.063477e-01 8.449914e-02 0.000000e+00 0.000000e+00

from montepython_public.

Kshitizpandey123 avatar Kshitizpandey123 commented on August 14, 2024

Here is the full message, if this helps:
Error in Class: thermodynamics_init(L:372) :error in thermodynamics_workspace_init(ppr,pba,pth,ptw);
=>thermodynamics_workspace_init(L:857) :error in thermodynamics_hyrec_init(ppr,pba,pth,ptw->SIunit_nH0,pba->T_cmb,ptw->fHe, ptw->ptdw->ap_z_limits[ptw->ptdw->index_ap_brec],ptw->ptdw->phyrec);
=>thermodynamics_hyrec_init(L:46) :error in hyrec_allocate;
=>
**** ERROR HAS OCCURRED in HYREC-2 ****
in allocate_and_read_atomic: could not open file /home/kshitiz/class/external/HyRec2020/Alpha_inf.dat
in allocate_and_read_fit: could not open file /home/kshitiz/class/external/HyRec2020/fit_swift.dat

from montepython_public.

brinckmann avatar brinckmann commented on August 14, 2024

Something seems to be going wrong with your paths, you will notice the former paths point to
path['cosmo'] = '/home/kshitiz/class_public-3.2.3'
while the errors point to
/home/kshitiz/class/
I can't be sure how this is happening, but this appears to be your problem. Are you making sure to create a new chains directory after making changes to your default.conf or your input param file? Otherwise the code will use your old settings if you're rerunning in the same chains directory. This is my best guess for what is going wrong.

Best,
Thejs

from montepython_public.

Kshitizpandey123 avatar Kshitizpandey123 commented on August 14, 2024

My CLASS main folder's name was "class_public-3.2.3", but it looks like there is some default / hard-coded path within the code itslef that only recognizes "class" as the main folder's name. I changed the name of my folder to "class" and it works now!
Thank you so much, wouldn't have been possible to identify this without your intervention!

from montepython_public.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.