Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

simple example

joleho
Einsteiger
970Aufrufe
Hi,

I am new in Blas and Lapack and have probably a very simple question. I installed the MKL library 10 and tried to run the example from the User Guide for C++ but I got the error:

g++ -o tmp testblas2.cc -L$MKLPATH -I$MKLINCLUDE -lmkl

testblas2.cc:4: error: declaration of C function `void zdotc(complex16*, int*, complex16*, int*, complex16*, int*)' conflicts with
/opt/intel/mkl/10.0/include/mkl_blas.h:297: error: previous declaration `void zdotc(MKL_Complex16*, int*, MKL_Complex16*, int*, MKL_Complex16*, int*)' here
testblas2.cc:9: error: `main' must return `int'
testblas2.cc: In function `int main(...)':

what is wrong?

Jojo

0 Kudos
4 Antworten
TimP
Geehrter Beitragender III
970Aufrufe
You may have a more recent version of g++ than what testblas2 was written for, or the example may not be updated for consistency with MKL 10. It's better to rely entirely on the header file, and remove the conflicting declaration from the example source.
joleho
Einsteiger
970Aufrufe
Sorry, its not clear to me what to do?
May icc work for this example?
TimP
Geehrter Beitragender III
970Aufrufe
icc may not be as strict in comparing syntax as the latest g++ is, so it may work.
joleho
Einsteiger
970Aufrufe

Forall bloody beginners (like me)having the same problem:

#include "mkl_typse.h"

MKL_Complex16* a;

compile with:

g++ -o tmp testblas.cc -L$MKLPATH -I$MKLINCLUDE -lmkl -lguide -lpthread

then its fine...

Antworten