Trouble accessing python version of LHAPDF

Asked by Jake on 2017-11-15

Hi,

I'm trying to access the python version of LHAPDF for a study of the systematic uncertainties. I have the "use_syst" flag to "True", but when launching the process I get the error

"Failed to access python version of LHAPDF: If the python interface to LHAPDF is available on your system, try adding its location to the PYTHONPATH environment variable and theLHAPDF library location to LD_LIBRARY_PATH (linux) or DYLD_LIBRARY_PATH (mac os x)."

Following the advice on other questions, I have gone to /PATH/TO/LHAPDF6/lib/python2.7/site-packages/ and run "import lhapdf" in a python shell. I get the error

"Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libLHAPDF.so: cannot open shared object file: No such file or directory"

Furthermore I have tried "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:PATH/TO/LHAPDF6/lib/libLHAPDF.so" prior to trying to import lhapdf into python, but I get the same error.

I installed lhapdf6 directly from MadGraph and am using it out of the box. Any guidance would be much appreciated.

Thanks for your time,
Jake

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2017-11-16
Last query:
2017-11-16
Last reply:
2017-11-15

Hi,

I'm not expert on this. You might have better help from the lhapdf author. (likely from Andy)
They have a mailing list for the support.

For your test with
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:PATH/TO/LHAPDF6/lib/ibLHAPDF.so

you should actually not include the name of the so file in that line, but rather use
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:PATH/TO/LHAPDF6/lib/

Cheers,

Olivier

PS: if you are on mac the SIP might prevent python to have access to the LD_LIBRARY_PATH making the use of such variable irrelevant.

Jake (hasek05-06) said : #2

Hi Olivier,

Thanks a lot! This fixed the issue with loading lhapdf into python, and thus MadGraph was able to perform systematics. To add more information in case anybody else has this issue, I'm running on Linux, not Mac.

One final question: in terms of SysCalc vs systematics, is there any advantage to one approach over the other?

Thanks again,
Jake