- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. I had tried IA-32. I'll add that to my notes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This bug did get fixed for 11.1. Sorry for the late notice.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page