- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After a long break from using ifort, I just upgraded to version 10.1.007 for Mac OSX running Leopard. To see if it works, I tried it on my simple test program:
do i=1,10**9
x=i
s=s+sin(x)
end do
print*, s
end
I found it takes the same amount of time to run with the -parallel switch as without (approx 13 sec) on my Core 2 Duo Mac. I vaguely recall that under Tiger, and ifort version 9.something, it ran twice as fast with -parallel. So, is -parallel broken in 10.1.007, or is it my memory that's broken?
do i=1,10**9
x=i
s=s+sin(x)
end do
print*, s
end
I found it takes the same amount of time to run with the -parallel switch as without (approx 13 sec) on my Core 2 Duo Mac. I vaguely recall that under Tiger, and ifort version 9.something, it ran twice as fast with -parallel. So, is -parallel broken in 10.1.007, or is it my memory that's broken?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-parallel doesn't thread a single level vectorizable loop, unless -par-threshold is set to make it more aggressive. One might argue that it should do so by default for loops longer than 20000 or so, in simpler cases than yours. Optimizing out your x=i step could be more valuable than threading:
x=1 !double precision needed to alleviate numerical problems
do....
..
x=x+1
enddo
With the combination of sum reduction, svml function calls and poorly optimized serial code, setting a suitable threshold would be difficult. If you think its threshold settings are "broken" for your real applications, submit an issue with evidence on premier.intel.com. If the compiler could make value judgements, it would ridicule this example for its numerical ineptitude.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just rebooted, and find that -parallel now works! It indeed almost halves the CPU time for the above program on my 2-processor iMac. So I learnt something: reboot before blaming the software.....
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