"Fatal python error" when using NP flag in SMEFTatNLO model

Asked by matteo maltoni on 2021-04-07

Dear MadGraph experts,

I tried to generate different processes at leading order, with both versions 2.8.2 and 3.0.4, using a restriction of the SMEFTatNLO model, but every time I specify a NP coupling value (like NP^2==2), I get the error reported at the end of this message. I did the same before, but it's the first time this error occurs to me.

Do you have any hint about what could be wrong?

This is my PYTHONPATH variable:

:/home/matteo/.local/lib/python3.8/site-packages:/home/matteo/Scrivania/MG5_aMC_v2_8_2/HEPTools/lhapdf6_py3//lib/python3.8/site-packages/

and here is the error:

Generated helas calls for 7 subprocesses (699 diagrams) in 1.637 s
Wrote files for 1116 helas calls in 1.017 s
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized

Thread 0x00007f15a7262700 (most recent call first):
  File "/usr/lib/python3.8/threading.py", line 302 in wait
  File "/usr/lib/python3.8/queue.py", line 170 in get
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/madgraph/various/cluster.py", line 631 in worker
  File "/usr/lib/python3.8/threading.py", line 870 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Current thread 0x00007f15a88d9740 (most recent call first):
  File "<frozen importlib._bootstrap_external>", line 973 in get_data
  File "<frozen importlib._bootstrap_external>", line 874 in get_code
  File "<frozen importlib._bootstrap_external>", line 779 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/models/SMEFTatNLO/particles.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/models/SMEFTatNLO/__init__.py", line 3 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/models/__init__.py", line 42 in load_model
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/models/__init__.py", line 50 in load_model
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/models/__init__.py", line 50 in load_model
  File "/home/matteo/Scrivania/MG5_aMC_v2_8_2/models/__init__.py", line 50 in load_model
  ...
 Aborted (core dumped)

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2021-04-09
Last query:
2021-04-09
Last reply:
2021-04-09

since NP is not define within SMEFTatNLO (but it is in SMEFTatNLO-LO and SMEFTatNLO-NLO)
this might be the reason.

Otherwise could you be more specific on what I would need to do to reproduce the issue?

Cheers,

Olivier

Hi Olivier,

Thank you for your prompt answer.
I imported SMEFTatNLO-LO, then I tried to

generate p p > t t~ NP^2==2

(but this has happened with any other process I've tried). When I type "output", the above error occurs.
I don't know if this could be a consequence of a wrong Python setting.

Best,

Matteo

I do not reproduce the error actually.
This sounds weird that you have a threading issue for such computation since we are using a single thread for the generation of the code.

Olivier

Hi Olivier,

I found out that, after deleting the $PYTHONPATH line from my ~/.bashrc file, the error doesn't show up anymore.
Do you know if there's a way to fix this, without having to delete the $PYTHONPATH every time?

Best,

Matteo

Did you tried this as PYTHONPATH? (i.e. remove the leading ":" which is dangerous)

/home/matteo/.local/lib/python3.8/site-packages:/home/matteo/Scrivania/MG5_aMC_v2_8_2/HEPTools/lhapdf6_py3//lib/python3.8/site-packages/

Otherwise the question is when do you need such PYTHONPATH?
/home/matteo/Scrivania/MG5_aMC_v2_8_2/HEPTools/lhapdf6_py3//lib/python3.8/site-packages/
sounds for lhapdf. If removing PYTHONPATH works for you then you likely do not need that part at all
and should also test to have only
/home/matteo/.local/lib/python3.8/site-packages

if with that simple one that does not work, then the question is what module did you include inside that path that's creating such issue.

Cheers,

Olivier

Thanks Olivier Mattelaer, that solved my question.