Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Duke_K
Beginner
65 Views

Segmentation fault from dcsradd

Hello. I get segmentation fault after this calling

call mkl_dcsradd('T', 1, sort, size(imat1)-1, maxval(jmat1), mat1, jmat1, imat1, bb, mat3, jmat3, imat3, Wv, jWv, iWv, size(Wv), info).

sort isn't set, bb=-1.d0. All arrays are allocatable, jWv and Wv are not allocated. Matrices mat1 and mat3 are in the attached files*. MKL version is 12.0.3. All parameters and matrices seem fine to me, and I can't figure what's it all about. Moreover, on MKL version 10.2.7 all work properly.

Can you, please, help me with some advice?


*I attached them to my next comment
notes about matrices storage:
order of arrays - ja, ia, a
matrices are 15x15. mat1 has 15 nonzero elements, mat3 has 225 nonzero elements, most of them are zeros.
0 Kudos
5 Replies
Chao_Y_Intel
Employee
65 Views

Hello,

Do you have any code that could show this problem? That will help to look at this problem.

Thanks,
Chao
Duke_K
Beginner
65 Views

Thank you for answer.

The thing is that I get this error just like that - read matrices from files and run the routine. I've made small separate program, and attached it to post along with updated matrices. I compile this program by "ifort -mkl segfault.f90", maybe it's not exactly the right way, but before that case I have no problems.

Also I'd like to add, that version of MKL, which crushes on the case, is 10.3.3, not 12.0.3.
Chao_Y_Intel
Employee
65 Views

Hello,

For the attached code, it computed withthe request=1:

According to the manual:
If request=1, the routine computes only values of the array ic of length m + 1, the memory for this array must be allocated beforehand.

In thecode, resmat, jresmat do not allocate the memory. Also, the sort is undefined, it should be a integer value.

Thanks,
Chao

Duke_K
Beginner
65 Views

Thank you for your answer, Chao. But I didn't understand your suggestions quite well, will you, please, explain it to me one more time? If request=1, array ic must be allocated, so in my code. After this calling, we get number of nonzero elements in matrix (nnz), so we can allocate arrays c and jc. But we may not allocate them, am I right? For example, if we just want to know nnz. And anyway, thing is that segmentation fault prevents procedure with request=1 from finishing, and this is my problem. Thanks in advance for your answer and your time.
Chao_Y_Intel
Employee
65 Views

Hello, >But we may not allocate them, am I right? For example, if we just want to know nnz. And anyway, thing is that segmentation fault prevents procedure with request=1 from finishing, yes, those arrays are not allocated in your program, and it needs to allocated before calling the function. Thanks, Chao
Reply