Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Migration to Win7

DavidWhite
Valued Contributor II
856 Views

We are currently running XP with VS2005 and latest version of Visual Fortran compiling ia32.

What should we be planning to migrate to under Win7?

What are the coding changes we need to think about to migrate to x64? Do we need to, or can we continue to produce 32-bit apps?

Currently all our variable declarations are the more traditional ones like INTEGER, REAL , REAL*8 (or REAL(KIND=8)). What should we be doing to make these easier to migrate?

thanks,


David

0 Kudos
8 Replies
TimP
Honored Contributor III
856 Views
You haven't raised any issues where a change would be indicated. Both the 32-bit binaries produced by ifort ia32 and the 64-bit binaries produced by ifort Intel64 should work well.
0 Kudos
mecej4
Honored Contributor III
856 Views
You did not say whether you will migrate to Win7-32 or Win7-64. If the former, you need to make no changes, other than getting used to the UI differences between XP and W7, the slightly altered security model and installing the W7-32 SDK in place of the XP SDK.

If you move to Win7-64, but use only the IA32 compiler, you will need to be aware that registry entries and system files will not always be in the same places in XP and W7.

If you move to Win7-64 and use the X64 compiler, you need to choose between the LP64 and ILP64 models; in LP64, integers are 32-bit, Long and Pointer are 64-bit, whereas in ILP64 integers are also 64-bit. The ABI is quite different from that of W-32; arguments are passed in registers when possible, there is no STDCALL, and the name decoration is not the same as in W-32.
0 Kudos
TimP
Honored Contributor III
856 Views
The STDCALL issue should arise only if you use that keyword explicitly in your source code. You can't mix 32-bit objects with 64-bit objects, regardless of whether the 32-bit uses STDCALL or CDECL, which has been standard for about 10 years.
X64 has far better support for 64-bit integers, and it may be feasible, as mecej4 says, to convert your application entirely to 64-bit integers (ILP64 model), but there is no need to do so if it works perfectly well with 32-bit integers.
0 Kudos
DavidWhite
Valued Contributor II
856 Views
Tim,

Further to this discussion from last year. I am about to Migrate to Win7, but can stay with x86, 32 bit executables for the time being, especially as my users will be on a mix of XP and Win7 for up to three years.

I would like to start planning for x64 executables, possibly building both versions in the interim to ensure that the eventual migration to win7 x64 is smooth.

My application is fully functional with 32 bit integers, and so I expect that I can stay with the LP64 model.

My application has developed originally from F77, with the traditional INTEGER, REAL*8, etc declares, although I am almost exclusively using INTEGER and REAL(KIND=8) with a few INTEGER(2) variables.

What is the "correct" way to change my code so that it is easiest to migrate?

Will I need conditional compiler commands for x86 and x64, or is that simply in the project settings?

Can you point me to documentation to facilitate this transition?

thanks,


David


0 Kudos
TimP
Honored Contributor III
856 Views
You should be able to make all the conversions by X64 project settings, if you have reasonably portable Fortran. I have never used the special HANDLE or pointer-sized integer types (should be in the doc which comes with ifort), but those could come in handy if you need them; they will adapt automatically when you change the project setting.
0 Kudos
anthonyrichards
New Contributor III
856 Views
..and you can find the details of all of the equivalences beteen INTEGER types such as INTEGER(HANDLE) and integer sizes such as INTEGER(4) in the IFWINTY.F90 file found in C:\Program Files\Intel\ComposerXE-2011\compiler\include. This module early on defines

integer, parameter :: POINTER_LEN = INT_PTR_KIND() ! 4 for WIN32 systems
! 8 for WIN64 systems


and uses POINTER_LEN thereafter where needed to define and extend integer lengths appropriately.
0 Kudos
Steven_L_Intel1
Employee
856 Views
David,

If your program is "straight Fortran", and doesn't call C or Win32 API routines, you very likely will need no source or option changes at all for 64-bit Win7. If changes are needed, 99% of the time you will get a compile-time or link-time error alerting you to a problem and you can ask about it here.

I saw that mecej4 mentioned an SDK install - you don't need that either. I would recommend moving to VS2010, however, as VS2005 has some limitations on Windows 7 (it works, but you have to run it with Administrator privileges. The Fortran release notes have more detail.)
0 Kudos
DavidWhite
Valued Contributor II
856 Views
I have been using RealWin to do the interfacing to the Win32 API, etc. This is now unsupported, and while I have the source code, I assume this won't work for the GUI.

In some other Apps I have been dabbling with XEffort - is that viable for x64, or am I going to need to learn more about the new Windows API functions / mixed language calls, I assume?

I have ordered VS2010, which I will install on my XP machine, which will be my development machine in the short term, but I hope to have a second Win 7 Machine soon.

Thanks

David
0 Kudos
Reply