Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
6680 Discussions

Problem while calling sparse matrix routines

jaidotsh
Beginner
135 Views
[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
1 Solution
mecej4
Black Belt
135 Views
The second argument should be &my_size. To catch such errors, use the provided prototypes.

View solution in original post

1 Reply
mecej4
Black Belt
136 Views
The second argument should be &my_size. To catch such errors, use the provided prototypes.
Reply