- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a code that uses ZHBEVD. I try linking it with either a generic version of LAPACK or with MKL. The exact same code, linked with either library does not give the same workspace sizes.
With the generic version of LAPACK, I get :
lwork: 162
lrwork: 208
liwork: 48
With MKL, I get :
lwork: 162
lrwork: 208
liwork: 210453397552
This last liwork size obviously produces a bad_alloc error and terminates the program.
Not sure if this is the right place to submit this, but here it is.
I have a code that uses ZHBEVD. I try linking it with either a generic version of LAPACK or with MKL. The exact same code, linked with either library does not give the same workspace sizes.
With the generic version of LAPACK, I get :
lwork: 162
lrwork: 208
liwork: 48
With MKL, I get :
lwork: 162
lrwork: 208
liwork: 210453397552
This last liwork size obviously produces a bad_alloc error and terminates the program.
Not sure if this is the right place to submit this, but here it is.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you attach the example of the code you use?
see this link how to attach file to forum post.
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, here is a sample code. The included headers are not the ones provided with MKL, but rather the clapack ones. It should however not matter other than calling the types by different names.
Here is the output of the program :
[mboisson@ip12 demo]$ ./demo_exe_test_zhbevd.out
Content of the matrix:
(0,0)
(0,0)
(-0.1,0)
(0,0)
(-0.141421,0)
(0,0)
Before workspace query
jobz:V
uplo:U
n:3
kd: 1
ldab: 2
lwork: -1
lrwork: -1
liwork: -1
info: 0
After workspace query
jobz:V
uplo:U
n:3
kd: 1
ldab: 2
lwork: 18
lrwork: 34
liwork: 210453397522
info: 0
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Aborted
Yes, here is a sample code. The included headers are not the ones provided with MKL, but rather the clapack ones. It should however not matter other than calling the types by different names.
Here is the output of the program :
[mboisson@ip12 demo]$ ./demo_exe_test_zhbevd.out
Content of the matrix:
(0,0)
(0,0)
(-0.1,0)
(0,0)
(-0.141421,0)
(0,0)
Before workspace query
jobz:V
uplo:U
n:3
kd: 1
ldab: 2
lwork: -1
lrwork: -1
liwork: -1
info: 0
After workspace query
jobz:V
uplo:U
n:3
kd: 1
ldab: 2
lwork: 18
lrwork: 34
liwork: 210453397522
info: 0
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Aborted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, and the MKL version that is used is mkl64/10.1.3.027
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
If you use libmkl_intel_lp64.a for linking you should change the line typedef long int integer; to typedef int integer; in file f2c.h.
Or you should use libmkl_intel_ilp64.a for correct result because sizeof (long int) = 8 byte for Linux and 64-bit x86-64.
Below my output result with libmkl_intel_ilp64.a:
Content of the matrix:
(0,0)
(0,0)
(-0.1,0)
(0,0)
(-0.141421,0)
(0,0)
Before workspace query
jobz:V
uplo:U
n:3
kd: 1
ldab: 2
lwork: -1
lrwork: -1
liwork: -1
info: 0
After workspace query
jobz:V
uplo:U
n:3
kd: 1
ldab: 2
lwork: 18
lrwork: 34
liwork: 18
info: 0

Reply
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