- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm just starting to see if I can use OpenMP to speed up some code I've been working on. Simply adding the -openmp flag results in an error though (I haven't put any openmp directives into the code yet).
I'm using iFort 10.1 and Mac OS X 10.5.3.
The error I'm getting is as follows:
Undefined symbols:
"___kmpc_begin", referenced from:
_MAIN__ in create_test.o
"___kmpc_global_thread_num", referenced from:
_MAIN__ in create_test.o
"___kmpc_end", referenced from:
_MAIN__ in create_test.o
ld: symbol(s) not found
Can anyone give me any suggestions on what's going wrong?
I'm using iFort 10.1 and Mac OS X 10.5.3.
The error I'm getting is as follows:
Undefined symbols:
"___kmpc_begin", referenced from:
_MAIN__ in create_test.o
"___kmpc_global_thread_num", referenced from:
_MAIN__ in create_test.o
"___kmpc_end", referenced from:
_MAIN__ in create_test.o
ld: symbol(s) not found
Can anyone give me any suggestions on what's going wrong?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking again, it looks like the problem's arising when the make command tries to create a library file.
It does the following:
ifort -openmp -c test3.f90 -o test3.o;
ifort -openmp -c test2.f90 -o test2.o;
ifort -openmp -c test1.f90 -o test1.o;
ifort -o test1 test1.o test2.o test3.o libfile.a;
I've tried to simplify what it does here obviously, these aren't the real filenames but the structure is the same. Its after the last line that the error lines appear. The previous ifort commands do have the following warnings though:
:4: warning: "__INTMAX_TYPE__" redefined
:11: warning: this is the location of the previous definition
:5: warning: "__UINTMAX_TYPE__" redefined
:12: warning: this is the location of the previous definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When ifort is used to link, the -openmp flag will add -lguide -lpthread to the script passed to ld. Maybe your Makefile requires -openmp to be added to the Fortran link flags. Recent versions of ifort give you the choice of libiomp5 instead of libguide, for compatibility with gcc/gfortran. Only on Windows do objects carry notations about their library dependencies.
I haven't seen that type redefinition thing, but that's a different issue.

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