Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
27415 Discussions

How to compile program for Linux that was written in Windows

zpal
Beginner
417 Views

Hello!

I have a program in Fortran 90 written in Windows with MSVS (2017)+Intel Parallel Studio (2019). How can I compile it to run on Linux?

0 Kudos
3 Replies
Steve_Lionel
Black Belt Retired Employee
417 Views

If it really is a Fortran 90 program (and doesn't make use of features outside of Fortran), you would just obtain and install a Fortran compiler for Linux and use that to build the program. Intel sells Intel Parallel Studio XE Composer Edition for Fortran Linux. There is also the gfortran compiler as part of the Gnu Compiler Collection (gcc) that should work if it is close to standard Fortran 90.

Steve_Lionel
Black Belt Retired Employee
417 Views

I see in your other thread that you also use OpenMP - that is supported by most Fortran compilers on Linux.

Greg_T_
Valued Contributor I
409 Views

For a larger project with several source files, I have used Visual Studio output to list the sources files which helps create a makefile to compile the project on Linux.  A previous forum article with an example makefile may be helpful:

https://community.intel.com/t5/Intel-Fortran-Compiler/Tools-to-create-makefile-from-VS-project/m-p/1...

Regards, Greg T.

Reply