Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26734 Discussions

Vectorization bug in 2018 (and probably earlier)

Jellby
Beginner
113 Views

I got different results with -O0 and -O2, and all boiled down to this change:

https://gitlab.com/Molcas/OpenMolcas/merge_requests/24/diffs?commit_id=b3a58a756c165811808c0fe531dbc...

i.e., compiling this file with -O0 (or with !DIR$ NOVECTOR) passes the tests, while with -O2 there are quite significant numerical differences. Rearranging the calculation of some variables as shown makes it work with -O2 too, so I guess there must be a bug in the vectorization done by the compiler.

0 Kudos
1 Reply
Janus
New Contributor I
113 Views

Yes, ifort 18 does have vectorization issues. We reported one such bug (concerning SSE 4.2) last year. It only affects version 18, versions 17 and 19 are fine AFAIK. Unfortunately we were told by Intel support that there are no plans to fix it in the 18.x release series, which is a pity. Therefore I can only recommend to stay away from ifort 18 (it also has other regressions beyond this one). If you absolutely depend on this particular version, -xSSE3 can be used as a workaround for the vectorization problem (at least that worked for us).

Cheers,

Janus

 

Reply