From 6462bc8fcd279f65ff446d0131261d326c0817bd Mon Sep 17 00:00:00 2001 From: Alycia Lisito <alycia.lisito@inria.fr> Date: Fri, 11 Feb 2022 15:10:05 +0100 Subject: [PATCH] testing: add check api std for cholesky --- testing/testing_zpoinv.c | 2 +- testing/testing_zposv.c | 14 +++++++------- testing/testing_zpotrf.c | 2 +- testing/testing_zpotri.c | 2 +- testing/testing_zpotrs.c | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/testing/testing_zpoinv.c b/testing/testing_zpoinv.c index db8d2f939..e6fcd3f3e 100644 --- a/testing/testing_zpoinv.c +++ b/testing/testing_zpoinv.c @@ -122,7 +122,7 @@ testing_zpoinv_std( run_arg_list_t *args, int check ) CHAMELEON_Complex64_t *A0 = malloc( LDA * N * sizeof(CHAMELEON_Complex64_t) ); CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA ); - // hres += check_ztrtri( args, ChamHermitian, uplo, ChamNonUnit, descA0, descA ); + hres += check_ztrtri_std( args, ChamHermitian, uplo, ChamNonUnit, N, A0, A, LDA ); free( A0 ); } diff --git a/testing/testing_zposv.c b/testing/testing_zposv.c index be1aead94..89eaf2c77 100644 --- a/testing/testing_zposv.c +++ b/testing/testing_zposv.c @@ -142,22 +142,22 @@ testing_zposv_std( run_arg_list_t *args, int check ) /* Checks the factorisation and residue */ if ( check ) { - CHAMELEON_Complex64_t *A0 = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); - CHAMELEON_Complex64_t *X0 = malloc( LDB*NRHS*sizeof(CHAMELEON_Complex64_t) ); + CHAMELEON_Complex64_t *A0 = malloc( LDA*N* sizeof(CHAMELEON_Complex64_t) ); + CHAMELEON_Complex64_t *B = malloc( LDB*NRHS*sizeof(CHAMELEON_Complex64_t) ); /* Check the factorization */ CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA ); - // hres += check_zxxtrf( args, ChamHermitian, uplo, descA0, descA ); + hres += check_zxxtrf_std( args, ChamHermitian, uplo, N, NRHS, A0, A, LDA ); /* Check the solve */ - CHAMELEON_zplrnt( N, NRHS, X0, LDB, seedB ); + CHAMELEON_zplrnt( N, NRHS, B, LDB, seedB ); CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA ); - // hres += check_zsolve( args, ChamHermitian, ChamNoTrans, uplo, descA0, descX, descB ); + hres += check_zsolve_std( args, ChamHermitian, ChamNoTrans, uplo, N, NRHS, A0, LDA, X, B, LDB ); free( A0 ); - free( X0 ); + free( B ); } free( A ); @@ -170,7 +170,7 @@ testing_t test_zposv; const char *zposv_params[] = { "mtxfmt", "nb", "uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; const char *zposv_output[] = { NULL }; -const char *zposv_outchk[] = { "RETURN", NULL }; +const char *zposv_outchk[] = { "||A||", "||A-fact(A)||", "||X||", "||B||", "||Ax-b||", "||Ax-b||/N/eps/(||A||||x||+||b||", "RETURN", NULL }; /** * @brief Testing registration function diff --git a/testing/testing_zpotrf.c b/testing/testing_zpotrf.c index a584be5a2..6e724d958 100644 --- a/testing/testing_zpotrf.c +++ b/testing/testing_zpotrf.c @@ -113,7 +113,7 @@ testing_zpotrf_std( run_arg_list_t *args, int check ) CHAMELEON_Complex64_t *A0 = malloc( LDA * N * sizeof(CHAMELEON_Complex64_t) ); CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA ); - // hres += check_zxxtrf( args, ChamHermitian, uplo, A0, A ); + hres += check_zxxtrf_std( args, ChamHermitian, uplo, N, N, A0, A, LDA ); free( A0 ); } diff --git a/testing/testing_zpotri.c b/testing/testing_zpotri.c index 072a99806..4488cce07 100644 --- a/testing/testing_zpotri.c +++ b/testing/testing_zpotri.c @@ -121,7 +121,7 @@ testing_zpotri_std( run_arg_list_t *args, int check ) CHAMELEON_Complex64_t *A0 = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA ); - // hres += check_ztrtri( args, ChamHermitian, uplo, ChamNonUnit, descA0, descA ); + hres += check_ztrtri_std( args, ChamHermitian, uplo, ChamNonUnit, N, A0, A, LDA ); free( A0 ); } diff --git a/testing/testing_zpotrs.c b/testing/testing_zpotrs.c index cb7b2715e..5d6d95ec6 100644 --- a/testing/testing_zpotrs.c +++ b/testing/testing_zpotrs.c @@ -117,7 +117,7 @@ testing_zpotrs_std( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - A = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); + A = malloc( LDA*N* sizeof(CHAMELEON_Complex64_t) ); X = malloc( LDB*NRHS*sizeof(CHAMELEON_Complex64_t) ); /* Fills the matrix with random values */ @@ -135,16 +135,16 @@ testing_zpotrs_std( run_arg_list_t *args, int check ) /* Checks the factorisation and residue */ if ( check ) { - CHAMELEON_Complex64_t *A0 = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); - CHAMELEON_Complex64_t *X0 = malloc( LDB*NRHS*sizeof(CHAMELEON_Complex64_t) ); + CHAMELEON_Complex64_t *A0 = malloc( LDA*N* sizeof(CHAMELEON_Complex64_t) ); + CHAMELEON_Complex64_t *B = malloc( LDB*NRHS*sizeof(CHAMELEON_Complex64_t) ); CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA ); - CHAMELEON_zplrnt( N, NRHS, X0, LDB, seedB ); + CHAMELEON_zplrnt( N, NRHS, B, LDB, seedB ); - // hres += check_zsolve( args, ChamHermitian, ChamNoTrans, uplo, descA0, descX, descB ); + hres += check_zsolve_std( args, ChamHermitian, ChamNoTrans, uplo, N, NRHS, A0, LDA, X, B, LDB ); free( A0 ); - free( X0 ); + free( B ); } free( A ); -- GitLab