FS#75274 - [lhapdf] Segmentation fault when using the python interface of LHAPDF.
Attached to Project:
Community Packages
Opened by JumaX9 (jumax9) - Friday, 08 July 2022, 16:40 GMT
Last edited by Konstantin Gizdov (kgizdov) - Friday, 19 August 2022, 11:51 GMT
Opened by JumaX9 (jumax9) - Friday, 08 July 2022, 16:40 GMT
Last edited by Konstantin Gizdov (kgizdov) - Friday, 19 August 2022, 11:51 GMT
|
Details
Description:
When trying to get an array of results from LHAPDF I'm getting a segmentation fault. I've installed the package (version 6.5.1) from source and it works as expected (snippet to reproduce the error below) so it must (I guess?) be a problem of the arch package. I've reverted back to 6.4 and it works as expected as well. Additional info: version: 6.5.1 * link to upstream bug report, if any Steps to reproduce: Python example that reproduces the error: ``` from lhapdf import mkPDF import numpy as np xarr = np.arange(0, 50)/50 qarr = np.ones_like(xarr)*1.65 aa = mkPDF("NNPDF40_nnlo_as_01180") aa.xfxQ([21, 5, 4], xarr, qarr) ``` which should return an array of 50 values. and the error: /usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = double; _Alloc = std::allocator<double>; const_reference = const double&; size_type = long unsigned int]: Assertion '__n < this->size()' failed. |
This task depends upon
Closed by Konstantin Gizdov (kgizdov)
Friday, 19 August 2022, 11:51 GMT
Reason for closing: Fixed
Additional comments about closing: lhapdf 6.5.2-3
Friday, 19 August 2022, 11:51 GMT
Reason for closing: Fixed
Additional comments about closing: lhapdf 6.5.2-3
import lhapdf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/lhapdf/__init__.py", line 1, in <module>
from .lhapdf import *
ModuleNotFoundError: No module named 'lhapdf.lhapdf'
(but this might be an upstream problem?)
lhapdf 6.5.2-3 no longer has the problem.