Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

Vectorization bug in 2018 (and probably earlier)

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
Highlighted
New Contributor I
13 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

 

0 Kudos