Turn on suggestions

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
- fortran mkl csr sparse matrix storage, integer size of row/column index vectors for very large arrays

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

may_ka

Beginner

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

10-07-2017
04:40 AM

174 Views

Hi there,

I ran into trouble with the single precision integer size (I think it is 32bit) of the row index vector of mkl csr arrays. I create squared sparse arrays with +56,000,000 rows and columns and +3,000,000,000 elements. The column index vector is still ok because largest numbers are equal to the column dimension. However, the row index vector makes trouble with entries equal to the length of the column index vector which cannot be held by a single precision integer. I could use a larger integer kind number (double precision integer, 64 bit) but then I am in trouble with all mkl routines dealing with csr matrices (e.g. dcsrmm). That is because these routine have a fortran 77 interfaces and as outlined in the mkl manual, the expect index vectors of kind single precision. I can imagine that one could set the default integer to 64 bit when installing the mkl, but I am not sure whether that is possible. Any Ideas??

Thanks a lot

Link Copied

8 Replies

may_ka

Beginner

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

10-07-2017
04:43 AM

174 Views

I found that "ilp64" is my friend.

Seems to be solved.

Xuhao_C_

Beginner

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

04-28-2020
12:21 PM

174 Views

Hi,

I have the same problem. Basically the row indices are in a 64-bit array (A_idx_ptr) and the column indices are in a 32-bit array (A_nnz_idx).

mkl_scsrmm (&transa, &M , &N, &K, &alpha , matdescra, A_nonzeros, A_nnz_idx, A_idx_ptr, A_idx_ptr+1, B, &N, &beta , C, &N);

How did you call the above function?

may_ka

Beginner

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

04-28-2020
03:19 PM

174 Views

Hi,

you just have to link you application against the version of mkl where the default integer is 64 bit. Checkout the mkl link adviser to get the link line correct.

Cheers

MariaZh

Employee

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

04-28-2020
04:03 PM

174 Views

Hi,

Currently we do not support mixing of different integer types for column and row indices in Sparse BLAS.

If you need long integers, you will have to convert column indices and use ILP64 interface of MKL.

Best regards,

Maria

Xuhao C. wrote:Hi,

I have the same problem. Basically the row indices are in a 64-bit array (A_idx_ptr) and the column indices are in a 32-bit array (A_nnz_idx).

mkl_scsrmm (&transa, &M , &N, &K, &alpha , matdescra, A_nonzeros, A_nnz_idx, A_idx_ptr, A_idx_ptr+1, B, &N, &beta , C, &N);

How did you call the above function?

Xuhao_C_

Beginner

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

04-28-2020
05:59 PM

174 Views

So you convert column indices into 64-bit before pass it to the function?

may.ka wrote:Hi,

you just have to link you application against the version of mkl where the default integer is 64 bit. Checkout the mkl link adviser to get the link line correct.

Cheers

Xuhao_C_

Beginner

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

04-28-2020
06:00 PM

174 Views

I see. So either both 32-bit or both 64-bit. Thanks.

Zhukova, Maria (Intel) wrote:Hi,

Currently we do not support mixing of different integer types for column and row indices in Sparse BLAS.

If you need long integers, you will have to convert column indices and use ILP64 interface of MKL.Best regards,

Maria

Quote:

Xuhao C.wrote:

Hi,

I have the same problem. Basically the row indices are in a 64-bit array (A_idx_ptr) and the column indices are in a 32-bit array (A_nnz_idx).

mkl_scsrmm (&transa, &M , &N, &K, &alpha , matdescra, A_nonzeros, A_nnz_idx, A_idx_ptr, A_idx_ptr+1, B, &N, &beta , C, &N);

How did you call the above function?

Xuhao_C_

Beginner

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

04-29-2020
02:44 PM

174 Views

BTW, does csrmm support multi-threading? Say if I export MKL_NUM_THREADS=32 on a 32-core CPU, will it get speedup compared to sequential setting?

Zhukova, Maria (Intel) wrote:Hi,

Currently we do not support mixing of different integer types for column and row indices in Sparse BLAS.

If you need long integers, you will have to convert column indices and use ILP64 interface of MKL.Best regards,

Maria

Quote:

Xuhao C.wrote:

Hi,

How did you call the above function?

Gennady_F_Intel

Moderator

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

04-30-2020
05:27 AM

174 Views

Topic Options

- 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.