why.n0t
why.n0t

Reputation: 432

Compiling Fortran using Ifort for Linux under Windows

I develop and run some Fortran Code under Windows (7, 64 bit) using Visual Studio 2010 and ifort.

The code, mostly compiled to a DLL file, is tested on Windows and is deployed approx. 25% of the time to Windows (Windows 2000 up to Windows 7) and 75% to SUSE Linux. While the Windows solution is completely handled by me, the Linux "branch" is compiled by someone other (it is 100% the same code). The Linux branch is compiled with the g95/NAG compiler.

Due to some decisions out of our control, we will change from NAG to gfortran. After some tests, we found the code compiled with gfortran (and some optimisation like -o2) to take about double the time to finish compared to Windows and ifort (no optimisation, full debug). We had a chance to compile the code under Linux and ifort and got about the speed of Windows + ifort. (NAG compiled code is somewhere in between.)

For obvious reasons, we would like to compile the code with ifort for Windows and Linux, so:

Is it possible to compile for SUSE Linux under Windows with ifort (using cmd or Visual Studio 2010)?

Upvotes: 1

Views: 1341

Answers (1)

Steve Lionel
Steve Lionel

Reputation: 7267

I'll answer for Intel - no, you can't compile for Linux in Windows (except using a VM in which case you are really running Linux, as stated above). A VM is a reasonable approach, but you'll have to buy a separate license for ifort on Linux.

Or, as I assume you have a Linux box you will test on, build there (you can SSH to it from your Windows box.) True, you won't have the Visual Studio IDE, but some of our customers use Eclipse (with the Photran plugin) or Code::Blocks with Intel Fortran.

Upvotes: 3

Related Questions