Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Single binary for both 32 and 64 OS

jinliang_w_
Beginner
172 Views

Hi there,

I have intel fortran compiler installed on my old (Windows 7, 32bit) and new (Windows 10, 64bit) laptop. The problem is, the executable produced in 32bit OS cannot run in 64bit OS, and vice versa. Is it possible to produce a single executable that runs on both 32 and 64bit OS?

The compiling options I use are

mpiifort *.f90 /fp:source /O2 /Qparallel /Qvec-threshold100 /Qip /Qinline-factor=100 /Qunroll-aggressive /Qopenmp /link /STACK:6400000

 

Any suggestions are highly appreciated!

 

0 Kudos
3 Replies
Arjen_Markus
Valued Contributor III
172 Views

A 32-bits executable ought to work on a 64-bits machine, but not vice versa. Are you sure all the libraries (DLLs) are present? Is there any message when you try to run the program?

Anthony_Richards
New Contributor I
172 Views

I believe that when transferring an app to a different machine, you have to accompany it with and install the
recommended redistributable library package applicable to the compiler version on the 32-bit machine on which the app was created.
Just consult the relevant Intel resource page, for example https://software.intel.com/en-us/articles/redistributable-libraries-of-the-intel-c-and-fortran-compi...

You have to do this even when  transferring a 64-bit app produced on one 32-bit machine (which will not actually run on that 32-bit machine) to a 64-bit machine on which it is required (which I have done on one occasion). Different redistributables apply in each case.

Anthony_Richards
New Contributor I
172 Views

I received a private message from Jinliang saying one of the above posts led him to a satisfactory solution. Just to let others know.

Reply