Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

OMP Error#13

Hi

I am working on Visual Studio 2008(C++) on Windows XP environment.

My release build exe gives following error at random i.e. one out of every 4-5 times when I start the application. Haven't seen it once the applications starts normally.

OMP: Error #13: Assertion failure at z_Windows_NT_util.c(426)

OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Fatser response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.

I originally linked with libiomp5md.dll only and had not included libiom5md.lib in linker dependency.

However, after seeing the other thread on same topic, I have added libiomp5md.lib in linker dependency. Also, excluded vcomp90.lib specifically. Still, the issue remains.

My application has lot of dlls which are compiled using visual c++ compiler, however, the dll which uses omp and the application exe are compiled using intel compiler only.

Please help. Let me know if anymore info is required.

0 Kudos
10 Replies
Highlighted
Moderator
9 Views

0 Kudos
Highlighted
Beginner
9 Views

Yes, I saw this thread earlier but I am compiling with Qopenmp option in visual studio. Still I get this error.

0 Kudos
Highlighted
Beginner
9 Views

Do we need to make sure that all the projects and dlls that an app uses are compiled with Qopenmp or is it enough to justuse it in dll which actually makes use of omp parallelism.
0 Kudos
Highlighted
Black Belt
9 Views

The purpose of compiling everything with /Qopenmp set is to assure that all functions which may become active in a parallel region are built compatible with recursivity. For Fortran functions, the same may be achieved by declaring them recursive. In principle, no such problem (local arrays defaulting to static) should occur with C or C++ functions.
0 Kudos
Highlighted
Moderator
9 Views

is it possible to attach the buildlog.htm? Use private if prefered.

Thanks,
Jennifer
0 Kudos
Highlighted
Beginner
9 Views

I think probably, I found the cause. My application installer already included libguide40.dll and during some version upgrade of intel compiler, it showed runtime error for not finding libiomp5md.dll and I included that also. Now recentlywe switched to11.x version and also enabled omp pragma.

Have removed libguide40.dll and couldn't see this error again. Could someone confirm if this diagnosis has some chance of being correct?

However, shouldn't runtime system behave consistently if both dlls are present?
0 Kudos
Highlighted
Black Belt
9 Views

If I understand what you're saying, yes, you must avoid any situation where you link against more than one OpenMP library. It won't work when you have both libguide40 and a version of libiomp5 linked in, or if the wrong one comes earlier on your PATH. These dlls implement many of the same function calls in incompatible ways.
0 Kudos
Highlighted
Beginner
9 Views

Well, I removed libguide40.dll. However, one third party dll we are using is using IPP and links to libguide40.dll. That makes the app not start on any machine which doesn't have libguide40.dll. So, I am back to square one. I included libguide40.dll again and I again see this error in my application.

I have no control over the third party dll so is there a way to link both the dlls and still not get this error? Is KMP_DUPLICATE_LIB_OK = true a way to resolve this? However, I also read this has side effects and not recommended one.

Is setting /Qopenmp-lib:legacy workable? I tried to set the same instead of /Qopenmp in VS2008 but it doesn't allow stating incorrect syntax. Where should I set this?
0 Kudos
Highlighted
Black Belt
9 Views

libiomp5 should support all function calls compatibly with libguide40, although I think at one time some functions were shifted between libguide and libimf. If you can link by setting /link /nodefaultlib:libguide40.lib and linking all against libiomp5, that should be better than attempting to link against both.
The openmp-lib:legacy option was discontinued some time ago, although I suppose it was meant for situations such as you describe.
0 Kudos
Highlighted
Beginner
9 Views

I put /Qopenmp-lib:legacy in linker command line options. During compilation I get this warning

xilib: warning #10006: ignoring unknown option '/Qopenmp-lib:legacy'

After I install the package with only libguide40.dll, the app doesn't start with the error that libiomp5md.dll is required.

What's the clean way of compiling with 11.x compiler and still link with libguide40.dll?
0 Kudos