Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Some subroutines of lapack in mkl gives Segmentation fault for matrix dimension larger than 1020

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Zhang__Simon

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-11-2019
01:28 AM

137 Views

Some subroutines of lapack in mkl gives Segmentation fault for matrix dimension larger than 1020

OS: Ubuntu 18.04.2 server, kernel 4.15.0-50-generic. MKL provided by intel parallel studio xe 2019.3.

The C code reproducing the error

#include <stdlib.h> #include <stdio.h> #include <mkl.h> #define N 1021 int main(){ printf("begin main\n"); double m,a[N*N]; lapack_int n1=N, n2=N; for(size_t i=0;i<N*N;i++){ if(i%(N+1)==0){ a =(double) rand()/RAND_MAX; } else {a=0;} } lapack_int info; printf("begin lapack\n"); info = LAPACKE_dsyevd(LAPACK_ROW_MAJOR, 'V','U', n1, a, n2, m); printf("%d: end lapack\n", info); return 0; }

This code gave correct results for matrix smaller than 1020*1020, while gave Segmentation fault when N>1020. The error persists for icc, gcc, linking options as simple as -mkl for icc or full linking and compiling options as advised by linking advisor. dsteqr routine seems have similar issues.

I am new to directly using lower level routines in MKL, so there may also be some problems in my code above. Though it works well for smaller matrix.

Thanks in advance.

Link Copied

1 Reply

Zhang__Simon

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-15-2019
06:33 PM

137 Views

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.