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
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Incorrect workspace size returned by query to DGESVD in MKL 11.0.5

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

mecej4

Black Belt

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

07-25-2013
04:17 AM

163 Views

Incorrect workspace size returned by query to DGESVD in MKL 11.0.5

There are discrepancies between the required minimum value of the argument **lwork** (i) as stated in the documentation, (ii) as returned by a workspace query with lwork=-1 and (iii) the value required to pass the input argument check in routine DGESVD, for the case JOBU='N', JOBVT='N' -- the case where only the singular values are desired. Here is a reproducer, based on the details provided in another thread ("bug in MKL 11.0update5 DGESVG", http://software.intel.com/en-us/forums/topic/402436). The outputs were obtained using IFort 13.1.3.198/32-bit on Win-8-Pro-64.

[fortran]

program dgesvdx

c Program to demonstrate incorrect estimate of lwork in call to ?gesvd

c in MKL 11.0.5

c

c use mkl_lapack

implicit none

character*1 :: jobu, jobvt

integer :: m,n,lda,ldu,ldvt,lwork,info

double precision :: A(1,10)

double precision :: work(13),S(1),U(1),VT(1)

character*200 buf

data A/2d0, 7d0, 5d0, 9d0, 3d0, 6d0, 2d0, 5d0, 4d0, 8d0/

c

call mkl_get_version_string( buf )

write(*,'(A)')buf

m=1

n=10

jobu='N'

jobvt='N'

lda=1

ldu=1

ldvt=1

c

c First call to find lwork needed

c

lwork=-1

call dgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt,

+ work, lwork, info)

write(*,*)'info = ',info,' lwork asked for by MKL =',work(1)

lwork=nint(work(1))

c

c starting with size returned, try increasing values until DGESVD

c accepts the value as sufficient

c

info=-1

do while(info .lt. 0)

call dgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt,

+ work, lwork, info)

write(*,*)'lwork = ',lwork,' info = ',info

lwork=lwork+1

end do

write(*,*)'s = ',s(1)

end program dgesvdx

[/fortran]

Output with version 11.0.1 of MKL[bash]

Intel(R) Math Kernel Library Version 11.0.1 Product Build 20121016 for 32-bit applications

info = 0 lwork asked for by MKL = 5.00000000000000

lwork = 5 info = 0

s = 17.6918060129541

[/bash]

Output with version 11.0.5 of MKL[bash]

Intel(R) Math Kernel Library Version 11.0.5 Product Build 20130612 for 32-bit applications

info = 0 lwork asked for by MKL = 5.00000000000000

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 5 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 6 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 7 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 8 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 9 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 10 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 11 info = -13

MKL ERROR: Parameter 13 was incorrect on entry to DGESVD.

lwork = 12 info = -13

lwork = 13 info = 0

s = 17.6918060129541

[/bash]

Link Copied

5 Replies

mecej4

Black Belt

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

07-25-2013
04:20 AM

163 Views

**Forum bug**: there is no edit button for my own post, so I cannot edit the above post, but I can edit this response! I can also edit the original post if I fiddle with the URL (add "/edit" to the thread URL).

SergeyKostrov

Valued Contributor II

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

07-25-2013
07:45 AM

163 Views

Gennady_F_Intel

Moderator

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

07-25-2013
09:56 AM

163 Views

Aleksandr_Z_Intel

Employee

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

08-08-2013
02:24 AM

163 Views

mecej4,

Thank you for reporting the issue. Workaround is to set lwork ≥ max(3*min(m, n)+max(m, n), 5*min(m,n)) for real flavors and lwork ≥ 2*min(m, n)+max(m, n) for complex flavors for m and n such that (12*m+n) <160 or (12*n+m) <160.

Gennady_F_Intel

Moderator

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

10-27-2013
11:38 PM

163 Views

the issue has been fixed in the 11.1 update 1.

Topic Options

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

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