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

Openmp Static Linking

IntFortran
Beginner
3,699 Views

I use Intel Parallel Studio XE 2013 with Visual Studio Shell. I'm trying to compile fortran code with openmp with static linking. It compiles and produces executable. But the executable does not work on another computer because of missing libiomp5md.dll file. I have used  /MT /Qopenmp-link:static command line for both fortran compile and linker options but it does not generate fully static compiled executable. Is there any way to fix this problem?

 

Thanks in advcance.

0 Kudos
9 Replies
mecej4
Honored Contributor III
3,699 Views

I believe that what is stated in https://software.intel.com/en-us/articles/openmp-static-library-deprecation-in-intelr-mkl-on-microsoft-windows still applies. In other words, if you want OpenMP support, your users need the DLL.

0 Kudos
IntFortran
Beginner
3,699 Views

The program was built by using an older version of intel fortran compiler and there is no need for additional dll files. When Intel Fortran Compiler 2013 version is used for building the executable, this problem is encountered. I have searched the web for fully static executable but the solutions given did not work for me. I think i make mistake about command line.

0 Kudos
TimP
Honored Contributor III
3,699 Views
No, as mentioned above, static openmp support was withdrawn.
0 Kudos
mecej4
Honored Contributor III
3,699 Views

sonicc34 wrote:

The program was built by using an older version of intel fortran compiler and there is no need for additional dll files.

Let's be consistent: if you still have that older version, and it provided a static OpenMP library, EXEs built with that combination do not need a DLL for OpenMP support. However, I gathered that you want to use the newer compiler, and the newer compiler does not provide a static OpenMP library. Generally, using an older runtime library with a newer compiler will not work, but you can certainly try.

sonicc34 wrote:

When Intel Fortran Compiler 2013 version is used for building the executable, this problem is encountered. I have searched the web for fully static executable but the solutions given did not work for me. I think i make mistake about command line.

I do not understand this. How can you search the web for executables when the executable in question is the one built by you? Command line switches cannot help when the static library you seek is not available for the newer compiler.

0 Kudos
Steven_L_Intel1
Employee
3,699 Views

I think sonicc34 meant searching the web for a way to generate fully-static executables. As you say, that's no longer available for OpenMP applications (and never was for applications using coarrays.)

0 Kudos
IntFortran
Beginner
3,699 Views

Steve Lionel (Intel) wrote:

I think sonicc34 meant searching the web for a way to generate fully-static executables. As you say, that's no longer available for OpenMP applications (and never was for applications using coarrays.)

You are right about the web search Steve. I have found this post where you mention about static linking in your last comment.

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/291216

But /Qopenmp-link:static command line does not work.

0 Kudos
Steven_L_Intel1
Employee
3,699 Views

What does "not work" mean? What error do you get?

I'll comment that this option became unsupported a couple of releases ago, but I think the one you say you're using still had it. Please ZIP the buildlog.htm from a rebuild of your project and attach the ZIP, or show us the commands you're using including plus the output of "ifort /v".

0 Kudos
IntFortran
Beginner
3,699 Views

I just used  /Qopenmp-link:static command. I use vsersion 2013 and follwing line is written in the bıildlog:

ifort: command line remark #10148: option '/Qopenmp-link:static' not supported

I think i should include libiomp5md.dll into setup package. Thanks for your help.

0 Kudos
Steven_L_Intel1
Employee
3,699 Views

Ok - I checked the release notes and the removal of the static OpenMP libraries was in that version.

0 Kudos
Reply