- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to compile the following simple C program to test mkl_ddnscsr (convert from dense matrix to sparse csr matrix). It creates a dense m x 1 matrix (a dense vector) and tries to convert it. Unfortunately the program crashes (with a segmentation fault) in my enviroment. The program is attached if someone wants to try to compile it.
#include
int main()
{
#define M 100
int m = M;
int n = 1;
double v;
double sv;
int isv[M + 1];
int jsv;
int job[6] = {0, 0, 1, 2, M, 1};
int info;
int i;for(i = 0; i < m; ++i)
v = 1.0;
mkl_ddnscsr(job, &m, &n, v, &m, sv, jsv, isv, &info);
return 0;
}
I am using Linux (Ubuntu 9.10), gcc 4.4.1 and I believe that I am getting the link options correct (I got the linking line from the link advisor). Here is the command line I use to compile:
gcc -Wall -O3 -funroll-loops -ftree-vectorize -mtune=native -march=native -I/opt/intel/mkl/10.2.2.025/include -DVERBOSE -DDEBUG -lm -o testsparseblas testsparseblas.c /opt/intel/mkl/10.2.2.025/lib/em64t/libmkl_solver_lp64_sequential.a -Wl,--start-group /opt/intel/mkl/10.2.2.025/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.2.2.025/lib/em64t/libmkl_sequential.a /opt/intel/mkl/10.2.2.025/lib/em64t/libmkl_core.a -Wl,--end-group -lpthread
Any hints?
Obs: Sorry I could not make the editor honor the indentation in the code above, but it is so simple that the lack indentation does not make it unreadable.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
please try
mkl_ddnscsr(job, &m, &n, v, &n, sv, jsv, isv, &info);
and let us know how it will work
--Gennady
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page