Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
8 Views

Problem while calling sparse matrix routines

Jump to solution
[bash]       
        double csr_values = {5,1,2,8,3,5,9,4};
        double x = {1,3,1,2};

        int csr_j = {2,3,1,3,4,3,2,3};
        int csr_i= {1,3,6,7,9};
     
        double *y = (double *) malloc(4*sizeof(double));
        int i;
        for(i=0;i<4;i++)
                y = 0.0;
        int my_size = 4;
        mkl_dcsrgemv("N", my_size, csr_values, csr_i, csr_j, x, y);[/bash]
I'm just getting started with MKL. I'm getting a segmentation fault when I execute the code
0 Kudos

Accepted Solutions
Highlighted
Black Belt
8 Views
The second argument should be &my_size. To catch such errors, use the provided prototypes.

View solution in original post

0 Kudos
1 Reply
Highlighted
Black Belt
9 Views
The second argument should be &my_size. To catch such errors, use the provided prototypes.

View solution in original post

0 Kudos