diff --git a/control/auxiliary.c b/control/auxiliary.c index d299d8fa8b47f9c5e2eb04f6a66c62c8dbafdc78..15fc1905e108ae08ced208a05fa2d1e85fe8d184 100644 --- a/control/auxiliary.c +++ b/control/auxiliary.c @@ -19,7 +19,7 @@ * @author Florent Pruvost * @author Guillaume Sylvand * @author Mathieu Faverge - * @date 2023-07-04 + * @date 2023-07-05 * *** * @@ -78,7 +78,7 @@ void chameleon_warning(const char *func_name, const char *msg_text) */ void chameleon_error(const char *func_name, const char *msg_text) { - fprintf(stderr, "CHAMELEON ERROR: %s(): %s\n", func_name, msg_text); + fprintf( stderr, "CHAMELEON ERROR: %s(): %s\n", func_name, msg_text ); } /** diff --git a/testing/testing_zcesca.c b/testing/testing_zcesca.c index 1ac5b7816b0f37c759f4f1b601ad63d2c5a316dc..166f0239bfa671c306bf18027d4c1fec8a0533f5 100644 --- a/testing/testing_zcesca.c +++ b/testing/testing_zcesca.c @@ -9,11 +9,11 @@ * * @brief Chameleon zcesca testing * - * @version 1.2.0 + * @version 1.3.0 * @author Florent Pruvost * @author Alycia Lisito * @author Philippe Swartvagher - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -46,15 +46,12 @@ testing_zcesca_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", M ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", M ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -63,8 +60,7 @@ testing_zcesca_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -90,7 +86,7 @@ testing_zcesca_desc( run_arg_list_t *args, int check ) CHAMELEON_zgemm_WS_Free( ws ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); (void)check; return hres; diff --git a/testing/testing_zgeadd.c b/testing/testing_zgeadd.c index fbf52a03bea8c2641b95af80da5d8cab91e77b18..512903444d97ed840e5174bd620291d9c138d2c8 100644 --- a/testing/testing_zgeadd.c +++ b/testing/testing_zgeadd.c @@ -47,18 +47,15 @@ testing_zgeadd_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) ); - int LDB = run_arg_get_int( args, "LDB", M ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) ); + int LDB = run_arg_get_int( args, "LDB", M ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); @@ -81,10 +78,8 @@ testing_zgeadd_desc( run_arg_list_t *args, int check ) } /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -114,8 +109,8 @@ testing_zgeadd_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB0 ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); return hres; } diff --git a/testing/testing_zgemm.c b/testing/testing_zgemm.c index 84272df649db94d0d70da9143118bcb0ba99ff9c..7084304dbe6999fa948b54111e4f35beb6a5e568 100644 --- a/testing/testing_zgemm.c +++ b/testing/testing_zgemm.c @@ -9,12 +9,12 @@ * * @brief Chameleon zgemm testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-11 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -36,7 +36,6 @@ testing_zgemm_desc( run_arg_list_t *args, int check ) /* Read arguments */ int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); int P = parameters_getvalue_int( "P" ); cham_trans_t transA = run_arg_get_trans( args, "transA", ChamNoTrans ); @@ -83,12 +82,9 @@ testing_zgemm_desc( run_arg_list_t *args, int check ) } /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, Bn, Bm, Bn ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, M, N ); /* Fill the matrices with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -121,7 +117,7 @@ testing_zgemm_desc( run_arg_list_t *args, int check ) /* Check the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descCinit, seedC ); hres += check_zgemm( args, transA, transB, alpha, descA, descB, beta, descCinit, descC ); @@ -129,9 +125,9 @@ testing_zgemm_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zgesv_nopiv.c b/testing/testing_zgesv_nopiv.c index 1593f85a6fe477e8ac7a13bc08ae05b6a7f69147..9b9a624266760d0dd73f21a5624a69657bd0f73e 100644 --- a/testing/testing_zgesv_nopiv.c +++ b/testing/testing_zgesv_nopiv.c @@ -36,18 +36,15 @@ testing_zgesv_nopiv_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - int N = run_arg_get_int( args, "N", 1000 ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - double bump = run_arg_get_double( args, "bump", (double)N ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int N = run_arg_get_int( args, "N", 1000 ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + double bump = run_arg_get_double( args, "bump", (double)N ); /* Descriptors */ CHAM_desc_t *descA, *descX; @@ -55,10 +52,8 @@ testing_zgesv_nopiv_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); - CHAMELEON_Desc_Create( - &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); + parameters_desc_create( "X", &descX, ChamComplexDouble, nb, nb, LDB, NRHS, N, NRHS ); /* Fills the matrix with random values */ CHAMELEON_zplgtr_Tile( 0, ChamUpper, descA, seedA ); @@ -100,8 +95,8 @@ testing_zgesv_nopiv_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descX ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descX ); return hres; } diff --git a/testing/testing_zgetrf.c b/testing/testing_zgetrf.c index 4fb585532858bbeb2869037ce4fbbf69a380ed82..978017c413f879736b8f1321b081618608c45622 100644 --- a/testing/testing_zgetrf.c +++ b/testing/testing_zgetrf.c @@ -33,17 +33,14 @@ testing_zgetrf_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", M ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - cham_diag_t diag = run_arg_get_diag( args, "diag", ChamUnit ); - int Q = parameters_compute_q( P ); - int minMN = chameleon_min( M, N ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", M ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + cham_diag_t diag = run_arg_get_diag( args, "diag", ChamUnit ); + int minMN = chameleon_min( M, N ); /* Descriptors */ CHAM_desc_t *descA, *descIPIV; @@ -52,10 +49,9 @@ testing_zgetrf_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); - CHAMELEON_Desc_Create( - &descIPIV, CHAMELEON_MAT_ALLOC_TILE, ChamInteger, nb, 1, nb, minMN, 1, 0, 0, minMN, 1, P, Q ); + &descIPIV, CHAMELEON_MAT_ALLOC_TILE, ChamInteger, nb, 1, nb, minMN, 1, 0, 0, minMN, 1, CHAMELEON_Comm_size(), 1 ); /* Fills the matrix with random values */ if ( diag == ChamUnit ) { @@ -132,7 +128,7 @@ testing_zgetrf_desc( run_arg_list_t *args, int check ) CHAMELEON_zgetrf_WS_Free( ws ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); CHAMELEON_Desc_Destroy( &descIPIV ); return hres; diff --git a/testing/testing_zgetrf_nopiv.c b/testing/testing_zgetrf_nopiv.c index 2d29e5493ad68fc98e3b26a4ff0b46c23076c182..099898fd0eca15b337b017619faa29a584c9935c 100644 --- a/testing/testing_zgetrf_nopiv.c +++ b/testing/testing_zgetrf_nopiv.c @@ -29,16 +29,13 @@ testing_zgetrf_nopiv_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", M ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - double bump = run_arg_get_double( args, "bump", (double)N ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", M ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + double bump = run_arg_get_double( args, "bump", (double)N ); /* Descriptors */ CHAM_desc_t *descA; @@ -46,8 +43,7 @@ testing_zgetrf_nopiv_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplgtr_Tile( 0, ChamUpper, descA, seedA ); @@ -76,7 +72,7 @@ testing_zgetrf_nopiv_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zgetrs_nopiv.c b/testing/testing_zgetrs_nopiv.c index 9bd503a6b6e40976d1fe1dcafccfb7c3655f84d3..2e611763d500e9f5f9f828c883f3c5d25e50d4d3 100644 --- a/testing/testing_zgetrs_nopiv.c +++ b/testing/testing_zgetrs_nopiv.c @@ -30,18 +30,15 @@ testing_zgetrs_nopiv_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - int N = run_arg_get_int( args, "N", 1000 ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - double bump = run_arg_get_double( args, "bump", (double)N ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int N = run_arg_get_int( args, "N", 1000 ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + double bump = run_arg_get_double( args, "bump", (double)N ); /* Descriptors */ CHAM_desc_t *descA, *descX; @@ -49,10 +46,8 @@ testing_zgetrs_nopiv_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); - CHAMELEON_Desc_Create( - &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); + parameters_desc_create( "X", &descX, ChamComplexDouble, nb, nb, LDB, NRHS, N, NRHS ); /* Fills the matrix with random values */ CHAMELEON_zplgtr_Tile( 0, ChamUpper, descA, seedA ); @@ -92,8 +87,8 @@ testing_zgetrs_nopiv_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descX ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descX ); return hres; } diff --git a/testing/testing_zgram.c b/testing/testing_zgram.c index b43fcc8b57641983fc424b660777a652d50e1c9a..d23f17d780393573d5a7bcf2381bca53fda30e7b 100644 --- a/testing/testing_zgram.c +++ b/testing/testing_zgram.c @@ -9,11 +9,11 @@ * * @brief Chameleon zgram testing * - * @version 1.2.0 + * @version 1.3.0 * @author Florent Pruvost * @author Alycia Lisito * @author Philippe Swartvagher - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -45,15 +45,12 @@ testing_zgram_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int P = parameters_getvalue_int( "P" ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -62,8 +59,7 @@ testing_zgram_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Fill the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -89,7 +85,7 @@ testing_zgram_desc( run_arg_list_t *args, int check ) CHAMELEON_zgemm_WS_Free( ws ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); (void)check; return hres; diff --git a/testing/testing_zhemm.c b/testing/testing_zhemm.c index bdd9d928b8b638777e59896e3da49ab72d017fe8..157f8552b475d6fab1dda442bd64d2bbf11cfdcf 100644 --- a/testing/testing_zhemm.c +++ b/testing/testing_zhemm.c @@ -9,12 +9,12 @@ * * @brief Chameleon zhemm testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c * */ @@ -35,24 +35,23 @@ testing_zhemm_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( side == ChamLeft ) ? M : N ) ); - int LDB = run_arg_get_int( args, "LDB", M ); - int LDC = run_arg_get_int( args, "LDC", M ); - CHAMELEON_Complex64_t alpha = testing_zalea(); - CHAMELEON_Complex64_t beta = testing_zalea(); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int seedC = run_arg_get_int( args, "seedC", testing_ialea() ); - double bump = testing_dalea(); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( side == ChamLeft ) ? M : N ) ); + int LDB = run_arg_get_int( args, "LDB", M ); + int LDC = run_arg_get_int( args, "LDC", M ); + CHAMELEON_Complex64_t alpha = testing_zalea(); + CHAMELEON_Complex64_t beta = testing_zalea(); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + int seedC = run_arg_get_int( args, "seedC", testing_ialea() ); + double bump = testing_dalea(); + int Q = parameters_compute_q( P ); /* Descriptors */ int Am; @@ -74,12 +73,9 @@ testing_zhemm_desc( run_arg_list_t *args, int check ) } /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, Am, 0, 0, Am, Am, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, Am, Am, Am ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( bump, uplo, descA, seedA ); @@ -112,7 +108,7 @@ testing_zhemm_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descCinit, seedC ); hres += @@ -121,9 +117,9 @@ testing_zhemm_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zher2k.c b/testing/testing_zher2k.c index eab554bf8fabfa38f7e801e1f1911b7848e20441..cd85c00729ac526796a55fbb586b64eaafa5e45d 100644 --- a/testing/testing_zher2k.c +++ b/testing/testing_zher2k.c @@ -9,12 +9,12 @@ * * @brief Chameleon zher2k testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> z c * */ @@ -35,17 +35,16 @@ testing_zher2k_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int K = run_arg_get_int( args, "K", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); - int LDB = run_arg_get_int( args, "LDB", ( ( trans == ChamNoTrans ) ? N : K ) ); - int LDC = run_arg_get_int( args, "LDC", N ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int K = run_arg_get_int( args, "K", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); + int LDB = run_arg_get_int( args, "LDB", ( ( trans == ChamNoTrans ) ? N : K ) ); + int LDC = run_arg_get_int( args, "LDC", N ); CHAMELEON_Complex64_t alpha = testing_zalea(); double beta = testing_dalea(); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); @@ -75,12 +74,9 @@ testing_zher2k_desc( run_arg_list_t *args, int check ) } /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, An, Am, An ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, N, N ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -105,7 +101,7 @@ testing_zher2k_desc( run_arg_list_t *args, int check ) /* Check the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplghe_Tile( bump, uplo, descCinit, seedC ); hres += check_zsyrk( args, ChamHermitian, uplo, trans, alpha, descA, descB, @@ -114,9 +110,9 @@ testing_zher2k_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zherk.c b/testing/testing_zherk.c index 0dd6ce591808908bb6ddaa23f9d039c5106570d2..6cf801f151663fcd5fcadcf6f8325e9029c52af2 100644 --- a/testing/testing_zherk.c +++ b/testing/testing_zherk.c @@ -9,12 +9,12 @@ * * @brief Chameleon zherk testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> z c * */ @@ -35,22 +35,21 @@ testing_zherk_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int K = run_arg_get_int( args, "K", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); - int LDC = run_arg_get_int( args, "LDC", N ); - double alpha = testing_dalea(); - double beta = testing_dalea(); - double bump = testing_dalea(); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedC = run_arg_get_int( args, "seedC", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int K = run_arg_get_int( args, "K", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); + int LDC = run_arg_get_int( args, "LDC", N ); + double alpha = testing_dalea(); + double beta = testing_dalea(); + double bump = testing_dalea(); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedC = run_arg_get_int( args, "seedC", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ int Am, An; @@ -73,10 +72,8 @@ testing_zherk_desc( run_arg_list_t *args, int check ) } /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, N, N ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -99,7 +96,7 @@ testing_zherk_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplghe_Tile( bump, uplo, descCinit, seedC ); hres += check_zsyrk( args, ChamHermitian, uplo, trans, alpha, descA, NULL, @@ -108,8 +105,8 @@ testing_zherk_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zlacpy.c b/testing/testing_zlacpy.c index d82da3d111e5388dfa90b26f7f9bd0e3f1208845..9c88f76e0b49485a7a79ebef4aef4443a76fd3c6 100644 --- a/testing/testing_zlacpy.c +++ b/testing/testing_zlacpy.c @@ -9,13 +9,13 @@ * * @brief Chameleon zlacpy testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Mathieu Faverge * @author Alycia Lisito * @author Florent Pruvost * @author Philippe Swartvagher - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -67,17 +67,14 @@ testing_zlacpy_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", M ); - int LDB = run_arg_get_int( args, "LDB", M ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", M ); + int LDB = run_arg_get_int( args, "LDB", M ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA, *descB; @@ -85,10 +82,8 @@ testing_zlacpy_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates two different matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); /* Fills each matrix with different random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -114,8 +109,8 @@ testing_zlacpy_desc( run_arg_list_t *args, int check ) hres += check_zmatrices( args, uplo, descA, descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); return hres; } diff --git a/testing/testing_zlange.c b/testing/testing_zlange.c index 1d9263ea1ee46d0e844279d24bbe21650c3116b2..1f4f8e8ff336d0649d8d11d5768ca508286e814b 100644 --- a/testing/testing_zlange.c +++ b/testing/testing_zlange.c @@ -9,13 +9,13 @@ * * @brief Chameleon zlange testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito * @author Philippe Swartvagher - * @date 2022-02-14 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -71,15 +71,12 @@ testing_zlange_desc( run_arg_list_t *args, int check ) /* Read arguments */ int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); int N = run_arg_get_int( args, "N", 1000 ); int M = run_arg_get_int( args, "M", N ); int LDA = run_arg_get_int( args, "LDA", M ); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); /* Descriptors */ double norm; @@ -88,8 +85,7 @@ testing_zlange_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrix */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -113,7 +109,7 @@ testing_zlange_desc( run_arg_list_t *args, int check ) ChamNonUnit, norm, descA ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zlanhe.c b/testing/testing_zlanhe.c index bf89c966a3025e4995038f2519d89cacf04e0268..d9b7a6411c1a7cc8c28081e181a4b0a762686215 100644 --- a/testing/testing_zlanhe.c +++ b/testing/testing_zlanhe.c @@ -9,13 +9,13 @@ * * @brief Chameleon zlanhe testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Mathieu Faverge * @author Alycia Lisito * @author Philippe Swartvagher * @author Florent Pruvost - * @date 2022-02-14 + * @date 2023-07-05 * @precisions normal z -> c * */ @@ -67,16 +67,13 @@ testing_zlanhe_desc( run_arg_list_t *args, int check ) /* Read arguments */ int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); int N = run_arg_get_int( args, "N", 1000 ); int LDA = run_arg_get_int( args, "LDA", N ); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); double bump = testing_dalea(); - int Q = parameters_compute_q( P ); /* Descriptors */ double norm; @@ -87,8 +84,7 @@ testing_zlanhe_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrix */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( bump, uplo, descA, seedA ); @@ -111,7 +107,7 @@ testing_zlanhe_desc( run_arg_list_t *args, int check ) hres = check_znorm( args, ChamHermitian, norm_type, uplo, ChamNonUnit, norm, descA ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zlansy.c b/testing/testing_zlansy.c index 2247dbfec47679903e1094470c0cd509cd2c1e28..7d839646273b808f0e8e41b6c333863ac6cbcfe4 100644 --- a/testing/testing_zlansy.c +++ b/testing/testing_zlansy.c @@ -9,13 +9,13 @@ * * @brief Chameleon zlansy testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Mathieu Faverge * @author Alycia Lisito * @author Philippe Swartvagher * @author Florent Pruvost - * @date 2022-02-14 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -67,16 +67,13 @@ testing_zlansy_desc( run_arg_list_t *args, int check ) /* Read arguments */ int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); int N = run_arg_get_int( args, "N", 1000 ); int LDA = run_arg_get_int( args, "LDA", N ); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); CHAMELEON_Complex64_t bump = testing_zalea(); - int Q = parameters_compute_q( P ); /* Descriptors */ double norm; @@ -87,8 +84,7 @@ testing_zlansy_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrix */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( bump, uplo, descA, seedA ); @@ -111,7 +107,7 @@ testing_zlansy_desc( run_arg_list_t *args, int check ) hres = check_znorm( args, ChamSymmetric, norm_type, uplo, ChamNonUnit, norm, descA ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zlantr.c b/testing/testing_zlantr.c index c051cfa5a7a03349ee7538855243a65cca33e1a7..1a9c85e007441f1122023bf208de7fa917e82069 100644 --- a/testing/testing_zlantr.c +++ b/testing/testing_zlantr.c @@ -9,13 +9,13 @@ * * @brief Chameleon zlantr testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Mathieu Faverge * @author Alycia Lisito * @author Philippe Swartvagher * @author Florent Pruvost - * @date 2022-02-14 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -92,9 +92,7 @@ testing_zlantr_desc( run_arg_list_t *args, int check ) /* Read arguments */ int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); @@ -102,7 +100,6 @@ testing_zlantr_desc( run_arg_list_t *args, int check ) int M = run_arg_get_int( args, "M", N ); int LDA = run_arg_get_int( args, "LDA", M ); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); /* Descriptors */ double norm; @@ -111,8 +108,7 @@ testing_zlantr_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrix */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -135,7 +131,7 @@ testing_zlantr_desc( run_arg_list_t *args, int check ) hres = check_znorm( args, ChamTriangular, norm_type, uplo, diag, norm, descA ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zlascal.c b/testing/testing_zlascal.c index 6869b9c7b6c29cda4b6a7f05fd348d937b728b2e..6c96b0dbfa1e56e7b27b83ff6810a5efd1f5aae8 100644 --- a/testing/testing_zlascal.c +++ b/testing/testing_zlascal.c @@ -9,12 +9,12 @@ * * @brief Chameleon zlascal testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Mathieu Faverge * @author Alycia Lisito * @author Philippe Swartvagher - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -58,17 +58,16 @@ testing_zlascal_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", M ); - CHAMELEON_Complex64_t alpha = run_arg_get_complex64( args, "alpha", 1. ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", M ); + CHAMELEON_Complex64_t alpha = run_arg_get_complex64( args, "alpha", 1. ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descA, *descAinit; @@ -76,8 +75,7 @@ testing_zlascal_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrix */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -98,7 +96,7 @@ testing_zlascal_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descAinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descAinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descAinit, seedA ); hres += check_zscale( args, uplo, alpha, descAinit, descA ); @@ -106,7 +104,7 @@ testing_zlascal_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descAinit ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zlauum.c b/testing/testing_zlauum.c index a59f2426ec89e95966191b8adf958d0d7cb63de8..d94853260cf2ed0763177e6be02bae4374e1fc59 100644 --- a/testing/testing_zlauum.c +++ b/testing/testing_zlauum.c @@ -41,15 +41,12 @@ testing_zlauum_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -57,8 +54,7 @@ testing_zlauum_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Initialises the matrices with the same values */ CHAMELEON_zplghe_Tile( 0., uplo, descA, seedA ); @@ -84,7 +80,7 @@ testing_zlauum_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zplrnk.c b/testing/testing_zplrnk.c index ab9cfdd21fdf3d3323b77229316b0f6c25d30108..53d2f7f4afbeb7b1aab7755113cb917d9ff7ec38 100644 --- a/testing/testing_zplrnk.c +++ b/testing/testing_zplrnk.c @@ -9,12 +9,12 @@ * * @brief Chameleon zplrnk testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -32,14 +32,12 @@ testing_zplrnk_desc( run_arg_list_t *args, int check ) /* Read arguments */ int async = parameters_getvalue_int( "async" ); int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); int N = run_arg_get_int( args, "N", 1000 ); int M = run_arg_get_int( args, "M", N ); int K = run_arg_get_int( args, "K", N ); int LDC = run_arg_get_int( args, "LDC", M ); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descC; @@ -47,8 +45,7 @@ testing_zplrnk_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrix */ - CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, M, N ); /* Calculates the random rank-k matrix */ testing_start( &test_data ); @@ -68,7 +65,7 @@ testing_zplrnk_desc( run_arg_list_t *args, int check ) hres = check_zrankk( args, K, descC ); } - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zpoinv.c b/testing/testing_zpoinv.c index 90f77baea9085ea8aa2f4c677015cd7764ca5803..d9c47565c1ba12ce27e98ae1ddc1b95cd354cdaa 100644 --- a/testing/testing_zpoinv.c +++ b/testing/testing_zpoinv.c @@ -43,15 +43,12 @@ testing_zpoinv_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -59,8 +56,7 @@ testing_zpoinv_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Initialise the matrix with the random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -87,7 +83,7 @@ testing_zpoinv_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zposv.c b/testing/testing_zposv.c index 14951a35877eee5b520052f8e83580da4975c434..bc60d41a5cddea7dd2270b9f2a133bf3f3fd015a 100644 --- a/testing/testing_zposv.c +++ b/testing/testing_zposv.c @@ -44,18 +44,15 @@ testing_zposv_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA, *descX; @@ -63,10 +60,8 @@ testing_zposv_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); - CHAMELEON_Desc_Create( - &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); + parameters_desc_create( "X", &descX, ChamComplexDouble, nb, nb, LDB, NRHS, N, NRHS ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -107,8 +102,8 @@ testing_zposv_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descX ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descX ); return hres; } diff --git a/testing/testing_zpotrf.c b/testing/testing_zpotrf.c index 5fe89884701447b14e2de3fd95225227b5f9394d..4f84e08f53a7cb0583d84e83f5d240bd938a648b 100644 --- a/testing/testing_zpotrf.c +++ b/testing/testing_zpotrf.c @@ -37,15 +37,12 @@ testing_zpotrf_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -53,8 +50,7 @@ testing_zpotrf_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -82,7 +78,7 @@ testing_zpotrf_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zpotri.c b/testing/testing_zpotri.c index 1edf9d23016abfb728388688bec84434f14a4f6c..fed682df0d8e372ccc3c8666f54a7da10991a60b 100644 --- a/testing/testing_zpotri.c +++ b/testing/testing_zpotri.c @@ -38,15 +38,12 @@ testing_zpotri_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -54,8 +51,7 @@ testing_zpotri_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Initialise the matrix with the random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -85,7 +81,7 @@ testing_zpotri_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zpotrs.c b/testing/testing_zpotrs.c index 98977ad094de9bf5a8744aab64e92cea2d2b0db9..7f86ee7bdfd361cb12f0c06ecdc5a279df2de4d3 100644 --- a/testing/testing_zpotrs.c +++ b/testing/testing_zpotrs.c @@ -38,18 +38,15 @@ testing_zpotrs_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA, *descX; @@ -57,10 +54,8 @@ testing_zpotrs_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); - CHAMELEON_Desc_Create( - &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); + parameters_desc_create( "X", &descX, ChamComplexDouble, nb, nb, LDB, NRHS, N, NRHS ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -97,8 +92,8 @@ testing_zpotrs_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descX ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descX ); return hres; } diff --git a/testing/testing_zsymm.c b/testing/testing_zsymm.c index 1d8f2c5b802dd64a51a34f6b36917f9e6516ec5b..dc44dba13a4811493cc02b8f91fc74a3bba6a41c 100644 --- a/testing/testing_zsymm.c +++ b/testing/testing_zsymm.c @@ -9,12 +9,12 @@ * * @brief Chameleon zsymm testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -35,24 +35,23 @@ testing_zsymm_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( side == ChamLeft ) ? M : N ) ); - int LDB = run_arg_get_int( args, "LDB", M ); - int LDC = run_arg_get_int( args, "LDC", M ); - CHAMELEON_Complex64_t alpha = testing_zalea(); - CHAMELEON_Complex64_t beta = testing_zalea(); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int seedC = run_arg_get_int( args, "seedC", testing_ialea() ); - double bump = testing_dalea(); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( side == ChamLeft ) ? M : N ) ); + int LDB = run_arg_get_int( args, "LDB", M ); + int LDC = run_arg_get_int( args, "LDC", M ); + CHAMELEON_Complex64_t alpha = testing_zalea(); + CHAMELEON_Complex64_t beta = testing_zalea(); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + int seedC = run_arg_get_int( args, "seedC", testing_ialea() ); + double bump = testing_dalea(); + int Q = parameters_compute_q( P ); /* Descriptors */ int Am; @@ -74,12 +73,9 @@ testing_zsymm_desc( run_arg_list_t *args, int check ) } /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, Am, 0, 0, Am, Am, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, Am, Am, Am ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( bump, uplo, descA, seedA ); @@ -112,7 +108,7 @@ testing_zsymm_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descCinit, seedC ); hres += @@ -121,9 +117,9 @@ testing_zsymm_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zsyr2k.c b/testing/testing_zsyr2k.c index 9fe468976d2a669bcbcbcc82b88ab1c4771b53aa..482aa43a925656c678ebeddac81c9ab249f5b4e9 100644 --- a/testing/testing_zsyr2k.c +++ b/testing/testing_zsyr2k.c @@ -9,12 +9,12 @@ * * @brief Chameleon zsyr2k testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> z c d s * */ @@ -35,17 +35,16 @@ testing_zsyr2k_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int K = run_arg_get_int( args, "K", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); - int LDB = run_arg_get_int( args, "LDB", ( ( trans == ChamNoTrans ) ? N : K ) ); - int LDC = run_arg_get_int( args, "LDC", N ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int K = run_arg_get_int( args, "K", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); + int LDB = run_arg_get_int( args, "LDB", ( ( trans == ChamNoTrans ) ? N : K ) ); + int LDC = run_arg_get_int( args, "LDC", N ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); @@ -75,12 +74,9 @@ testing_zsyr2k_desc( run_arg_list_t *args, int check ) } /* Create the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, An, Am, An ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, N, N ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -105,7 +101,7 @@ testing_zsyr2k_desc( run_arg_list_t *args, int check ) /* Check the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplgsy_Tile( bump, uplo, descCinit, seedC ); hres += check_zsyrk( args, ChamSymmetric, uplo, trans, alpha, descA, descB, @@ -114,9 +110,9 @@ testing_zsyr2k_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zsyrk.c b/testing/testing_zsyrk.c index 39564d56736102d2d6d9a2aef652b0f1e4c5aff6..c6d7a082dfde7d39292033bc018ddc8c8ed55345 100644 --- a/testing/testing_zsyrk.c +++ b/testing/testing_zsyrk.c @@ -9,12 +9,12 @@ * * @brief Chameleon zsyrk testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> z c d s * */ @@ -35,16 +35,15 @@ testing_zsyrk_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int K = run_arg_get_int( args, "K", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); - int LDC = run_arg_get_int( args, "LDC", N ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int K = run_arg_get_int( args, "K", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? N : K ) ); + int LDC = run_arg_get_int( args, "LDC", N ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); CHAMELEON_Complex64_t bump = testing_zalea(); @@ -73,10 +72,8 @@ testing_zsyrk_desc( run_arg_list_t *args, int check ) } /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "C", &descC, ChamComplexDouble, nb, nb, LDC, N, N, N ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -99,7 +96,7 @@ testing_zsyrk_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplgsy_Tile( bump, uplo, descCinit, seedC ); hres += check_zsyrk( args, ChamSymmetric, uplo, trans, alpha, descA, NULL, @@ -108,8 +105,8 @@ testing_zsyrk_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descCinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descC ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descC ); return hres; } diff --git a/testing/testing_zsysv.c b/testing/testing_zsysv.c index 88511c2328233918028d14925986f4cfc8268267..51dc5746ca8dff540127078038b6406d3421adea 100644 --- a/testing/testing_zsysv.c +++ b/testing/testing_zsysv.c @@ -36,18 +36,17 @@ testing_zsysv_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descA, *descX; @@ -55,10 +54,8 @@ testing_zsysv_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); - CHAMELEON_Desc_Create( - &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); + parameters_desc_create( "X", &descX, ChamComplexDouble, nb, nb, LDB, NRHS, N, NRHS ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( (double)N, uplo, descA, seedA ); @@ -99,8 +96,8 @@ testing_zsysv_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descX ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descX ); return hres; } diff --git a/testing/testing_zsytrf.c b/testing/testing_zsytrf.c index fe7e5b37c8a20a2c194f726f6f1dd86c5ad67a37..676c73b19b59ea1dceed6845abb26f1d74b2e5b0 100644 --- a/testing/testing_zsytrf.c +++ b/testing/testing_zsytrf.c @@ -29,15 +29,14 @@ testing_zsytrf_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descA; @@ -45,8 +44,7 @@ testing_zsytrf_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( (double)N, uplo, descA, seedA ); @@ -73,7 +71,7 @@ testing_zsytrf_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; } diff --git a/testing/testing_zsytrs.c b/testing/testing_zsytrs.c index 9a74d736bb8f807bae073cff4857db4fd947a68c..8fa343a9d4ed5d88b82f97ba0496176b53e664a9 100644 --- a/testing/testing_zsytrs.c +++ b/testing/testing_zsytrs.c @@ -30,18 +30,17 @@ testing_zsytrs_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descA, *descX; @@ -49,10 +48,8 @@ testing_zsytrs_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); - CHAMELEON_Desc_Create( - &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); + parameters_desc_create( "X", &descX, ChamComplexDouble, nb, nb, LDB, NRHS, N, NRHS ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( (double)N, uplo, descA, seedA ); @@ -89,8 +86,8 @@ testing_zsytrs_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descX ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descX ); return hres; } diff --git a/testing/testing_ztradd.c b/testing/testing_ztradd.c index 705d69666a63a3a6854412c98361337523ea1be5..a07d4520b8170c04761096017e24cc7268713aa5 100644 --- a/testing/testing_ztradd.c +++ b/testing/testing_ztradd.c @@ -60,26 +60,23 @@ testing_ztradd_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) ); - int LDB = run_arg_get_int( args, "LDB", M ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) ); + int LDB = run_arg_get_int( args, "LDB", M ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); /* Descriptors */ int Am, An; CHAM_desc_t *descA, *descB; - cham_uplo_t uplo_inv = uplo; + cham_uplo_t uplo_inv = uplo; if ( uplo != ChamUpperLower && trans != ChamNoTrans ) { uplo_inv = (uplo == ChamUpper) ? ChamLower : ChamUpper; @@ -100,10 +97,8 @@ testing_ztradd_desc( run_arg_list_t *args, int check ) } /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, Am, An ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); /* Fills the matrix with random values */ switch ( uplo ) { @@ -148,8 +143,8 @@ testing_ztradd_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descB0 ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); return hres; } diff --git a/testing/testing_ztrmm.c b/testing/testing_ztrmm.c index 694e437068de549c84893324b7bdb81a3318df42..e987f5e301cbbb34382e19052e79dfe82b4c666c 100644 --- a/testing/testing_ztrmm.c +++ b/testing/testing_ztrmm.c @@ -9,12 +9,12 @@ * * @brief Chameleon ztrmm testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -35,22 +35,21 @@ testing_ztrmm_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int LDA = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N ); - int LDB = run_arg_get_int( args, "LDB", M ); - CHAMELEON_Complex64_t alpha = testing_zalea(); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int LDA = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N ); + int LDB = run_arg_get_int( args, "LDB", M ); + CHAMELEON_Complex64_t alpha = testing_zalea(); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descA, *descB, *descBinit; @@ -61,17 +60,14 @@ testing_ztrmm_desc( run_arg_list_t *args, int check ) /* Calculates the dimensions according to the side */ if ( side == ChamLeft ) { - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, M, 0, 0, M, M, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, M, M, M ); } else { - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); } /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -94,7 +90,7 @@ testing_ztrmm_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descBinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descBinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descBinit, seedB ); hres += check_ztrmm( args, CHECK_TRMM, side, uplo, trans, diag, @@ -103,8 +99,8 @@ testing_ztrmm_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descBinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); return hres; } diff --git a/testing/testing_ztrsm.c b/testing/testing_ztrsm.c index 450b795b668f16ccbb90662d555ab54fbd382486..593ef78cb5b588d381491a2e2b878f736b928a3e 100644 --- a/testing/testing_ztrsm.c +++ b/testing/testing_ztrsm.c @@ -9,12 +9,12 @@ * * @brief Chameleon ztrsm testing * - * @version 1.2.0 + * @version 1.3.0 * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-05 * @precisions normal z -> c d s * */ @@ -35,23 +35,22 @@ testing_ztrsm_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); - cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); - int N = run_arg_get_int( args, "N", 1000 ); - int M = run_arg_get_int( args, "M", N ); - int An = ( side == ChamLeft ) ? M : N; - int LDA = run_arg_get_int( args, "LDA", An ); - int LDB = run_arg_get_int( args, "LDB", M ); - CHAMELEON_Complex64_t alpha = testing_zalea(); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int P = parameters_getvalue_int( "P" ); + cham_trans_t trans = run_arg_get_trans( args, "trans", ChamNoTrans ); + cham_side_t side = run_arg_get_side( args, "side", ChamLeft ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); + int N = run_arg_get_int( args, "N", 1000 ); + int M = run_arg_get_int( args, "M", N ); + int An = ( side == ChamLeft ) ? M : N; + int LDA = run_arg_get_int( args, "LDA", An ); + int LDB = run_arg_get_int( args, "LDB", M ); + CHAMELEON_Complex64_t alpha = testing_zalea(); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); + int seedB = run_arg_get_int( args, "seedB", testing_ialea() ); + int Q = parameters_compute_q( P ); /* Descriptors */ CHAM_desc_t *descA, *descB, *descBinit; @@ -61,10 +60,8 @@ testing_ztrsm_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, An, An, P, Q ); - CHAMELEON_Desc_Create( - &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, An, An, An ); + parameters_desc_create( "B", &descB, ChamComplexDouble, nb, nb, LDB, N, M, N ); /* Fills the matrix with random values */ /* We bump a little bit the diagonal to make it stable */ @@ -88,7 +85,7 @@ testing_ztrsm_desc( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descBinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descBinit, CHAMELEON_MAT_ALLOC_TILE, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descBinit, seedB ); hres += check_ztrmm( args, CHECK_TRSM, side, uplo, trans, diag, @@ -97,8 +94,8 @@ testing_ztrsm_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descBinit ); } - CHAMELEON_Desc_Destroy( &descA ); - CHAMELEON_Desc_Destroy( &descB ); + parameters_desc_destroy( &descA ); + parameters_desc_destroy( &descB ); return hres; } diff --git a/testing/testing_ztrtri.c b/testing/testing_ztrtri.c index 8e39a9f9e3e521d9521d7b4b0a6624fe2688dc37..3eba5959a8e597caccf23793e2d29131bc7f7b04 100644 --- a/testing/testing_ztrtri.c +++ b/testing/testing_ztrtri.c @@ -33,16 +33,13 @@ testing_ztrtri_desc( run_arg_list_t *args, int check ) int hres = 0; /* Read arguments */ - int async = parameters_getvalue_int( "async" ); - intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); - cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); - int N = run_arg_get_int( args, "N", 1000 ); - int LDA = run_arg_get_int( args, "LDA", N ); - int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); - int Q = parameters_compute_q( P ); + int async = parameters_getvalue_int( "async" ); + int nb = run_arg_get_int( args, "nb", 320 ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); + int N = run_arg_get_int( args, "N", 1000 ); + int LDA = run_arg_get_int( args, "LDA", N ); + int seedA = run_arg_get_int( args, "seedA", testing_ialea() ); /* Descriptors */ CHAM_desc_t *descA; @@ -50,8 +47,7 @@ testing_ztrtri_desc( run_arg_list_t *args, int check ) CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); /* Creates the matrices */ - CHAMELEON_Desc_Create( - &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + parameters_desc_create( "A", &descA, ChamComplexDouble, nb, nb, LDA, N, N, N ); /* Initialises the matrices with the same values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -79,7 +75,7 @@ testing_ztrtri_desc( run_arg_list_t *args, int check ) CHAMELEON_Desc_Destroy( &descA0 ); } - CHAMELEON_Desc_Destroy( &descA ); + parameters_desc_destroy( &descA ); return hres; }