Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Use of Sparse Blas

abhimodak
New Contributor I
390 Views

Hi

I am trying to use the sparse blas subroutine mkl_dcoom for operation A * B. In reference to the interface of this subroutine, I thus have alpah = 1 and beta = 0.

I hence thought that I can "reuse" the matrix B for retrieving the result. This seems to be not working.

More specifically,

(1) Call mkl_dcoom('N', m, m, m, 1.0d0, 'G F', values, irow, jcol, nz, B, m, 0.0, B, m)

This gives B = 0 on return

(2) Call mkl_dcoom('N', m, m, m, 1.0d0, 'G F', values, irow, jcol, nz, B, m, 0.0d0, C, m)

This gives C with correct matrix-matrix product.

Is this expected? Also is there a fortran90/95 interface to the sparse blas subroutines? I will re-consult the document butso far I have not be able to find it.

Abhi

0 Kudos
1 Solution
Gennady_F_Intel
Moderator
390 Views

Hi Abhi,

1. Yes. This is an expected result. There is no opportunity to do in-place operation for this function.

Nevertheless thanks for the question we will improve MKL documentation regarding this topic.

2. we have only F77 interfaces for Sparse BLAS routines. You can use these interfaces for calling from F90/95.

as an additional info we have F77 examples for MKL Sparse BLAS routines Please look at $MKL_ROOTexamplesspblassource folder. You can find there C and Fortan examples of these functions, including examples with for coordinate format support.

--Gennady

View solution in original post

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
391 Views

Hi Abhi,

1. Yes. This is an expected result. There is no opportunity to do in-place operation for this function.

Nevertheless thanks for the question we will improve MKL documentation regarding this topic.

2. we have only F77 interfaces for Sparse BLAS routines. You can use these interfaces for calling from F90/95.

as an additional info we have F77 examples for MKL Sparse BLAS routines Please look at $MKL_ROOTexamplesspblassource folder. You can find there C and Fortan examples of these functions, including examples with for coordinate format support.

--Gennady

0 Kudos
Reply