Possible bug in pcgehdrv

Open discussion regarding features, bugs, issues, vendors, etc.

Possible bug in pcgehdrv

Postby granat » Thu Mar 08, 2007 9:12 am

The do loop

*
DO 10 J = JL, ILO+JA+NB-IOFF-1, -NB
JB = MIN( JA+IHI-J, NB )

in pcgehdrv makes JB such that the following call to

CALL PCLARFT( 'Forward', 'Columnwise', IHI-K, JB, A, I+1, J,
$ DESCA, TAU, WORK( IPT ), WORK( IPW ) )

adresses TAU at position N, even though TAU only consist of N-1
initiated/computed values from PCGEHRD.

This is a possible bug - anyone who knows who wrote this code?

Best regards
Robert Granat
granat
 
Posts: 4
Joined: Mon Jan 23, 2006 11:06 am

Re: Possible bug in pcgehdrv

Postby granat » Fri Mar 09, 2007 8:53 am

granat wrote:The do loop

*
DO 10 J = JL, ILO+JA+NB-IOFF-1, -NB
JB = MIN( JA+IHI-J, NB )

in pcgehdrv makes JB such that the following call to

CALL PCLARFT( 'Forward', 'Columnwise', IHI-K, JB, A, I+1, J,
$ DESCA, TAU, WORK( IPT ), WORK( IPW ) )

adresses TAU at position N, even though TAU only consist of N-1
initiated/computed values from PCGEHRD.

This is a possible bug - anyone who knows who wrote this code?

Best regards
Robert Granat


By some testing we suggest that the line

JB = MIN( JA+IHI-J, NB )

is replaced by

JB = MIN( JA+IHI-J-1, NB ).

//Robert
granat
 
Posts: 4
Joined: Mon Jan 23, 2006 11:06 am

Postby Julien Langou » Mon Mar 12, 2007 1:15 pm

Hello Robert,
thanks for the patch. Is there an easy to check this by simply changing the HRD.dat file for example?
Julien.
Julien Langou
 
Posts: 727
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby granat » Tue Mar 13, 2007 6:40 am

Julien Langou wrote:Hello Robert,
thanks for the patch. Is there an easy to check this by simply changing the HRD.dat file for example?
Julien.


What we did was to compile the library using the Pathscale compiler as

pathf90 -O0 -g -trapuv

which means that all variables are initiated with NaN and floating point exceptions are trapped. The NAG compiler should have a similar option.

Observe that the following lines should be modified as well:

@@ -183,7 +183,7 @@
IV = IOFF + 1
I = IA + ILO - 1
J = JA + ILO - 1
- JB = MIN( NB-IOFF, JA+IHI-J )
+ JB = MIN( NB-IOFF, JA+IHI-J-1 )
*
* Compute upper triangular matrix T from TAU.
*

Best regards
Robert Granat and Åke Sandgren
granat
 
Posts: 4
Joined: Mon Jan 23, 2006 11:06 am


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest