I have a code which serves as a communication tool between Fortran and VB. It was originally converted from Lahey to Intel 32-bit and it doesn't run on 64-bit. Any help would be appreciated to convert it to 64-bit.
So when you converted from lahey to Intel 32bit, did you get it working properly?When you say 'it doesn't run on 64-bit' do you mean on a 64-bit operating system? Or with 64-bit Intel Fortran? And if with 64-bit Fortran, are you also using 64-bit VB? Which version of VB?
Yes, when the code is converted from Lahey to Intel 32-bit it works properly. I am working on a 32bit operating system with VB2005. My Intel Fortran is for both 32 and 64bit. Later I compile the code for 32bit and 64bit separetely without giving any errors. But the 64bit executable doesn't run on a 64bit operating system. (Note: my other codes work this way for 64 bit)
I have been told that the conversion needs more changes in order to make it work for 64bit, but I don't know what they are. And I have been advised to seek help on this forum.
Serra C. ha scritto:But the 64bit executable doesn't run on a 64bit operating system. (Note: my other codes work this way for 64 bit)
Does it run on the 64-bit system that created the program?
If so, and the problem is that it will not run on a different target 64-bit system, then that is most likely because the target system has to have the correct redistributable libraries installed on it. You need to install the visual C redistributables that match your VS 2005 as well as the Intel stuff needed for a 64-bit executable. Speaking from my own experience, I downloaded the Intel w_fcompxe_redist_msi_2011.10.325.zip and vcredist_x64.exe Visual Studio 2005 redistributables and installed them on the target system, after which my 64-bit app compiled using the VS2005-integrated Intel Composer XE 32/64 bit on a 32-bit OS ran OK on the target system. Although I have to admit, it was a pure Fortran coded program, not a VB.Net main. If the above fails to solve your problem, than perhaps you also need some VB.Net redistributables on your target system if it does not also have the same version of VB.Net installed on it?
To elaborate on this a bit - mixing VB and Fortran (or native C++) on a 64-bit system can be problematic. VB likes to run in "Any CPU" mode which often creates problems for native code that interacts with VB. I admit that I don't understand the way that Serra's program operates - it's not a DLL called from VB but a separate executable that somehow sends Windows messages to a VB program. The method in which it does this makes many assumptions about the size of a Windows "handle".
I did the initial conversion of Serra's Fortran code from Lahey syntax as a courtesy, not having seen the VB code. I noted at the time there were many dependencies on 32-bit in the code and that they'd need to be addressed if this was ever built for 64-bit. I then suggested that Serra ask here for help, as I did not understand the VB part and Intel Premier Support is not for programming consultation.
Maybe if Serra provided the VB side it might make more sense for someone.