Commit 2b411f2c authored by Mathieu Faverge's avatar Mathieu Faverge

Merge branch 'hotfix/sonarqube' into 'master'

Hotfix/sonarqube

See merge request solverstack/chameleon!96
parents 30dfca5c cd988fa4
...@@ -20,86 +20,86 @@ ...@@ -20,86 +20,86 @@
*/ */
#include "control/common.h" #include "control/common.h"
void morse_pzgebrd_ge2gb(MORSE_desc_t A, MORSE_desc_t T, MORSE_desc_t D, void morse_pzgebrd_ge2gb(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D,
MORSE_sequence_t *sequence, MORSE_request_t *request) MORSE_sequence_t *sequence, MORSE_request_t *request)
{ {
int k; int k;
int tempkm, tempkn; int tempkm, tempkn;
if (A.m >= A.n){ MORSE_desc_t *A1, *A2, *T1, *D1 = NULL;
for (k = 0; k < A.nt; k++) {
tempkm = k == A.mt-1 ? A.m-k*A.mb : A.mb;
tempkn = k == A.nt-1 ? A.n-k*A.nb : A.nb;
morse_pzgeqrf( if (A->m >= A->n){
morse_desc_submatrix(&A, k*A.mb, k*A.nb, A.m-k*A.mb, tempkn), for (k = 0; k < A->nt; k++) {
morse_desc_submatrix(&T, k*T.mb, k*T.nb, T.m-k*T.mb, tempkn), tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
morse_desc_submatrix(&D, k*T.mb, k*T.nb, T.m-k*T.mb, tempkn), tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
sequence, request);
morse_pzunmqr( A1 = morse_desc_submatrix(A, k*A->mb, k*A->nb, A->m-k*A->mb, tempkn);
MorseLeft, A2 = morse_desc_submatrix(A, k*A->mb, (k+1)*A->nb, A->m-k*A->mb, A->n-(k+1)*A->nb);
MorseConjTrans, T1 = morse_desc_submatrix(T, k*T->mb, k*T->nb, T->m-k*T->mb, T->nb );
morse_desc_submatrix(&A, k*A.mb, k*A.nb, A.m-k*A.mb, tempkn), if ( D != NULL ) {
morse_desc_submatrix(&A, k*A.mb, (k+1)*A.nb, A.m-k*A.mb, A.n-(k+1)*A.nb), D1 = morse_desc_submatrix(D, k*D->mb, k*D->nb, D->m-k*D->mb, tempkn);
morse_desc_submatrix(&T, k*T.mb, k*T.nb, T.m-k*T.mb, tempkn), }
morse_desc_submatrix(&D, k*T.mb, k*T.nb, T.m-k*T.mb, tempkn),
sequence, request);
if (k+1 < A.nt){ morse_pzgeqrf( A1, T1, D1,
tempkn = k+1 == A.nt-1 ? A.n-(k+1)*A.nb : A.nb; sequence, request);
morse_pzgelqf( morse_pzunmqr( MorseLeft, MorseConjTrans,
morse_desc_submatrix(&A, k*A.mb, (k+1)*A.nb, tempkm, A.n-(k+1)*A.nb), A1, A2, T1, D1,
morse_desc_submatrix(&T, k*T.mb, (k+1)*T.nb, T.mb, T.n-(k+1)*T.nb), sequence, request);
morse_desc_submatrix(&D, k*T.mb, (k+1)*T.nb, T.mb, T.n-(k+1)*T.nb),
sequence, request);
morse_pzunmlq( if (k+1 < A->nt){
MorseRight, MorseConjTrans, tempkn = k+1 == A->nt-1 ? A->n-(k+1)*A->nb : A->nb;
morse_desc_submatrix(&A, k*A.mb, (k+1)*A.nb, tempkm, A.n-(k+1)*A.nb),
morse_desc_submatrix(&A, (k+1)*A.mb, (k+1)*A.nb, A.m-(k+1)*A.mb, A.n-(k+1)*A.nb), A1 = morse_desc_submatrix(A, k*A->mb, (k+1)*A->nb, tempkm, A->n-(k+1)*A->nb);
morse_desc_submatrix(&T, k*T.mb, (k+1)*T.nb, T.mb, T.n-(k+1)*T.nb), A2 = morse_desc_submatrix(A, (k+1)*A->mb, (k+1)*A->nb, A->m-(k+1)*A->mb, A->n-(k+1)*A->nb);
morse_desc_submatrix(&D, k*T.mb, (k+1)*T.nb, T.mb, T.n-(k+1)*T.nb), T1 = morse_desc_submatrix(T, k*T->mb, (k+1)*T->nb, T->mb, T->n-(k+1)*T->nb);
sequence, request); if ( D != NULL ) {
} D1 = morse_desc_submatrix(D, k*D->mb, (k+1)*D->nb, tempkm, D->n-(k+1)*D->nb);
} }
morse_pzgelqf( A1, T1, D1,
sequence, request);
morse_pzunmlq( MorseRight, MorseConjTrans,
A1, A2, T1, D1,
sequence, request);
}
}
} }
else{ else{
for (k = 0; k < A.mt; k++) { for (k = 0; k < A->mt; k++) {
tempkm = k == A.mt-1 ? A.m-k*A.mb : A.mb; tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempkn = k == A.nt-1 ? A.n-k*A.nb : A.nb; tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
A1 = morse_desc_submatrix(A, k*A->mb, k*A->nb, tempkm, A->n-k*A->nb);
A2 = morse_desc_submatrix(A, (k+1)*A->mb, k*A->nb, A->m-(k+1)*A->mb, A->n-k*A->nb);
T1 = morse_desc_submatrix(T, k*T->mb, k*T->nb, T->mb, T->n-k*T->nb);
if ( D != NULL ) {
D1 = morse_desc_submatrix(D, k*D->mb, k*D->nb, tempkm, D->n-k*D->nb);
}
morse_pzgelqf( A1, T1, D1,
sequence, request);
morse_pzgelqf( morse_pzunmlq( MorseRight, MorseConjTrans,
morse_desc_submatrix(&A, k*A.mb, k*A.nb, tempkm, A.n-k*A.nb), A1, A2, T1, D1,
morse_desc_submatrix(&T, k*T.mb, k*T.nb, T.mb, T.n-k*T.nb), sequence, request);
morse_desc_submatrix(&D, k*T.mb, k*T.nb, T.mb, T.n-k*T.nb),
sequence, request);
morse_pzunmlq( if (k+1 < A->mt){
MorseRight, MorseConjTrans, tempkm = k+1 == A->mt-1 ? A->m-(k+1)*A->mb : A->mb;
morse_desc_submatrix(&A, k*A.mb, k*A.nb, tempkm, A.n-k*A.nb),
morse_desc_submatrix(&A, (k+1)*A.mb, k*A.nb, A.m-(k+1)*A.mb, A.n-k*A.nb),
morse_desc_submatrix(&T, k*T.mb, k*T.nb, T.mb, T.n-k*T.nb),
morse_desc_submatrix(&D, k*T.mb, k*T.nb, T.mb, T.n-k*T.nb),
sequence, request);
if (k+1 < A.mt){ A1 = morse_desc_submatrix(A, (k+1)*A->mb, k*A->nb, A->m-(k+1)*A->mb, tempkn);
tempkm = k+1 == A.mt-1 ? A.m-(k+1)*A.mb : A.mb; A2 = morse_desc_submatrix(A, (k+1)*A->mb, (k+1)*A->nb, A->m-(k+1)*A->mb, A->n-(k+1)*A->nb);
T1 = morse_desc_submatrix(T, (k+1)*T->mb, k*T->nb, T->m-(k+1)*T->mb, T->nb );
if ( D != NULL ) {
D1 = morse_desc_submatrix(D, (k+1)*D->mb, k*D->nb, D->m-(k+1)*D->mb, tempkn);
}
morse_pzgeqrf( morse_pzgeqrf( A1, T1, D1,
morse_desc_submatrix(&A, (k+1)*A.mb, k*A.nb, A.m-(k+1)*A.mb, tempkn), sequence, request);
morse_desc_submatrix(&T, (k+1)*T.mb, k*T.nb, T.m-(k+1)*T.mb, tempkn),
morse_desc_submatrix(&D, (k+1)*T.mb, k*T.nb, T.m-(k+1)*T.mb, tempkn),
sequence, request);
morse_pzunmqr( morse_pzunmqr( MorseLeft, MorseConjTrans,
MorseLeft, MorseConjTrans, A1, A2, T1, D1,
morse_desc_submatrix(&A, (k+1)*A.mb, k*A.nb, A.m-(k+1)*A.mb, tempkn), sequence, request);
morse_desc_submatrix(&A, (k+1)*A.mb, (k+1)*A.nb, A.m-(k+1)*A.mb, A.n-(k+1)*A.nb), }
morse_desc_submatrix(&T, (k+1)*T.mb, k*T.nb, T.m-(k+1)*T.mb, tempkn), }
morse_desc_submatrix(&D, (k+1)*T.mb, k*T.nb, T.m-(k+1)*T.mb, tempkn),
sequence, request);
}
}
} }
} }
...@@ -299,7 +299,6 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree, ...@@ -299,7 +299,6 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree,
p = qrtree->currpiv(qrtree, k, n); p = qrtree->currpiv(qrtree, k, n);
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb; tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldbp = BLKLDD(B, p);
if(qrtree->gettype(qrtree, k, n) == 0){ if(qrtree->gettype(qrtree, k, n) == 0){
/* TS kernel */ /* TS kernel */
...@@ -393,7 +392,6 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree, ...@@ -393,7 +392,6 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree,
temppn = p == A->nt-1 ? A->n-p*A->nb : A->nb; temppn = p == A->nt-1 ? A->n-p*A->nb : A->nb;
tempkmin = chameleon_min(tempkm, temppn); tempkmin = chameleon_min(tempkm, temppn);
ldbp = BLKLDD(B, p);
#if defined(CHAMELEON_COPY_DIAG) #if defined(CHAMELEON_COPY_DIAG)
MORSE_TASK_zlacpy( MORSE_TASK_zlacpy(
...@@ -433,7 +431,6 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree, ...@@ -433,7 +431,6 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree,
p = qrtree->currpiv(qrtree, k, n); p = qrtree->currpiv(qrtree, k, n);
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb; tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldbp = BLKLDD(B, p);
if(qrtree->gettype(qrtree, k, n) == 0){ if(qrtree->gettype(qrtree, k, n) == 0){
/* TS kernel */ /* TS kernel */
......
...@@ -300,9 +300,8 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree, ...@@ -300,9 +300,8 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree,
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb; tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldan = BLKLDD(A, n); ldan = BLKLDD(A, n);
ldbp = BLKLDD(B, p);
if(qrtree->gettype(qrtree, k, n) == 0){ if( qrtree->gettype(qrtree, k, n) == 0 ) {
/* TS kernel */ /* TS kernel */
L = 0; L = 0;
T = TS; T = TS;
...@@ -312,6 +311,7 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree, ...@@ -312,6 +311,7 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree,
L = tempmm; L = tempmm;
T = TT; T = TT;
} }
for (m = 0; m < B->mt; m++) { for (m = 0; m < B->mt; m++) {
tempmm = m == B->mt-1 ? B->m-m*B->mb : B->mb; tempmm = m == B->mt-1 ? B->m-m*B->mb : B->mb;
ldbm = BLKLDD(B, m); ldbm = BLKLDD(B, m);
...@@ -324,7 +324,7 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree, ...@@ -324,7 +324,7 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree,
MORSE_TASK_ztpmqrt( MORSE_TASK_ztpmqrt(
&options, &options,
side, trans, side, trans,
tempmm, tempnn, tempkn, L, ib, T->nb, tempmm, tempnn, tempkn, chameleon_min( L, tempmm ), ib, T->nb,
A(n, k), ldan, A(n, k), ldan,
T(n, k), T->mb, T(n, k), T->mb,
B(m, p), ldbm, B(m, p), ldbm,
...@@ -432,16 +432,15 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree, ...@@ -432,16 +432,15 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree,
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb; tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldan = BLKLDD(A, n); ldan = BLKLDD(A, n);
ldbp = BLKLDD(B, p);
if(qrtree->gettype(qrtree, k, n) == 0){ if( qrtree->gettype(qrtree, k, n) == 0 ) {
/* TS kernel */ /* TS kernel */
L = 0; L = 0;
T = TS; T = TS;
} }
else { else {
/* TT kernel */ /* TT kernel */
L = tempmm; L = A->mb;
T = TT; T = TT;
} }
...@@ -457,7 +456,7 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree, ...@@ -457,7 +456,7 @@ void morse_pzunmqr_param(const libhqr_tree_t *qrtree,
MORSE_TASK_ztpmqrt( MORSE_TASK_ztpmqrt(
&options, &options,
side, trans, side, trans,
tempmm, tempnn, tempkn, L, ib, T->nb, tempmm, tempnn, tempkn, chameleon_min( L, tempmm ), ib, T->nb,
A(n, k), ldan, A(n, k), ldan,
T(n, k), T->mb, T(n, k), T->mb,
B(m, p), ldbm, B(m, p), ldbm,
......
...@@ -467,6 +467,7 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt, ...@@ -467,6 +467,7 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt,
NB = descA.mb; NB = descA.mb;
LDAB = NB + 1; LDAB = NB + 1;
uplo = M >= N ? MorseUpper : MorseLower; uplo = M >= N ? MorseUpper : MorseLower;
#if defined(CHAMELEON_COPY_DIAG) #if defined(CHAMELEON_COPY_DIAG)
{ {
morse_zdesc_alloc(D, A->mb, A->nb, A->m, A->n, 0, 0, A->m, A->n, ); morse_zdesc_alloc(D, A->mb, A->nb, A->m, A->n, 0, 0, A->m, A->n, );
...@@ -474,7 +475,7 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt, ...@@ -474,7 +475,7 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt,
} }
#endif #endif
/* Reduction to band */ /* Reduction to band */
morse_pzgebrd_ge2gb( descA, descT, D, morse_pzgebrd_ge2gb( &descA, &descT, Dptr,
sequence, request ); sequence, request );
/* Allocate band structure */ /* Allocate band structure */
...@@ -498,6 +499,7 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt, ...@@ -498,6 +499,7 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt,
} }
memset(E, 0, MINMN * sizeof(double) ); memset(E, 0, MINMN * sizeof(double) );
#if !defined(CHAMELEON_SIMULATION)
/* NCC = 0, C = NULL, we do not update any matrix with new singular vectors */ /* NCC = 0, C = NULL, we do not update any matrix with new singular vectors */
/* On exit, AB = U (S +~ E) VT */ /* On exit, AB = U (S +~ E) VT */
if (uplo == MorseUpper){ if (uplo == MorseUpper){
...@@ -535,7 +537,6 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt, ...@@ -535,7 +537,6 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt,
morse_sequence_wait( morse, sequence ); morse_sequence_wait( morse, sequence );
#if !defined(CHAMELEON_SIMULATION)
info = LAPACKE_zgbbrd( LAPACK_COL_MAJOR, info = LAPACKE_zgbbrd( LAPACK_COL_MAJOR,
gbbrd_vect, gbbrd_vect,
M, N, M, N,
...@@ -548,7 +549,10 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt, ...@@ -548,7 +549,10 @@ int MORSE_zgesvd_Tile_Async( MORSE_enum jobu, MORSE_enum jobvt,
if (info != 0) { if (info != 0) {
fprintf(stderr, "MORSE_zgesvd_Tile_Async: LAPACKE_zgbbrd = %d\n", info ); fprintf(stderr, "MORSE_zgesvd_Tile_Async: LAPACKE_zgbbrd = %d\n", info );
} }
#else
morse_sequence_wait( morse, sequence );
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */
morse_desc_mat_free( &descAB ); morse_desc_mat_free( &descAB );
/* Transform U and Vt into tile format */ /* Transform U and Vt into tile format */
......
...@@ -525,7 +525,6 @@ int MORSE_zheevd_Tile_Async( MORSE_enum jobz, MORSE_enum uplo, ...@@ -525,7 +525,6 @@ int MORSE_zheevd_Tile_Async( MORSE_enum jobz, MORSE_enum uplo,
/* Cleanup the temporary data */ /* Cleanup the temporary data */
morse_desc_mat_free( &descV ); morse_desc_mat_free( &descV );
free(V); free(V);
free(E); free(E);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free( Dptr ); morse_desc_mat_free( Dptr );
......
...@@ -65,7 +65,7 @@ void morse_pzbarrier_row2tl(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_r ...@@ -65,7 +65,7 @@ void morse_pzbarrier_row2tl(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_r
void morse_pzbarrier_tl2pnl(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzbarrier_tl2pnl(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzbarrier_tl2row(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzbarrier_tl2row(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzgebrd_gb2bd(MORSE_enum uplo, MORSE_desc_t *A, double *D, double *E, MORSE_desc_t *T, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzgebrd_gb2bd(MORSE_enum uplo, MORSE_desc_t *A, double *D, double *E, MORSE_desc_t *T, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzgebrd_ge2gb(MORSE_desc_t A, MORSE_desc_t T, MORSE_desc_t D, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzgebrd_ge2gb(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, int BS, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, int BS, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzgemm(MORSE_enum transA, MORSE_enum transB, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzgemm(MORSE_enum transA, MORSE_enum transB, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request);
......
...@@ -40,7 +40,7 @@ if(DOXYGEN_EXECUTABLE) ...@@ -40,7 +40,7 @@ if(DOXYGEN_EXECUTABLE)
if(CHAMELEON_SCHED_STARPU) if(CHAMELEON_SCHED_STARPU)
configure_file("conf-dev-starpu.dox.in" configure_file("conf-dev-starpu.dox.in"
"chameleon-dev.dox" "${CMAKE_CURRENT_BINARY_DIR}/chameleon-dev.dox"
@ONLY) @ONLY)
# configure_file("conf-usr-starpu.dox.in" # configure_file("conf-usr-starpu.dox.in"
# "chameleon-usr.dox" # "chameleon-usr.dox"
...@@ -49,7 +49,7 @@ if(DOXYGEN_EXECUTABLE) ...@@ -49,7 +49,7 @@ if(DOXYGEN_EXECUTABLE)
elseif(CHAMELEON_SCHED_QUARK) elseif(CHAMELEON_SCHED_QUARK)
configure_file("conf-dev-quark.dox.in" configure_file("conf-dev-quark.dox.in"
"chameleon-dev.dox" "${CMAKE_CURRENT_BINARY_DIR}/chameleon-dev.dox"
@ONLY) @ONLY)
# configure_file("conf-usr-quark.dox.in" # configure_file("conf-usr-quark.dox.in"
# "chameleon-usr.dox" # "chameleon-usr.dox"
......
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