- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Balises:
- Intel® Fortran Compiler
Lien copié
5 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Interesting. I had tried IA-32. I'll add that to my notes.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
This bug did get fixed for 11.1. Sorry for the late notice.

Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable