From 001ac4c027c7c402915faddba10248bc440bd31e Mon Sep 17 00:00:00 2001 From: dnikku Date: Mon, 10 May 2021 19:06:37 +0530 Subject: [PATCH] libflame: Added DTL code to stprfb.c stprfs.c stptri.c stptrs.c strevc.c strevc3.c strexc.c files Enabled DTL logging and tracing in the specified files Change-Id: I0e56a9b12b05c5c3b3726b2c87061cbd1afbf90a --- src/map/lapack2flamec/f2c/c/stprfb.c | 10 +++++++++- src/map/lapack2flamec/f2c/c/stprfs.c | 9 +++++++++ src/map/lapack2flamec/f2c/c/stptri.c | 10 ++++++++++ src/map/lapack2flamec/f2c/c/stptrs.c | 11 +++++++++++ src/map/lapack2flamec/f2c/c/strevc.c | 9 +++++++++ src/map/lapack2flamec/f2c/c/strevc3.c | 10 ++++++++++ src/map/lapack2flamec/f2c/c/strexc.c | 18 +++++++++++++++++- 7 files changed, 75 insertions(+), 2 deletions(-) diff --git a/src/map/lapack2flamec/f2c/c/stprfb.c b/src/map/lapack2flamec/f2c/c/stprfb.c index 93fa62854..9f6230d3a 100644 --- a/src/map/lapack2flamec/f2c/c/stprfb.c +++ b/src/map/lapack2flamec/f2c/c/stprfb.c @@ -247,6 +247,12 @@ /* ===================================================================== */ /* Subroutine */ int stprfb_(char *side, char *trans, char *direct, char * storev, integer *m, integer *n, integer *k, integer *l, real *v, integer *ldv, real *t, integer *ldt, real *a, integer *lda, real *b, integer *ldb, real *work, integer *ldwork) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"stprfb inputs: side %c, trans %c, direct %c, storev %c, m %d, n %d, k %d, l %d, ldv %d, ldt %d, lda %d, ldb %d",*side, *trans, *direct, *storev, *m, *n, *k, *l, *ldv, *ldt, *lda, *ldb); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ integer a_dim1, a_offset, b_dim1, b_offset, t_dim1, t_offset, v_dim1, v_offset, work_dim1, work_offset, i__1, i__2; /* Local variables */ @@ -297,6 +303,7 @@ work -= work_offset; /* Function Body */ if (*m <= 0 || *n <= 0 || *k <= 0 || *l < 0) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } if (lsame_(storev, "C")) { @@ -911,8 +918,9 @@ } } } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STPRFB */ } /* stprfb_ */ - \ No newline at end of file + diff --git a/src/map/lapack2flamec/f2c/c/stprfs.c b/src/map/lapack2flamec/f2c/c/stprfs.c index c2758ba72..8bb68d6ba 100644 --- a/src/map/lapack2flamec/f2c/c/stprfs.c +++ b/src/map/lapack2flamec/f2c/c/stprfs.c @@ -168,6 +168,12 @@ static real c_b19 = -1.f; /* Subroutine */ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real *ap, real *b, integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real *work, integer *iwork, integer *info) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"stprfs inputs: uplo %c, trans %c, diag %c, n %d, nrhs %d, ldb %d, ldx %d",*uplo, *trans, *diag, *n, *nrhs, *ldb, *ldx); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ integer b_dim1, b_offset, x_dim1, x_offset, i__1, i__2, i__3; real r__1, r__2, r__3; @@ -265,6 +271,7 @@ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real { i__1 = -(*info); xerbla_("STPRFS", &i__1); + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Quick return if possible */ @@ -279,6 +286,7 @@ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real berr[j] = 0.f; /* L10: */ } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } if (notran) @@ -617,6 +625,7 @@ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real } /* L250: */ } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STPRFS */ } diff --git a/src/map/lapack2flamec/f2c/c/stptri.c b/src/map/lapack2flamec/f2c/c/stptri.c index 6dfd0ba49..c2b59cc15 100644 --- a/src/map/lapack2flamec/f2c/c/stptri.c +++ b/src/map/lapack2flamec/f2c/c/stptri.c @@ -110,6 +110,12 @@ static integer c__1 = 1; /* Subroutine */ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"stptri inputs: uplo %c, diag %c, n %d",*uplo, *diag, *n); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ integer i__1, i__2; /* Local variables */ @@ -164,6 +170,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info) { i__1 = -(*info); xerbla_("STPTRI", &i__1); + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Check for singularity if non-unit. */ @@ -180,6 +187,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info) jj += *info; if (ap[jj] == 0.f) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* L10: */ @@ -195,6 +203,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info) { if (ap[jj] == 0.f) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } jj = jj + *n - *info + 1; @@ -260,6 +269,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info) /* L40: */ } } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STPTRI */ } diff --git a/src/map/lapack2flamec/f2c/c/stptrs.c b/src/map/lapack2flamec/f2c/c/stptrs.c index de5aa4152..25f732f3f 100644 --- a/src/map/lapack2flamec/f2c/c/stptrs.c +++ b/src/map/lapack2flamec/f2c/c/stptrs.c @@ -123,6 +123,12 @@ static integer c__1 = 1; /* Subroutine */ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real *ap, real *b, integer *ldb, integer *info) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"stptrs inputs: uplo %c, trans %c, diag %c, n %d, nrhs %d, ldb %d",*uplo, *trans, *diag, *n, *nrhs, *ldb); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ integer b_dim1, b_offset, i__1; /* Local variables */ @@ -190,11 +196,13 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real { i__1 = -(*info); xerbla_("STPTRS", &i__1); + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Quick return if possible */ if (*n == 0) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Check for singularity. */ @@ -210,6 +218,7 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real { if (ap[jc + *info - 1] == 0.f) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } jc += *info; @@ -226,6 +235,7 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real { if (ap[jc] == 0.f) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } jc = jc + *n - *info + 1; @@ -243,6 +253,7 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real stpsv_(uplo, trans, diag, n, &ap[1], &b[j * b_dim1 + 1], &c__1); /* L30: */ } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STPTRS */ } diff --git a/src/map/lapack2flamec/f2c/c/strevc.c b/src/map/lapack2flamec/f2c/c/strevc.c index 7db522935..56e2c1cee 100644 --- a/src/map/lapack2flamec/f2c/c/strevc.c +++ b/src/map/lapack2flamec/f2c/c/strevc.c @@ -225,6 +225,12 @@ here the magnitude of a complex number */ /* Subroutine */ int strevc_(char *side, char *howmny, logical *select, integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real *work, integer *info) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"strevc inputs: side %c, howmny %c, n %d, ldt %d, ldvl %d, ldvr %d, mm %d",*side, *howmny, *n, *ldt, *ldvl, *ldvr, *mm); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ integer t_dim1, t_offset, vl_dim1, vl_offset, vr_dim1, vr_offset, i__1, i__2, i__3; real r__1, r__2, r__3, r__4; @@ -397,11 +403,13 @@ int strevc_(char *side, char *howmny, logical *select, integer *n, real *t, inte { i__1 = -(*info); xerbla_("STREVC", &i__1); + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Quick return if possible. */ if (*n == 0) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Set the constants to control overflow. */ @@ -1228,6 +1236,7 @@ int strevc_(char *side, char *howmny, logical *select, integer *n, real *t, inte /* L260: */ } } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STREVC */ } diff --git a/src/map/lapack2flamec/f2c/c/strevc3.c b/src/map/lapack2flamec/f2c/c/strevc3.c index c78a8b22b..6ffc256e1 100644 --- a/src/map/lapack2flamec/f2c/c/strevc3.c +++ b/src/map/lapack2flamec/f2c/c/strevc3.c @@ -242,6 +242,12 @@ /* ===================================================================== */ /* Subroutine */ int strevc3_(char *side, char *howmny, logical *select, integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real *work, integer *lwork, integer *info) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"strevc3 inputs: side %c, howmny %c, n %d, ldt %d, ldvl %d, ldvr %d, mm %d",*side, *howmny, *n, *ldt, *ldvl, *ldvr, *mm); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ address a__1[2]; integer t_dim1, t_offset, vl_dim1, vl_offset, vr_dim1, vr_offset, i__1[2], i__2, i__3, i__4; @@ -416,13 +422,16 @@ if (*info != 0) { i__2 = -(*info); xerbla_("STREVC3", &i__2); + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } else if (lquery) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Quick return if possible. */ if (*n == 0) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Use blocked version of back-transformation if sufficient workspace. */ @@ -1344,6 +1353,7 @@ L260: ; } } + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STREVC3 */ } diff --git a/src/map/lapack2flamec/f2c/c/strexc.c b/src/map/lapack2flamec/f2c/c/strexc.c index 9750a5ad6..8b519913d 100644 --- a/src/map/lapack2flamec/f2c/c/strexc.c +++ b/src/map/lapack2flamec/f2c/c/strexc.c @@ -142,6 +142,12 @@ /* ===================================================================== */ /* Subroutine */ int strexc_(char *compq, integer *n, real *t, integer *ldt, real *q, integer *ldq, integer *ifst, integer *ilst, real *work, integer *info) { + AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5); +#if AOCL_DTL_LOG_ENABLE + char buffer[256]; + snprintf(buffer, 256,"strexc inputs: compq %c, n %d, ldt %d, ldq %d, ifst %d, ilst %d",*compq, *n, *ldt, *ldq, *ifst, *ilst); + AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer); +#endif /* System generated locals */ integer q_dim1, q_offset, t_dim1, t_offset, i__1; /* Local variables */ @@ -204,10 +210,12 @@ if (*info != 0) { i__1 = -(*info); xerbla_("STREXC", &i__1); + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Quick return if possible */ if (*n <= 1) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } /* Determine the first row of specified block */ @@ -237,6 +245,7 @@ } } if (*ifst == *ilst) { + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } if (*ifst < *ilst) { @@ -260,6 +269,7 @@ slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &here, & nbf, &nbnext, &work[1], info); if (*info != 0) { *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } here += nbnext; @@ -283,6 +293,7 @@ slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &i__1, & c__1, &nbnext, &work[1], info); if (*info != 0) { *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } if (nbnext == 1) { @@ -300,6 +311,7 @@ slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, & here, &c__1, &nbnext, &work[1], info); if (*info != 0) { *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } here += 2; @@ -332,6 +344,7 @@ slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &i__1, & nbnext, &nbf, &work[1], info); if (*info != 0) { *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } here -= nbnext; @@ -355,6 +368,7 @@ slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &i__1, & nbnext, &c__1, &work[1], info); if (*info != 0) { *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } if (nbnext == 1) { @@ -373,6 +387,7 @@ slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, & i__1, &c__2, &c__1, &work[1], info); if (*info != 0) { *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; } here += -2; @@ -391,8 +406,9 @@ } } *ilst = here; + AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5); return 0; /* End of STREXC */ } /* strexc_ */ - \ No newline at end of file +