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

/libs:static and libiomp5md.dll

onkelhotte
New Contributor II
1,519 Views
Hi there,

i have set the compiler option /libs:static so I dont have to distribute the Fortran dlls along with my executable.

Now a customer reported me, that the libiomp5md.dll is missing, copying that file into his executable directory solved the problem.

Is it possible to integrate the libiomp5md.dll inmy executable from the start?

Thanks in advance,
Markus
0 Kudos
5 Replies
TimP
Honored Contributor III
1,519 Views
Quoting - onkelhotte
i have set the compiler option /libs:static so I dont have to distribute the Fortran dlls along with my executable.

Now a customer reported me, that the libiomp5md.dll is missing, copying that file into his executable directory solved the problem.
Check the documentation matching your compiler version. The most recent compilers have the separate command flag /Qopenmp-link:static so as to control the OpenMP library separately. I suppose this might help avoid unintentional creation of applications with conflicting static run-time components linked in at various stages.
I hope this doesn't signal a return to the Itanium fiasco, where vendors wanted to supply their own OpenMP run-time, but customers had policies against OS installation upgrades, so it was impossible to run updated applications (except by using the static link option).
0 Kudos
Steven_L_Intel1
Employee
1,519 Views
As Tim indicates, even if you use /libs:static, the OpenMP library is linked dynamically. We strongly recommend keeping it that way to avoid conflicts, but /Qopenmp-link:static is available if you insist.
0 Kudos
onkelhotte
New Contributor II
1,519 Views
As Tim indicates, even if you use /libs:static, the OpenMP library is linked dynamically. We strongly recommend keeping it that way to avoid conflicts, but /Qopenmp-link:static is available if you insist.

Im a little bit confused...

So, when I static link the OpenMP Library and the customer already has an OpenMP library or system, my program wont work on that machine?

Markus
0 Kudos
Steven_L_Intel1
Employee
1,519 Views
If your application is self-contained and doesn't reference other non-system DLLs, it should be ok to link to the static library. What you want to avoid is having two or more copies of OpenMP libraries in the application address space.
0 Kudos
onkelhotte
New Contributor II
1,519 Views
If your application is self-contained and doesn't reference other non-system DLLs, it should be ok to link to the static library. What you want to avoid is having two or more copies of OpenMP libraries in the application address space.

This is not the case, so static linking is okay for me.

Markus
0 Kudos
Reply