- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using ifort 11.0.069 on ubuntu 9.04/
I have a program where I use either fixed or allocatable arrays depending upon whether I define the array size at compile time via FPP or not.
Rightly or wrongly, I suspected that performance would be better when using fixed arrays. When compiling with -O3 optimizations this is indeed the case when there is a small performance increase with fixed array size.
However, if I add -ipo to the compiler options, both speed up, but the performance is now *much* quicker when using alloctable arrays compared to the previously quicker fixed arrays (about x2 as fast compared to using fixed arrays).
Is this normal?
I have a program where I use either fixed or allocatable arrays depending upon whether I define the array size at compile time via FPP or not.
Rightly or wrongly, I suspected that performance would be better when using fixed arrays. When compiling with -O3 optimizations this is indeed the case when there is a small performance increase with fixed array size.
However, if I add -ipo to the compiler options, both speed up, but the performance is now *much* quicker when using alloctable arrays compared to the previously quicker fixed arrays (about x2 as fast compared to using fixed arrays).
Is this normal?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If there is a performance loss with allocatable arrays, a likely reason would be that the allocations and deallocations occur too often, inside a lower level function or loop. ipo might help with that, but your result does seem surprising.
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