- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
~/Desktop $ gcc -o test cblas_zgbmvx.c -Wl,-rpath=/opt/intel/mkl/10.1.3.027/lib/32 -L/opt/intel/mkl/10.1.3.027/lib/32 -lmkl_gf -liomp5 -lmkl_intel -lmkl_intel_thread -lmkl_core -lpthread -lm
/tmp/ccETbui0.o: In function `main':
cblas_zgbmvx.c:(.text+0xc9): undefined reference to `GetIntegerParameters'
cblas_zgbmvx.c:(.text+0x103): undefined reference to `GetIntegerParameters'
cblas_zgbmvx.c:(.text+0x13d): undefined reference to `GetScalarsZ'
cblas_zgbmvx.c:(.text+0x177): undefined reference to `GetCblasCharParameters'
cblas_zgbmvx.c:(.text+0x322): undefined reference to `GetVectorZ'
cblas_zgbmvx.c:(.text+0x36e): undefined reference to `GetVectorZ'
cblas_zgbmvx.c:(.text+0x3f4): undefined reference to `GetBandArrayZ'
cblas_zgbmvx.c:(.text+0x492): undefined reference to `PrintParameters'
cblas_zgbmvx.c:(.text+0x4a6): undefined reference to `PrintParameters'
cblas_zgbmvx.c:(.text+0x4d8): undefined reference to `PrintVectorZ'
cblas_zgbmvx.c:(.text+0x50a): undefined reference to `PrintVectorZ'
cblas_zgbmvx.c:(.text+0x568): undefined reference to `PrintBandArrayZ'
cblas_zgbmvx.c:(.text+0x643): undefined reference to `PrintVectorZ'
collect2: ld returned 1 exit status
what should i do ?
thx
/tmp/ccETbui0.o: In function `main':
cblas_zgbmvx.c:(.text+0xc9): undefined reference to `GetIntegerParameters'
cblas_zgbmvx.c:(.text+0x103): undefined reference to `GetIntegerParameters'
cblas_zgbmvx.c:(.text+0x13d): undefined reference to `GetScalarsZ'
cblas_zgbmvx.c:(.text+0x177): undefined reference to `GetCblasCharParameters'
cblas_zgbmvx.c:(.text+0x322): undefined reference to `GetVectorZ'
cblas_zgbmvx.c:(.text+0x36e): undefined reference to `GetVectorZ'
cblas_zgbmvx.c:(.text+0x3f4): undefined reference to `GetBandArrayZ'
cblas_zgbmvx.c:(.text+0x492): undefined reference to `PrintParameters'
cblas_zgbmvx.c:(.text+0x4a6): undefined reference to `PrintParameters'
cblas_zgbmvx.c:(.text+0x4d8): undefined reference to `PrintVectorZ'
cblas_zgbmvx.c:(.text+0x50a): undefined reference to `PrintVectorZ'
cblas_zgbmvx.c:(.text+0x568): undefined reference to `PrintBandArrayZ'
cblas_zgbmvx.c:(.text+0x643): undefined reference to `PrintVectorZ'
collect2: ld returned 1 exit status
what should i do ?
thx
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes one more source file need to be compiled - common_func.c.
The other way is to use the provided makefile in the directory examples/cblas to build and run the examples.
This command
>make so32 compiler=gnu function=cblas_zgbmv
will compile the required sources by gnu compiler, link the correct MKL libraries and run cblas_zgbmv example.
-Vladimir
The other way is to use the provided makefile in the directory examples/cblas to build and run the examples.
This command
>make so32 compiler=gnu function=cblas_zgbmv
will compile the required sources by gnu compiler, link the correct MKL libraries and run cblas_zgbmv example.
-Vladimir
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - liunsteingmail.com
~/Desktop $ gcc -o test cblas_zgbmvx.c -Wl,-rpath=/opt/intel/mkl/10.1.3.027/lib/32 -L/opt/intel/mkl/10.1.3.027/lib/32 -lmkl_gf -liomp5 -lmkl_intel -lmkl_intel_thread -lmkl_core -lpthread -lm
/tmp/ccETbui0.o: In function `main':
cblas_zgbmvx.c:(.text+0xc9): undefined reference to `GetIntegerParameters'
/tmp/ccETbui0.o: In function `main':
cblas_zgbmvx.c:(.text+0xc9): undefined reference to `GetIntegerParameters'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
I suppose libmkl_gf and libmkl_intel conflict with each other; just one of those two should be used. The link advisor on the right hand side of the forum page recommends only-lmkl_intel. Doesn't cblas also require its own library or common_func.c?
thx for the reply
i later found out that it might not be a linking error
those "functions" or "macros" that caused the problem are declared in mkl_example.h
but i dont think it's implemented anywhere since it's just examples, not part of the mkl library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes one more source file need to be compiled - common_func.c.
The other way is to use the provided makefile in the directory examples/cblas to build and run the examples.
This command
>make so32 compiler=gnu function=cblas_zgbmv
will compile the required sources by gnu compiler, link the correct MKL libraries and run cblas_zgbmv example.
-Vladimir
The other way is to use the provided makefile in the directory examples/cblas to build and run the examples.
This command
>make so32 compiler=gnu function=cblas_zgbmv
will compile the required sources by gnu compiler, link the correct MKL libraries and run cblas_zgbmv example.
-Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Lunev (Intel)
Yes one more source file need to be compiled - common_func.c.
The other way is to use the provided makefile in the directory examples/cblas to build and run the examples.
This command
>make so32 compiler=gnu function=cblas_zgbmv
will compile the required sources by gnu compiler, link the correct MKL libraries and run cblas_zgbmv example.
-Vladimir
The other way is to use the provided makefile in the directory examples/cblas to build and run the examples.
This command
>make so32 compiler=gnu function=cblas_zgbmv
will compile the required sources by gnu compiler, link the correct MKL libraries and run cblas_zgbmv example.
-Vladimir
i've tried to use make but passed the wrong arguments: make lib32 function=common_func compiler=gnu
but now it works !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK I am getting this error:
for the make file:
Dgemm_mkl:
gcc -c -o Dgemm.o cblas_dgemmx.c
gcc -L -o Dgemm Dgemm.o
I get:
[sahar@kw2227 myMKLtests]$ make
gcc -c -o Dgemm.o cblas_dgemmx.c
gcc -o Dgemm Dgemm.o
Dgemm.o: In function `main':
cblas_dgemmx.c:(.text+0xb8): undefined reference to `GetIntegerParameters'
cblas_dgemmx.c:(.text+0xed): undefined reference to `GetScalarsD'
cblas_dgemmx.c:(.text+0x129): undefined reference to `GetCblasCharParameters'
cblas_dgemmx.c:(.text+0x2cc): undefined reference to `GetArrayD'
cblas_dgemmx.c:(.text+0x31f): undefined reference to `GetArrayD'
cblas_dgemmx.c:(.text+0x36c): undefined reference to `GetArrayD'
cblas_dgemmx.c:(.text+0x3f5): undefined reference to `PrintParameters'
cblas_dgemmx.c:(.text+0x409): undefined reference to `PrintParameters'
cblas_dgemmx.c:(.text+0x44b): undefined reference to `PrintArrayD'
cblas_dgemmx.c:(.text+0x48d): undefined reference to `PrintArrayD'
cblas_dgemmx.c:(.text+0x4c9): undefined reference to `PrintArrayD'
cblas_dgemmx.c:(.text+0x527): undefined reference to `cblas_dgemm'
cblas_dgemmx.c:(.text+0x575): undefined reference to `PrintArrayD'
collect2: ld returned 1 exit status
make: *** [Dgemm_mkl] Error 1
if it wasn't a linking problem then what is it??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
these references like 'GetIntegerParameters' and others are defined into common_func.c file.

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