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 Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- MKL function cblas_sgemv gives different results each time

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

XUE__Xingyuan

Beginner

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

10-07-2019
04:28 AM

82 Views

MKL function cblas_sgemv gives different results each time

Hi, I have used cblas_sgemv but this function gives different results each time and I have checked the inputs which are always the same. Sometimes the result is correct (with 1e-6 L2 norm error compared to the correct result). Could someone tell me why I have this?

Thanks,

Cindy

Link Copied

4 Replies

Gennady_F_Intel

Moderator

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

10-07-2019
08:19 PM

82 Views

XUE__Xingyuan

Beginner

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

10-08-2019
05:37 AM

82 Views

I have solved the problem. By running the following two commands, the results are correct.

export MKL_INTERFACE_LAYER=GNU export MKL_THREADING_LAYER=GNU

More details can be found here.

It seems a linking problem. I just could not figure out why this works. Can anyone explain it to me?

Gennady_F_Intel

Moderator

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

10-08-2019
09:33 PM

82 Views

all info you may find out into mkl user's guide.

XUE__Xingyuan

Beginner

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

10-09-2019
09:50 PM

82 Views

Thanks for your help.

For more complete information about compiler optimizations, see our Optimization Notice.