Dummies guide for migrating to 64-bit?

Dummies guide for migrating to 64-bit?

Does anyone have a roadmap to help migrate existing 32-bit applications (both exe and dll's) to 64-bit?

What do I need to know?

What are the traps?

Until now, I have managed to avoid this, but one of my clients is using 64-bit MS Office, and cannot load my 32-bit DLL's, so I think I need to start migrating to 64-bit.

Thanks,

David

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I am in the midst of this process myself.  

The biggest issue I've had so far are with pointers - for both inter-language binding and intra-language as well.

For instance, with callbacks which pass the address of the function, we use

INTEGER(LEN_ADDRESS), INTENT (IN ) :: iCallback

where LEN_ADDRESS is defined as

INTEGER, PARAMETER :: LEN_ADDRESS = INT_PTR_KIND()

Other than that, I don't think I've had to change any code.

Hope this is a start at least! :)

Cheers,

Jim

The biggest change for us was the procedure decorations, for example

      subroutine set_buckle_results_strings(index, str)

	!DEC$ ATTRIBUTES DLLEXPORT::SET_BUCKLE_RESULTS_STRINGS

	#ifdef _M_X64

	!DEC$ ATTRIBUTES ALIAS:'SET_BUCKLE_RESULTS_STRINGS'::SET_BUCKLE_RESULTS_STRINGS

	#else

	!DEC$ ATTRIBUTES ALIAS:'_SET_BUCKLE_RESULTS_STRINGS'::SET_BUCKLE_RESULTS_STRINGS

	#endif
        use iso_c_binding

	        implicit none

	        integer(c_int), value, intent(in)        :: index

	        character(kind=c_char,len=*), intent(in) :: str

You'll need this if you pass strings between C and Fortran and don't want to use bind(c) because of the consequent restrictions.

I think there is more choice with mkl as well but if you're just migrating an existing 32-bit app then you probably don't need to worry about that.

Simon

!DEC$ ATTRIBUTES ALIAS, DECORATE::

Is better as the prefix and postfix decorations performed on it that are associated with the platform and calling mechanism that is in effect so no ifdef is required.

 

Most Fortran code is relatively immune to address-size, but if you have calls to Windows APIs, or as mentioned in earlier replies, declare integers that are to hold addresses, you need to take care to use the correct integer kind and not blindly say INTEGER*4 (or even just INTEGER). Use HANDLE (from IFWINTY) or C_INTPTR_T (from ISO_C_BINDING) to get correct kinds. And yes, do use DECORATE when appropriate.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today