Thanks for the reply, @jalopezg.
- I installed ROOT and Pythia8 under the conda environment in AlmaLinux 9 and the ROOT configuration is as follows:
$ conda create -n pyroot -c conda-forge python=3.11 root=6.26.10
$ conda activate pyroot
(pyroot) $ root-config --version
6.26/10
(pyroot) $ root-config --arch
linuxx8664gcc
(pyroot) $ root-config --platform
linux
(pyroot) $ root-config --python3-version
3.11.0
(pyroot) $ root-config --cc
x86_64-conda-linux-gnu-cc
(pyroot) $ root-config --cxx
x86_64-conda-linux-gnu-c++
(pyroot) $ root-config --f77
CMAKE_Fortran_COMPILER-NOTFOUND
(pyroot) $ root-config --ld
x86_64-conda-linux-gnu-c++
-
I do not agree your opinion that the problem is related to a mismatch either in the Python version of C++ standard. In my opinion, there might be some reason why the authors of Pythia8 introduce Pythia.infoPython()
instead of Pythia.info
.
-
Here is the stack trace of (Case PyRoot). [I could not attach the stack trace because I’m a new user so that I copy the contents here.]
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
Thread 2 (Thread 0x7fe537a4d640 (LWP 4833) "python"):
#0 0x00007fe55500b39a in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1 0x00007fe55500dea4 in pthread_cond_timedwait
GLIBC_2.3.2 () from /lib64/libc.so.6
#2 0x0000565179b44889 in PyCOND_TIMEDWAIT (us=<optimized out>, mut=<optimized out>, cond=0x565179ed7088 <_PyRuntime+392>) at /usr/local/src/conda/python-3.11.3/Python/condvar.h:73
#3 take_gil (tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Python/ceval_gil.h:250
#4 0x0000565179b66022 in PyEval_RestoreThread (tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Python/ceval.c:535
#5 0x0000565179ca25c2 in pysleep (timeout=<optimized out>) at /usr/local/src/conda/python-3.11.3/Modules/timemodule.c:2171
#6 time_sleep (self=<optimized out>, timeout_obj=<optimized out>) at /usr/local/src/conda/python-3.11.3/Modules/timemodule.c:383
#7 0x0000565179b7e7db in cfunction_vectorcall_O (func=0x7fe554ed7240, args=0x7fe542bd21e8, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/local/src/conda/python-3.11.3/Include/cpython/methodobject.h:52
#8 0x0000565179b76651 in _PyObject_VectorcallTstate (kwnames=<optimized out>, nargsf=<optimized out>, args=<optimized out>, callable=0x7fe554ed7240, tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92
#9 PyObject_Vectorcall (callable=0x7fe554ed7240, args=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/local/src/conda/python-3.11.3/Objects/call.c:299
#10 0x0000565179b69386 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at /usr/local/src/conda/python-3.11.3/Python/ceval.c:4773
#11 0x0000565179b8fcd3 in _PyEval_EvalFrame (throwflag=0, frame=0x7fe542bd2188, tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73
#12 _PyEval_Vector (kwnames=<optimized out>, argcount=1, args=0x7fe554e22ba8, locals=0x0, func=<optimized out>, tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438
#13 _PyFunction_Vectorcall (func=<optimized out>, stack=0x7fe554e22ba8, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/local/src/conda/python-3.11.3/Objects/call.c:393
#14 0x0000565179b6d099 in do_call_core (use_tracing=<optimized out>, kwdict=0x7fe554cb6cc0, callargs=0x7fe554e22b90, func=0x7fe554cc9440, tstate=<optimized out>) at /usr/local/src/conda/python-3.11.3/Python/ceval.c:7356
#15 _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at /usr/local/src/conda/python-3.11.3/Python/ceval.c:5380
#16 0x0000565179baf8ed in _PyEval_EvalFrame (throwflag=0, frame=0x7fe542bd2020, tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73
#17 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, func=0x7fe538700040, tstate=0x56517f154090) at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438
#18 _PyFunction_Vectorcall (kwnames=<optimized out>, nargsf=<optimized out>, stack=<optimized out>, func=0x7fe538700040) at /usr/local/src/conda/python-3.11.3/Objects/call.c:393
#19 _PyObject_VectorcallTstate (tstate=0x56517f154090, callable=0x7fe538700040, args=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92
#20 0x0000565179baf6b8 in method_vectorcall (method=<optimized out>, args=0x565179ee5530 <_PyRuntime+58928>, nargsf=<optimized out>, kwnames=0x0) at /usr/local/src/conda/python-3.11.3/Objects/classobject.c:67
#21 0x0000565179c894af in thread_run (boot_raw=0x7fe537ace250) at /usr/local/src/conda/python-3.11.3/Modules/_threadmodule.c:1092
#22 0x0000565179c54494 in pythread_wrapper (arg=<optimized out>) at /usr/local/src/conda/python-3.11.3/Python/thread_pthread.h:241
#23 0x00007fe55500e802 in start_thread () from /lib64/libc.so.6
#24 0x00007fe554fae450 in clone3 () from /lib64/libc.so.6
Thread 1 (Thread 0x7fe554f6c740 (LWP 4811) "python"):
#0 0x00007fe5550871df in wait4 () from /lib64/libc.so.6
#1 0x00007fe554fd08fb in do_system () from /lib64/libc.so.6
#2 0x00007fe554a15d6d in TUnixSystem::StackTrace() () from /home/chof/mambaforge/envs/pyroot/bin/../lib/libCore.so.6.26
#3 0x00007fe554bcbe8f in (anonymous namespace)::TExceptionHandlerImp::HandleException(int) () from /home/chof/mambaforge/envs/pyroot/bin/../lib/libcppyy_backend3_11.so.6.26
#4 0x00007fe554a12ed1 in TUnixSystem::DispatchSignals(ESignals) () from /home/chof/mambaforge/envs/pyroot/bin/../lib/libCore.so.6.26
#5 <signal handler called>
#6 0x00007fe536b12e67 in Pythia8::Info::weight(int) const () from /home/chof/mambaforge/envs/pyroot/lib/./libpythia8.so
#7 0x00007fe535c5c041 in ?? ()
#8 0x0000000000000000 in ?? ()
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum https://root.cern/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6 0x00007fe536b12e67 in Pythia8::Info::weight(int) const () from /home/chof/mambaforge/envs/pyroot/lib/./libpythia8.so
#7 0x00007fe535c5c041 in ?? ()
#8 0x0000000000000000 in ?? ()
===========================================================
Traceback (most recent call last):
File "/home/chof/test.py", line 5, in <module>
pythia.info.weight()
cppyy.ll.SegmentationViolation: double Pythia8::Info::weight(int i = 0) =>
SegmentationViolation: segfault in C++; program state was reset
Cheers, ChoF.