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

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

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

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

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/ .

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

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

 

Best Reply

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?

Leave a Comment

Please sign in to add a comment. Not a member? Join today