Page 1 of 1

Workspace in dsbgvd, zhbgvd

PostPosted: Wed May 25, 2016 8:31 am
by lawrence mulholland
1. In dsbgvd.f (ssbgvd.f)

with the case WANTZ = .False.
LWMIN = 2*N (line 282)

But, (line 140)

Call dsbgst(.....,work(INDWRK), iinfo)

where INDWRK = N+1 and dsbgst requires a workspace of 2*N

Therefore either
i. line 282 should be LWMIN = 3*N; or,
ii. line 140 should use WORK(INDE)

2. In zhbgvd.f (chbgvd.f)
Line 312: LRWMIN = N
Line 374: Call ZHBGST(....,RWORK(INDWRK), IINFO)
INDWRK = N+1 and ZHBGST requires RWORK(N)

Therefore either
i. line 312 should be LWMIN = 2*N; or,
ii. line 374 should use RWORK(INDE)

Re: Workspace in dsbgvd, zhbgvd

PostPosted: Wed May 25, 2016 8:58 pm
by Julien Langou
Hi Lawrence,

Thanks for the bug reports.

1. In dsbgvd.f (ssbgvd.f)

with the case WANTZ = .False.
LWMIN = 2*N (line 282)

But, (line 140) (correction: line 340)

Call dsbgst(.....,work(INDWRK), iinfo)

where INDWRK = N+1 and dsbgst requires a workspace of 2*N

Therefore either
i. line 282 should be LWMIN = 3*N; or,
ii. line 140 should use WORK(INDE)
(correction: line 340)


Let us go with fix (ii) then.
Note: I simply used "WORK", not "WORK(INDE)"

2. In zhbgvd.f (chbgvd.f)
Line 312: LRWMIN = N
Line 374: Call ZHBGST(....,RWORK(INDWRK), IINFO)
INDWRK = N+1 and ZHBGST requires RWORK(N)

Therefore either
i. line 312 should be LWMIN = 2*N; or,
ii. line 374 should use RWORK(INDE)


Let us go with fix (ii) then.
Note: I simply used "RWORK", not "RWORK(INDE)".

Thanks a lot Lawrence!
Julien.