- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have old Fortan IV (ANSI 77) code I need to compile with your lastest compiler. Is it possible, and are there special complier switch needed.
or
What is the best procedure, use a specfic converter, complete re-write... etc
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SInce this issue is related to Fortran, I'll take the liberty to move this thread to the Fortran user forum so you can get a proper response there...
thanks,
Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issues relating to compiling old code are more to do with obsolete features in the language, and, work arounds that were used at the time, which modern compilers will reject. A simple example was to pass variable size arrays as X(1), and then to access the whole array in a subroutine. Modern compilers will object to this, and you will need to pass the array as X(*).
Other areas to watch for are named COMMON Blocks and whether these have different sizes in different routines.
A summary of the issues relating to modernizing old code can be found at
http://fortranwiki.org/fortran/show/Modernizing+Old+Fortran
Regards,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issues relating to compiling old code are more to do with obsolete features in the language, and, work arounds that were used at the time, which modern compilers will reject. A simple example was to pass variable size arrays as X(1), and then to access the whole array in a subroutine. Modern compilers will object to this, and you will need to pass the array as X(*).
Other areas to watch for are named COMMON Blocks and whether these have different sizes in different routines.
You're talking about conversion of pre-f77 code and non-compliant extensions. The question was about f77 code. The notation x(*) for what is now called assumed size was standard in f77, but ifort accepts the common equivalent usage from before f77, without requiring special options.
As you hinted, the usual problems with so-called f77 code involve non-standard extensions, which would be equally troublesome with another f77 compiler.
There aren't compiler switches for all of the (very few) cases of true incompatibility between standards.
ifort attempts to deal with mis-matched common lengths, except for rejecting them under OpenMP.
Opinions vary on the merits of re-writing f77 or f66 code to take advantage of more modern syntax, but such changes should be postponed until the application is working on the new platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page