joezuntz/cosmosis

Undefined symbol error with ACT DR4 likelihood

margaret-ikape opened this issue · 6 comments

Hi @joezuntz ,

I have just installed the new cosmosis version and included the ACT likelihood (which runs fine), but when I try to run the test sampler on the ACT likelihood, I get

File "/home/margaret/env/lib/python3.9/site-packages/cosmosis/runtime/module.py", line 103, in __init__
    self.library, language = self.load_library(filename)
  File "/home/margaret/env/lib/python3.9/site-packages/cosmosis/runtime/module.py", line 291, in load_library
    raise SetupError("You specified a path %s for a module. "
cosmosis.runtime.module.SetupError: You specified a path /home/margaret/cosmosis-standard-library/likelihood/actpolfull_dr4.01/actpol.so for a module. File exists, but could not be opened. Error was /home/margaret/cosmosis-standard-library/likelihood/actpolfull_dr4.01/actpol.so: undefined symbol: __cosmosis_modules_MOD_datablock_put_double

Could you please tell me what I'm doing wrong?

Thank you!

Hi @margaret-ikape ,

ACTPol isn't included with cosmosis, so I think this is a module you've installed separately?

I can see the actpolfull_dr4.01 file is publicly available, but I'm not sure what interface file you're using (i.e. the file with the setup and execute functions), or the Makefile. If you're able to share those I can have a look.

In general, though, the error you're seeing happens when flags looking something like this are missing from a Makefile:

USER_FFLAGS+=-Wl,-rpath,${PWD}
USER_LDFLAGS+=-Wl,-rpath,${PWD} -lcosmosis

best,
Joe

Thanks, @joezuntz. I added the two lines above and it works fine now.

Thanks again,

Great, glad this worked for you! If you're able to share the likelihood code interface to cosmosis so I could package it with cosmosis then that would be really great (I have a vague memory of discussing this with Renee Hlozek at one point). No worries if not, or not yet.

I'll close this issue now.
Cheers,
Joe

Hi @margaret-ikape - that's interesting, I hadn't seen this. It's more a camb question - I'm not sure if it's intended or not.