- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am having problems linking a FORTRAN OMP based program under Linux (Red Hat Enterprise 4).
I am linking withINTEL library libomp5.a and the system library /lib/libpthread.so.0.
The exact error that I am getting is:
/opt/intel/fc/10.1.018/lib/libiomp5.a(z_Linux_util.o)(.text+0x15ec): In function `__kmp_register_atfork':
: undefined reference to `pthread_atfork'
Does anyone know with which library(ies) should I link in order to get it right?
Thanks,
Rak
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am having problems linking a FORTRAN OMP based program under Linux (Red Hat Enterprise 4).
I am linking withINTEL library libomp5.a and the system library /lib/libpthread.so.0.
The exact error that I am getting is:
/opt/intel/fc/10.1.018/lib/libiomp5.a(z_Linux_util.o)(.text+0x15ec): In function `__kmp_register_atfork':
: undefined reference to `pthread_atfork'
Does anyone know with which library(ies) should I link in order to get it right?
Thanks,
Rak
Did you use -lpthread?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you use -lpthread?
As you are using ifort, there is no reason to be using libiomp5, unless you are using -openmp or -parallel (at least implicitly, by using a library built with OpenMP). Using the same ifort options at link specifies the OpenMP and pthread libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you use -lpthread?
Thanks for the replay. I finally found the solution. Using -lpthread alone didn't solve the problem. I had to specify -lpthread and to explicitly link with /opt/intel/fc/10.1.018.lib/libguide.a and /usr/lib/libpthread_nonshared.a.
Rak

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