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

mkl_ddiamv example

Aaron_B_1
Beginner
391 Views

I have some problems with using mkl_ddiamv (language C). Can anybody show me a code example of using mkl_ddiamv with initialization of all the input formal parametres? It is desirable to use the number of diagonals more than one. For example, 3-diagonals with offset=[-1 0 1] and size 5 by 5 with all elements are ones.Multiplicated vectors are ones too. In different sources the matrix in special diag format is treated as two-dimensional array or one-dimensional array with row-by-row storage.

0 Kudos
4 Replies
Ying_H_Intel
Employee
391 Views

Hi Aaron, 

There is mkl_sdia.c sample under mkl example directory.  you may refer to it first and let us know if any problem. 

Best Regards,
Ying 

0 Kudos
Aaron_B_1
Beginner
391 Views

Ying H (Intel) wrote:

Hi Aaron, 

There is mkl_sdia.c sample under mkl example directory.  you may refer to it first and let us know if any problem. 

Best Regards,
Ying 

Thank you very much! I handle with my problem using your code example. Thank you!

0 Kudos
Aaron_B_1
Beginner
391 Views

I have one more strange question. 

In my project's properties I set "Use Intel MKL" to "Parallel". The majority of time of my programm is matrix-vector multiplication, which is performed by mkl_ddiamv. In my task manager I always see, that only one thread is busy by my programm process. I use Intel C++ Compiler 14.0. I try to take many different sizes of multiplicated arrays. There is no difference. I unsuccessfully tried to find some info about the reason of one-thread calculation. 

Is it normal behavior of this function or I do something wrong? Should I change some of my project's properties or include something to launch my app multy-threated?

0 Kudos
Ying_H_Intel
Employee
391 Views

Hi Aaron, 

Level 2 for DIA format is not threaded till current versions of MKL. You may try csr format if needed.  I will update the thread function list in https://software.intel.com/en-us/articles/intel-mkl-threaded-functions/

Thank

Ying

0 Kudos
Reply