- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These constants are defined into header files. Pls have a look at the mkl_spblas.h as an example. How to check this value? You may find out the example - sparse_spmm.c.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found out that my mkl version was too old. After installing a newer mkl, that program compiled. Thanks for the help.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page