- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am converting some Fortran77 codes into Fortran90. I want to make it faster by taking advantage of the features in Fotran90 - 'forall' and 'where' for array operations and intrinsic function - 'dot_product' for vector multiplication. But when I used program profile software to analyze the program, I got slower result for these changes, especially the dot_product function.
Does anybody know if there are advantages in Fortran90 which can be utilized to upgrade Fortran77 code? Thanks.
ccflian
Does anybody know if there are advantages in Fortran90 which can be utilized to upgrade Fortran77 code? Thanks.
ccflian
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't bother. The constructs you refer to don't make the code faster - as you find, they can slow it down. Use these features if they make sense in your new coding, but leave your old code alone.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The question is about f90 in general, not even about any particular Intel compiler. Even if I consider that it may have been intended to refer to Intel compilers, I can't place the response.
With efl/efc, I don't see any good alternative which performs as well as dot_product() and matmul() in many applications. CVF6.6 does an excellent job with matmul() and reshape() in certain contexts. ifl/ifc are improving.
Many compilers for non-IA architectures perform well with reasonable use of current syntax. I don't fully understand the recommendation to avoid it.
With efl/efc, I don't see any good alternative which performs as well as dot_product() and matmul() in many applications. CVF6.6 does an excellent job with matmul() and reshape() in certain contexts. ifl/ifc are improving.
Many compilers for non-IA architectures perform well with reasonable use of current syntax. I don't fully understand the recommendation to avoid it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't say that one should avoid the new features, but rather than one should not devote any energy to "converting" old, but working, code to F90. Sure, there are nice intrinsics such as MATMUL, but if you've already got a MATMUL coded in your application, there's rarely an advantage to recoding.
What I tend to see in my experience is that programmers familiar with F77 but not with F90 do these conversions in ways that often slow down the code and introduce errors. It's also a waste of effort - one of the major principles of Fortran is that as the language evolves, your old programs continue to work unchanged.
What I tend to see in my experience is that programmers familiar with F77 but not with F90 do these conversions in ways that often slow down the code and introduce errors. It's also a waste of effort - one of the major principles of Fortran is that as the language evolves, your old programs continue to work unchanged.
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