简体   繁体   中英

Compiling Fortran using Ifort for Linux under Windows

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

The Code, mostly compiled to DLL, is tested in Windows and is deployd approx. 25% of the time to Windows (2000 up to 7) and 75% to Suse Linux. While the Windows solution is completly handeld 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 decissons out of our control we will change from NAG to gfortran. After some test 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 VS 2010)?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM