Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

Printing Constant from mkl library

$
0
0

Hi. 

I am trying to compile the following program (test.c) to find value of a constant in the mkl 10.0.4.023.

#include<stdio.h>
#include "mkl.h"
main()
{
	int a = SPARSE_INDEX_BASE_ZERO;
	printf("%d", a);

}

with the following commands:

source compilervars.sh intel64

icc test.c -DMKL_ILP64 -I${MKLROOT}/include  -L${MKLROOT}/lib/mic -lmkl_intel_ilp64 -lmkl_core -l    mkl_sequential -lpthread -lm -ldl

The message that I get is:

 

-bash: MKLROOT: command not found
-bash: MKLROOT: command not found
find_constant.c(7): error: identifier "SPARSE_INDEX_BASE_ZERO" is undefined
      int a = SPARSE_INDEX_BASE_ZERO;
              ^

compilation aborted for find_constant.c (code 2)

Is the program that I write correct?

If not, how to find out the value of the constants used in mkl?

 

Thank you.

 


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>