Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

16.0.1 ICE with -standard-semantics -QxAVX -Qopt-report

TimP
Honored Contributor III
515 Views

Correction to my previous comment on this subject.  I had been using a hidden setting of -standard-semantics for recent versions of ifort.  Now with 16.0.1 the combination of options  -standard-semantics -Qxhost -Qopt-report produces internal compiler error while processing maxloc.  If I remove opt-report it runs, but optimization of maxloc is disabled.   Setting -assume:old_maxminloc fixes the ICE and restores optimization.  I assume this makes the 0-length operand case non-conformant with f2003 but didn't test that.  Setting -arch:SSE4.1 also avoids the ICE.

0 Kudos
9 Replies
Steven_L_Intel1
Employee
515 Views

C'mon, Tim, you know the drill. Please provide a source so that we can investigate.

0 Kudos
TimP
Honored Contributor III
515 Views

$ ifort -O3 -standard-semantics -Qopenmp -QxAVX  -fpp  -Qopt-report -debug:inline-debug-info  -c loopsfv.F

All those options are needed to provoke this ICE.  Tried only with Intel64, happens with VS2013 and 2015 environments.

0 Kudos
mecej4
Honored Contributor III
515 Views

Need lcd_mod.mod or the source file to generate the module file.

0 Kudos
TimP
Honored Contributor III
515 Views

added module source

0 Kudos
Steven_L_Intel1
Employee
515 Views

Thanks - I can reproduce this and will escalate to development. Issue ID is DPD200379011.

0 Kudos
Steven_L_Intel1
Employee
515 Views

The developers tell me that this is a bug they recently fixed and that the fix will appear in Update 2.

0 Kudos
TimP
Honored Contributor III
515 Views

Good to see that it will be fixed.  It has been difficult to understand why complying with f2003 causes so much trouble.

ifort may be unrolling the inner loop excessively.  It doesn't perform as well as Intel C, which has only a single AVX2 parallel comparison in the inner loop of function s3110 (where the ifort bug appears to be).  That's only a nit pick, as ifort performs much better on this case than any non-Intel compiler I've been able to test.

The unrolling in this case doesn't appear to be affected by /Qunroll or unroll directive.

VTune doesn't seem to show excessive remainder loop time.

0 Kudos
Steven_L_Intel1
Employee
515 Views

It's not "complying with F2003", but the 2003-compatible operations exposed a bug in the optimizer.

0 Kudos
TimP
Honored Contributor III
515 Views

16.0.2 seems to support full optimization without old_maxminloc.

0 Kudos
Reply