Commit 2d2e102a authored by PRUVOST Florent's avatar PRUVOST Florent

fix the problem of diag tile copy appearing in QUARK case

parent 97fe07d3
......@@ -32,7 +32,11 @@
#define A(m,n) A, m, n
#define T(m,n) T, m, n
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(k) DIAG, k, 0
#else
#define DIAG(k) A, k, k
#endif
/***************************************************************************//**
* Parallel tile LQ factorization - dynamic scheduling
......@@ -112,11 +116,13 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
A(k, k), ldak,
T(k, k), T->mb);
if ( k < (A->mt-1) ) {
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, A->mb, A->nb, A->nb,
A(k, k), ldak,
DIAG(k), A->mb );
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -36,7 +36,11 @@
#define A(m,n) A, (m), (n)
#define T(m,n) T, (m), (n)
#define T2(m,n) T, (m), (n)+A->nt
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(m,n) DIAG, ((n)/BS), 0
#else
#define DIAG(m,n) A, (m), (n)
#endif
/***************************************************************************//**
* Parallel tile LQ factorization (reduction Householder) - dynamic scheduling
......@@ -117,11 +121,13 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
A(k, N), ldak,
T(k, N), T->mb);
if ( k < (A->mt-1) ) {
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkm, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -32,7 +32,11 @@
#define A(m,n) A, m, n
#define T(m,n) T, m, n
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(k) DIAG, k, 0
#else
#define DIAG(k) A, k, k
#endif
/***************************************************************************//**
* Parallel tile QR factorization - dynamic scheduling
......@@ -107,11 +111,13 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
A(k, k), ldak,
T(k, k), T->mb);
if ( k < (A->nt-1) ) {
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, A->mb, A->nb, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -34,7 +34,11 @@
#define A(m,n) A, (m), (n)
#define T(m,n) T, (m), (n)
#define T2(m,n) T, (m), ((n)+A->nt)
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(m,n) DIAG, ((m)/BS), 0
#else
#define DIAG(m,n) A, (m), (n)
#endif
/***************************************************************************//**
* Parallel tile QR factorization (reduction Householder) - dynamic scheduling
......@@ -116,11 +120,13 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
A(M, k), ldaM,
T(M, k), T->mb);
if ( k < (A->nt-1) ) {
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, A->nb, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, A->nb, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -33,7 +33,11 @@
#include "common.h"
#define A(_m_,_n_) A, _m_, _n_
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(_k_) DIAG, _k_, 0
#else
#define DIAG(_k_) A, _k_, _k_
#endif
#define L(_m_,_n_) L, _m_, _n_
#define IPIV(_m_,_n_) &(IPIV[(int64_t)A->mb*((int64_t)(_m_)+(int64_t)A->mt*(int64_t)(_n_))])
......@@ -86,11 +90,13 @@ void morse_pzgetrf_incpiv(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV,
k == A->mt-1, A->nb*k);
if ( k < (minMNT-1) ) {
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpperLower, tempkm, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak);
#endif
}
for (n = k+1; n < A->nt; n++) {
......
......@@ -33,7 +33,11 @@
#define A(m,n) A, m, n
#define Q(m,n) Q, m, n
#define T(m,n) T, m, n
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(k) DIAG, k, 0
#else
#define DIAG(k) A, k, k
#endif
/***************************************************************************//**
* Parallel construction of Q using tile V (application to identity) - dynamic scheduling
......@@ -112,11 +116,13 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
T(k, n), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -33,7 +33,11 @@
#define Q(m,n) Q, (m), (n)
#define T(m,n) T, (m), (n)
#define T2(m,n) T, (m), (n)+(A->nt)
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(m,n) DIAG, ((n)/BS), 0
#else
#define DIAG(m,n) A, (m), (n)
#endif
/**
* Parallel construction of Q using tile V (application to identity;
......@@ -135,11 +139,13 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
T(k, n), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -33,7 +33,11 @@
#define A(m,n) A, m, n
#define Q(m,n) Q, m, n
#define T(m,n) T, m, n
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(k) DIAG, k, 0
#else
#define DIAG(k) A, k, k
#endif
/***************************************************************************//**
* Parallel construction of Q using tile V (application to identity) - dynamic scheduling
......@@ -108,11 +112,13 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
T(m, k), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -35,7 +35,11 @@
#define Q(m,n) Q, (m), (n)
#define T(m,n) T, (m), (n)
#define T2(m,n) T, (m), (n)+(A->nt)
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(m,n) DIAG, ((m)/BS), 0
#else
#define DIAG(m,n) A, (m), (n)
#endif
/**
* Parallel construction of Q using tile V (application to identity;
......@@ -141,11 +145,13 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
T(m, k), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -34,7 +34,11 @@
#define A(m,n) A, m, n
#define B(m,n) B, m, n
#define T(m,n) T, m, n
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(k) DIAG, k, 0
#else
#define DIAG(k) A, k, k
#endif
/***************************************************************************//**
* Parallel application of Q using tile V - LQ factorization - dynamic scheduling
......@@ -103,11 +107,13 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
ldbk = BLKLDD(B, k);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempkm, A->nb,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -166,11 +172,13 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
T(k, m), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempkm, A->nb,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -215,11 +223,13 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
T(k, n), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -248,11 +258,13 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
tempkn = k == B->nt -1 ? B->n -k*B->nb : B->nb;
tempkmin = k == minMT-1 ? minM-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -35,7 +35,11 @@
#define B(m,n) B, (m), (n)
#define T(m,n) T, (m), (n)
#define T2(m,n) T, (m), (n)+A->nt
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(m,n) DIAG, ((n)/BS), 0
#else
#define DIAG(m,n) A, (m), (n)
#endif
/***************************************************************************//**
* Parallel application of Q using tile V - LQ factorization (reduction
......@@ -106,11 +110,13 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
tempkmin = min(tempkm,tempNn);
ldaN = BLKLDD(A, N);
ldbN = BLKLDD(B, N);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -216,11 +222,13 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
T(k, m), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -291,11 +299,13 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
T(k, n), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -328,11 +338,13 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
tempNn = N == A->nt-1 ? A->n-N*A->nb : A->nb;
tempkmin = min(tempkm,tempNn);
ldaN = BLKLDD(A, N);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldaN,
DIAG(k, N), ldaN );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -34,7 +34,11 @@
#define A(m,n) A, m, n
#define B(m,n) B, m, n
#define T(m,n) T, m, n
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(k) DIAG, k, 0
#else
#define DIAG(k) A, k, k
#endif
/***************************************************************************//**
* Parallel application of Q using tile V - QR factorization - dynamic scheduling
......@@ -103,11 +107,13 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
ldbk = BLKLDD(B, k);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -168,11 +174,13 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
T(m, k), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -219,11 +227,13 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
T(n, k), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempkn, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -252,11 +262,13 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
tempkn = k == B->nt-1 ? B->n-k*B->nb : B->nb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempkn, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -35,7 +35,11 @@
#define B(m,n) B, (m), (n)
#define T(m,n) T, (m), (n)
#define T2(m,n) T, (m), ((n)+A->nt)
#if defined(CHAMELEON_COPY_DIAG)
#define DIAG(m,n) DIAG, ((m)/BS), 0
#else
#define DIAG(m,n) A, (m), (n)
#endif
/***************************************************************************//**
* Parallel application of Q using tile V - QR factorization (reduction
......@@ -105,11 +109,13 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
tempkmin = min(tempMm, tempkn);
ldaM = BLKLDD(A, M);
ldbM = BLKLDD(B, M);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -218,11 +224,13 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
T(m, k), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -295,11 +303,13 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
T(n, k), T->mb);
}
}
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......@@ -331,11 +341,13 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
tempMm = M == A->mt-1 ? A->m-M*A->mb : A->mb;
tempkmin = min(tempMm, tempkn);
ldaM = BLKLDD(A, M);
#if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy(
&options,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
......
......@@ -136,6 +136,12 @@
#define MORSE_MPI_SIZE morse->mpi_comm_size
#endif
/*******************************************************************************
* Activate copy of diagonal tile (StarPU only) for some tile algorithms (pz)
**/
#if defined(CHAMELEON_SCHED_STARPU)
#define CHAMELEON_COPY_DIAG
#endif
/*******************************************************************************
* IPT internal define
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment