Closed runburg closed 2 years ago
Hi @runburg
That's a tricky one. Unless you give classy
a path
property in the input, Cobaya prefers the auto-installed one over the global one. The design idea was that most of the time users would be specifying paths to their modified versions, since they may have more than one around.
You have two options:
path
option in the theory: classy
block.Closing since it's not a bug, but please do update us here, and feel free to re-open if it feels appropriate.
Hi, I'm still struggling with this...I've tried to set the path property but I haven't figured out which path to use to make this work. I was just assuming I should point it to the path of the folder with the classy cython .so file but this is apparently not working.
Where should I be pointing cobaya to?
Try the base folder (e.g. the first level on which you have cloned the repo). Cobaya will (should) find the actual library from there (see https://github.com/CobayaSampler/cobaya/blob/1fdbb581385a959ee1f2e072db4f18149eda8694/cobaya/theories/classy/classy.py#L501). Do let me know otherwise.
Okay this worked thanks! I was trying to point to the library directly. Pointing to the base folder of the CLASS installation worked.
@runburg can you specify how you gave the path? Is it like this?
theory:
classy:
path: '/home/sreeman/class_public'
extra_args:
non linear: hmcode
nonlinear_min_k_max: 20
N_ncdm: 1
N_ur: 2.0328
Yes that looks right if class_public is your modified CLASS code.
@runburg Ok thanks. Now it looks like it is working. My error was initially I didn't give those ''
.
Hi,
So I'm trying to use a modified version of CLASS with Cobaya. I have the modified version of CLASS compiled and working with the python wrapper (I can import from a python file and set new parameters and compute cosmologies with these modified components). As far as I understand it, this version of classy has been installed globally (since I can
import classy
from my python script and get the correct version.However, when I try and use cobaya, I get
even though the output says
I'm sure this is an easy solve but any help would be much appreciated! Thanks!