diff --git a/cmake_modules/local_subs.py b/cmake_modules/local_subs.py index 14b07b874208eb465c18c4912a387c7402da984f..8fec8ccde1c44496ba92cb681c3239b2481ec870 100644 --- a/cmake_modules/local_subs.py +++ b/cmake_modules/local_subs.py @@ -71,6 +71,7 @@ subs = { # ----- Chameleon Prefixes ('CHAMELEON_P', 'CHAMELEON_S', 'CHAMELEON_D', 'CHAMELEON_C', 'CHAMELEON_Z' ), + ('CHAMELEON_p', 'CHAMELEON_s', 'CHAMELEON_d', 'CHAMELEON_c', 'CHAMELEON_z' ), ('RUNTIME_P', 'RUNTIME_s', 'RUNTIME_d', 'RUNTIME_c', 'RUNTIME_z' ), ('chameleon_p', 'chameleon_s', 'chameleon_d', 'chameleon_c', 'chameleon_z' ), ('codelet_p', 'codelet_s', 'codelet_d', 'codelet_c', 'codelet_z' ), diff --git a/compute/ztile.c b/compute/ztile.c index 02af3dfb8e41ff40fa207662203be81491760e89..b4c3b536725994387c5e18676e054035b3cdfd83 100644 --- a/compute/ztile.c +++ b/compute/ztile.c @@ -26,7 +26,8 @@ * * @ingroup CHAMELEON_Complex64_t * - * CHAMELEON_zLapack_to_Tile - Conversion from LAPACK layout to tile layout. + * @brief Conversion of CHAMELEON_Complex64_t matrix from LAPACK layout to tile + * layout. Deprecated function, see CHAMELEON_zLap2Desc(). * ******************************************************************************* * @@ -37,25 +38,85 @@ * The leading dimension of the matrix Af77. * * @param[in,out] A - * Descriptor of the CHAMELEON matrix in tile layout. - * If CHAMELEON_TRANSLATION_MODE is set to ChamInPlace, - * A->mat is not used and set to Af77 when returns, else if - * CHAMELEON_TRANSLATION_MODE is set to ChamOutOfPlace, - * A->mat has to be allocated before. + * Descriptor of the CHAMELEON matrix. * ******************************************************************************* * * @retval CHAMELEON_SUCCESS successful exit * + */ +int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ) +{ + return CHAMELEON_zLap2Desc( ChamUpperLower, Af77, LDA, A ); +} + +/** + ******************************************************************************** + * + * @ingroup CHAMELEON_Complex64_t + * + * @brief Conversion of CHAMELEON_Complex64_t matrix from tile layout to LAPACK + * layout. Deprecated function, see CHAMELEON_zDesc2Lap(). + * ******************************************************************************* * - * @sa CHAMELEON_zTile_to_Lapack - * @sa CHAMELEON_cLapack_to_Tile - * @sa CHAMELEON_dLapack_to_Tile - * @sa CHAMELEON_sLapack_to_Tile + * @param[in] A + * Descriptor of the CHAMELEON matrix. + * + * @param[in,out] Af77 + * LAPACK matrix. + * + * @param[in] LDA + * The leading dimension of the matrix Af77. + * + ******************************************************************************* + * + * @retval CHAMELEON_SUCCESS successful exit * */ -int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ) +int CHAMELEON_zTile_to_Lapack( CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ) +{ + return CHAMELEON_zDesc2Lap( ChamUpperLower, A, Af77, LDA ); +} + +/** + ******************************************************************************** + * + * @ingroup CHAMELEON_Complex64_t + * + * @brief Conversion of a CHAMELEON_Complex64_t matrix from LAPACK layout to + * CHAM_desct_t. + * + ******************************************************************************* + * + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular; + * = ChamLower: A is lower triangular; + * = ChamUpperLower: A is general. + * + * @param[in] Af77 + * LAPACK matrix. + * + * @param[in] LDA + * The leading dimension of the matrix Af77. + * + * @param[in,out] A + * Descriptor of the CHAMELEON matrix. + * + ******************************************************************************* + * + * @retval CHAMELEON_SUCCESS successful exit + * + ******************************************************************************* + * + * @sa CHAMELEON_zDesc2Lap + * @sa CHAMELEON_cLap2Desc + * @sa CHAMELEON_dLap2Desc + * @sa CHAMELEON_sLap2Desc + * + */ +int CHAMELEON_zLap2Desc( cham_uplo_t uplo, CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ) { CHAM_context_t *chamctxt; RUNTIME_sequence_t *sequence = NULL; @@ -87,7 +148,7 @@ int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t /* Start the computation */ chameleon_sequence_create( chamctxt, &sequence ); - chameleon_pzlacpy( ChamUpperLower, B, A, sequence, &request ); + chameleon_pzlacpy( uplo, B, A, sequence, &request ); CHAMELEON_Desc_Flush( B, sequence ); CHAMELEON_Desc_Flush( A, sequence ); @@ -107,19 +168,22 @@ int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t * * @ingroup CHAMELEON_Complex64_t * - * CHAMELEON_Tile_to_Lapack - Conversion from tile layout to LAPACK layout. + * @brief Conversion of CHAMELEON_Complex64_t matrix from LAPACK layout to tile + * layout. Deprecated function, see CHAMELEON_zDesc2Lap(). * ******************************************************************************* * + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular; + * = ChamLower: A is lower triangular; + * = ChamUpperLower: A is general. + * * @param[in] A - * Descriptor of the CHAMELEON matrix in tile layout. + * Descriptor of the CHAMELEON matrix. * * @param[in,out] Af77 * LAPACK matrix. - * If CHAMELEON_TRANSLATION_MODE is set to ChamInPlace, - * Af77 has to be A->mat, else if - * CHAMELEON_TRANSLATION_MODE is set to ChamOutOfPlace, - * Af77 has to be allocated before. * * @param[in] LDA * The leading dimension of the matrix Af77. @@ -130,13 +194,13 @@ int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t * ******************************************************************************* * - * @sa CHAMELEON_zLapack_to_Tile - * @sa CHAMELEON_cTile_to_Lapack - * @sa CHAMELEON_dTile_to_Lapack - * @sa CHAMELEON_sTile_to_Lapack + * @sa CHAMELEON_zLap2Desc + * @sa CHAMELEON_cDesc2Lap + * @sa CHAMELEON_dDesc2Lap + * @sa CHAMELEON_sDesc2Lap * */ -int CHAMELEON_zTile_to_Lapack( CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ) +int CHAMELEON_zDesc2Lap( cham_uplo_t uplo, CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ) { CHAM_context_t *chamctxt; RUNTIME_sequence_t *sequence = NULL; @@ -167,7 +231,7 @@ int CHAMELEON_zTile_to_Lapack( CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int /* Start the computation */ chameleon_sequence_create( chamctxt, &sequence ); - chameleon_pzlacpy( ChamUpperLower, A, B, sequence, &request ); + chameleon_pzlacpy( uplo, A, B, sequence, &request ); CHAMELEON_Desc_Flush( A, sequence ); CHAMELEON_Desc_Flush( B, sequence ); diff --git a/control/chameleon_f77.c b/control/chameleon_f77.c index 7de2fe850557b483ab887d19cd95b951d572b34e..b3e09b48c25b514581a07b75b55a90bd2f41d0f7 100644 --- a/control/chameleon_f77.c +++ b/control/chameleon_f77.c @@ -97,10 +97,10 @@ extern "C" { * FORTRAN API - conversion from LAPACK F77 matrix layout to tile layout */ void CHAMELEON_LAPACK_TO_TILE(intptr_t *Af77, int *LDA, intptr_t *A, int *INFO) - { *INFO = CHAMELEON_Lapack_to_Tile( (void *)Af77, *LDA, (CHAM_desc_t *)(*A)); } + { *INFO = CHAMELEON_Lap2Desc( ChamUpperLower, (void *)Af77, *LDA, (CHAM_desc_t *)(*A) ); } void CHAMELEON_TILE_TO_LAPACK(intptr_t *A, intptr_t *Af77, int *LDA, int *INFO) - { *INFO = CHAMELEON_Tile_to_Lapack((CHAM_desc_t *)(*A), (void *)Af77, *LDA); } + { *INFO = CHAMELEON_Desc2Lap( ChamUpperLower, (CHAM_desc_t *)(*A), (void *)Af77, *LDA ); } #ifdef __cplusplus } diff --git a/control/chameleon_zf77.c b/control/chameleon_zf77.c index 6162950adc36ea39555323e6eab694c8e15b640b..08f079d7f7dc5fc7b603c63083e279293aaffad2 100644 --- a/control/chameleon_zf77.c +++ b/control/chameleon_zf77.c @@ -281,10 +281,10 @@ * FORTRAN API - math functions (simple interface) */ void CHAMELEON_ZLAPACK_TO_TILE(CHAMELEON_Complex64_t *Af77, int *LDA, CHAM_desc_t *A, int *info) -{ *info = CHAMELEON_zLapack_to_Tile(Af77, *LDA, A); } +{ *info = CHAMELEON_zLap2Desc( ChamUpperLower, Af77, *LDA, A ); } void CHAMELEON_ZTILE_TO_LAPACK(CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int *LDA, int *info) -{ *info = CHAMELEON_zTile_to_Lapack(A, Af77, *LDA); } +{ *info = CHAMELEON_zDesc2Lap( ChamUpperLower, A, Af77, *LDA ); } //void CHAMELEON_ZGEBRD(int *M, int *N, CHAMELEON_Complex64_t *A, int *LDA, double *D, double *E, CHAM_desc_t **descT, int *info) //{ *info = CHAMELEON_zgebrd(*M, *N, A, *LDA, D, E, *descT); } diff --git a/control/descriptor.c b/control/descriptor.c index b8d0e080b6c9b7c987f0d6a143f17a491beb04ab..51d2687303b026655966e0232ecb7a3f74bacf4f 100644 --- a/control/descriptor.c +++ b/control/descriptor.c @@ -765,7 +765,7 @@ CHAM_desc_t *CHAMELEON_Desc_Copy( CHAM_desc_t *descin, void *mat ) CHAMELEON_Desc_Create_User( &descout, mat, descin->dtyp, descin->mb, descin->nb, descin->bsiz, descin->lm, descin->ln, descin->i, descin->j, descin->m, descin->n, descin->p, descin->q, - descin->get_blkaddr, descin->get_blkldd, descin->get_rankof ); + NULL, NULL, descin->get_rankof ); return descout; } @@ -800,7 +800,7 @@ CHAM_desc_t *CHAMELEON_Desc_CopyOnZero( CHAM_desc_t *descin, void *mat ) CHAMELEON_Desc_Create_User( &descout, mat, descin->dtyp, descin->mb, descin->nb, descin->bsiz, descin->lm, descin->ln, descin->i, descin->j, descin->m, descin->n, 1, 1, - descin->get_blkaddr, descin->get_blkldd, descin->get_rankof ); + NULL, NULL, descin->get_rankof ); return descout; } diff --git a/control/tile.c b/control/tile.c index c32b0355a38018b3e519aac491530084a514573e..3d9257ef4a69d2256af3ce3c42cab336cdddbb5f 100644 --- a/control/tile.c +++ b/control/tile.c @@ -29,7 +29,8 @@ * * @ingroup Tile * - * CHAMELEON_Lapack_to_Tile - Conversion from LAPACK layout to tile layout. + * @brief Conversion from LAPACK layout to tile layout + * Deprecated function see CHAMELEON_Lap2Desc(). * ****************************************************************************** * @@ -39,7 +40,7 @@ * @param[in] LDA * The leading dimension of the matrix Af77. * - * @param[out] A + * @param[in,out] A * Descriptor of the CHAMELEON matrix in tile layout. * ****************************************************************************** @@ -47,21 +48,84 @@ * @retval CHAMELEON_SUCCESS successful exit * */ -int CHAMELEON_Lapack_to_Tile(void *Af77, int LDA, CHAM_desc_t *A) +int +CHAMELEON_Lapack_to_Tile( void *Af77, int LDA, CHAM_desc_t *A ) +{ + return CHAMELEON_Lap2Desc( ChamUpperLower, Af77, LDA, A ); +} + +/** + * + * @ingroup Tile + * + * @brief Conversion from tile layout to LAPACK layout. + * Deprecated function, see CHAMELEON_Desc2Lap(). + * + ****************************************************************************** + * + * @param[in] A + * Descriptor of the CHAMELEON matrix in tile layout. + * + * @param[in,out] Af77 + * LAPACK matrix (only needed on proc 0). + * + * @param[in] LDA + * The leading dimension of the matrix Af77. + * + ****************************************************************************** + * + * @retval CHAMELEON_SUCCESS successful exit + * + */ +int +CHAMELEON_Tile_to_Lapack( CHAM_desc_t *A, void *Af77, int LDA ) +{ + return CHAMELEON_Desc2Lap( ChamUpperLower, A, Af77, LDA ); +} + +/** + * + * @ingroup Tile + * + * @brief Conversion from LAPACK layout to CHAM_desc_t. + * + ****************************************************************************** + * + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular, the lower part is not referenced; + * = ChamLower: A is lower triangular, the upper part is not referenced; + * = ChamUpperLower: A is general. + * + * @param[in] Af77 + * LAPACK matrix. + * + * @param[in] LDA + * The leading dimension of the matrix Af77. + * + * @param[in,out] A + * Descriptor of the CHAMELEON matrix initialized with data from Af77. + * + ****************************************************************************** + * + * @retval CHAMELEON_SUCCESS successful exit + * + */ +int CHAMELEON_Lap2Desc( cham_uplo_t uplo, void *Af77, int LDA, CHAM_desc_t *A ) { switch( A->dtyp ) { case ChamComplexDouble: - return CHAMELEON_zLapack_to_Tile( (CHAMELEON_Complex64_t *)Af77, LDA, A ); + return CHAMELEON_zLap2Desc( uplo, (CHAMELEON_Complex64_t *)Af77, LDA, A ); break; case ChamComplexFloat: - return CHAMELEON_cLapack_to_Tile( (CHAMELEON_Complex32_t *)Af77, LDA, A ); + return CHAMELEON_cLap2Desc( uplo, (CHAMELEON_Complex32_t *)Af77, LDA, A ); break; case ChamRealFloat: - return CHAMELEON_sLapack_to_Tile( (float *)Af77, LDA, A ); + return CHAMELEON_sLap2Desc( uplo, (float *)Af77, LDA, A ); break; case ChamRealDouble: default: - return CHAMELEON_dLapack_to_Tile( (double *)Af77, LDA, A ); + return CHAMELEON_dLap2Desc( uplo, (double *)Af77, LDA, A ); } return CHAMELEON_ERR_ILLEGAL_VALUE; } @@ -70,14 +134,20 @@ int CHAMELEON_Lapack_to_Tile(void *Af77, int LDA, CHAM_desc_t *A) * * @ingroup Tile * - * CHAMELEON_Tile_to_Lapack - Conversion from tile layout to LAPACK layout. + * @brief Conversion from CHAM_desc_t to LAPACK layout. * ****************************************************************************** * - * @param[out] A + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular, the lower part is not referenced; + * = ChamLower: A is lower triangular, the upper part is not referenced; + * = ChamUpperLower: A is general. + * + * @param[in] A * Descriptor of the CHAMELEON matrix in tile layout. * - * @param[in] Af77 + * @param[in,out] Af77 * LAPACK matrix (only needed on proc 0). * * @param[in] LDA @@ -88,21 +158,21 @@ int CHAMELEON_Lapack_to_Tile(void *Af77, int LDA, CHAM_desc_t *A) * @retval CHAMELEON_SUCCESS successful exit * */ -int CHAMELEON_Tile_to_Lapack(CHAM_desc_t *A, void *Af77, int LDA) +int CHAMELEON_Desc2Lap( cham_uplo_t uplo, CHAM_desc_t *A, void *Af77, int LDA ) { switch( A->dtyp ) { case ChamComplexDouble: - return CHAMELEON_zTile_to_Lapack( A, (CHAMELEON_Complex64_t *)Af77, LDA ); + return CHAMELEON_zDesc2Lap( uplo, A, (CHAMELEON_Complex64_t *)Af77, LDA ); break; case ChamComplexFloat: - return CHAMELEON_cTile_to_Lapack( A, (CHAMELEON_Complex32_t *)Af77, LDA ); + return CHAMELEON_cDesc2Lap( uplo, A, (CHAMELEON_Complex32_t *)Af77, LDA ); break; case ChamRealFloat: - return CHAMELEON_sTile_to_Lapack( A, (float *)Af77, LDA ); + return CHAMELEON_sDesc2Lap( uplo, A, (float *)Af77, LDA ); break; case ChamRealDouble: default: - return CHAMELEON_dTile_to_Lapack( A, (double *)Af77, LDA ); + return CHAMELEON_dDesc2Lap( uplo, A, (double *)Af77, LDA ); } return CHAMELEON_ERR_ILLEGAL_VALUE; } diff --git a/example/lapack_to_chameleon/step2.c b/example/lapack_to_chameleon/step2.c index f71c8c1d142751972c5ee740ca74459a73a0532f..1357a6759f937b86cac93fa42a9a793b559076f7 100644 --- a/example/lapack_to_chameleon/step2.c +++ b/example/lapack_to_chameleon/step2.c @@ -126,10 +126,10 @@ int main(int argc, char *argv[]) { /* copy LAPACK matrices in CHAMELEON descriptors to be able to call the tile * interface */ - CHAMELEON_dLapack_to_Tile(A, N, descA); - CHAMELEON_dLapack_to_Tile(B, N, descB); - CHAMELEON_dLapack_to_Tile(X, N, descX); - CHAMELEON_dLapack_to_Tile(Acpy, N, descAC); + CHAMELEON_dLap2Desc(UPLO, A, N, descA); + CHAMELEON_dLap2Desc(ChamUpperLower, B, N, descB); + CHAMELEON_dLap2Desc(ChamUpperLower, X, N, descX); + CHAMELEON_dLap2Desc(UPLO, Acpy, N, descAC); /* You could alternatively create descriptors wrapping your allocated * matrices to avoid copies Lapack_to_Tile with the following */ @@ -208,11 +208,11 @@ int main(int argc, char *argv[]) { res / N / eps / (anorm * xnorm + bnorm )); } - /* get back results in LAPACK format */ - CHAMELEON_dTile_to_Lapack(descA, A, N); - CHAMELEON_dTile_to_Lapack(descB, B, N); - CHAMELEON_dTile_to_Lapack(descX, X, N); - CHAMELEON_dTile_to_Lapack(descAC, Acpy, N); + /* get back results in LAPACK format if needed */ + CHAMELEON_dDesc2Lap(UPLO, descA, A, N); + CHAMELEON_dDesc2Lap(ChamUpperLower, descB, B, N); + CHAMELEON_dDesc2Lap(ChamUpperLower, descX, X, N); + CHAMELEON_dDesc2Lap(UPLO, descAC, Acpy, N); /* deallocate A, B, X, Acpy and associated descriptors descA, ... */ CHAMELEON_Desc_Destroy( &descA ); diff --git a/include/chameleon.h b/include/chameleon.h index a66b980e876c51a9040be6761dc7bf040eace6bf..953bd31cd4216f61ddac97313636d8c4b10be672 100644 --- a/include/chameleon.h +++ b/include/chameleon.h @@ -91,14 +91,17 @@ int CHAMELEON_Distributed_start (void); int CHAMELEON_Distributed_stop (void); int CHAMELEON_Comm_size (void); int CHAMELEON_Comm_rank (void); -int CHAMELEON_Lapack_to_Tile (void *Af77, int LDA, CHAM_desc_t *A); -int CHAMELEON_Tile_to_Lapack (CHAM_desc_t *A, void *Af77, int LDA); +int CHAMELEON_Lap2Desc ( cham_uplo_t uplo, void *Af77, int LDA, CHAM_desc_t *A ); +int CHAMELEON_Desc2Lap ( cham_uplo_t uplo, CHAM_desc_t *A, void *Af77, int LDA ); int CHAMELEON_Distributed_start (void); int CHAMELEON_Distributed_stop (void); int CHAMELEON_Distributed_size (int *size); int CHAMELEON_Distributed_rank (int *rank); int CHAMELEON_GetThreadNbr (void); +int CHAMELEON_Lapack_to_Tile( void *Af77, int LDA, CHAM_desc_t *A ) __attribute__((deprecated("Please refer to CHAMELEON_Lap2Desc() instead"))); +int CHAMELEON_Tile_to_Lapack( CHAM_desc_t *A, void *Af77, int LDA ) __attribute__((deprecated("Please refer to CHAMELEON_Desc2Lap() instead"))); + /* Descriptor */ int CHAMELEON_Element_Size(int type); diff --git a/include/chameleon/chameleon_z.h b/include/chameleon/chameleon_z.h index 928a6d3c5c8fca1d1372dbf1610861d2e23588fe..03bae9adf27acdb8787be3b8204fe98e5403b267 100644 --- a/include/chameleon/chameleon_z.h +++ b/include/chameleon/chameleon_z.h @@ -321,8 +321,10 @@ int CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile(int N, CHAM_desc_t **descL, int /** * Auxiliary function prototypes */ -int CHAMELEON_zLapack_to_Tile(CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A); -int CHAMELEON_zTile_to_Lapack(CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA); +int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ) __attribute__((deprecated("Please refer to CHAMELEON_zLap2Desc() instead"))); +int CHAMELEON_zTile_to_Lapack( CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ) __attribute__((deprecated("Please refer to CHAMELEON_zDesc2Lap() instead"))); +int CHAMELEON_zLap2Desc( cham_uplo_t uplo, CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ); +int CHAMELEON_zDesc2Lap( cham_uplo_t uplo, CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ); /** * User Builder function prototypes diff --git a/testing/chameleon_ztesting.c b/testing/chameleon_ztesting.c index 93fc4472e77e949e4610d5d3f575f0c1470bb8f2..e41178a64e4afad629fa148408fba776a5470def 100644 --- a/testing/chameleon_ztesting.c +++ b/testing/chameleon_ztesting.c @@ -40,6 +40,7 @@ static parameter_t parameters[] = { { "niter", "Perform multiple iteration per test", 'l', PARAM_OPTION, 1, 0, TestValInt, {1}, NULL, pread_int, sprint_int }, { "trace", "Enable the trace generation", -30, PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, { "nowarmup", "Disable the warmup run to load libraries", -31, PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, + { "mtxfmt", "Change the way the matrix is stored (0: global, 1: tiles, 2: OOC)", -32, PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 1, 6, TestValInt, {0}, NULL, pread_int, sprint_int }, { NULL, "Machine parameters", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL }, { "threads", "Number of CPU workers per node", 't', PARAM_OPTION | PARAM_OUTPUT, 1, 7, TestValInt, {-1}, NULL, pread_int, sprint_int }, @@ -48,8 +49,8 @@ static parameter_t parameters[] = { { "Q", "Columns (Q) in the PxQ process grid", 'Q', PARAM_OUTPUT, 1, 2, TestValInt, { 1}, NULL, pread_int, sprint_int }, { NULL, "Main input parameters", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL }, - { "op", "Operation to test/time", 'o', PARAM_OPTION | PARAM_OUTPUT, 1, 1, TestString, {0}, NULL, pread_string, sprint_string }, - { "file", "Input file", 'f', PARAM_OPTION, 1, 1, TestString, {0}, NULL, pread_string, sprint_string }, + { "op", "Operation to test/time ('-o help' to get the list of functions)", 'o', PARAM_OPTION | PARAM_OUTPUT, 1, 1, TestString, {0}, NULL, pread_string, sprint_string }, + { "file", "Input file", 'f', PARAM_OPTION, 1, 1, TestString, {0}, NULL, pread_string, sprint_string }, { NULL, "Matrix definition parameters", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL }, { "m", "Dimension M of the operation", 'm', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 5, TestValInt, {0}, NULL, pread_int, sprint_int }, @@ -159,7 +160,11 @@ void print_usage( const char* prog_name ) str, param->helper ); } - printf( "\n" ); + printf( "\n" + "For example: %s -H -o gemm -t 2 -m 2000 -n 2000 -k 2000 -b 200\n" + " will run one gemm with three matrices of size 2000x2000 each and a tile size of 200.\n" + " The output will be in the human readable format\n" + "\n", prog_name ); } } diff --git a/testing/testing_zcheck.c b/testing/testing_zcheck.c index 7d1bd45621c62d6766e6fc0f6043a1c257b35953..5a5f9f302e24a3c962aac79989f521f683e5feae 100644 --- a/testing/testing_zcheck.c +++ b/testing/testing_zcheck.c @@ -79,8 +79,8 @@ int check_zmatrices( run_arg_list_t *args, cham_uplo_t uplo, CHAM_desc_t *descA, } /* Converts the matrices to LAPACK layout in order to compare them on the main process */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descB, B, LDA ); + CHAMELEON_zDesc2Lap( uplo, descA, A, LDA ); + CHAMELEON_zDesc2Lap( uplo, descB, B, LDA ); if ( rank == 0 ) { double *work = (double *)malloc(LDA*N*sizeof(double)); @@ -175,7 +175,7 @@ int check_znorm( run_arg_list_t *args, cham_mtxtype_t matrix_type, cham_normtype } /* Converts the matrix to LAPACK layout in order to use the LAPACK norm function */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); + CHAMELEON_zDesc2Lap( uplo, descA, A, LDA ); if ( rank == 0 ) { double *work = (double*) malloc(chameleon_max(M, N)*sizeof(double)); @@ -294,6 +294,7 @@ int check_zsum ( run_arg_list_t *args, cham_uplo_t uplo, cham_trans_t trans, CHAMELEON_Complex64_t *Bref = NULL; CHAMELEON_Complex64_t *Bcham = NULL; CHAMELEON_Complex64_t mzone = -1.0; + cham_uplo_t uploA = uplo; if ( rank == 0 ) { A = malloc(An*LDA*sizeof(CHAMELEON_Complex64_t)); @@ -311,16 +312,16 @@ int check_zsum ( run_arg_list_t *args, cham_uplo_t uplo, cham_trans_t trans, Anorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uplo, ChamNonUnit, descA ); } else { - cham_uplo_t uplo_inv = (uplo == ChamUpper) ? ChamLower : ChamUpper; - Anorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uplo_inv, ChamNonUnit, descA ); + uploA = (uplo == ChamUpper) ? ChamLower : ChamUpper; + Anorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uploA, ChamNonUnit, descA ); } Binitnorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uplo, ChamNonUnit, descBref ); } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descBref, Bref, LDB ); - CHAMELEON_Tile_to_Lapack( descBcham, Bcham, LDB ); + CHAMELEON_zDesc2Lap( uploA, descA, A, LDA ); + CHAMELEON_zDesc2Lap( uplo, descBref, Bref, LDB ); + CHAMELEON_zDesc2Lap( uplo, descBcham, Bcham, LDB ); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); @@ -411,7 +412,7 @@ int check_zscale( run_arg_list_t *args, cham_uplo_t uplo, CHAMELEON_Complex64_t } /* Converts the matrix to LAPACK layout in order to scale with BLAS */ - CHAMELEON_Tile_to_Lapack( descA1, Ainit, M ); + CHAMELEON_zDesc2Lap( uplo, descA1, Ainit, M ); if ( rank == 0 ) { /* Scales using core function */ @@ -420,7 +421,7 @@ int check_zscale( run_arg_list_t *args, cham_uplo_t uplo, CHAMELEON_Complex64_t /* Converts back into Chameleon to compare with check_zmatrices */ descBlas = CHAMELEON_Desc_CopyOnZero( descA1, NULL ); - CHAMELEON_Lapack_to_Tile( Ainit, M, descBlas ); + CHAMELEON_zLap2Desc( uplo, Ainit, M, descBlas ); /* Compares the two matrices */ info_solution = check_zmatrices( args, uplo, descA2, descBlas ); @@ -520,10 +521,10 @@ int check_zgemm( run_arg_list_t *args, cham_trans_t transA, cham_trans_t transB, C = (CHAMELEON_Complex64_t *)malloc(N *LDC*sizeof(CHAMELEON_Complex64_t)); } - CHAMELEON_Tile_to_Lapack(descA, A, LDA); - CHAMELEON_Tile_to_Lapack(descB, B, LDB); - CHAMELEON_Tile_to_Lapack(descCref, Cref, LDC); - CHAMELEON_Tile_to_Lapack(descC, C, LDC); + CHAMELEON_zDesc2Lap( ChamUpperLower, descA, A, LDA ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descB, B, LDB ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descCref, Cref, LDC ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descC, C, LDC ); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); @@ -656,10 +657,10 @@ int check_zsymm( run_arg_list_t *args, cham_mtxtype_t matrix_type, cham_side_t s } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descB, B, LDB ); - CHAMELEON_Tile_to_Lapack( descCref, Cref, LDC ); - CHAMELEON_Tile_to_Lapack( descC, C, LDC ); + CHAMELEON_zDesc2Lap( uplo, descA, A, LDA ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descB, B, LDB ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descCref, Cref, LDC ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descC, C, LDC ); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); @@ -806,11 +807,11 @@ int check_zsyrk( run_arg_list_t *args, cham_mtxtype_t matrix_type, cham_uplo_t u } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descCref, Cref, LDC ); - CHAMELEON_Tile_to_Lapack( descC, C, LDC ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descA, A, LDA ); + CHAMELEON_zDesc2Lap( uplo, descCref, Cref, LDC ); + CHAMELEON_zDesc2Lap( uplo, descC, C, LDC ); if ( descB != NULL ) { - CHAMELEON_Tile_to_Lapack( descB, B, LDA ); + CHAMELEON_zDesc2Lap( ChamUpperLower, descB, B, LDA ); } if ( rank == 0 ) { @@ -979,9 +980,9 @@ int check_ztrmm( run_arg_list_t *args, int check_func, cham_side_t side, cham_up } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack(descA, A, LDA); - CHAMELEON_Tile_to_Lapack(descB, B, LDB); - CHAMELEON_Tile_to_Lapack(descBref, Bref, LDB); + CHAMELEON_zDesc2Lap( uplo, descA, A, LDA); + CHAMELEON_zDesc2Lap( ChamUpperLower, descB, B, LDB); + CHAMELEON_zDesc2Lap( ChamUpperLower, descBref, Bref, LDB); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); diff --git a/testing/testing_zgeadd.c b/testing/testing_zgeadd.c index 00358df0c5089fe3dddb3f95fd6bb580d05f7d6b..becf3433ef56fdba4fb867126aa9a4831609b355 100644 --- a/testing/testing_zgeadd.c +++ b/testing/testing_zgeadd.c @@ -42,16 +42,17 @@ testing_zgeadd( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB; /* Read arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); cham_fixdbl_t t, gflops; @@ -73,9 +74,9 @@ testing_zgeadd( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -106,7 +107,7 @@ testing_zgeadd( run_arg_list_t *args, int check ) } testing_t test_zgeadd; -const char *zgeadd_params[] = { "nb", "trans", "m", "n", "lda", "ldb", +const char *zgeadd_params[] = { "mtxfmt", "nb", "trans", "m", "n", "lda", "ldb", "alpha", "beta", "seedA", "seedB", NULL }; const char *zgeadd_output[] = { NULL }; const char *zgeadd_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zgelqf.c b/testing/testing_zgelqf.c index db11f2d8ff61a78640e10598999385c087c1cccf..ba0f5c20a0a995fc69a305466b953a3f6aa332be 100644 --- a/testing/testing_zgelqf.c +++ b/testing/testing_zgelqf.c @@ -27,15 +27,16 @@ testing_zgelqf( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descT; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 RH = run_arg_get_int( args, "qra", 4 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 RH = run_arg_get_int( args, "qra", 4 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgelqf( M, N ); @@ -52,7 +53,7 @@ testing_zgelqf( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descT, P, Q ); /* Fills the matrix with random values */ @@ -72,7 +73,7 @@ testing_zgelqf( run_arg_list_t *args, int check ) CHAM_desc_t *descA0 = CHAMELEON_Desc_Copy( descA, NULL ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, N, N, 0, 0, N, N, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, N, N, 0, 0, N, N, P, Q ); CHAMELEON_zplrnt_Tile( descA0, seedA ); CHAMELEON_zunglq_Tile( descA, descT, descQ ); @@ -91,7 +92,7 @@ testing_zgelqf( run_arg_list_t *args, int check ) } testing_t test_zgelqf; -const char *zgelqf_params[] = { "nb", "ib", "m", "n", "lda", "qra", "seedA", NULL }; +const char *zgelqf_params[] = { "mtxfmt", "nb","ib", "m", "n", "lda", "qra", "seedA", NULL }; const char *zgelqf_output[] = { NULL }; const char *zgelqf_outchk[] = { "||A||", "||I-QQ'||", "||A-fact(A)||", "RETURN", NULL }; diff --git a/testing/testing_zgelqf_hqr.c b/testing/testing_zgelqf_hqr.c index a5b3d57a3bf683c372ccbf9b0ba0491c639963eb..02ec329ccee1449132be0d8dc69e0f91d9f4217d 100644 --- a/testing/testing_zgelqf_hqr.c +++ b/testing/testing_zgelqf_hqr.c @@ -27,19 +27,20 @@ testing_zgelqf_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descTS, *descTT; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 qr_a = run_arg_get_int( args, "qra", -1 ); - int qr_p = run_arg_get_int( args, "qrp", -1 ); - int llvl = run_arg_get_int( args, "llvl", -1 ); - int hlvl = run_arg_get_int( args, "hlvl", -1 ); - int domino = run_arg_get_int( args, "domino", -1 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 qr_a = run_arg_get_int( args, "qra", -1 ); + int qr_p = run_arg_get_int( args, "qrp", -1 ); + int llvl = run_arg_get_int( args, "llvl", -1 ); + int hlvl = run_arg_get_int( args, "hlvl", -1 ); + int domino = run_arg_get_int( args, "domino", -1 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgelqf( M, N ); @@ -51,7 +52,7 @@ testing_zgelqf_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descTT, P, Q ); @@ -80,7 +81,7 @@ testing_zgelqf_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA0 = CHAMELEON_Desc_Copy( descA, NULL ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, N, N, 0, 0, N, N, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, N, N, 0, 0, N, N, P, Q ); CHAMELEON_zplrnt_Tile( descA0, seedA ); CHAMELEON_zunglq_param_Tile( &qrtree, descA, descTS, descTT, descQ ); @@ -101,7 +102,7 @@ testing_zgelqf_hqr( run_arg_list_t *args, int check ) } testing_t test_zgelqf_hqr; -const char *zgelqf_hqr_params[] = { "nb", "ib", "m", "n", "lda", "qra", +const char *zgelqf_hqr_params[] = { "mtxfmt", "nb", "ib", "m", "n", "lda", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", NULL }; const char *zgelqf_hqr_output[] = { NULL }; const char *zgelqf_hqr_outchk[] = { "||A||", "||I-QQ'||", "||A-fact(A)||", "RETURN", NULL }; diff --git a/testing/testing_zgelqs.c b/testing/testing_zgelqs.c index 3b9d23bd5e92dfa635f1c0c2c3251868d754d41e..4cad8cdd76dcfcf62d25f4ab23fcd77bd32a1fc7 100644 --- a/testing/testing_zgelqs.c +++ b/testing/testing_zgelqs.c @@ -35,18 +35,19 @@ testing_zgelqs( run_arg_list_t *args, int check ) CHAM_desc_t *descA1, *descA2, *descB1, *descB2, *descT, *descQ, *descX; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", M ); - int LDB = run_arg_get_int( args, "LDB", M ); - int RH = run_arg_get_int( args, "qra", 0 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", M ); + int LDB = run_arg_get_int( args, "LDB", M ); + int RH = run_arg_get_int( args, "qra", 0 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgelqs(); @@ -70,9 +71,9 @@ testing_zgelqs( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, K, 0, 0, M, K, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, K, 0, 0, M, K, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descT, P, Q ); /* Fills the matrix with random values */ @@ -108,7 +109,7 @@ testing_zgelqs( run_arg_list_t *args, int check ) } testing_t test_zgelqs; -const char *zgelqs_params[] = { "nb", "ib", "m", "n", "k", "lda", +const char *zgelqs_params[] = { "mtxfmt", "nb", "ib", "m", "n", "k", "lda", "ldb", "qra", "seedA", "seedB", NULL }; const char *zgelqs_output[] = { NULL }; const char *zgelqs_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zgels.c b/testing/testing_zgels.c index 6e78dae1bb04781db5c8780858f32fd2d523a25b..9cb3874626dd447ea6dc0435df4e686893087a91 100644 --- a/testing/testing_zgels.c +++ b/testing/testing_zgels.c @@ -39,20 +39,21 @@ testing_zgels( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX, *descT; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 maxMN = chameleon_max( M, N ); - int NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", M ); - int LDB = run_arg_get_int( args, "LDB", maxMN ); - int RH = run_arg_get_int( args, "qra", 4 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 maxMN = chameleon_max( M, N ); + int NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", M ); + int LDB = run_arg_get_int( args, "LDB", maxMN ); + int RH = run_arg_get_int( args, "qra", 4 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgels( trans, M, N, NRHS ); @@ -72,9 +73,9 @@ testing_zgels( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descT, P, Q ); /* Fills the matrix with random values */ @@ -94,9 +95,9 @@ testing_zgels( run_arg_list_t *args, int check ) CHAM_desc_t *subX, *subB; CHAMELEON_Desc_Create( - &descA0, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA0, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); CHAMELEON_zplrnt_Tile( descA0, seedA ); CHAMELEON_zplrnt_Tile( descB, seedB ); @@ -128,7 +129,7 @@ testing_zgels( run_arg_list_t *args, int check ) } testing_t test_zgels; -const char *zgels_params[] = { "nb", "ib", "trans", "m", "n", "k", +const char *zgels_params[] = { "mtxfmt", "nb", "ib", "trans", "m", "n", "k", "lda", "ldb", "qra", "seedA", "seedB", NULL }; const char *zgels_output[] = { NULL }; const char *zgels_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zgels_hqr.c b/testing/testing_zgels_hqr.c index 3bf679addbe62406150a869055dec779de34c204..f457a006fcf15f2f331eedab82fb24536fe78443 100644 --- a/testing/testing_zgels_hqr.c +++ b/testing/testing_zgels_hqr.c @@ -39,6 +39,7 @@ testing_zgels_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX, *descTS, *descTT; /* Reads arguments */ + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); int ib = run_arg_get_int( args, "ib", 48 ); int P = parameters_getvalue_int( "P" ); @@ -68,9 +69,9 @@ testing_zgels_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descTT, P, Q ); @@ -100,9 +101,9 @@ testing_zgels_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *subX, *subB; CHAMELEON_Desc_Create( - &descA0, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA0, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, maxMN, NRHS, P, Q ); CHAMELEON_zplrnt_Tile( descA0, seedA ); CHAMELEON_zplrnt_Tile( descB, seedB ); @@ -136,7 +137,7 @@ testing_zgels_hqr( run_arg_list_t *args, int check ) } testing_t test_zgels_hqr; -const char *zgels_hqr_params[] = { "nb", "ib", "trans", "m", "n", "k", +const char *zgels_hqr_params[] = { "mtxfmt", "nb", "ib", "trans", "m", "n", "k", "lda", "ldb", "qra", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", "seedB", NULL }; const char *zgels_hqr_output[] = { NULL }; diff --git a/testing/testing_zgemm.c b/testing/testing_zgemm.c index c9cc3943c11dc0a96b3f56799d75cf8afa2c19f2..17d39874d0d3799dbdb482a789f58e25393fd041 100644 --- a/testing/testing_zgemm.c +++ b/testing/testing_zgemm.c @@ -28,6 +28,7 @@ testing_zgemm( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descC, *descCinit; /* Read arguments */ + 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 ); @@ -72,11 +73,11 @@ testing_zgemm( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); /* Fill the matrices with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -94,7 +95,7 @@ testing_zgemm( run_arg_list_t *args, int check ) /* Check the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descCinit, (void*)(-mtxfmt), 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 ); @@ -110,7 +111,7 @@ testing_zgemm( run_arg_list_t *args, int check ) } testing_t test_zgemm; -const char *zgemm_params[] = { "nb", "transA", "transB", "m", "n", "k", "lda", "ldb", +const char *zgemm_params[] = { "mtxfmt", "nb", "transA", "transB", "m", "n", "k", "lda", "ldb", "ldc", "alpha", "beta", "seedA", "seedB", "seedC", NULL }; const char *zgemm_output[] = { NULL }; const char *zgemm_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zgeqrf.c b/testing/testing_zgeqrf.c index 96fb92f8f643df4094d412209d95e754456b5056..b74da21ef9621260ff0d2491503be2d6fcba9c1b 100644 --- a/testing/testing_zgeqrf.c +++ b/testing/testing_zgeqrf.c @@ -27,15 +27,16 @@ testing_zgeqrf( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descT; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 RH = run_arg_get_int( args, "qra", 4 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 RH = run_arg_get_int( args, "qra", 4 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgeqrf( M, N ); @@ -52,7 +53,7 @@ testing_zgeqrf( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descT, P, Q ); /* Fills the matrix with random values */ @@ -72,7 +73,7 @@ testing_zgeqrf( run_arg_list_t *args, int check ) CHAM_desc_t *descA0 = CHAMELEON_Desc_Copy( descA, NULL ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, M, M, 0, 0, M, M, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, M, M, 0, 0, M, M, P, Q ); CHAMELEON_zplrnt_Tile( descA0, seedA ); CHAMELEON_zungqr_Tile( descA, descT, descQ ); @@ -91,7 +92,7 @@ testing_zgeqrf( run_arg_list_t *args, int check ) } testing_t test_zgeqrf; -const char *zgeqrf_params[] = { "nb", "ib", "m", "n", "lda", "qra", "seedA", NULL }; +const char *zgeqrf_params[] = { "mtxfmt", "nb","ib", "m", "n", "lda", "qra", "seedA", NULL }; const char *zgeqrf_output[] = { NULL }; const char *zgeqrf_outchk[] = { "||A||", "||I-QQ'||", "||A-fact(A)||", "RETURN", NULL }; diff --git a/testing/testing_zgeqrf_hqr.c b/testing/testing_zgeqrf_hqr.c index b4d264e185e0c0cd0d90d1f585be6b6ac1a81eb3..d34784a0f973b78382b21621999b12b859e4771f 100644 --- a/testing/testing_zgeqrf_hqr.c +++ b/testing/testing_zgeqrf_hqr.c @@ -27,19 +27,20 @@ testing_zgeqrf_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descTS, *descTT; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 qr_a = run_arg_get_int( args, "qra", -1 ); - int qr_p = run_arg_get_int( args, "qrp", -1 ); - int llvl = run_arg_get_int( args, "llvl", -1 ); - int hlvl = run_arg_get_int( args, "hlvl", -1 ); - int domino = run_arg_get_int( args, "domino", -1 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 qr_a = run_arg_get_int( args, "qra", -1 ); + int qr_p = run_arg_get_int( args, "qrp", -1 ); + int llvl = run_arg_get_int( args, "llvl", -1 ); + int hlvl = run_arg_get_int( args, "hlvl", -1 ); + int domino = run_arg_get_int( args, "domino", -1 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgeqrf( M, N ); @@ -51,7 +52,7 @@ testing_zgeqrf_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descTT, P, Q ); @@ -80,7 +81,7 @@ testing_zgeqrf_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA0 = CHAMELEON_Desc_Copy( descA, NULL ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, M, M, 0, 0, M, M, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, M, M, 0, 0, M, M, P, Q ); CHAMELEON_zplrnt_Tile( descA0, seedA ); CHAMELEON_zungqr_param_Tile( &qrtree, descA, descTS, descTT, descQ ); @@ -101,7 +102,7 @@ testing_zgeqrf_hqr( run_arg_list_t *args, int check ) } testing_t test_zgeqrf_hqr; -const char *zgeqrf_hqr_params[] = { "nb", "ib", "m", "n", "lda", "qra", +const char *zgeqrf_hqr_params[] = { "mtxfmt", "nb", "ib", "m", "n", "lda", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", NULL }; const char *zgeqrf_hqr_output[] = { NULL }; const char *zgeqrf_hqr_outchk[] = { "||A||", "||I-QQ'||", "||A-fact(A)||", "RETURN", NULL }; diff --git a/testing/testing_zgeqrs.c b/testing/testing_zgeqrs.c index a7eb9d3c5d94a46e9ff9a29eb4ab20f536c008ef..b77662085337e3c1d024c186a9186c1ea05468a3 100644 --- a/testing/testing_zgeqrs.c +++ b/testing/testing_zgeqrs.c @@ -28,18 +28,19 @@ testing_zgeqrs( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX, *descT; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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 NRHS = run_arg_get_int( args, "NRHS", 1 ); - int LDA = run_arg_get_int( args, "LDA", M ); - int LDB = run_arg_get_int( args, "LDB", M ); - int RH = run_arg_get_int( args, "qra", 0 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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 NRHS = run_arg_get_int( args, "NRHS", 1 ); + int LDA = run_arg_get_int( args, "LDA", M ); + int LDB = run_arg_get_int( args, "LDB", M ); + int RH = run_arg_get_int( args, "qra", 0 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgeqrs( M, N, NRHS ); @@ -63,9 +64,9 @@ testing_zgeqrs( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, M, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, M, NRHS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, N, &descT, P, Q ); /* Fills the matrix with random values */ @@ -108,7 +109,7 @@ testing_zgeqrs( run_arg_list_t *args, int check ) } testing_t test_zgeqrs; -const char *zgeqrs_params[] = { "nb", "ib", "m", "n", "k", "lda", +const char *zgeqrs_params[] = { "mtxfmt", "nb", "ib", "m", "n", "k", "lda", "ldb", "qra", "seedA", "seedB", NULL }; const char *zgeqrs_output[] = { NULL }; const char *zgeqrs_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zgesv.c b/testing/testing_zgesv.c index 1b38fa53d39c9fb412a636adec3c107ae42e3207..dd87323aa2891d799e4608c298defeaff558061e 100644 --- a/testing/testing_zgesv.c +++ b/testing/testing_zgesv.c @@ -34,15 +34,16 @@ testing_zgesv( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX; /* Reads arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgesv( N, NRHS ); @@ -50,9 +51,9 @@ testing_zgesv( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -94,7 +95,7 @@ testing_zgesv( run_arg_list_t *args, int check ) } testing_t test_zgesv; -const char *zgesv_params[] = { "nb", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; +const char *zgesv_params[] = { "mtxfmt", "nb","n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; const char *zgesv_output[] = { NULL }; const char *zgesv_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zgetrf.c b/testing/testing_zgetrf.c index 67bba59850f5acb5cdb00d118693c7078cdd3656..47430577fcc7f62e431a8d84b3219194487d9d9b 100644 --- a/testing/testing_zgetrf.c +++ b/testing/testing_zgetrf.c @@ -27,13 +27,14 @@ testing_zgetrf( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgetrf( M, N ); @@ -41,7 +42,7 @@ testing_zgetrf( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -70,7 +71,7 @@ testing_zgetrf( run_arg_list_t *args, int check ) } testing_t test_zgetrf; -const char *zgetrf_params[] = { "nb", "m", "n", "lda", "seedA", NULL }; +const char *zgetrf_params[] = { "mtxfmt", "nb","m", "n", "lda", "seedA", NULL }; const char *zgetrf_output[] = { NULL }; const char *zgetrf_outchk[] = { "||A||", "||A-fact(A)||", "RETURN", NULL }; diff --git a/testing/testing_zgetrs.c b/testing/testing_zgetrs.c index c665c63705af42bd7cdd68d042fda1078a684822..5433ea73d122f29deb7e8ada3192ba56e6feb8b4 100644 --- a/testing/testing_zgetrs.c +++ b/testing/testing_zgetrs.c @@ -28,15 +28,16 @@ testing_zgetrs( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX; /* Reads arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgetrs( N, NRHS ); @@ -44,9 +45,9 @@ testing_zgetrs( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -84,7 +85,7 @@ testing_zgetrs( run_arg_list_t *args, int check ) } testing_t test_zgetrs; -const char *zgetrs_params[] = { "nb", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; +const char *zgetrs_params[] = { "mtxfmt", "nb","n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; const char *zgetrs_output[] = { NULL }; const char *zgetrs_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zhemm.c b/testing/testing_zhemm.c index eb0dda06088ab9df0de7fe8ae6a493ae7bc504ab..d1fdc57351d0b6fee8f4402d94633e03ad8d73bc 100644 --- a/testing/testing_zhemm.c +++ b/testing/testing_zhemm.c @@ -28,23 +28,24 @@ testing_zhemm( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descC, *descCinit; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_side_t side = run_arg_get_uplo( 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int seedC = run_arg_get_int( args, "seedC", random() ); - double bump = testing_dalea(); - bump = run_arg_get_double( args, "bump", bump ); - int Q = parameters_compute_q( P ); + 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_uplo( 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int seedC = run_arg_get_int( args, "seedC", random() ); + double bump = testing_dalea(); + bump = run_arg_get_double( args, "bump", bump ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zhemm( side, M, N ); @@ -63,11 +64,11 @@ testing_zhemm( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, Am, 0, 0, Am, Am, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, Am, 0, 0, Am, Am, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( bump, uplo, descA, seedA ); @@ -85,7 +86,7 @@ testing_zhemm( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descCinit, seedC ); hres += @@ -102,7 +103,7 @@ testing_zhemm( run_arg_list_t *args, int check ) } testing_t test_zhemm; -const char *zhemm_params[] = { "nb", "side", "uplo", "m", "n", "lda", "ldb", "ldc", +const char *zhemm_params[] = { "mtxfmt", "nb", "side", "uplo", "m", "n", "lda", "ldb", "ldc", "alpha", "beta", "seedA", "seedB", "seedC", "bump", NULL }; const char *zhemm_output[] = { NULL }; const char *zhemm_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zher2k.c b/testing/testing_zher2k.c index ca179840cd30f75a7a56eb5dfcb392ef97aed2e3..20e26c88009d641a0bf0fb48fb5513ec8eef16e2 100644 --- a/testing/testing_zher2k.c +++ b/testing/testing_zher2k.c @@ -28,15 +28,16 @@ testing_zher2k( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descC, *descCinit; /* Read arguments */ - 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 ); + 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 ); CHAMELEON_Complex64_t alpha = testing_zalea(); double beta = testing_dalea(); int seedA = run_arg_get_int( args, "seedA", random() ); @@ -65,11 +66,11 @@ testing_zher2k( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, An, 0, 0, Am, An, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -87,7 +88,7 @@ testing_zher2k( run_arg_list_t *args, int check ) /* Check the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplghe_Tile( bump, uplo, descCinit, seedC ); hres += @@ -104,7 +105,7 @@ testing_zher2k( run_arg_list_t *args, int check ) } testing_t test_zher2k; -const char *zher2k_params[] = { "nb", "trans", "uplo", "n", "k", "lda", "ldb", "ldc", +const char *zher2k_params[] = { "mtxfmt", "nb", "trans", "uplo", "n", "k", "lda", "ldb", "ldc", "alpha", "beta", "seedA", "seedB", "seedC", "bump", NULL }; const char *zher2k_output[] = { NULL }; const char *zher2k_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zherk.c b/testing/testing_zherk.c index ff93b7ee7ee526e21d8dfa1638d48e75068ae534..28730ea71d3f315485e68141a6399ed320314132 100644 --- a/testing/testing_zherk.c +++ b/testing/testing_zherk.c @@ -29,20 +29,21 @@ testing_zherk( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descC, *descCinit; /* Reads arguments */ - 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", random() ); - int seedC = run_arg_get_int( args, "seedC", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedC = run_arg_get_int( args, "seedC", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zherk( K, N ); @@ -64,9 +65,9 @@ testing_zherk( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -83,7 +84,7 @@ testing_zherk( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplghe_Tile( bump, uplo, descCinit, seedC ); hres += @@ -99,7 +100,7 @@ testing_zherk( run_arg_list_t *args, int check ) } testing_t test_zherk; -const char *zherk_params[] = { "nb", "trans", "uplo", "n", "k", "lda", "ldc", +const char *zherk_params[] = { "mtxfmt", "nb", "trans", "uplo", "n", "k", "lda", "ldc", "alpha", "beta", "seedA", "seedC", "bump", NULL }; const char *zherk_output[] = { NULL }; const char *zherk_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlacpy.c b/testing/testing_zlacpy.c index 0e068822c07b72a7bdf9ebeeb4a65915f2d021d6..6526cbf8e0a6757d36c67bed6448963c46f8a4bc 100644 --- a/testing/testing_zlacpy.c +++ b/testing/testing_zlacpy.c @@ -58,15 +58,16 @@ testing_zlacpy( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zlacpy( uplo, M, N ); @@ -74,9 +75,9 @@ testing_zlacpy( run_arg_list_t *args, int check ) /* Creates two different matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); /* Fills each matrix with different random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -103,7 +104,7 @@ testing_zlacpy( run_arg_list_t *args, int check ) } testing_t test_zlacpy; -const char *zlacpy_params[] = { "nb", "uplo", "m", "n", "lda", "ldb", "seedA", NULL }; +const char *zlacpy_params[] = { "mtxfmt", "nb","uplo", "m", "n", "lda", "ldb", "seedA", NULL }; const char *zlacpy_output[] = { NULL }; const char *zlacpy_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlange.c b/testing/testing_zlange.c index 6484e788279e62d6e397d5f82a0b72cf37594594..060f2741b3d16186db2e87af6e1e90004754995d 100644 --- a/testing/testing_zlange.c +++ b/testing/testing_zlange.c @@ -55,6 +55,7 @@ testing_zlange( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ + 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 ); @@ -70,7 +71,7 @@ testing_zlange( run_arg_list_t *args, int check ) /* Creates the matrix */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -94,7 +95,7 @@ testing_zlange( run_arg_list_t *args, int check ) } testing_t test_zlange; -const char *zlange_params[] = { "nb", "norm", "m", "n", "lda", "seedA", NULL }; +const char *zlange_params[] = { "mtxfmt", "nb","norm", "m", "n", "lda", "seedA", NULL }; const char *zlange_output[] = { NULL }; const char *zlange_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlanhe.c b/testing/testing_zlanhe.c index a15d6d61bd7b5d51f9a9decd208983f10965a4dc..a5a8c5a94b91bc29d9fbdef2bd406f436efa13a5 100644 --- a/testing/testing_zlanhe.c +++ b/testing/testing_zlanhe.c @@ -53,6 +53,7 @@ testing_zlanhe( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ + 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 ); @@ -71,7 +72,7 @@ testing_zlanhe( run_arg_list_t *args, int check ) /* Creates the matrix */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( bump, uplo, descA, seedA ); @@ -95,7 +96,7 @@ testing_zlanhe( run_arg_list_t *args, int check ) } testing_t test_zlanhe; -const char *zlanhe_params[] = { "nb", "norm", "uplo", "n", "lda", "seedA", "bump", NULL }; +const char *zlanhe_params[] = { "mtxfmt", "nb","norm", "uplo", "n", "lda", "seedA", "bump", NULL }; const char *zlanhe_output[] = { NULL }; const char *zlanhe_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlansy.c b/testing/testing_zlansy.c index fe38d04e84ed7ed8557192479ca1f9fd32f021fa..90c3c4f8989047363dfcabcc7d626177752f0b86 100644 --- a/testing/testing_zlansy.c +++ b/testing/testing_zlansy.c @@ -53,6 +53,7 @@ testing_zlansy( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ + 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 ); @@ -71,7 +72,7 @@ testing_zlansy( run_arg_list_t *args, int check ) /* Creates the matrix */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( bump, uplo, descA, seedA ); @@ -95,7 +96,7 @@ testing_zlansy( run_arg_list_t *args, int check ) } testing_t test_zlansy; -const char *zlansy_params[] = { "nb", "norm", "uplo", "n", "lda", "seedA", "bump", NULL }; +const char *zlansy_params[] = { "mtxfmt", "nb","norm", "uplo", "n", "lda", "seedA", "bump", NULL }; const char *zlansy_output[] = { NULL }; const char *zlansy_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlantr.c b/testing/testing_zlantr.c index f8f11cdb206d655f79e2cb92fa5c828e90ba5e34..2299d0f516742c9afb77a7abf2965ffacb2c979a 100644 --- a/testing/testing_zlantr.c +++ b/testing/testing_zlantr.c @@ -74,6 +74,7 @@ testing_zlantr( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ + 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 ); @@ -91,7 +92,7 @@ testing_zlantr( run_arg_list_t *args, int check ) /* Creates the matrix */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -115,7 +116,7 @@ testing_zlantr( run_arg_list_t *args, int check ) } testing_t test_zlantr; -const char *zlantr_params[] = { "nb", "norm", "uplo", "diag", "m", "n", "lda", "seedA", NULL }; +const char *zlantr_params[] = { "mtxfmt", "nb","norm", "uplo", "diag", "m", "n", "lda", "seedA", NULL }; const char *zlantr_output[] = { NULL }; const char *zlantr_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlascal.c b/testing/testing_zlascal.c index 7717d29933d60ad04460306de47dd4b0b73617e5..708b4ed17cae929f0764fc225aa221f17762df56 100644 --- a/testing/testing_zlascal.c +++ b/testing/testing_zlascal.c @@ -52,15 +52,16 @@ testing_zlascal( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descAinit; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zlascal( uplo, M, N ); @@ -68,7 +69,7 @@ testing_zlascal( run_arg_list_t *args, int check ) /* Creates the matrix */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -84,7 +85,7 @@ testing_zlascal( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descAinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descAinit, (void*)(-mtxfmt), 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 ); @@ -98,7 +99,7 @@ testing_zlascal( run_arg_list_t *args, int check ) } testing_t test_zlascal; -const char *zlascal_params[] = { "nb", "uplo", "m", "n", "lda", "alpha", "seedA", NULL }; +const char *zlascal_params[] = { "mtxfmt", "nb","uplo", "m", "n", "lda", "alpha", "seedA", NULL }; const char *zlascal_output[] = { NULL }; const char *zlascal_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zlauum.c b/testing/testing_zlauum.c index 99b5e362c4e89179c2a66f95dbaf550dc939fb58..8e8989293b2b04040549b9733c971a0b4898b87d 100644 --- a/testing/testing_zlauum.c +++ b/testing/testing_zlauum.c @@ -34,13 +34,14 @@ testing_zlauum( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zlauum( N ); @@ -48,7 +49,7 @@ testing_zlauum( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Initialises the matrices with the same values */ CHAMELEON_zplghe_Tile( 0., uplo, descA, seedA ); @@ -76,7 +77,7 @@ testing_zlauum( run_arg_list_t *args, int check ) } testing_t test_zlauum; -const char *zlauum_params[] = { "nb", "uplo", "n", "lda", "seedA", NULL }; +const char *zlauum_params[] = { "mtxfmt", "nb","uplo", "n", "lda", "seedA", NULL }; const char *zlauum_output[] = { NULL }; const char *zlauum_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zposv.c b/testing/testing_zposv.c index 09016d54e6d72bda33bf06f61babd14e69069904..a678274bd6f01cf7078d9cd6af87150e334d5859 100644 --- a/testing/testing_zposv.c +++ b/testing/testing_zposv.c @@ -34,16 +34,17 @@ testing_zposv( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX; /* Reads arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zposv( N, NRHS ); @@ -51,9 +52,9 @@ testing_zposv( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -95,7 +96,7 @@ testing_zposv( run_arg_list_t *args, int check ) } testing_t test_zposv; -const char *zposv_params[] = { "nb", "uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; +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 }; diff --git a/testing/testing_zpotrf.c b/testing/testing_zpotrf.c index d3e2a452a5f2e7ab93b65dff48fb0dbc3066edca..30da50690f6c82a2347fa15205254d6c91aecf62 100644 --- a/testing/testing_zpotrf.c +++ b/testing/testing_zpotrf.c @@ -27,13 +27,14 @@ testing_zpotrf( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zpotrf( N ); @@ -41,7 +42,7 @@ testing_zpotrf( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -70,7 +71,7 @@ testing_zpotrf( run_arg_list_t *args, int check ) } testing_t test_zpotrf; -const char *zpotrf_params[] = { "nb", "uplo", "n", "lda", "seedA", NULL }; +const char *zpotrf_params[] = { "mtxfmt", "nb","uplo", "n", "lda", "seedA", NULL }; const char *zpotrf_output[] = { NULL }; const char *zpotrf_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zpotri.c b/testing/testing_zpotri.c index 0e57f59d3e29d7a202667936ce5bec5821adcda0..3c144cd506006e8a03a90b648d8c291aa7a23ea0 100644 --- a/testing/testing_zpotri.c +++ b/testing/testing_zpotri.c @@ -28,13 +28,14 @@ testing_zpotri( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zpotri( N ); @@ -42,7 +43,7 @@ testing_zpotri( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Initialise the matrix with the random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -75,7 +76,7 @@ testing_zpotri( run_arg_list_t *args, int check ) } testing_t test_zpotri; -const char *zpotri_params[] = { "nb", "uplo", "n", "lda", "seedA", NULL }; +const char *zpotri_params[] = { "mtxfmt", "nb","uplo", "n", "lda", "seedA", NULL }; const char *zpotri_output[] = { NULL }; const char *zpotri_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zpotrs.c b/testing/testing_zpotrs.c index 21c908a8a42c3c7ceddd06f266a957c9caa15f6f..8cba4c1462a2ec5563c5dc667b9696eaf5de8252 100644 --- a/testing/testing_zpotrs.c +++ b/testing/testing_zpotrs.c @@ -28,16 +28,17 @@ testing_zpotrs( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX; /* Reads arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zpotrs( N, NRHS ); @@ -45,9 +46,9 @@ testing_zpotrs( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -85,7 +86,7 @@ testing_zpotrs( run_arg_list_t *args, int check ) } testing_t test_zpotrs; -const char *zpotrs_params[] = { "nb", "uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; +const char *zpotrs_params[] = { "mtxfmt", "nb","uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; const char *zpotrs_output[] = { NULL }; const char *zpotrs_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zsymm.c b/testing/testing_zsymm.c index b6a9a2a497541d49e00e096430df417ef00b36df..5bd8804992384c97d2472c7ff9bdd9614084dbfd 100644 --- a/testing/testing_zsymm.c +++ b/testing/testing_zsymm.c @@ -28,23 +28,24 @@ testing_zsymm( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descC, *descCinit; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int P = parameters_getvalue_int( "P" ); - cham_side_t side = run_arg_get_uplo( 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int seedC = run_arg_get_int( args, "seedC", random() ); - double bump = testing_dalea(); - bump = run_arg_get_double( args, "bump", bump ); - int Q = parameters_compute_q( P ); + 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_uplo( 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int seedC = run_arg_get_int( args, "seedC", random() ); + double bump = testing_dalea(); + bump = run_arg_get_double( args, "bump", bump ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zsymm( side, M, N ); @@ -63,11 +64,11 @@ testing_zsymm( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, Am, 0, 0, Am, Am, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, Am, 0, 0, Am, Am, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( bump, uplo, descA, seedA ); @@ -85,7 +86,7 @@ testing_zsymm( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_zplrnt_Tile( descCinit, seedC ); hres += @@ -102,7 +103,7 @@ testing_zsymm( run_arg_list_t *args, int check ) } testing_t test_zsymm; -const char *zsymm_params[] = { "nb", "side", "uplo", "m", "n", "lda", "ldb", "ldc", +const char *zsymm_params[] = { "mtxfmt", "nb", "side", "uplo", "m", "n", "lda", "ldb", "ldc", "alpha", "beta", "seedA", "seedB", "seedC", "bump", NULL }; const char *zsymm_output[] = { NULL }; const char *zsymm_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zsyr2k.c b/testing/testing_zsyr2k.c index 1d173f1cf141839e5d7032b4a3d92b15553465df..107932eebdccaed648c373f4197b304233bf031b 100644 --- a/testing/testing_zsyr2k.c +++ b/testing/testing_zsyr2k.c @@ -28,15 +28,16 @@ testing_zsyr2k( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descC, *descCinit; /* Read arguments */ - 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 ); + 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 ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); int seedA = run_arg_get_int( args, "seedA", random() ); @@ -65,11 +66,11 @@ testing_zsyr2k( run_arg_list_t *args, int check ) /* Create the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, An, 0, 0, Am, An, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); /* Fill the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -87,7 +88,7 @@ testing_zsyr2k( run_arg_list_t *args, int check ) /* Check the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplgsy_Tile( bump, uplo, descCinit, seedC ); hres += @@ -104,7 +105,7 @@ testing_zsyr2k( run_arg_list_t *args, int check ) } testing_t test_zsyr2k; -const char *zsyr2k_params[] = { "nb", "trans", "uplo", "n", "k", "lda", "ldb", "ldc", +const char *zsyr2k_params[] = { "mtxfmt", "nb", "trans", "uplo", "n", "k", "lda", "ldb", "ldc", "alpha", "beta", "seedA", "seedB", "seedC", "bump", NULL }; const char *zsyr2k_output[] = { NULL }; const char *zsyr2k_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zsyrk.c b/testing/testing_zsyrk.c index 70ec507f6c5816d65001c1fbdcdd26857d35f1c3..31128264d0195c0c5952df28c76fecf021f632c7 100644 --- a/testing/testing_zsyrk.c +++ b/testing/testing_zsyrk.c @@ -28,14 +28,15 @@ testing_zsyrk( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descC, *descCinit; /* Reads arguments */ - 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 ); + 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 ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); CHAMELEON_Complex64_t bump = testing_zalea(); @@ -63,9 +64,9 @@ testing_zsyrk( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -82,7 +83,7 @@ testing_zsyrk( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descCinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); + &descCinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, N, N, P, Q ); CHAMELEON_zplgsy_Tile( bump, uplo, descCinit, seedC ); hres += @@ -98,7 +99,7 @@ testing_zsyrk( run_arg_list_t *args, int check ) } testing_t test_zsyrk; -const char *zsyrk_params[] = { "nb", "trans", "uplo", "n", "k", "lda", "ldc", +const char *zsyrk_params[] = { "mtxfmt", "nb", "trans", "uplo", "n", "k", "lda", "ldc", "alpha", "beta", "seedA", "seedC", "bump", NULL }; const char *zsyrk_output[] = { NULL }; const char *zsyrk_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zsysv.c b/testing/testing_zsysv.c index 0b5022a806687b1fb15aaa0f71658142cebe5b29..4388dd1fd6d5a41dff0d5225179eee67b7e547cd 100644 --- a/testing/testing_zsysv.c +++ b/testing/testing_zsysv.c @@ -34,16 +34,17 @@ testing_zsysv( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX; /* Reads arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zsysv( N, NRHS ); @@ -51,9 +52,9 @@ testing_zsysv( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( (double)N, uplo, descA, seedA ); @@ -95,7 +96,7 @@ testing_zsysv( run_arg_list_t *args, int check ) } testing_t test_zsysv; -const char *zsysv_params[] = { "nb", "uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; +const char *zsysv_params[] = { "mtxfmt", "nb","uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; const char *zsysv_output[] = { NULL }; const char *zsysv_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zsytrf.c b/testing/testing_zsytrf.c index d47c98a66ae684005327e2ed3c610bfd721d3a85..2ec913eb85b0327ea0e0a8cb3cd2e1e3da056c2c 100644 --- a/testing/testing_zsytrf.c +++ b/testing/testing_zsytrf.c @@ -27,13 +27,14 @@ testing_zsytrf( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zpotrf( N ); @@ -41,7 +42,7 @@ testing_zsytrf( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( (double)N, uplo, descA, seedA ); @@ -70,7 +71,7 @@ testing_zsytrf( run_arg_list_t *args, int check ) } testing_t test_zsytrf; -const char *zsytrf_params[] = { "nb", "uplo", "n", "lda", "seedA", NULL }; +const char *zsytrf_params[] = { "mtxfmt", "nb","uplo", "n", "lda", "seedA", NULL }; const char *zsytrf_output[] = { NULL }; const char *zsytrf_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zsytrs.c b/testing/testing_zsytrs.c index 4c7c9c8a34fd891781b5fd87d55aac0199580b66..5a026592be6858fffa17ffd2ac5f1e055c99c87c 100644 --- a/testing/testing_zsytrs.c +++ b/testing/testing_zsytrs.c @@ -28,16 +28,17 @@ testing_zsytrs( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descX; /* Reads arguments */ - 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", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = 0; // flops_zsytrs( N, NRHS ); @@ -45,9 +46,9 @@ testing_zsytrs( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descX, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); + &descX, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, NRHS, 0, 0, N, NRHS, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplgsy_Tile( (double)N, uplo, descA, seedA ); @@ -85,7 +86,7 @@ testing_zsytrs( run_arg_list_t *args, int check ) } testing_t test_zsytrs; -const char *zsytrs_params[] = { "nb", "uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; +const char *zsytrs_params[] = { "mtxfmt", "nb","uplo", "n", "nrhs", "lda", "ldb", "seedA", "seedB", NULL }; const char *zsytrs_output[] = { NULL }; const char *zsytrs_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_ztradd.c b/testing/testing_ztradd.c index 1dc329ad32db9425a11a8fa57e3e3c17d8855124..0e1759632ce45dff69b18de3b18fc771f6ea72a7 100644 --- a/testing/testing_ztradd.c +++ b/testing/testing_ztradd.c @@ -55,14 +55,15 @@ testing_ztradd( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB; /* Reads arguments */ - 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 ); + 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 ); CHAMELEON_Complex64_t alpha = testing_zalea(); CHAMELEON_Complex64_t beta = testing_zalea(); int seedA = run_arg_get_int( args, "seedA", random() ); @@ -87,9 +88,9 @@ testing_ztradd( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, Am, An, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ switch ( uplo ) { @@ -141,7 +142,7 @@ testing_ztradd( run_arg_list_t *args, int check ) } testing_t test_ztradd; -const char *ztradd_params[] = { "nb", "trans", "uplo", "m", "n", "lda", +const char *ztradd_params[] = { "mtxfmt", "nb", "trans", "uplo", "m", "n", "lda", "ldb", "alpha", "beta", "seedA", "seedB", NULL }; const char *ztradd_output[] = { NULL }; const char *ztradd_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_ztrmm.c b/testing/testing_ztrmm.c index 12caaffeb0936316b0dd5621ff4f2b74b057b3d7..7d7b1041cb82314a7aae07f7826f41a7c13f6652 100644 --- a/testing/testing_ztrmm.c +++ b/testing/testing_ztrmm.c @@ -28,20 +28,21 @@ testing_ztrmm( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descBinit; /* Reads arguments */ - 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_uplo( 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 K = run_arg_get_int( args, "K", N ); - int LDA = run_arg_get_int( args, "LDA", N ); - int LDB = run_arg_get_int( args, "LDB", N ); - CHAMELEON_Complex64_t alpha = testing_zalea(); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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_uplo( 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 K = run_arg_get_int( args, "K", N ); + int LDA = run_arg_get_int( args, "LDA", N ); + int LDB = run_arg_get_int( args, "LDB", N ); + CHAMELEON_Complex64_t alpha = testing_zalea(); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_ztrmm( side, N, K ); @@ -61,9 +62,9 @@ testing_ztrmm( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); /* Fills the matrix with random values */ CHAMELEON_zplrnt_Tile( descA, seedA ); @@ -80,7 +81,7 @@ testing_ztrmm( run_arg_list_t *args, int check ) /* Checks the solution */ if ( check ) { CHAMELEON_Desc_Create( - &descBinit, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); + &descBinit, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, Bn, 0, 0, Bm, Bn, P, Q ); CHAMELEON_zplrnt_Tile( descBinit, seedB ); hres += check_ztrmm( args, CHECK_TRMM, side, uplo, trans, diag, alpha, descA, descB, descBinit ); @@ -95,7 +96,7 @@ testing_ztrmm( run_arg_list_t *args, int check ) } testing_t test_ztrmm; -const char *ztrmm_params[] = { "nb", "trans", "side", "uplo", "diag", "n", "k", +const char *ztrmm_params[] = { "mtxfmt", "nb", "trans", "side", "uplo", "diag", "n", "k", "lda", "ldb", "alpha", "seedA", "seedB", NULL }; const char *ztrmm_output[] = { NULL }; const char *ztrmm_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_ztrsm.c b/testing/testing_ztrsm.c index 1fc4273e9bff99ebb59d444d25a98d4775f56590..46fa36846c009a6c86a6548fcf981e48d5aedcb0 100644 --- a/testing/testing_ztrsm.c +++ b/testing/testing_ztrsm.c @@ -27,21 +27,22 @@ testing_ztrsm( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descB, *descBinit; /* Reads arguments */ - 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 Ak = ( side == ChamLeft ) ? M : N; - int LDA = run_arg_get_int( args, "LDA", Ak ); - int LDB = run_arg_get_int( args, "LDB", N ); - CHAMELEON_Complex64_t alpha = testing_zalea(); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedB = run_arg_get_int( args, "seedB", random() ); - int Q = parameters_compute_q( P ); + 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 Ak = ( side == ChamLeft ) ? M : N; + int LDA = run_arg_get_int( args, "LDA", Ak ); + int LDB = run_arg_get_int( args, "LDB", N ); + CHAMELEON_Complex64_t alpha = testing_zalea(); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedB = run_arg_get_int( args, "seedB", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_ztrsm( side, M, N ); @@ -51,9 +52,9 @@ testing_ztrsm( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, Ak, 0, 0, Ak, Ak, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); CHAMELEON_Desc_Create( - &descB, NULL, ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); + &descB, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDB, N, 0, 0, M, N, P, Q ); /* Fills the matrix with random values */ /* We bump a little bit the diagonal to make it stable */ @@ -86,7 +87,7 @@ testing_ztrsm( run_arg_list_t *args, int check ) } testing_t test_ztrsm; -const char *ztrsm_params[] = { "nb", "side", "uplo", "trans", "diag", "m", "n", +const char *ztrsm_params[] = { "mtxfmt", "nb", "side", "uplo", "trans", "diag", "m", "n", "lda", "ldb", "alpha", "seedA", "seedB", NULL }; const char *ztrsm_output[] = { NULL }; const char *ztrsm_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_ztrtri.c b/testing/testing_ztrtri.c index 49854a9e33a0b8ac3dcd91e224f8f07a2519457f..9901ceb7befa7c698be9e4e9dae445556846d469 100644 --- a/testing/testing_ztrtri.c +++ b/testing/testing_ztrtri.c @@ -27,14 +27,15 @@ testing_ztrtri( run_arg_list_t *args, int check ) CHAM_desc_t *descA; /* Reads arguments */ - 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", random() ); - int Q = parameters_compute_q( P ); + 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", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_ztrtri( N ); @@ -42,7 +43,7 @@ testing_ztrtri( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, N, N, P, Q ); /* Initialises the matrices with the same values */ CHAMELEON_zplghe_Tile( (double)N, uplo, descA, seedA ); @@ -71,7 +72,7 @@ testing_ztrtri( run_arg_list_t *args, int check ) } testing_t test_ztrtri; -const char *ztrtri_params[] = { "nb", "uplo", "diag", "n", "lda", "seedA", NULL }; +const char *ztrtri_params[] = { "mtxfmt", "nb","uplo", "diag", "n", "lda", "seedA", NULL }; const char *ztrtri_output[] = { NULL }; const char *ztrtri_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zunglq.c b/testing/testing_zunglq.c index 22864c2ccf0c8231a73f389a73e47d25cae34d1e..12cd3b998bf3ddf00a361ffd57f8d326e842fb77 100644 --- a/testing/testing_zunglq.c +++ b/testing/testing_zunglq.c @@ -27,16 +27,17 @@ testing_zunglq( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descT, *descQ; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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", chameleon_min( M, N ) ); - int LDA = run_arg_get_int( args, "LDA", M ); - int RH = run_arg_get_int( args, "qra", 0 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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", chameleon_min( M, N ) ); + int LDA = run_arg_get_int( args, "LDA", M ); + int RH = run_arg_get_int( args, "qra", 0 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zunglq( M, N, K ); @@ -60,9 +61,9 @@ testing_zunglq( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, K, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, K, N, P, Q ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( K, N, &descT, P, Q ); /* Fills the matrix with random values */ @@ -90,7 +91,7 @@ testing_zunglq( run_arg_list_t *args, int check ) } testing_t test_zunglq; -const char *zunglq_params[] = { "nb", "ib", "m", "n", "k", "lda", "qra", "seedA", NULL }; +const char *zunglq_params[] = { "mtxfmt", "nb","ib", "m", "n", "k", "lda", "qra", "seedA", NULL }; const char *zunglq_output[] = { NULL }; const char *zunglq_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zunglq_hqr.c b/testing/testing_zunglq_hqr.c index 6b5527ef529e5f6b300ae40cd5a4086f4bc4fecd..3c55d96a3c5b651891c71b8f58964b73e36f49da 100644 --- a/testing/testing_zunglq_hqr.c +++ b/testing/testing_zunglq_hqr.c @@ -27,20 +27,21 @@ testing_zunglq_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descTS, *descTT, *descQ; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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", chameleon_min( M, N ) ); - int LDA = run_arg_get_int( args, "LDA", M ); - int qr_a = run_arg_get_int( args, "qra", -1 ); - int qr_p = run_arg_get_int( args, "qrp", -1 ); - int llvl = run_arg_get_int( args, "llvl", -1 ); - int hlvl = run_arg_get_int( args, "hlvl", -1 ); - int domino = run_arg_get_int( args, "domino", -1 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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", chameleon_min( M, N ) ); + int LDA = run_arg_get_int( args, "LDA", M ); + int qr_a = run_arg_get_int( args, "qra", -1 ); + int qr_p = run_arg_get_int( args, "qrp", -1 ); + int llvl = run_arg_get_int( args, "llvl", -1 ); + int hlvl = run_arg_get_int( args, "hlvl", -1 ); + int domino = run_arg_get_int( args, "domino", -1 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zunglq( M, N, K ); @@ -59,9 +60,9 @@ testing_zunglq_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, K, N, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, K, N, P, Q ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( K, N, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( K, N, &descTT, P, Q ); @@ -100,7 +101,7 @@ testing_zunglq_hqr( run_arg_list_t *args, int check ) } testing_t test_zunglq_hqr; -const char *zunglq_hqr_params[] = { "nb", "ib", "m", "n", "k", "lda", "qra", +const char *zunglq_hqr_params[] = { "mtxfmt", "nb", "ib", "m", "n", "k", "lda", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", NULL }; const char *zunglq_hqr_output[] = { NULL }; const char *zunglq_hqr_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zungqr.c b/testing/testing_zungqr.c index 05e38cd56e0346a2e59ed5537cb03e5173f65870..3497672ed09df0c7cf7f3d68871f79480d70a64f 100644 --- a/testing/testing_zungqr.c +++ b/testing/testing_zungqr.c @@ -27,16 +27,17 @@ testing_zungqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descT, *descQ; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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", chameleon_min( M, N ) ); - int LDA = run_arg_get_int( args, "LDA", M ); - int RH = run_arg_get_int( args, "qra", 0 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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", chameleon_min( M, N ) ); + int LDA = run_arg_get_int( args, "LDA", M ); + int RH = run_arg_get_int( args, "qra", 0 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zungqr( M, N, K ); @@ -60,9 +61,9 @@ testing_zungqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, M, K, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, M, K, P, Q ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, K, &descT, P, Q ); /* Fills the matrix with random values */ @@ -90,7 +91,7 @@ testing_zungqr( run_arg_list_t *args, int check ) } testing_t test_zungqr; -const char *zungqr_params[] = { "nb", "ib", "m", "n", "k", "lda", "qra", "seedA", NULL }; +const char *zungqr_params[] = { "mtxfmt", "nb","ib", "m", "n", "k", "lda", "qra", "seedA", NULL }; const char *zungqr_output[] = { NULL }; const char *zungqr_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zungqr_hqr.c b/testing/testing_zungqr_hqr.c index 850a5a4519ee6d7038a6ef719386e37691a7364c..04831decfccd7e7b6efdee78686bd84e8d1a0497 100644 --- a/testing/testing_zungqr_hqr.c +++ b/testing/testing_zungqr_hqr.c @@ -27,20 +27,21 @@ testing_zungqr_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descTS, *descTT, *descQ; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - 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", chameleon_min( M, N ) ); - int LDA = run_arg_get_int( args, "LDA", M ); - int qr_a = run_arg_get_int( args, "qra", -1 ); - int qr_p = run_arg_get_int( args, "qrp", -1 ); - int llvl = run_arg_get_int( args, "llvl", -1 ); - int hlvl = run_arg_get_int( args, "hlvl", -1 ); - int domino = run_arg_get_int( args, "domino", -1 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + 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", chameleon_min( M, N ) ); + int LDA = run_arg_get_int( args, "LDA", M ); + int qr_a = run_arg_get_int( args, "qra", -1 ); + int qr_p = run_arg_get_int( args, "qrp", -1 ); + int llvl = run_arg_get_int( args, "llvl", -1 ); + int hlvl = run_arg_get_int( args, "hlvl", -1 ); + int domino = run_arg_get_int( args, "domino", -1 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zungqr( M, N, K ); @@ -59,9 +60,9 @@ testing_zungqr_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, M, K, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, M, K, P, Q ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, K, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( M, K, &descTT, P, Q ); @@ -100,7 +101,7 @@ testing_zungqr_hqr( run_arg_list_t *args, int check ) } testing_t test_zungqr_hqr; -const char *zungqr_hqr_params[] = { "nb", "ib", "m", "n", "k", "lda", "qra", +const char *zungqr_hqr_params[] = { "mtxfmt", "nb", "ib", "m", "n", "k", "lda", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", NULL }; const char *zungqr_hqr_output[] = { NULL }; const char *zungqr_hqr_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zunmlq.c b/testing/testing_zunmlq.c index cd17d466f9a0ea0d7a0409605d9baacfc7d336f5..41ccb3abb1a81129225fc7a952b81ba9868398bb 100644 --- a/testing/testing_zunmlq.c +++ b/testing/testing_zunmlq.c @@ -29,20 +29,21 @@ testing_zunmlq( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descT, *descC; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - int P = parameters_getvalue_int( "P" ); - cham_side_t side = run_arg_get_uplo( args, "side", ChamLeft ); - 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 K = run_arg_get_int( args, "K", N ); - int LDA = run_arg_get_int( args, "LDA", K ); - int LDC = run_arg_get_int( args, "LDC", M ); - int RH = run_arg_get_int( args, "qra", 4 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedC = run_arg_get_int( args, "seedC", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + int P = parameters_getvalue_int( "P" ); + cham_side_t side = run_arg_get_uplo( args, "side", ChamLeft ); + 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 K = run_arg_get_int( args, "K", N ); + int LDA = run_arg_get_int( args, "LDA", K ); + int LDC = run_arg_get_int( args, "LDC", M ); + int RH = run_arg_get_int( args, "qra", 4 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedC = run_arg_get_int( args, "seedC", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zunmlq( side, M, N, K ); @@ -62,9 +63,9 @@ testing_zunmlq( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, K, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, K, An, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( K, An, &descT, P, Q ); /* Fills the matrix with random values */ @@ -91,7 +92,7 @@ testing_zunmlq( run_arg_list_t *args, int check ) CHAMELEON_zplrnt_Tile( descC0, seedC ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, An, An, 0, 0, An, An, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, An, An, 0, 0, An, An, P, Q ); CHAMELEON_zunglq_Tile( descA, descT, descQ ); hres += check_zqc( args, side, trans, descC0, descQ, descC ); @@ -108,7 +109,7 @@ testing_zunmlq( run_arg_list_t *args, int check ) } testing_t test_zunmlq; -const char *zunmlq_params[] = { "nb", "ib", "side", "trans", "m", "n", "k", +const char *zunmlq_params[] = { "mtxfmt", "nb", "ib", "side", "trans", "m", "n", "k", "lda", "ldc", "qra", "seedA", "seedC", NULL }; const char *zunmlq_output[] = { NULL }; const char *zunmlq_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zunmlq_hqr.c b/testing/testing_zunmlq_hqr.c index a00808d9098a760986c613efdd38e6a4e26a531b..cc500bfa1b2804a8511b120b7b741c92277eacc1 100644 --- a/testing/testing_zunmlq_hqr.c +++ b/testing/testing_zunmlq_hqr.c @@ -29,6 +29,7 @@ testing_zunmlq_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descTS, *descTT, *descC; /* Reads arguments */ + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); int ib = run_arg_get_int( args, "ib", 48 ); int P = parameters_getvalue_int( "P" ); @@ -61,9 +62,9 @@ testing_zunmlq_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, K, An, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, An, 0, 0, K, An, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( K, An, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( K, An, &descTT, P, Q ); @@ -99,7 +100,7 @@ testing_zunmlq_hqr( run_arg_list_t *args, int check ) CHAMELEON_zplrnt_Tile( descC0, seedC ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, An, An, 0, 0, An, An, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, An, An, 0, 0, An, An, P, Q ); CHAMELEON_zunglq_param_Tile( &qrtree, descA, descTS, descTT, descQ ); hres += check_zqc( args, side, trans, descC0, descQ, descC ); @@ -118,7 +119,7 @@ testing_zunmlq_hqr( run_arg_list_t *args, int check ) } testing_t test_zunmlq_hqr; -const char *zunmlq_hqr_params[] = { "nb", "ib", "side", "trans", "m", "n", +const char *zunmlq_hqr_params[] = { "mtxfmt", "nb", "ib", "side", "trans", "m", "n", "k", "lda", "ldc", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", "seedC", NULL }; const char *zunmlq_hqr_output[] = { NULL }; diff --git a/testing/testing_zunmqr.c b/testing/testing_zunmqr.c index e34113f60a7bb35bf0a42a47a11f4efbc00fdc87..e2c3717cdea6aeba0d3de885312d31dc325be660 100644 --- a/testing/testing_zunmqr.c +++ b/testing/testing_zunmqr.c @@ -29,20 +29,21 @@ testing_zunmqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descT, *descC; /* Reads arguments */ - int nb = run_arg_get_int( args, "nb", 320 ); - int ib = run_arg_get_int( args, "ib", 48 ); - int P = parameters_getvalue_int( "P" ); - cham_side_t side = run_arg_get_uplo( args, "side", ChamLeft ); - 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 K = run_arg_get_int( args, "K", chameleon_min( M, N ) ); - int LDA = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N ); - int LDC = run_arg_get_int( args, "LDC", M ); - int RH = run_arg_get_int( args, "qra", 4 ); - int seedA = run_arg_get_int( args, "seedA", random() ); - int seedC = run_arg_get_int( args, "seedC", random() ); - int Q = parameters_compute_q( P ); + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); + int nb = run_arg_get_int( args, "nb", 320 ); + int ib = run_arg_get_int( args, "ib", 48 ); + int P = parameters_getvalue_int( "P" ); + cham_side_t side = run_arg_get_uplo( args, "side", ChamLeft ); + 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 K = run_arg_get_int( args, "K", chameleon_min( M, N ) ); + int LDA = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N ); + int LDC = run_arg_get_int( args, "LDC", M ); + int RH = run_arg_get_int( args, "qra", 4 ); + int seedA = run_arg_get_int( args, "seedA", random() ); + int seedC = run_arg_get_int( args, "seedC", random() ); + int Q = parameters_compute_q( P ); cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zunmqr( side, M, N, K ); @@ -62,9 +63,9 @@ testing_zunmqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, Am, K, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, Am, K, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( Am, K, &descT, P, Q ); /* Fills the matrix with random values */ @@ -91,7 +92,7 @@ testing_zunmqr( run_arg_list_t *args, int check ) CHAMELEON_zplrnt_Tile( descC0, seedC ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, Am, Am, 0, 0, Am, Am, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, Am, Am, 0, 0, Am, Am, P, Q ); CHAMELEON_zungqr_Tile( descA, descT, descQ ); hres += check_zqc( args, side, trans, descC0, descQ, descC ); @@ -108,7 +109,7 @@ testing_zunmqr( run_arg_list_t *args, int check ) } testing_t test_zunmqr; -const char *zunmqr_params[] = { "nb", "ib", "side", "trans", "m", "n", "k", +const char *zunmqr_params[] = { "mtxfmt", "nb", "ib", "side", "trans", "m", "n", "k", "lda", "ldc", "qra", "seedA", "seedC", NULL }; const char *zunmqr_output[] = { NULL }; const char *zunmqr_outchk[] = { "RETURN", NULL }; diff --git a/testing/testing_zunmqr_hqr.c b/testing/testing_zunmqr_hqr.c index 0fd785b41d2d566fe392e8751825ed4c5380bfb2..f44306a9472f29257b8bb9945cbe88dcffaa2b90 100644 --- a/testing/testing_zunmqr_hqr.c +++ b/testing/testing_zunmqr_hqr.c @@ -29,6 +29,7 @@ testing_zunmqr_hqr( run_arg_list_t *args, int check ) CHAM_desc_t *descA, *descTS, *descTT, *descC; /* Reads arguments */ + intptr_t mtxfmt = parameters_getvalue_int( "mtxfmt" ); int nb = run_arg_get_int( args, "nb", 320 ); int ib = run_arg_get_int( args, "ib", 48 ); int P = parameters_getvalue_int( "P" ); @@ -61,9 +62,9 @@ testing_zunmqr_hqr( run_arg_list_t *args, int check ) /* Creates the matrices */ CHAMELEON_Desc_Create( - &descA, NULL, ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, Am, K, P, Q ); + &descA, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDA, K, 0, 0, Am, K, P, Q ); CHAMELEON_Desc_Create( - &descC, NULL, ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); + &descC, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, LDC, N, 0, 0, M, N, P, Q ); CHAMELEON_Alloc_Workspace_zgels( Am, K, &descTS, P, Q ); CHAMELEON_Alloc_Workspace_zgels( Am, K, &descTT, P, Q ); @@ -99,7 +100,7 @@ testing_zunmqr_hqr( run_arg_list_t *args, int check ) CHAMELEON_zplrnt_Tile( descC0, seedC ); CHAMELEON_Desc_Create( - &descQ, NULL, ChamComplexDouble, nb, nb, nb * nb, Am, Am, 0, 0, Am, Am, P, Q ); + &descQ, (void*)(-mtxfmt), ChamComplexDouble, nb, nb, nb * nb, Am, Am, 0, 0, Am, Am, P, Q ); CHAMELEON_zungqr_param_Tile( &qrtree, descA, descTS, descTT, descQ ); hres += check_zqc( args, side, trans, descC0, descQ, descC ); @@ -118,7 +119,7 @@ testing_zunmqr_hqr( run_arg_list_t *args, int check ) } testing_t test_zunmqr_hqr; -const char *zunmqr_hqr_params[] = { "nb", "ib", "side", "trans", "m", "n", +const char *zunmqr_hqr_params[] = { "mtxfmt", "nb", "ib", "side", "trans", "m", "n", "k", "lda", "ldc", "qra", "qrp", "llvl", "hlvl", "domino", "seedA", "seedC", NULL }; const char *zunmqr_hqr_output[] = { NULL };