Skip to content

Fix the quick return code in Eigen subroutines #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

penghongbo
Copy link

Description
Fix the quick return code for S/D/C/ZGEESX, C/ZHBEVX, S/DSBEVX, C/ZHEEVX, S/DSYEVX, C/ZHPEVX, S/DSPEVX, C/ZHPGVX.

  1. set RCONDE and RCONDV in S/D/C/ZGEESX when N = 0.
  2. set Q in C/ZHBEVX, S/DSBEVX when N = 1 and WANTZ.
  3. set IFAIL in C/ZHBEVX, S/DSBEVX, C/ZHEEVX, S/DSYEVX, C/ZHPEVX, S/DSPEVX when N = 1 and WANTZ.
  4. set M = 0 in C/ZHPGVX when N = 0.

Checklist

  • The documentation has been updated.
  • If the PR solves a specific issue, it is set to be closed on merge.

…C/ZHEEVX,

S/DSYEVX, C/ZHPEVX, S/DSPEVX, C/ZHPGVX.

1. set RCONDE and RCONDV in S/D/C/ZGEESX when N = 0.
2. set Q in C/ZHBEVX, S/DSBEVX when N = 1 and WANTZ.
3. set IFAIL in C/ZHBEVX, S/DSBEVX, C/ZHEEVX, S/DSYEVX, C/ZHPEVX, S/DSPEVX when
   N = 1 and WANTZ.
4. set M in C/ZHPGVX when N = 0.
Copy link
Collaborator

@angsch angsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am generally positive about the changes. However, there are a couple of data type mismatches. Could you please do another sweep and ensure that the assigned values match?

Out of curiosity, what made you look at these corner cases?

@@ -373,6 +373,8 @@ SUBROUTINE CGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
*
IF( N.EQ.0 ) THEN
SDIM = 0
IF (WANTSE .OR. WANTSB) RCONDE = 1.0E0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not RCONDE = ONE? (same question for other precisions)

@@ -373,6 +373,8 @@ SUBROUTINE CGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
*
IF( N.EQ.0 ) THEN
SDIM = 0
IF (WANTSE .OR. WANTSB) RCONDE = 1.0E0
IF (WANTSV .OR. WANTSB) RCONDV = 0.0E0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RCONDV = ZERO? (same question for other precisions)

IF( WANTZ )
$ Z( 1, 1 ) = CONE
IF( WANTZ ) THEN
Q( 1, 1 ) = ONE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have matching types: ONE -> CONE

Please also check precision 'z'.

$ Z( 1, 1 ) = CONE
IF( WANTZ ) THEN
Q( 1, 1 ) = ONE
Z( 1, 1 ) = ONE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ONE -> CONE

IF( WANTZ )
$ Z( 1, 1 ) = CONE
IF( WANTZ ) THEN
Z( 1, 1 ) = ONE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ONE -> CONE

IF( WANTZ ) THEN
Q( 1, 1 ) = ONE
Z( 1, 1 ) = ONE
IFAIL(1) = ZERO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have matching types: IFAIL(1) = 0 (more occurrences in other files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants