Skip to content

Commit

Permalink
CPUPL-908: LAPACK 3.9.0 - Netlib Test Suite runs
Browse files Browse the repository at this point in the history
Right usage of f2c_abs and f2c_dabs
Netlib Failures seen in: s,d - QR(), c,z - CH2/ZH2()

Change-Id: I5b26793eb885a2f3ab6f7a7e32e33efc0a11ae24
  • Loading branch information
managalv committed Jun 23, 2020
1 parent febbf70 commit e664639
Show file tree
Hide file tree
Showing 23 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion src/map/lapack2flamec/f2c/c/cbdsqr.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ int cbdsqr_(char *uplo, integer *n, integer *ncvt, integer * nru, integer *ncc,
if (tol >= 0.f)
{
/* Relative accuracy desired */
sminoa = f2c_abs(d__[1]);
sminoa = f2c_dabs(d__[1]);
if (sminoa == 0.f)
{
goto L50;
Expand Down
6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/chetrf_rk.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
for (i__ = k;
i__ >= i__1;
--i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
i__2 = *n - k;
cswap_(&i__2, &a[i__ + (k + 1) * a_dim1], lda, &a[ip + (k + 1) * a_dim1], lda);
Expand Down Expand Up @@ -448,7 +448,7 @@
for (i__ = k;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
i__2 = k - 1;
cswap_(&i__2, &a[i__ + a_dim1], lda, &a[ip + a_dim1], lda) ;
Expand All @@ -468,4 +468,4 @@
/* End of CHETRF_RK */
}
/* chetrf_rk__ */

6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/chetri_3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
for (i__ = 1;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
if (i__ < ip) {
cheswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand Down Expand Up @@ -844,7 +844,7 @@
for (i__ = *n;
i__ >= 1;
--i__) {
ip = (i__1 = ipiv[i__], abs(i__1));
ip = (i__1 = ipiv[i__], f2c_abs(i__1));
if (ip != i__) {
if (i__ < ip) {
cheswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand All @@ -859,4 +859,4 @@
/* End of CHETRI_3X */
}
/* chetri_3x__ */


10 changes: 5 additions & 5 deletions src/map/lapack2flamec/f2c/c/chetrs_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
for (k = *n;
k >= 1;
--k) {
kp = (i__1 = ipiv[k], abs(i__1));
kp = (i__1 = ipiv[k], f2c_abs(i__1));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand Down Expand Up @@ -305,7 +305,7 @@
for (k = 1;
k <= i__1;
++k) {
kp = (i__2 = ipiv[k], abs(i__2));
kp = (i__2 = ipiv[k], f2c_abs(i__2));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand All @@ -324,7 +324,7 @@
for (k = 1;
k <= i__1;
++k) {
kp = (i__2 = ipiv[k], abs(i__2));
kp = (i__2 = ipiv[k], f2c_abs(i__2));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand Down Expand Up @@ -385,7 +385,7 @@
for (k = *n;
k >= 1;
--k) {
kp = (i__1 = ipiv[k], abs(i__1));
kp = (i__1 = ipiv[k], f2c_abs(i__1));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand All @@ -396,4 +396,4 @@
/* End of CHETRS_3 */
}
/* chetrs_3__ */


2 changes: 1 addition & 1 deletion src/map/lapack2flamec/f2c/c/clalsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ int clalsd_(char *uplo, integer *smlsiz, integer *n, integer *nrhs, real *d__, r
{
*rank = 1;
clascl_("G", &c__0, &c__0, &d__[1], &c_b10, &c__1, nrhs, &b[ b_offset], ldb, info);
d__[1] = f2c_abs(d__[1]);
d__[1] = f2c_dabs(d__[1]);
}
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/map/lapack2flamec/f2c/c/clanht.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ real clanht_(char *norm, integer *n, real *d__, complex *e)
/* Find norm1(A). */
if (*n == 1)
{
anorm = f2c_abs(d__[1]);
anorm = f2c_dabs(d__[1]);
}
else
{
anorm = f2c_abs(d__[1]) + c_abs(&e[1]);
anorm = f2c_dabs(d__[1]) + c_abs(&e[1]);
sum = c_abs(&e[*n - 1]) + (r__1 = d__[*n], f2c_abs(r__1));
if (anorm < sum || sisnan_(&sum))
{
Expand Down
6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/csytrf_rk.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
for (i__ = k;
i__ >= i__1;
--i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
i__2 = *n - k;
cswap_(&i__2, &a[i__ + (k + 1) * a_dim1], lda, &a[ip + (k + 1) * a_dim1], lda);
Expand Down Expand Up @@ -446,7 +446,7 @@
for (i__ = k;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
i__2 = k - 1;
cswap_(&i__2, &a[i__ + a_dim1], lda, &a[ip + a_dim1], lda) ;
Expand All @@ -466,4 +466,4 @@
/* End of CSYTRF_RK */
}
/* csytrf_rk__ */


6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/csytri_3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
for (i__ = 1;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
if (i__ < ip) {
csyswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand Down Expand Up @@ -836,7 +836,7 @@
for (i__ = *n;
i__ >= 1;
--i__) {
ip = (i__1 = ipiv[i__], abs(i__1));
ip = (i__1 = ipiv[i__], f2c_abs(i__1));
if (ip != i__) {
if (i__ < ip) {
csyswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand All @@ -851,4 +851,4 @@
/* End of CSYTRI_3X */
}
/* csytri_3x__ */


10 changes: 5 additions & 5 deletions src/map/lapack2flamec/f2c/c/csytrs_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
for (k = *n;
k >= 1;
--k) {
kp = (i__1 = ipiv[k], abs(i__1));
kp = (i__1 = ipiv[k], f2c_abs(i__1));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand Down Expand Up @@ -303,7 +303,7 @@
for (k = 1;
k <= i__1;
++k) {
kp = (i__2 = ipiv[k], abs(i__2));
kp = (i__2 = ipiv[k], f2c_abs(i__2));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand All @@ -322,7 +322,7 @@
for (k = 1;
k <= i__1;
++k) {
kp = (i__2 = ipiv[k], abs(i__2));
kp = (i__2 = ipiv[k], f2c_abs(i__2));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand Down Expand Up @@ -380,7 +380,7 @@
for (k = *n;
k >= 1;
--k) {
kp = (i__1 = ipiv[k], abs(i__1));
kp = (i__1 = ipiv[k], f2c_abs(i__1));
if (kp != k) {
cswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand All @@ -391,4 +391,4 @@
/* End of CSYTRS_3 */
}
/* csytrs_3__ */


6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/dsytrf_rk.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
for (i__ = k;
i__ >= i__1;
--i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_dabs(i__2));
if (ip != i__) {
i__2 = *n - k;
dswap_(&i__2, &a[i__ + (k + 1) * a_dim1], lda, &a[ip + (k + 1) * a_dim1], lda);
Expand Down Expand Up @@ -446,7 +446,7 @@
for (i__ = k;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_dabs(i__2));
if (ip != i__) {
i__2 = k - 1;
dswap_(&i__2, &a[i__ + a_dim1], lda, &a[ip + a_dim1], lda) ;
Expand All @@ -466,4 +466,4 @@
/* End of DSYTRF_RK */
}
/* dsytrf_rk__ */


6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/dsytri_3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
for (i__ = 1;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_dabs(i__2));
if (ip != i__) {
if (i__ < ip) {
dsyswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand Down Expand Up @@ -682,7 +682,7 @@
for (i__ = *n;
i__ >= 1;
--i__) {
ip = (i__1 = ipiv[i__], abs(i__1));
ip = (i__1 = ipiv[i__], f2c_dabs(i__1));
if (ip != i__) {
if (i__ < ip) {
dsyswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand All @@ -697,4 +697,4 @@
/* End of DSYTRI_3X */
}
/* dsytri_3x__ */


10 changes: 5 additions & 5 deletions src/map/lapack2flamec/f2c/c/dsytrs_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
for (k = *n;
k >= 1;
--k) {
kp = (i__1 = ipiv[k], abs(i__1));
kp = (i__1 = ipiv[k], f2c_dabs(i__1));
if (kp != k) {
dswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand Down Expand Up @@ -284,7 +284,7 @@
for (k = 1;
k <= i__1;
++k) {
kp = (i__2 = ipiv[k], abs(i__2));
kp = (i__2 = ipiv[k], f2c_dabs(i__2));
if (kp != k) {
dswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand All @@ -303,7 +303,7 @@
for (k = 1;
k <= i__1;
++k) {
kp = (i__2 = ipiv[k], abs(i__2));
kp = (i__2 = ipiv[k], f2c_dabs(i__2));
if (kp != k) {
dswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand Down Expand Up @@ -346,7 +346,7 @@
for (k = *n;
k >= 1;
--k) {
kp = (i__1 = ipiv[k], abs(i__1));
kp = (i__1 = ipiv[k], f2c_dabs(i__1));
if (kp != k) {
dswap_(nrhs, &b[k + b_dim1], ldb, &b[kp + b_dim1], ldb);
}
Expand All @@ -357,4 +357,4 @@
/* End of DSYTRS_3 */
}
/* dsytrs_3__ */


8 changes: 4 additions & 4 deletions src/map/lapack2flamec/f2c/c/dtrevc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
wi = sqrt((d__1 = t[ki + (ki - 1) * t_dim1], f2c_dabs(d__1))) * sqrt((d__2 = t[ki - 1 + ki * t_dim1], f2c_dabs(d__2)));
}
/* Computing MAX */
d__1 = ulp * (abs(wr) + abs(wi));
d__1 = ulp * (f2c_dabs(wr) + f2c_dabs(wi));
smin = max(d__1,smlnum);
if (ip == 0) {
/* -------------------------------------------------------- */
Expand Down Expand Up @@ -943,7 +943,7 @@
wi = sqrt((d__1 = t[ki + (ki + 1) * t_dim1], f2c_dabs(d__1))) * sqrt((d__2 = t[ki + 1 + ki * t_dim1], f2c_dabs(d__2)));
}
/* Computing MAX */
d__1 = ulp * (abs(wr) + abs(wi));
d__1 = ulp * (f2c_dabs(wr) + f2c_dabs(wi));
smin = max(d__1,smlnum);
if (ip == 0) {
/* -------------------------------------------------------- */
Expand Down Expand Up @@ -1034,7 +1034,7 @@
work[j + iv * *n] = x[0];
work[j + 1 + iv * *n] = x[1];
/* Computing MAX */
d__3 = (d__1 = work[j + iv * *n], f2c_dabs(d__1)); d__4 = ( d__2 = work[j + 1 + iv * *n], f2c_dabs(d__2)); d__3 = max(d__3,d__4); // ; expr subst
d__3 = (d__1 = work[j + iv * *n], f2c_dabs(d__1)); d__4 = ( d__2 = work[j + 1 + iv * *n], f2c_dabs(d__2)); d__3 = max(d__3,d__4); // ; expr subst
vmax = max(d__3,vmax);
vcrit = bignum / vmax;
}
Expand Down Expand Up @@ -1206,7 +1206,7 @@
work[j + 1 + iv * *n] = x[1];
work[j + 1 + (iv + 1) * *n] = x[3];
/* Computing MAX */
d__1 = abs(x[0]), d__2 = abs(x[2]), d__1 = max(d__1, d__2), d__2 = abs(x[1]), d__1 = max(d__1,d__2) ; d__2 = abs(x[3]); d__1 = max(d__1,d__2); // ; expr subst
d__1 = f2c_dabs(x[0]), d__2 = f2c_dabs(x[2]), d__1 = max(d__1, d__2), d__2 = f2c_dabs(x[1]), d__1 = max(d__1,d__2) ; d__2 = f2c_dabs(x[3]); d__1 = max(d__1,d__2); // ; expr subst
vmax = max(d__1,vmax);
vcrit = bignum / vmax;
}
Expand Down
4 changes: 2 additions & 2 deletions src/map/lapack2flamec/f2c/c/ssytrf_rk.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ fclose(fptr);
for (i__ = k;
i__ >= i__1;
--i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
i__2 = *n - k;
sswap_(&i__2, &a[i__ + (k + 1) * a_dim1], lda, &a[ip + (k + 1) * a_dim1], lda);
Expand Down Expand Up @@ -460,7 +460,7 @@ fclose(fptr);
for (i__ = k;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
i__2 = k - 1;
sswap_(&i__2, &a[i__ + a_dim1], lda, &a[ip + a_dim1], lda) ;
Expand Down
6 changes: 3 additions & 3 deletions src/map/lapack2flamec/f2c/c/ssytri_3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
for (i__ = 1;
i__ <= i__1;
++i__) {
ip = (i__2 = ipiv[i__], abs(i__2));
ip = (i__2 = ipiv[i__], f2c_abs(i__2));
if (ip != i__) {
if (i__ < ip) {
ssyswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand Down Expand Up @@ -682,7 +682,7 @@
for (i__ = *n;
i__ >= 1;
--i__) {
ip = (i__1 = ipiv[i__], abs(i__1));
ip = (i__1 = ipiv[i__], f2c_abs(i__1));
if (ip != i__) {
if (i__ < ip) {
ssyswapr_(uplo, n, &a[a_offset], lda, &i__, &ip);
Expand All @@ -697,4 +697,4 @@
/* End of SSYTRI_3X */
}
/* ssytri_3x__ */


Loading

0 comments on commit e664639

Please sign in to comment.