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

getting error mkl_types.h: No such file or directory;

prash_r_
Beginner
3,167 Views

hi,

i'm a biginner of intel mkl as I tried to comile .c file with gcc i fot the error  mkl_types.h: No such file or directory even though i have that file.

can u please suggest me the reason.

thanku in advans

best regards

prash

0 Kudos
1 Solution
mecej4
Honored Contributor III
3,167 Views

To understand the error messages shown in #5, we need to see the contents of file cspblas_dcsr.c. Likewise, in order to investigate the linker error we need to know the linking command used.

Have you followed the suggestions given earlier in this thread?

View solution in original post

0 Kudos
5 Replies
prash_r_
Beginner
3,167 Views

hi ,

and even i'm unable to modify tha example codes givin in /opt/intel/composer_xe_2013_sp1.0.080/mkl/examples/spblasc/source to include a file operation in it.

thank u.

best regrads

prash r

0 Kudos
mecej4
Honored Contributor III
3,167 Views

GCC and MKL come from different vendors, and you need to follow the standard conventions of Unix/Linux in order to use them together. You need to specify (i) (using the -I option) the directory containing the MKL header files, (ii) (using the -L option) the directory containing the MKL libraries, and (iii) (using the -l options) the specific MKL libraries to link. A convenient tool to help you with these options is the MKL Link Line Advisor, available at https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ .

0 Kudos
Chao_Y_Intel
Moderator
3,167 Views
Prash, You need to copy the example code /opt/intel/composer_xe_2013_sp1.0.080/mkl/examples/spblasc/source to your directory to edit. For security consideration, the original file can not be changed. For the compiling error, You needs to add the include path for that file: /opt/intel/composer_xe_2013_sp1/mkl/include/ thanks, Chao
0 Kudos
prash_r_
Beginner
3,167 Views

hi.,

thanks for your respons mecej4 and Chao Y (Intel).

even I tried both the methods the same error is still existing. i guess the error may be  I have set some path variables.

and I also tried with includeing the path in program

#include " /opt/intel/composer_xe_2013_sp1.0.080/mkl/include/mkl_types.h"

and i got an error:

cspblas_dcsr.c: In function ‘main’:
cspblas_dcsr.c:191:9: warning: excess elements in array initializer [enabled by default]
cspblas_dcsr.c:191:9: warning: (near initialization for ‘values’) [enabled by default]
cspblas_dcsr.c:192:2: warning: excess elements in array initializer [enabled by default]
cspblas_dcsr.c:192:2: warning: (near initialization for ‘columns’) [enabled by default]
cspblas_dcsr.c:193:2: warning: excess elements in array initializer [enabled by default]
cspblas_dcsr.c:193:2: warning: (near initialization for ‘rowIndex’) [enabled by default]
cspblas_dcsr.c:207:3: warning: excess elements in array initializer [enabled by default]
cspblas_dcsr.c:207:3: warning: (near initialization for ‘sol’) [enabled by default]
/tmp/cciaC0RA.o: In function `main':
cspblas_dcsr.c:(.text+0x252): undefined reference to `mkl_cspblas_dcsrgemv'
collect2: error: ld returned 1 exit status

so plz help to sort out of this error. and other suggestions are welcomed.

thank u in advans

 

0 Kudos
mecej4
Honored Contributor III
3,168 Views

To understand the error messages shown in #5, we need to see the contents of file cspblas_dcsr.c. Likewise, in order to investigate the linker error we need to know the linking command used.

Have you followed the suggestions given earlier in this thread?

0 Kudos
Reply