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

ifort 12.1 /static option

mohanmuthu
New Contributor I
671 Views
Hi,

I recently got ifort 12.1.5.344 Build 20120612, and started compiling the codes (I used ifort 9.1 prior) in command prompt (IA 32).

When I use the options "/MT /traceback /warn", EXE works fine in other machine. But when I use "/Qparallel /fast" options, then it asks for additional dll. I tried adding "/static" option to it, still no change. EXE size remains same with and without /static option.

Could you please help whether I miss something?

Thanks,
Mohan
0 Kudos
1 Solution
Steven_L_Intel1
Employee
671 Views
/static on Windows doesn't mean link with the static libraries as it does on Linux.  It means allocate local variables statically.  The option you are looking for is /Qopenmp-link:static, but as Tim says it will disappear in the next release (September).

View solution in original post

0 Kudos
4 Replies
TimP
Honored Contributor III
671 Views
/Qparallel requires OpenMP library support. The library is excluded from static linking effect (even if you gave the /MT or equivalent).  If you are serious about linking that library statically, you must add that library specifically in your link step, if it exists in your installation.  It is deprecated (will disappear in the next major release).  There are several pitfalls which are hoped to be avoided by requiring the .dll; for example, if the static library is linked it must be done only in the final link step, and the dynamic library (or the conflicting Visual Studio libraries) must never be linked.
0 Kudos
Steven_L_Intel1
Employee
672 Views
/static on Windows doesn't mean link with the static libraries as it does on Linux.  It means allocate local variables statically.  The option you are looking for is /Qopenmp-link:static, but as Tim says it will disappear in the next release (September).
0 Kudos
mohanmuthu
New Contributor I
671 Views
Thank you Tim & Steve.

If I upgrade the compiler after Sep release, will it be static exe automatically as like Linux (I mean, it works stand alone without any additional files/libraries) ?

Until then, I will use /Qopenmp-link:static.
0 Kudos
Steven_L_Intel1
Employee
671 Views
No - when you update the compiler, the OpenMP library will always be dynamic and the statiic library will not be provided.
0 Kudos
Reply