Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
15 Views

mkl_ddiamv example

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
Highlighted
Employee
15 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
Highlighted
Beginner
15 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
Highlighted
Beginner
15 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
Highlighted
Employee
15 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