- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I want to convert a very large Fortran77/90 code that currently runs on Windows 32-bit XP to have it run on Windows 64-bit XP. I am using the Intel Visual Fortran compiler on both machines. My code was written to run in double precision such that my declarations have REAL*8 and COMPLEX*16 to define the real and complex variables. I have some INTEGER*8 declarations as well. The constants in the code are all defined such that they have the *.d* declaration. I am trying to make as much of the changes as I can on the 32-bit OS before I need to physically bring the modified code to another building to compile on the 64-bit OS.
Will this code compile without any modifications on the 64-bit OS? Are double precision variables on a 32-bit OS equivalent to double precision variables on a 64-bit or are they equivalent to a single precision value on 64-bit? Should I be replacing my REAL*8, COMPLEX*16, etc... declarations with say, dp=kind(0.d0), REAL(dp), COMPLEX(dp)? Are there any other pitfalls I should be looking out for when converting the code?
Thank you all very much for your help.
Sincerely,
David
I want to convert a very large Fortran77/90 code that currently runs on Windows 32-bit XP to have it run on Windows 64-bit XP. I am using the Intel Visual Fortran compiler on both machines. My code was written to run in double precision such that my declarations have REAL*8 and COMPLEX*16 to define the real and complex variables. I have some INTEGER*8 declarations as well. The constants in the code are all defined such that they have the *.d* declaration. I am trying to make as much of the changes as I can on the 32-bit OS before I need to physically bring the modified code to another building to compile on the 64-bit OS.
Will this code compile without any modifications on the 64-bit OS? Are double precision variables on a 32-bit OS equivalent to double precision variables on a 64-bit or are they equivalent to a single precision value on 64-bit? Should I be replacing my REAL*8, COMPLEX*16, etc... declarations with say, dp=kind(0.d0), REAL(dp), COMPLEX(dp)? Are there any other pitfalls I should be looking out for when converting the code?
Thank you all very much for your help.
Sincerely,
David
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nothing you have indicated here would require modification to build with 64-bit ifort. The data types are all identical, if you don't deal with addresses such as C_LOC() or Cray pointers. While use of kind notation is preferable, it doesn't affect 32- to 64-bit portability on Intel compilers. Few current 64-bit platforms (none with Intel CPUs) use 64-bit data types for default real or integer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David,
You should have very little or no conversion consequences... unless you use mixed language programming. If you are all Fortran then it will be likely you will have no problems once you have all your library and include paths worked out.
The only other minor gotcha is if your 32-bit code was using INTEGER where it should have been using a type declared value (such as a pointer INTPTR or HANDLE or DWORD, ...). If your 32-bit code works by accident rather than by design then you may have a few issues to resolve.
BTW - When I converted a ~750 file /~600,000 line application from 32-bit to 64-bit the only problems I encountered were the assumption of the size of INTEGER == size of pointer. These were clearly problems of assumptionsin the original 32-bitsouce. Once these issues were fixed the application compiles fine on either platform.
Kind of like jumping out of an airplane for the first time - "I've seen this done, but is THIS parachute going to work." The only way to answer that is to take the jump.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jimdempseyatthecove
David,
You should have very little or no conversion consequences... unless you use mixed language programming. If you are all Fortran then it will be likely you will have no problems once you have all your library and include paths worked out.
The only other minor gotcha is if your 32-bit code was using INTEGER where it should have been using a type declared value (such as a pointer INTPTR or HANDLE or DWORD, ...). If your 32-bit code works by accident rather than by design then you may have a few issues to resolve.
BTW - When I converted a ~750 file / ~600,000 line application from 32-bit to 64-bit the only problems I encountered were the assumption of the size of INTEGER == size of pointer. These were clearly problems of assumptions in the original 32-bit souce. Once these issues were fixed the application compiles fine on either platform.
Kind of like jumping out of an airplane for the first time - "I've seen this done, but is THIS parachute going to work." The only way to answer that is to take the jump.
Jim Dempsey
Sincerely,
David

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