Infinite loop in compilation at -O3 in gfortran
Bug #1998203 reported by
Zachary Marshall
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MadGraph5_aMC@NLO |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi authors,
Running:
import model HC_NLO_
generate p p > x0 t b~ j $$ w+ w- [QCD] @0
add process p p > x0 t~ b j $$ w+ w- [QCD] @1
generates fortran code like that in the attached tarball in the latest MG5_aMC version. When this is compiled with -O3 in gfortran 11, we encounter what appears to be an infinite loop in compilation (at least the compilation of this file runs for more than a day). -O2 works just fine, and older versions of gfortran seem to work fine.
We'd be very happy to have your advice on how to proceed here.
Thanks to Nello Bruscino for the original report and Jan Kretzschmar for the code extraction.
Thanks,
Zach
Changed in mg5amcnlo: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
One of our super-experts (Scott Snyder) sent the following along:
The problem comes from UPDATE_WL_6_0 and similar, where we have 210 lines
inside a triply-nested loop like:
This seems to trigger ~ O(N^3) behavior in the loop
induction variable / strength reduction optimization.
I can avoid the bad behavior if i break up the inner loop by adding
enddo
DO K=1,IN_SIZE
about every 50 lines.
Perhaps this could be suggested to the authors; it looks like it should wl_updater( ) in q_polynomial.py.
be an easy change in write_expanded_
I reproduced this with gcc12. However, i'm just starting today to look
at gcc13. If the issue's still there, i'll look into reporting
it to the gcc folks.