Commit 0d84794a authored by BOUCHERIE Raphael's avatar BOUCHERIE Raphael

testing for zunmqr_param works, compiled with -Wall, added zgels_param

parent 43144c81
......@@ -260,7 +260,7 @@ include_directories(${LIBHQR_INCLUDE_DIRS})
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
if( THREADS_FOUND )
list(APPEND EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
list(APPEND EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
endif ()
# Add math library to the list of extra
......@@ -268,18 +268,18 @@ endif ()
set(M_LIBRARIES "")
if(UNIX OR WIN32)
find_library(
M_m_LIBRARY
NAMES m
)
M_m_LIBRARY
NAMES m
)
mark_as_advanced(M_m_LIBRARY)
if (M_m_LIBRARY)
list(APPEND M_LIBRARIES "${M_m_LIBRARY}")
list(APPEND EXTRA_LIBRARIES "${M_m_LIBRARY}")
list(APPEND M_LIBRARIES "${M_m_LIBRARY}")
list(APPEND EXTRA_LIBRARIES "${M_m_LIBRARY}")
else()
message(FATAL_ERROR "Could NOT find libm on your system."
" Are you sure to a have a C compiler installed?")
message(FATAL_ERROR "Could NOT find libm on your system."
" Are you sure to a have a C compiler installed?")
endif()
endif()
endif()
# Try to find librt (libposix4 - POSIX.1b Realtime Extensions library)
# on Unix systems except Apple ones because it does not exist on it
......
......@@ -131,11 +131,13 @@ set(ZSRC
pzunmlq.c
pzunmlqrh.c
pzunmqr.c
pzunmqr_param.c
pzunmqrrh.c
pztpgqrt.c
pztpqrt.c
###
zgels.c
zgels_param.c
zgelqf.c
zgelqs.c
zgeqrf.c
......
......@@ -52,9 +52,9 @@ void morse_pzgeqrf_param( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_de
MORSE_desc_t *D = NULL;
int k, m, n, i, p;
int K, M, RD;
int ldap, ldam, ldaMRD;
int tempkmin, tempkn, tempMm, tempnn, tempmm, tempMRDm;
int K;
int ldap, ldam;
int tempkmin, tempkn, tempnn, tempmm;
int ib;
int *tiles;
......
......@@ -54,8 +54,8 @@ void morse_pzungqr_param(const libhqr_tree_t *qrtree,
MORSE_desc_t *D = NULL;
int k, m, n, i, p;
int ldak, ldqk, ldam, ldqm, ldqp;
int tempmm, tempnn, tempkmin, tempkm, tempkn;
int ldam, ldqm, ldqp;
int tempmm, tempnn, tempkmin, tempkn;
int ib, minMT;
int *tiles;
......@@ -110,9 +110,6 @@ void morse_pzungqr_param(const libhqr_tree_t *qrtree,
RUNTIME_iteration_push(morse, k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
ldqk = BLKLDD(Q, k);
/* Setting the order of tiles */
libhqr_treewalk(qrtree, k, tiles);
......
This diff is collapsed.
This diff is collapsed.
......@@ -110,7 +110,7 @@
int MORSE_zunmqr_param(const libhqr_tree_t *qrtree,
MORSE_enum side, MORSE_enum trans, int M, int N, int K,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT,
MORSE_desc_t *descTS, MORSE_desc_t *descTT,
MORSE_Complex64_t *C, int LDC)
{
int NB, Am;
......@@ -191,7 +191,7 @@ int MORSE_zunmqr_param(const libhqr_tree_t *qrtree,
/* Call the tile interface */
MORSE_zunmqr_param_Tile_Async(
qrtree, side, trans, &descA, descT, &descC, sequence, &request);
qrtree, side, trans, &descA, descTS, descTT, &descC, sequence, &request);
/* if ( MORSE_TRANSLATION == MORSE_OUTOFPLACE ) {*/
morse_zooptile2lap(descC, C, NB, NB, LDC, N, sequence, &request);
......@@ -260,7 +260,7 @@ int MORSE_zunmqr_param(const libhqr_tree_t *qrtree,
*
******************************************************************************/
int MORSE_zunmqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans,
MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *C)
MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *C)
{
MORSE_context_t *morse;
MORSE_sequence_t *sequence = NULL;
......@@ -273,7 +273,7 @@ int MORSE_zunmqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
MORSE_zunmqr_param_Tile_Async(qrtree, side, trans, A, T, C, sequence, &request);
MORSE_zunmqr_param_Tile_Async(qrtree, side, trans, A, TS, TT, C, sequence, &request);
morse_sequence_wait(morse, sequence);
RUNTIME_desc_getoncpu(A);
RUNTIME_desc_getoncpu(C);
......@@ -313,7 +313,7 @@ int MORSE_zunmqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_
******************************************************************************/
int MORSE_zunmqr_param_Tile_Async(const libhqr_tree_t *qrtree,
MORSE_enum side, MORSE_enum trans,
MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *C,
MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *C,
MORSE_sequence_t *sequence, MORSE_request_t *request)
{
MORSE_context_t *morse;
......@@ -342,14 +342,18 @@ int MORSE_zunmqr_param_Tile_Async(const libhqr_tree_t *qrtree,
morse_error("MORSE_zunmqr_param_Tile", "invalid first descriptor");
return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
}
if (morse_desc_check(T) != MORSE_SUCCESS) {
if (morse_desc_check(TS) != MORSE_SUCCESS) {
morse_error("MORSE_zunmqr_param_Tile", "invalid second descriptor");
return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
}
if (morse_desc_check(C) != MORSE_SUCCESS) {
if (morse_desc_check(TT) != MORSE_SUCCESS) {
morse_error("MORSE_zunmqr_param_Tile", "invalid third descriptor");
return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
}
if (morse_desc_check(C) != MORSE_SUCCESS) {
morse_error("MORSE_zunmqr_param_Tile", "invalid fourth descriptor");
return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
}
/* Check input arguments */
if (A->nb != A->mb || C->nb != C->mb) {
morse_error("MORSE_zunmqr_param_Tile", "only square tiles supported");
......@@ -368,7 +372,7 @@ int MORSE_zunmqr_param_Tile_Async(const libhqr_tree_t *qrtree,
return MORSE_SUCCESS;
*/
morse_pzunmqr_param(qrtree, side, trans, A, C, T, sequence, request);
morse_pzunmqr_param(qrtree, side, trans, A, C, TS, TT, sequence, request);
return MORSE_SUCCESS;
}
......@@ -164,7 +164,7 @@ void morse_pzunmlq_param(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enu
MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzunmqr_param(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans,
MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *TS, MORSE_desc_t *TT,
MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzunglq_param(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
MORSE_sequence_t *sequence, MORSE_request_t *request);
......
......@@ -277,15 +277,18 @@ int MORSE_zunmqr_Tile_Async(MORSE_enum side, MORSE_enum trans, MORSE_desc_t *A,
* Declarations of libhqr dependent functions.
*/
#if defined(CHAMELEON_USE_LIBHQR)
int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int N, int NRHS, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descTS, MORSE_desc_t *descTT, MORSE_Complex64_t *B, int LDB);
int MORSE_zgels_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B);
int MORSE_zgels_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
int MORSE_zgeqrf_param(const libhqr_tree_t *qrtree, int M, int N, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descTS, MORSE_desc_t *descTT);
int MORSE_zgeqrf_param_Tile(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT);
int MORSE_zgeqrf_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_sequence_t *sequence, MORSE_request_t *request);
int MORSE_zungqr_param(const libhqr_tree_t *qrtree, int M, int N, int K, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descTS, MORSE_desc_t *descTT, MORSE_Complex64_t *B, int LDB);
int MORSE_zungqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B);
int MORSE_zungqr_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
int MORSE_zunmqr_param(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans, int M, int N, int K, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descT, MORSE_Complex64_t *B, int LDB);
int MORSE_zunmqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans, MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B);
int MORSE_zunmqr_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans, MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
int MORSE_zungqr_param(const libhqr_tree_t *qrtree, int M, int N, int K, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descTS, MORSE_desc_t *descTT, MORSE_Complex64_t *B, int LDB);
int MORSE_zungqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B);
int MORSE_zungqr_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
int MORSE_zunmqr_param(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans, int M, int N, int K, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descTS, MORSE_desc_t *TT, MORSE_Complex64_t *B, int LDB);
int MORSE_zunmqr_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B);
int MORSE_zunmqr_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum side, MORSE_enum trans, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
#endif /* defined(CHAMELEON_USE_LIBHQR) */
/**
* Declarations of workspace allocation functions (tile layout) - alphabetical order
......
......@@ -79,7 +79,6 @@ int testing_zgels_param(int argc, char **argv)
int K = min(M, N);
double eps;
int info_ortho, info_solution, info_factorization;
int i, j;
int LDAxN = LDA*N;
int LDBxNRHS = LDB*NRHS;
int domino, tsrr, llvl, hlvl, qr_a, qr_p;
......@@ -127,7 +126,7 @@ int testing_zgels_param(int argc, char **argv)
( M >= N ) ? LIBHQR_QR : LIBHQR_LQ,
&matrix, llvl, hlvl, qr_a, qr_p, domino, tsrr );
#if 0
#if 1
/* Initialize A1 and A2 */
LAPACKE_zlarnv_work(IONE, ISEED, LDAxN, A1);
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR, 'A', M, N, A1, LDA, A2, LDA );
......@@ -278,7 +277,7 @@ int testing_zgels_param(int argc, char **argv)
MORSE_zgeqrf_param( &qrtree, M, N, A2, LDA, TS, TT );
MORSE_zungqr_param( &qrtree, M, N, K, A2, LDA, TS, TT, Q, LDA);
MORSE_zunmqr(MorseLeft, MorseConjTrans, M, NRHS, N, A2, LDA, TS, B2, LDB);
MORSE_zunmqr_param( &qrtree, MorseLeft, MorseConjTrans, M, NRHS, N, A2, LDA, TS, TT, B2, LDB);
MORSE_ztrsm(MorseLeft, MorseUpper, MorseNoTrans, MorseNonUnit, N, NRHS, 1.0, A2, LDA, B2, LDB);
}
else {
......@@ -345,7 +344,6 @@ static int check_orthogonality(int M, int N, int LDQ, MORSE_Complex64_t *Q, doub
double alpha, beta;
double normQ;
int info_ortho;
int i;
int minMN = min(M, N);
double *work = (double *)malloc(minMN*sizeof(double));
......
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