Cross platform application using ifort

Cross platform application using ifort


I had a question on compiling source code files into an application that can run on different platforms. I will just summarise my queries here:

  1. If I compile a fortran source file into an application using ifort on my computer - will it run on other computers with same OS on it ? (for eg. compiled on Mac OSX machine, will it run on another Mac OSX machine ?)
  2. If the above happens, then what changes do I need to make to my compilation statement ? Would I need to add/remove flags etc. ? Would I need to use advanced Make features ?
  3. How do I set up a compilation of my source code such that it can run on another OS ? Is it even possible ? 

Could any one throw some light on these issues ? any link, suggestions, comments, or pedagogic examples will be appreciated heavily


2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

I doubt there's as much variety among Mac platforms as among linux ones, but maybe I haven't understood your concerns.
What is "above happens?"
As on linux, rather than compiling with -xHost, you would choose an architecture option which works on all the machines you support (-xSSE4.1, for example), or you might investigate the dual path options. For example, -axAVX -xSSE3 would choose the code path at run time.
On linux, for running across the full range of platforms by different vendors, you may need options like -imf-arch-consistency.
The only support for other OS is where you use the 32-bit "ia32" compiler to make a build which will run on both 32- and 64-bit flavors of the same OS. You may need to install more than the minimum default run-time libraries for this.
The ifort libraries can be installed on multiple computers without needing more compiler licenses, by use of the distributable liibraries. Except for the OpenMP library, the link option -static-intel will build static library functions in so you don't need the redistributables. You may still need libraries which would be installed by including the corresponding g++ development system.
You can't make a build to run on more than one of linux, Mac, Windows, for example.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!