- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling and linking an application, but have got problems with openmp.
My application is compiled using gcc 4.6.1, but uses some existing vendor modules, which requires libomp5. I link the modules and my own object files using
g++ -lpthread -liomp5 -L
The application was compiled successfully, but when it was executed, it aborted at the first openmp function. When I set KMP_VERSION 1, I got the following output:
Intel OMP performance library (dynamic) ver. 20080215 (C) Copyright 1997-2008 by Intel Corporation
Intel OMP library built: Feb 15 2008, 11:58:08 using Intel C++ Compiler 10.1
Intel OMP port library
Intel OMP nested library
Intel OMP alternative compiler support
Intel OMP sibling library
Intel OMP no tracefile support
Intel OMP no consistency checking support
Intel OMP INTEGER*8 dynamic dispatch support
Intel OMP INTEGER*8 dynamic scheduling support
Intel OMP Helper Thread support
Intel OMP debugger support version 1.1
Abort
I then tried to use the latest libiomp5, but still the application aborted at the same place. Could someone help me with it? Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the same with the library compiled using the latest Intel C++ Compiler 12.0 Update 6. I can see from the log that the library used in this application is compiled using Intel C++ Compiler 10.1. You can download the latest compiler from our registration center.
Thanks and Regards
Anoop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just saw that you have also tried with the latest libiomp5. Which version did you use? Also was wondering if you are encountering the same error when you execute the application compiled with icc..
Thanks and Regards
Anoop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I did try with Intel Compiler 2011.2.137. I got the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It will be great if you can share the testcase so that I can troubleshoot it here.
Regards
Anoop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the following command:
g++ -fopenmp filename.cpp -liomp5 -L
without -fopenmp, the #pragma statements will be simply neglected. AlsoFYI openmp library implies pthread library. So we need not explicitly specify that. You can use ldd command to check the contents of any dynamic library.
let me know if this works.
Regards
Anoop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ldd a.out
you should assure that you haven't linked both libiomp5 and libgomp. libgomp has improved greatly since libiomp5 was first introduced, so the most likely reason for linking with libiomp5 is to support an application which includes Intel as well as gnu OpenMP compilation, or so as to support features specific to libiomp5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do have both libiomp5 and libgomp linked. How can I avoid that? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you had any references to libgomp which aren't taken care of by current libiomp5, it might be that your gcc is too new for full compatibility with libiomp5, and I would advise filing a case on premier.intel.com demonstrating this. You can't run with more than 1 OpenMP library linked in, so I suspect that may be the cause of your problem.
On the other hand, if you link normally with libgomp, you would remove any reference to -liomp5 or libiomp5.
As I hinted, I would use libiomp5 only if you wish compatibility for objects compiled with icc -openmp (or -parallel). If you made any explicit calls to kmp_ functions, those would not be supported with libgomp.
If you use MKL threaded, you must choose either the gnu/libgomp compatible library or the libiomp5 compatible library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any idea?
thanks.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page