Skip to content

Commit c49c6b2

Browse files
authored
Merge pull request #1382 from martin-frbg/dtrmv-1332
Work around errors in multithreaded dtrmv
2 parents e2469a9 + b414283 commit c49c6b2

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

driver/level2/trmv_U.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *b, BLASLONG incb, FLOAT *bu
5454
COPY_K(m, b, incb, buffer, 1);
5555
}
5656

57-
for (is = 0; is < m; is += DTB_ENTRIES){
57+
/*FIXME the GEMV unrolling performed here was found to be broken, see issue 1332 */
58+
/* Multiplying DTB size by 100 is just a quick-and-dirty hack to disable it for now[B */
5859

59-
min_i = MIN(m - is, DTB_ENTRIES);
60+
for (is = 0; is < m; is += DTB_ENTRIES * 100){
61+
62+
min_i = MIN(m - is, DTB_ENTRIES * 100);
6063

6164
#ifndef TRANSA
6265
if (is > 0){
66+
fprintf(stderr,"WARNING unrolling of the trmv_U loop may give wrong results\n");
6367
GEMV_N(is, min_i, 0, dp1,
6468
a + is * lda, lda,
6569
B + is, 1,

interface/trmv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
220220
#ifdef SMP
221221
nthreads = num_cpu_avail(2);
222222

223+
/*FIXME trmv_thread was found to be broken, see issue 1332 */
224+
nthreads = 1;
225+
223226
if (nthreads == 1) {
224227
#endif
225228

0 commit comments

Comments
 (0)