class_public
class_public copied to clipboard
Python wrapper including GSL functions
Dear developers,
Quick question.
I implemented a model including a few special functions in 'background.c'. I use GSL library to implement these special functions; the code works fine and gives the expected output. However, I just noticed that these special functions are not recognized by the classy. I know I should modify classy.pyx, but I am not sure what exactly I should add and where I should include my modifications.
Any ideas ?
Many thanks in advance,
Did you solve it? I encounter the same problem
My guess is that you will have to tell the python/setup.py
script to link against the gsl library. To this end you will probably have to add -lgsl
to extra-link_args
and the path to the gsl library to library_dirs
within classy_ext = Extension(......)
stating around line 40 of python/setup.py
.
- Patrick
Hi Patric, Can you just tell me how to add the path of the GSL library to the "library_dirs" of the file "python/setup.py" ??
Actually I have to use the GSL library functions in order to add a numerical integrations in the file "background.c". But after the doing the modifications, when the I run the command "from classy import Class"; it shows the following error:--
ImportError: /home/aurindam/.local/lib/python3.8/site-packages/classy.cpython-38-x86_64-linux-gnu.so: undefined symbol: gsl_integration_qags
Can you give me any suggestion such that I can overcome this error??