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

Index shift by 1 from MKL 5.2 to MKL 8.0.1 on sparse vector operations?

mdajunge
Beginner
177 Views
We are currently trying to migrate our code from MKL 5.2 to MKL 8.0.1. Comparing the results we realized, that on functions that operate with sparse vectors (like zgthr() or zdotui_sub()) the index which select the entries to be used in x is starting from 0 in MKL 8.0.1 and from 1 in MKL 5.2.
For example, in order to access the first element of x in zgthr( nz, y, x, indx ), the first entry of indx would be 0 using MKL 8.0.1 and 1 using MKL 5.2.
We wrote a small program to demonstrate this behavior (see attachment). Its output is:
-------------------------
vector a:
1.44 + i*6.93
2.64 + i*10.23
3.84 + i*13.53
indices to be gathered from a:
1
2

Here are the results of MKL 5.2
vector b:
1.44 + i*6.93
2.64 + i*10.23
Here are the results of MKL 8.0.1
vector b:
2.64 + i*10.23
3.84 + i*13.53
-------------------------
We are using the following system:
gcc version 3.3.3 (SuSE Linux 9.1)
For MKL 8.0.1 we link:
libmkl
libguide
For MKL 5.2 we link:
libmkl_p3
libguide
Is there a compile flag or runtime variable which can be used to set the starting index 0 or 1 for sparse operations?
Thanks

Michael Junge

Message Edited by mdajunge on 02-10-2006 09:38 AM

0 Kudos
0 Replies
Reply