My company MOSEK sell a software package which essential part is a dynamic link library (shared libray). In order to exploit multiple threads we use OpenMP which is fairly simple to use.
Our customers may link that library with their application programs/libraries. Hence, we have very little control over how customers employ our library. They may link it with arbitrary other libraries. For instance our program may be called
- MATLAB
- .NET
- Java
- Crashes on Linux when OpenMP is used from MATLAB.
- Strange crashes when our library is loaded on run time. It seems some finalize code is executed a the proper time when the shared libraries are off loaded.
- Link problems. When we link with version of the OpenMP support library and our customer link with another version that our customers thinks we are stupid.
- that is 100% compatible with C (not C++),
- is almost as easy to use as OpenMP,
- makes it a lot easier to debug i.e. be open source and
- give us much control over what is happening.
Below is one of those annoying issues with OpenMP illustrated. Btw upgrading to MOSEK v6 solves the issue.
ReplyDeleteCustomer quote:
After I added a reference to yet another third party library (by CenterSpace) I'm getting the following error when calling into mosek:
OMP abort: Initializing libguide40.dll, but found libiomp5mt.lib already initialized.
This may cause performance degradation and correctness issues.
Set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore
this problem and force the program to continue anyway.
Please note that the use of KMP_DUPLICATE_LIB_OK is unsupported
and using it may cause undefined behavior.
For more information, please contact Intel(R) Premier Support.
According to http://software.intel.com/en-us/articles/opm-abort-initializing-libguide40dll/ the two libraries are incompatible. CenterSpace is using the newer library (libiomp5) while mosek is using (I guess here, as I only see the mosekdotnet64.dll) libguide40.dll that is deprecated (http://www.intel.com/software/products/compilers/docs/flin/main_for/mergedprojects/optaps_for/common/optaps_par_libs.htm ).