- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm trying to write a C code that solve a sparse system with dss_mkl, here it follows
#include "mkl_dss.h"
#include "mkl_types.h"
#define N 3
#define N2 (N*N)
#define NNZ (N*(N+2*(N-1))+2*(N-1)*N)
static int* ri;
static int* ci;
static double* a;
int main(){
int i,j,k;
ri=malloc((N2+1)*sizeof(int));
ci=malloc((NNZ)*sizeof(int));
a=malloc(NNZ*sizeof(double));
k=0;
ri[0]=0;
for(i=0;i<N2;i++){
ri[i+1]=ri;
for(j=0;j<N2;j++){
if(j-i==-N&&i>0){a
if(j-i==-1&&i%N>0){a
if(j-i==0){a
if(j-i==1&&i%N<N-1){a
if(j-i==N&&i<N2-1){a
}
}
for(k=0;k<N2+1;k++) printf("%4d ",ri
printf("\n");
for(k=0;k<NNZ;k++) printf("%4d ",ci
printf("\n");
for(k=0;k<NNZ;k++) printf("%4.1f ",a
printf("\n");
int error;
_MKL_DSS_HANDLE_t handle;
int options=MKL_DSS_DEFAULTS;
error=dss_create(handle,options);
int n2=N2;
int nnz=NNZ;
int symmetry=MKL_DSS_NON_SYMMETRIC;
error=dss_define_structure(handle,symmetry,ri,n2,n2,ci,nnz);
int reorder_opts=MKL_DSS_DEFAULTS;
error=dss_reorder(handle,reorder_opts,0);
}
I successful compiled this with "icc -mkl poisson2d.c". When I run this I get the following error
"MKL-DSS-DSS-Error, preordering failed (matrix types 11, 13 only)"
Can anyone help me? Where I am doing a mistake?
Thank You.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page