- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Here is a program to add 1 twenty times. Answer should be 20, but ifort 10.1 with default optimization gives 74 - try it please:
real a,c
a=1.
c=0.0
do i=1,20
c=a+c
end do
write(*,*)'sum=',c
end
Switching off optimization gives the right answer. Help appreciated.
Link kopiert
5 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
What's worse, it still does that in more recent versions, but the problem goes away when diagnostics are set.
Of course, it's associated with vectorization of sum reduction.
You're certainly entitled to file a problem report.
Of course, it's associated with vectorization of sum reduction.
You're certainly entitled to file a problem report.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I can reproduce this in the latest 11.0, but the beta of 11.1 chooses not to vectorize this and gets the right answer. I will report this to the developers.
Edit: Even if vectorization is forced in 11.1 the answer is correct. I have reported this as issue DPD200111340.
Edit: Even if vectorization is forced in 11.1 the answer is correct. I have reported this as issue DPD200111340.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Quoting - Steve Lionel (Intel)
I can reproduce this in the latest 11.0, but the beta of 11.1 chooses not to vectorize this and gets the right answer. I will report this to the developers.
Edit: Even if vectorization is forced in 11.1 the answer is correct. I have reported this as issue DPD200118979.
Edit: Even if vectorization is forced in 11.1 the answer is correct. I have reported this as issue DPD200118979.
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
ifort: NOTE: The Beta evaluation period for this product ends on 28-jul-2009 UTC.
Intel Fortran 11.1-2332
bb.f90(4): (col. 1) remark: LOOP WAS VECTORIZED.
GNU ld (Linux/GNU Binutils) 2.19.50.0.1.20081007
tim@tim-t61:~/src/net> ./a.out
sum= 74.00000
Doesn't attempt vectorization if -fp-model source is set.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Interesting. I had tried IA-32. I'll add that to my notes.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
This bug did get fixed for 11.1. Sorry for the late notice.

Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite