Skip to content

Commit

Permalink
bug: if multiple blocks initial approx in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
petschow committed May 15, 2013
1 parent 99f1fa6 commit 8d10fb3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
16 changes: 0 additions & 16 deletions SRC/LAPACK/odebz.f
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ SUBROUTINE ODEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
* Compute the number of eigenvalues in the initial intervals.
*
MOUT = 0
*DIR$ NOVECTOR
DO 30 JI = 1, MINP
DO 20 JP = 1, 2
TMP1 = D( 1 ) - AB( JI, JP )
Expand Down Expand Up @@ -406,21 +405,6 @@ SUBROUTINE ODEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
ITMP1 = 1
TMP2 = MIN( TMP2, -PIVMIN )
END IF
*
* A series of compiler directives to defeat vectorization
* for the next loop
*
*$PL$ CMCHAR=' '
CDIR$ NEXTSCALAR
C$DIR SCALAR
CDIR$ NEXT SCALAR
CVD$L NOVECTOR
CDEC$ NOVECTOR
CVD$ NOVECTOR
*VDIR NOVECTOR
*VOCL LOOP,SCALAR
CIBM PREFER SCALAR
*$PL$ CMCHAR='*'
*
DO 90 J = 2, N
TMP2 = D( J ) - E2( J-1 ) / TMP2 - TMP1
Expand Down
3 changes: 2 additions & 1 deletion SRC/mrrr.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ int mrrr(char *jobz, char *range, int *np, double *restrict D,
tolstruct->rtol2 = fmax(tolstruct->rtol2, 4.0 * DBL_EPSILON);
}
/* LAPACK: tolstruct->bsrtol = sqrt(DBL_EPSILON); */
tolstruct->bsrtol = fmin(tolstruct->rtol1, sqrt(DBL_EPSILON));
// tolstruct->bsrtol = fmin(tolstruct->rtol1, sqrt(DBL_EPSILON));
tolstruct->bsrtol = MIN_RELGAP;
tolstruct->RQtol = 2.0 * DBL_EPSILON;

/* Compute the desired eigenvalues */
Expand Down
4 changes: 3 additions & 1 deletion SRC/mrrr_val.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ int find_eigval_approx(int max_nthreads, char *range, in_t *Dstruct,
while (nthreads > 1 && nvals/nthreads < MIN_BISEC_CHUNK)
nthreads--;

if (nthreads > 1) {
/* Disabled the parallel execution if matrix splits into multiple blocks
as it is not reliable as it is; need to be done with more care */
if (nthreads > 1 && nsplit == 1) {

threads = (pthread_t *) malloc( nthreads * sizeof(pthread_t) );
assert(threads != NULL);
Expand Down

0 comments on commit 8d10fb3

Please sign in to comment.