diff --git a/cmake_modules/local_subs.py b/cmake_modules/local_subs.py index 65ccc98e16525d19272831bd929a4933fca5e1d4..56ab5e9854df20288f5406da4e4b8fa3fd0bbf82 100644 --- a/cmake_modules/local_subs.py +++ b/cmake_modules/local_subs.py @@ -42,7 +42,8 @@ subs = { ('int', 'float', 'double', 'CHAMELEON_Complex32_t', r'\bCHAMELEON_Complex64_t'), ('ChamPattern', 'ChamRealFloat', 'ChamRealDouble', 'ChamComplexFloat', r'\bChamComplexDouble' ), ('ChamPattern', 'ChamRealFloat', 'ChamRealDouble', 'ChamRealFloat', r'\bChamRealDouble' ), - ('int', 'float', 'double', 'complex32', r'\bcomplex64' ), + ('int', 'float', 'double', 'complex32', 'complex64' ), + ('Int', 'Float', 'Double', 'Complex32', 'Complex64' ), # ----- Additional BLAS ('', 'sTile', 'dTile', 'cTile', 'zTile' ), diff --git a/control/auxiliary.c b/control/auxiliary.c index 5f741fff12adf0aafe7ab9ad1b0486eabe84c863..8f767222c39788744adacde3012b125e04ce2221 100644 --- a/control/auxiliary.c +++ b/control/auxiliary.c @@ -214,16 +214,7 @@ int CHAMELEON_Element_Size(int type) */ int CHAMELEON_My_Mpi_Rank(void) { -#if defined(CHAMELEON_USE_MPI) - CHAM_context_t *chamctxt = chameleon_context_self(); - if (chamctxt == NULL) { - chameleon_error("CHAMELEON_Finalize()", "CHAMELEON not initialized"); - return CHAMELEON_ERR_NOT_INITIALIZED; - } - return CHAMELEON_MPI_RANK; -#else - return CHAMELEON_SUCCESS; -#endif + return CHAMELEON_Comm_rank(); } /** diff --git a/control/auxiliary.h b/control/auxiliary.h index 50d329e3d511b98cad25b131c17a913918c78c92..44e23675b32a07d529e59e23ae3eeeaee9886a21 100644 --- a/control/auxiliary.h +++ b/control/auxiliary.h @@ -38,13 +38,6 @@ void chameleon_fatal_error (const char *func_name, const char* msg_text); int chameleon_rank (CHAM_context_t *chamctxt); int chameleon_tune (cham_tasktype_t func, int M, int N, int NRHS); -/** - * API routines - */ -int CHAMELEON_Version (int *ver_major, int *ver_minor, int *ver_micro); -int CHAMELEON_Element_Size (int type); -int CHAMELEON_My_Mpi_Rank (void); - #ifdef __cplusplus } #endif diff --git a/control/common.h b/control/common.h index cfa3208d03c254aa104894bdb7090f582b536640..a22c99f89427cf04fbdcefdad6510a9ac88c5428 100644 --- a/control/common.h +++ b/control/common.h @@ -83,10 +83,6 @@ #define CHAMELEON_TRANSLATION chamctxt->translation #define CHAMELEON_PARALLEL chamctxt->parallel_enabled #define CHAMELEON_PROFILING chamctxt->profiling_enabled -#if defined(CHAMELEON_USE_MPI) -#define CHAMELEON_MPI_RANK chamctxt->my_mpi_rank -#define CHAMELEON_MPI_SIZE chamctxt->mpi_comm_size -#endif /** * IPT internal define diff --git a/control/control.c b/control/control.c index b093c255ef16ba1c16ce77ee489a43ae756ee309..d000550b635f950ff7fd2270033380dd8a0f0d07 100644 --- a/control/control.c +++ b/control/control.c @@ -112,11 +112,6 @@ int __chameleon_initpar(int ncpus, int ncudas, int nthreads_per_worker) RUNTIME_init( chamctxt, ncpus, ncudas, nthreads_per_worker ); -#if defined(CHAMELEON_USE_MPI) - chamctxt->my_mpi_rank = RUNTIME_comm_rank( chamctxt ); - chamctxt->mpi_comm_size = RUNTIME_comm_size( chamctxt ); -#endif - return CHAMELEON_SUCCESS; } @@ -153,6 +148,27 @@ int __chameleon_finalize(void) return CHAMELEON_SUCCESS; } +/** + * + * @ingroup Control + * + * @brief Check if the CHAMELEON library is initialized or not. + * + * @retval True if initialized + * @retval False if not initialized + * + */ +int CHAMELEON_Initialized(void) +{ + CHAM_context_t *chamctxt = chameleon_context_self(); + if ( chamctxt == NULL ) { + return 0; + } + else { + return 1; + } +} + /** * * @ingroup Control diff --git a/example/lapack_to_chameleon/step6.c b/example/lapack_to_chameleon/step6.c index e3ed23f19680c93d6edb0c0284bb4f18afdcf182..0e2a6efca706d6c995968c5ca0a035c7de9902c5 100644 --- a/example/lapack_to_chameleon/step6.c +++ b/example/lapack_to_chameleon/step6.c @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) { GRID_P = iparam[IPARAM_P]; GRID_Q = iparam[IPARAM_Q]; - if ( CHAMELEON_My_Mpi_Rank() == 0 ){ + if ( CHAMELEON_Comm_rank() == 0 ){ /* print informations to user */ print_header( argv[0], iparam); } @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) { /* print informations to user */ gflops = flops / cpu_time; - if ( CHAMELEON_My_Mpi_Rank() == 0 ) { + if ( CHAMELEON_Comm_rank() == 0 ) { printf( "%9.3f %9.2f\n", cpu_time, gflops); } fflush( stdout ); @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) { * else the test failed */ hres = ( res / N / eps / (anorm * xnorm + bnorm ) > 100.0 ); - if ( CHAMELEON_My_Mpi_Rank() == 0 ){ + if ( CHAMELEON_Comm_rank() == 0 ){ printf( " ||Ax-b|| ||A|| ||x|| ||b|| ||Ax-b||/N/eps/(||A||||x||+||b||) RETURN\n"); if (hres) { printf( "%8.5e %8.5e %8.5e %8.5e %8.5e FAILURE \n", diff --git a/example/lapack_to_chameleon/step7.c b/example/lapack_to_chameleon/step7.c index 02fc93497e417a5f6873f11cac500ae4ab6d0f95..affa1876f9819beb35760a3f5cb913a2e4f669cd 100644 --- a/example/lapack_to_chameleon/step7.c +++ b/example/lapack_to_chameleon/step7.c @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) { GRID_P = iparam[IPARAM_P]; GRID_Q = iparam[IPARAM_Q]; - if ( CHAMELEON_My_Mpi_Rank() == 0 ){ + if ( CHAMELEON_Comm_rank() == 0 ){ /* print informations to user */ print_header( argv[0], iparam); } @@ -185,7 +185,7 @@ int main(int argc, char *argv[]) { /* print informations to user */ gflops = flops / cpu_time; - if ( CHAMELEON_My_Mpi_Rank() == 0 ) { + if ( CHAMELEON_Comm_rank() == 0 ) { printf( "%9.3f %9.2f\n", cpu_time, gflops); } fflush( stdout ); @@ -212,7 +212,7 @@ int main(int argc, char *argv[]) { * else the test failed */ hres = ( res / N / eps / (anorm * xnorm + bnorm ) > 100.0 ); - if ( CHAMELEON_My_Mpi_Rank() == 0 ){ + if ( CHAMELEON_Comm_rank() == 0 ){ printf( " ||Ax-b|| ||A|| ||x|| ||b|| ||Ax-b||/N/eps/(||A||||x||+||b||) RETURN\n"); if (hres) { printf( "%8.5e %8.5e %8.5e %8.5e %8.5e FAILURE \n", diff --git a/include/chameleon.h b/include/chameleon.h index dfaaab485a9be2d5420e5e466ce89ede434ce198..67c0ca127fe25cb607fc35ad13429c4737c9e9cd 100644 --- a/include/chameleon.h +++ b/include/chameleon.h @@ -80,7 +80,8 @@ int CHAMELEON_map_Tile_Async( cham_uplo_t uplo, /* Auxiliary */ int CHAMELEON_Version (int *ver_major, int *ver_minor, int *ver_micro); -int CHAMELEON_My_Mpi_Rank (void); +int CHAMELEON_Initialized (void); +int CHAMELEON_My_Mpi_Rank (void) __attribute__((deprecated)); int __chameleon_init (int nworkers, int ncudas); int __chameleon_initpar (int nworkers, int ncudas, int nthreads_per_worker); int __chameleon_finalize (void); diff --git a/include/chameleon/struct.h b/include/chameleon/struct.h index 7451dfac6e75293e772cf7e90593ad765831f67d..aae3ded5ac94c722a9990d014729b833d671854a 100644 --- a/include/chameleon/struct.h +++ b/include/chameleon/struct.h @@ -123,10 +123,6 @@ typedef struct chameleon_context_s { int nworkers; int ncudas; int nthreads_per_worker; -#if defined(CHAMELEON_USE_MPI) - int my_mpi_rank; - int mpi_comm_size; -#endif /* Boolean flags */ cham_bool_t warnings_enabled; diff --git a/new-testing/CTestLists.cmake b/new-testing/CTestLists.cmake index e8bc3ee269018c630be514de6bb7ab343af7b0fb..781ddfdac8e397fbd12f02cae137d4412c3a41d0 100644 --- a/new-testing/CTestLists.cmake +++ b/new-testing/CTestLists.cmake @@ -71,7 +71,7 @@ foreach(prec ${RP_CHAMELEON_PRECISIONS}) endif() foreach(_test ${TESTS}) - add_test(test_${cat}_${prec}${_test} ${PREFIX} ${CMD} -c -t ${THREADS} -g ${gpus} -P 1 -o ${_test} -f input/${_test}.in ) + add_test(test_${cat}_${prec}${_test} ${PREFIX} ${CMD} -c -t ${THREADS} -g ${gpus} -P 1 -f input/${_test}.in ) endforeach() endforeach() endforeach() diff --git a/new-testing/input/geadd.in b/new-testing/input/geadd.in index e5ce4b9e02fbc7ee7d6596040414a68e932ea0fc..180fa9a87214d6b5bf1715c8ef341f39f76aa4d9 100644 --- a/new-testing/input/geadd.in +++ b/new-testing/input/geadd.in @@ -12,6 +12,7 @@ # alpha: Scalar alpha # beta: Scalar beta +op = geadd nb = 16, 17 ib = 8 m = 15, 17, 33 diff --git a/new-testing/input/gelqf.in b/new-testing/input/gelqf.in index 984f1a0f4f792822d27a8942ced9163712995611..5fb17e8113f8a0594929fc9dbbcd057ee93449cd 100644 --- a/new-testing/input/gelqf.in +++ b/new-testing/input/gelqf.in @@ -10,6 +10,7 @@ # lda: Leading dimension of the A matrix # RH: Size of each subdomain when using RH +op = gelqf nb = 16, 17 ib = 8 m = 13, 17, 35 diff --git a/new-testing/input/gelqf_hqr.in b/new-testing/input/gelqf_hqr.in index 041ca9683cfd18732534392b4fabbdd04ab60aa1..ff3accafcb0e0889d4add50d1f1f7aee2603cf6d 100644 --- a/new-testing/input/gelqf_hqr.in +++ b/new-testing/input/gelqf_hqr.in @@ -14,6 +14,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = gelqf_hqr nb = 8, 9 ib = 3 m = 13, 17, 35 diff --git a/new-testing/input/gelqs.in b/new-testing/input/gelqs.in index d35251eab8ce74d8885384f436d97bb535e88a36..6a5510accaf0666ac65fef275d93a1fb94752daa 100644 --- a/new-testing/input/gelqs.in +++ b/new-testing/input/gelqs.in @@ -10,6 +10,7 @@ # lda: Leading dimension of the A matrix # RH: Size of each subdomain when using RH +op = gelqs nb = 16, 17 ib = 8 m = 13, 17, 35 diff --git a/new-testing/input/gels.in b/new-testing/input/gels.in index 4b2932b8b2aa9c9f7b6dae02c1558230fa8368c2..93e08d2ddaa1ade9ca2a721b9b1898b1e9ea05b6 100644 --- a/new-testing/input/gels.in +++ b/new-testing/input/gels.in @@ -12,6 +12,7 @@ # trans: Wether the system involves A (ChamNoTrans) or A^H *ChamTransConj) # RH: Size of each subdomain when using RH +op = gels nb = 16, 17 ib = 8 m = 17, 31, 35 diff --git a/new-testing/input/gels_hqr.in b/new-testing/input/gels_hqr.in index 279c400cd50886d6600536595dffa97d2a438bcd..c64f87f4e26c86c18a4b6779281a789d90c48635 100644 --- a/new-testing/input/gels_hqr.in +++ b/new-testing/input/gels_hqr.in @@ -16,6 +16,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = gels_hqr nb = 8, 9 ib = 3 m = 17, 31, 35 diff --git a/new-testing/input/gemm.in b/new-testing/input/gemm.in index edbe7881f6b668383265a17bdefe9d1e021bcde7..f4df5ce2ce5384429096b78aa37d291962c09c0b 100644 --- a/new-testing/input/gemm.in +++ b/new-testing/input/gemm.in @@ -15,6 +15,7 @@ # alpha: Scalar alpha # beta: Scalar beta +op = gemm nb = 16, 17 ib = 8 m = 15, 25, 37 diff --git a/new-testing/input/geqrf.in b/new-testing/input/geqrf.in index 27f1dd01e5629b174bcce8b9f7a41b5365885fc9..5832b16a69f6a5f5984b70ff77cc53990f765040 100644 --- a/new-testing/input/geqrf.in +++ b/new-testing/input/geqrf.in @@ -11,6 +11,7 @@ # RH: Size of each subdomain when using RH +op = geqrf nb = 16, 17 ib = 8 m = 13, 17, 35 diff --git a/new-testing/input/geqrf_hqr.in b/new-testing/input/geqrf_hqr.in index 3196bbdc75112875c7433867a01276831fbbe551..88bfeb5ea4c8a2bc6919e10bad3eb1f722e46d8c 100644 --- a/new-testing/input/geqrf_hqr.in +++ b/new-testing/input/geqrf_hqr.in @@ -14,6 +14,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = geqrf_hqr nb = 8, 9 ib = 3 m = 13, 17, 57 diff --git a/new-testing/input/geqrs.in b/new-testing/input/geqrs.in index eb43914093ac7f818e7827e2882bf764bbc36ba4..bc0dd8de82b83fa95ae22da559b5df6221c8758c 100644 --- a/new-testing/input/geqrs.in +++ b/new-testing/input/geqrs.in @@ -10,6 +10,7 @@ # lda: Leading dimension of the A matrix # RH: Size of each subdomain when using RH +op = geqrs nb = 16, 17 ib = 8 m = 13, 17, 35 diff --git a/new-testing/input/gesv.in b/new-testing/input/gesv.in index 84e4793c92606d1e9784a5060a3ea43cabcab0eb..09f9cf6b62bc71f62f85f3e880c22723af21f23a 100644 --- a/new-testing/input/gesv.in +++ b/new-testing/input/gesv.in @@ -10,6 +10,7 @@ # lda: Leading dimension of matrix A # ldb: Leading dimension of matrix B +op = gesv nb = 16, 17 ib = 8 n = 15, 21, 35 diff --git a/new-testing/input/getrf.in b/new-testing/input/getrf.in index 717b14cd40111cc53c6c37dcc9b2345c004046f6..c5b89dd9a3fd12cbd8b0841bdafe46e2091ce181 100644 --- a/new-testing/input/getrf.in +++ b/new-testing/input/getrf.in @@ -9,6 +9,7 @@ # n: Number of columns of the matrix A # lda: Leading dimension of matrix A +op = getrf nb = 16, 17 ib = 8 m = 13, 17, 35 diff --git a/new-testing/input/getrs.in b/new-testing/input/getrs.in index 2b9eb0062b26af32723f3b79c9b17078a8161b02..0aadba866d57e9c5429b98fea5e526ead7c6bb15 100644 --- a/new-testing/input/getrs.in +++ b/new-testing/input/getrs.in @@ -10,6 +10,7 @@ # lda: Leading dimension of matrix A # ldb: Leading dimension of matrix B +op = getrs nb = 16, 17 ib = 8 m = 13, 17, 35 diff --git a/new-testing/input/hemm.in b/new-testing/input/hemm.in index d9149be518aab05fb2324ac31b92787d5ffb2a98..a571443045e1661b43a50adcd3bb9f96d5038362 100644 --- a/new-testing/input/hemm.in +++ b/new-testing/input/hemm.in @@ -15,6 +15,7 @@ # beta: Scalar beta # bump: bump value for Hermitian matrices +op = hemm nb = 16, 17 ib = 8 side = 0:1 diff --git a/new-testing/input/her2k.in b/new-testing/input/her2k.in index 3adce390e2b2c6e6fb4abe2abb50bce477bf8c58..8b420b62aa61c76e1937b7adbef00a6453d04c7c 100644 --- a/new-testing/input/her2k.in +++ b/new-testing/input/her2k.in @@ -15,6 +15,7 @@ # beta: Scalar beta # bump: Bump value for symmetric matrices +op = her2k nb = 16, 17 ib = 8 n = 15, 21, 33 diff --git a/new-testing/input/herk.in b/new-testing/input/herk.in index a3f3f70f0c8bd877c258c7b22fcc45d48510f125..c00df4c16f8fb4fa1f1c97e975a117d3de1b1974 100644 --- a/new-testing/input/herk.in +++ b/new-testing/input/herk.in @@ -14,6 +14,7 @@ # beta: Scalar beta # bump: Bump value for symmetric matrices +op = herk nb = 16, 17 ib = 8 n = 15, 21, 33 diff --git a/new-testing/input/lacpy.in b/new-testing/input/lacpy.in index 2354df8f8834909b56ff78bcd07c70a436af3096..4770730393039bb02f1f434e80d3798fd8756fa5 100644 --- a/new-testing/input/lacpy.in +++ b/new-testing/input/lacpy.in @@ -10,6 +10,7 @@ # LDA: Leading dimension of matrix A # LDB: Leading dimension of matrix B +op = lacpy nb = 16, 17 ib = 8 uplo = 0:2 diff --git a/new-testing/input/lange.in b/new-testing/input/lange.in index 1844435dba9805593e0f41b0d9269af2b0bc82fa..d4687cc6673fe9420deeef85c9973912b354b14f 100644 --- a/new-testing/input/lange.in +++ b/new-testing/input/lange.in @@ -10,6 +10,7 @@ # norm: norm type to be calculated (0 for Max|1 for One|2 for Infinity|3 for Frobenius) +op = lange nb = 16, 17 ib = 8 m = 15, 21, 33 diff --git a/new-testing/input/lanhe.in b/new-testing/input/lanhe.in index 5797df08fa40fd96e732e30c7b7a6253fb90b300..5e18eb96e731a790c2d7a1e4891eca26f06b876b 100644 --- a/new-testing/input/lanhe.in +++ b/new-testing/input/lanhe.in @@ -11,6 +11,7 @@ # uplo: matrix parte to be considered (0: Upper, 1: Lower) # bump: +op = lanhe nb = 16, 17 ib = 8 m = 15, 19, 32 diff --git a/new-testing/input/lansy.in b/new-testing/input/lansy.in index 3348d4afdef1d5a0fa54fed5bc690fafcbc8d28a..ef5d44836c8a61f61c994d8faf92377075c31a59 100644 --- a/new-testing/input/lansy.in +++ b/new-testing/input/lansy.in @@ -11,6 +11,7 @@ # uplo: matrix parte to be considered (0: Upper, 1: Lower) # bump: bump value for Hermitian matrices +op = lansy nb = 16, 17 ib = 8 m = 15, 19, 32 diff --git a/new-testing/input/lantr.in b/new-testing/input/lantr.in index 234b042cba7a128f32ef66d43706415f811f4289..0b2fc5ee5d6a497da0f8b45ac7ad17cb4dc8b722 100644 --- a/new-testing/input/lantr.in +++ b/new-testing/input/lantr.in @@ -12,6 +12,7 @@ # bump: # diag: whether or not A is unit triangular (0: non unit, 1: unit) +op = lantr nb = 16, 17 ib = 8 m = 15, 19, 32 diff --git a/new-testing/input/lascal.in b/new-testing/input/lascal.in index 404061a6fdfe00d9b20a9eb784b54cc410c1a7b9..ba7171b1b6abf98c90a8ab333a937456f566b4a6 100644 --- a/new-testing/input/lascal.in +++ b/new-testing/input/lascal.in @@ -10,6 +10,7 @@ # uplo: Part of the matrix to be copied (0 for Upper, 1 for Lower and 2 for UpperLower) # alpha: Scale to apply +op = lascal nb = 16, 17 ib = 8 m = 15, 19, 33 diff --git a/new-testing/input/lauum.in b/new-testing/input/lauum.in index a50f75225b88765f2450f4fff863d236876f4070..7e8688fe5b6ad31a290ca195394af1fa72c020a4 100644 --- a/new-testing/input/lauum.in +++ b/new-testing/input/lauum.in @@ -9,6 +9,7 @@ # lda: Leading dimension of matrix A # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = lauum nb = 16, 17 ib = 8 n = 15, 31, 33 diff --git a/new-testing/input/ongqr.in b/new-testing/input/ongqr.in index e4ca0c755751fc4421042b2c9766b0f1dc7e3eae..bf1aac7f1feece60c6656af4b54b38a9020f6974 100644 --- a/new-testing/input/ongqr.in +++ b/new-testing/input/ongqr.in @@ -10,6 +10,7 @@ # k: Number of reflectors of matrix A # lda: Leading dimension of matrix Q and A +op = ongqr nb = 16, 17 ib = 8 m = 15, 19, 33 diff --git a/new-testing/input/orglq.in b/new-testing/input/orglq.in index cc7079fd1fa6f2c710fe8c156790f2bce39c7564..af8612390acab51e3d01e12922133862978bead9 100644 --- a/new-testing/input/orglq.in +++ b/new-testing/input/orglq.in @@ -11,6 +11,7 @@ # lda: Leading dimension of matrix Q and A # RH: Size of each subdomain when using RH +op = orglq nb = 16, 17 ib = 8 m = 15, 19, 33 diff --git a/new-testing/input/orglq_hqr.in b/new-testing/input/orglq_hqr.in index e14831fdba2ced6c960eb85137e938d0d2aa3e34..e651f33dc412b52e050ec53874981ad357e26565 100644 --- a/new-testing/input/orglq_hqr.in +++ b/new-testing/input/orglq_hqr.in @@ -15,6 +15,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = orglq_hqr nb = 8, 9 ib = 3 m = 15, 19, 33 diff --git a/new-testing/input/orgqr.in b/new-testing/input/orgqr.in index 9f172fd275006b1ebd442d58a73a9432bf7aa784..5893d10ff87dbd34fca8b50272f92b42218688bb 100644 --- a/new-testing/input/orgqr.in +++ b/new-testing/input/orgqr.in @@ -11,6 +11,7 @@ # lda: Leading dimension of matrix Q and A # RH: Size of each subdomain when using RH +op = orgqr nb = 16, 17 ib = 8 m = 15, 19, 33 diff --git a/new-testing/input/orgqr_hqr.in b/new-testing/input/orgqr_hqr.in index 45080ddd2556b207896f8ae9e61ad0d8c805e53f..0e04fa1aa1fac27bc091be780e53d4c2b794cf48 100644 --- a/new-testing/input/orgqr_hqr.in +++ b/new-testing/input/orgqr_hqr.in @@ -15,6 +15,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = orgqr_hqr nb = 8, 9 ib = 3 m = 15, 19, 33 diff --git a/new-testing/input/ormlq.in b/new-testing/input/ormlq.in index 69ea2b7a384aff6dc99d8d347a13f8655de3f0d5..41f3108589e55b42b2d54fc4335712868af4d08f 100644 --- a/new-testing/input/ormlq.in +++ b/new-testing/input/ormlq.in @@ -13,6 +13,7 @@ # trans: Whether the matrix Q is transposed or conjugate transposed # RH: Size of each subdomain when using RH +op = ormlq nb = 16, 17 ib = 8 m = 15, 20, 33 diff --git a/new-testing/input/ormlq_hqr.in b/new-testing/input/ormlq_hqr.in index 93054a713071a11164cfe3737a9dba3a3e48cd10..99eeead9c909edb1cb1706c12aedcca1ab15822f 100644 --- a/new-testing/input/ormlq_hqr.in +++ b/new-testing/input/ormlq_hqr.in @@ -17,6 +17,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = ormlq_hqr nb = 16, 17 ib = 3 n = 15, 20, 32 diff --git a/new-testing/input/ormqr.in b/new-testing/input/ormqr.in index e9a7c15c20b65961cbbf5ac3af52a4c5978b08a2..1f61063a98614ad9e98d950ed4d7a2b1001856e5 100644 --- a/new-testing/input/ormqr.in +++ b/new-testing/input/ormqr.in @@ -13,6 +13,7 @@ # trans: Whether the matrix Q is transposed or conjugate transposed # RH: Size of each subdomain when using RH +op = ormqr nb = 16, 17 ib = 8 m = 15, 20, 33 diff --git a/new-testing/input/ormqr_hqr.in b/new-testing/input/ormqr_hqr.in index f24a54f2df84aadd77a95ce1b51f429ca8a89fc0..da46c71b27b1669528e4fbba5df60d1b1d9882d8 100644 --- a/new-testing/input/ormqr_hqr.in +++ b/new-testing/input/ormqr_hqr.in @@ -17,6 +17,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = ormqr_hqr nb = 16, 17 ib = 3 m = 15, 20, 32 diff --git a/new-testing/input/posv.in b/new-testing/input/posv.in index 0d4a05328fa0bcc99cadfc21ec471ec758599600..6c6b2ea08590d059d0bc2fdaf9686dcbc190371c 100644 --- a/new-testing/input/posv.in +++ b/new-testing/input/posv.in @@ -11,6 +11,7 @@ # ldb: Leading dimension of matrix B # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = posv nb = 16, 17 ib = 8 n = 15, 21, 35 diff --git a/new-testing/input/potrf.in b/new-testing/input/potrf.in index acb8ca94d8224b877c4813f8fc27e37558b3ffb6..2ddac0a5cd3b235c371111e46eb6a335ce61edb2 100644 --- a/new-testing/input/potrf.in +++ b/new-testing/input/potrf.in @@ -9,6 +9,7 @@ # lda: Leading dimension of matrix A # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = potrf nb = 16, 17 ib = 8 n = 15, 19, 37 diff --git a/new-testing/input/potri.in b/new-testing/input/potri.in index 7ec3e87475112d48b441dd7c71fe38ddd822cd69..44f28421982958bd7b14e929ccd4fbbeb561ab67 100644 --- a/new-testing/input/potri.in +++ b/new-testing/input/potri.in @@ -9,6 +9,7 @@ # lda: Leading dimension of matrix A # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = potri nb = 16, 17 ib = 8 n = 15, 19, 37 diff --git a/new-testing/input/potrs.in b/new-testing/input/potrs.in index 615674d7e08e20ee93751476b3c19fd9f0180244..5b54342265d68d497d51b5703dfa1ee2ac1621bb 100644 --- a/new-testing/input/potrs.in +++ b/new-testing/input/potrs.in @@ -11,6 +11,7 @@ # ldb: Leading dimension of matrix B # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = potrs nb = 16, 17 ib = 8 n = 15, 19, 37 diff --git a/new-testing/input/symm.in b/new-testing/input/symm.in index 164f0f5f8c7c91aebe8ba3c18c56235836e26374..17c7c3dacaa616116c1aa8fba89a6b5797034724 100644 --- a/new-testing/input/symm.in +++ b/new-testing/input/symm.in @@ -15,6 +15,7 @@ # beta: Scalar beta # bump: bump value for Hermitian matrices +op = symm nb = 16, 17 ib = 8 side = 0:1 diff --git a/new-testing/input/syr2k.in b/new-testing/input/syr2k.in index 54fe3411281f3584af6c5e1d87c21a0f3ccfe968..fe434797ba148ca5847228e1c08ea845dfb42af8 100644 --- a/new-testing/input/syr2k.in +++ b/new-testing/input/syr2k.in @@ -15,6 +15,7 @@ # beta: Scalar beta # bump: Bump value for symmetric matrices +op = syr2k nb = 16, 17 ib = 8 n = 15, 21, 35 diff --git a/new-testing/input/syrk.in b/new-testing/input/syrk.in index cad50f1aa4dd233774d4d2de611709e269329cc4..82daa929d76c69cfd164dceea7af1632d9c89fd4 100644 --- a/new-testing/input/syrk.in +++ b/new-testing/input/syrk.in @@ -14,6 +14,7 @@ # beta: Scalar beta # bump: Bump value for symmetric matrices +op = syrk nb = 16, 17 ib = 8 n = 15, 21, 35 diff --git a/new-testing/input/sysv.in b/new-testing/input/sysv.in index 0d4a05328fa0bcc99cadfc21ec471ec758599600..949edc1d160e817894ed36dd2ebf6c73f76364f0 100644 --- a/new-testing/input/sysv.in +++ b/new-testing/input/sysv.in @@ -11,6 +11,7 @@ # ldb: Leading dimension of matrix B # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = sysv nb = 16, 17 ib = 8 n = 15, 21, 35 diff --git a/new-testing/input/sytrf.in b/new-testing/input/sytrf.in index acb8ca94d8224b877c4813f8fc27e37558b3ffb6..72dec0a066c0a9ce80438f6c3b7421d2a1effdef 100644 --- a/new-testing/input/sytrf.in +++ b/new-testing/input/sytrf.in @@ -9,6 +9,7 @@ # lda: Leading dimension of matrix A # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = sytrf nb = 16, 17 ib = 8 n = 15, 19, 37 diff --git a/new-testing/input/sytrs.in b/new-testing/input/sytrs.in index 615674d7e08e20ee93751476b3c19fd9f0180244..176e0267bda174973a6c2a39114b0cdaae86f4ce 100644 --- a/new-testing/input/sytrs.in +++ b/new-testing/input/sytrs.in @@ -11,6 +11,7 @@ # ldb: Leading dimension of matrix B # uplo: Matrix part to be considered (0: Upper, 1: Lower) +op = sytrs nb = 16, 17 ib = 8 n = 15, 19, 37 diff --git a/new-testing/input/tradd.in b/new-testing/input/tradd.in index d56c130ac28091e1c72064debd15ad1da26df033..b930006627c68b1e14a3ebe245fb418e53150bdb 100644 --- a/new-testing/input/tradd.in +++ b/new-testing/input/tradd.in @@ -13,6 +13,7 @@ # alpha: Scalar alpha # beta: Scalar beta +op = tradd nb = 16, 17 ib = 8 m = 15, 29, 33 diff --git a/new-testing/input/trmm.in b/new-testing/input/trmm.in index f7a21e7f4731b12a259db934dabc0b3522f38865..d570337401e27e1c6991f68b42cb09d5a363e0df 100644 --- a/new-testing/input/trmm.in +++ b/new-testing/input/trmm.in @@ -14,6 +14,7 @@ # diag: Whether or not A is unit triangular # alpha: Scalar alpha +op = trmm nb = 16, 17 ib = 8 n = 15, 19, 35 diff --git a/new-testing/input/trsm.in b/new-testing/input/trsm.in index 8a376a0bebe01923f00f704678d56daf29da5ef7..2882e91427de91845e5a63c5a5188d393e1e505e 100644 --- a/new-testing/input/trsm.in +++ b/new-testing/input/trsm.in @@ -15,6 +15,7 @@ # diag: Whether or not A is unit triangular # alpha: Scalar alpha +op = trsm nb = 16, 17 ib = 8 n = 15, 27, 35 diff --git a/new-testing/input/trtri.in b/new-testing/input/trtri.in index ef19e366d92c7232a9e4271766a0df9453065295..d03760de7a41579e5e1aa6d7aaf47fcf0dd43e2b 100644 --- a/new-testing/input/trtri.in +++ b/new-testing/input/trtri.in @@ -10,6 +10,7 @@ # uplo: Matrix part to be considered (0: Upper, 1: Lower) # diag: Wheter the matrix A is unit trianuglar (0: non unit, 1: unit) +op = trtri nb = 16, 17 ib = 8 n = 15, 19, 33 diff --git a/new-testing/input/unglq.in b/new-testing/input/unglq.in index 869f70420dd87b4d65a50f72aadafe0e28994633..4a56e5cc3820158ad2d5eeffd42e8db6eed09ce8 100644 --- a/new-testing/input/unglq.in +++ b/new-testing/input/unglq.in @@ -11,6 +11,7 @@ # lda: Leading dimension of matrix Q and A # RH: Size of each subdomain when using RH +op = unglq nb = 16, 17 ib = 8 m = 15, 19, 33 diff --git a/new-testing/input/unglq_hqr.in b/new-testing/input/unglq_hqr.in index dbfd8878895380602aea47b31668567fe02dbca8..79879455da1fa6117f885431ce8e109ef85c2ea1 100644 --- a/new-testing/input/unglq_hqr.in +++ b/new-testing/input/unglq_hqr.in @@ -15,6 +15,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = unglq_hqr nb = 8, 9 ib = 3 m = 15, 19, 33 diff --git a/new-testing/input/ungqr.in b/new-testing/input/ungqr.in index 1e9be00844db694b64d4564871c9b739d7bcb768..af49b8278c0b4720ab965f812e7ba96823bf3d5b 100644 --- a/new-testing/input/ungqr.in +++ b/new-testing/input/ungqr.in @@ -11,6 +11,7 @@ # lda: Leading dimension of matrix Q and A # RH: Size of each subdomain when using RH +op = ungqr nb = 16, 17 ib = 8 m = 15, 19, 33 diff --git a/new-testing/input/ungqr_hqr.in b/new-testing/input/ungqr_hqr.in index 78f787899039bb27dff65aa2f8e4d53652b6a43a..4a16c90ee1bd72eee3548f968f8eccf1d29e9381 100644 --- a/new-testing/input/ungqr_hqr.in +++ b/new-testing/input/ungqr_hqr.in @@ -15,6 +15,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = ungqr_hqr nb = 8, 9 ib = 3 m = 15, 19, 33 diff --git a/new-testing/input/unmlq.in b/new-testing/input/unmlq.in index 3f520a0e23a27bdac63c0d2fcd9d5b5d686df69a..0436bb224acf722cb176a066713b5fc538bea0ac 100644 --- a/new-testing/input/unmlq.in +++ b/new-testing/input/unmlq.in @@ -13,6 +13,7 @@ # trans: Whether the matrix Q is transposed or conjugate transposed # RH: Size of each subdomain when using RH +op = unmlq nb = 16, 17 ib = 8 m = 15, 20, 33 diff --git a/new-testing/input/unmlq_hqr.in b/new-testing/input/unmlq_hqr.in index 6a0ea24ee6c71ee7d922308ac9006bbd0a7967d0..3275f4ee374aa5e5661df0325405789df1a09c9f 100644 --- a/new-testing/input/unmlq_hqr.in +++ b/new-testing/input/unmlq_hqr.in @@ -17,6 +17,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = unmlq_hqr nb = 8, 9 ib = 3 m = 15, 20, 33 diff --git a/new-testing/input/unmqr.in b/new-testing/input/unmqr.in index 24407e85845f3d6171f015af8a090de6f3fa3d40..f0351512082c8479ed540220cc550319c54b955e 100644 --- a/new-testing/input/unmqr.in +++ b/new-testing/input/unmqr.in @@ -13,6 +13,7 @@ # trans: Whether the matrix Q is transposed or conjugate transposed # RH: Size of each subdomain when using RH +op = unmqr nb = 16, 17 ib = 8 m = 15, 20, 33 diff --git a/new-testing/input/unmqr_hqr.in b/new-testing/input/unmqr_hqr.in index a4a74c1d00abb08befea98bf8bd3ae41c7332f1d..6634f9bbb41f335602c638007f1c4acf980500a2 100644 --- a/new-testing/input/unmqr_hqr.in +++ b/new-testing/input/unmqr_hqr.in @@ -17,6 +17,7 @@ # hlv: Tree used for high level reduction between nodes, only if qrp > 1 # domino: Enable/Disable the domino between upper and lower trees +op = unmqr_hqr nb = 8, 9 ib = 3 m = 15, 20 diff --git a/new-testing/run_list.c b/new-testing/run_list.c index 771813d696d3d237fee56e11698e1fa69d858884..8961782e5dc1d2dcb00d70366912c33651715029 100644 --- a/new-testing/run_list.c +++ b/new-testing/run_list.c @@ -301,7 +301,7 @@ run_arg_get_double( run_arg_list_t *arglist, const char *name, double defval ) * @retval The value of the argument _name_. */ CHAMELEON_Complex32_t -run_arg_get_Complex32( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex32_t defval ) +run_arg_get_complex32( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex32_t defval ) { val_t val, rval; val.cval = defval; @@ -327,7 +327,7 @@ run_arg_get_Complex32( run_arg_list_t *arglist, const char *name, CHAMELEON_Comp * @retval The value of the argument _name_. */ CHAMELEON_Complex64_t -run_arg_get_Complex64( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex64_t defval ) +run_arg_get_complex64( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex64_t defval ) { val_t val, rval; val.zval = defval; @@ -477,7 +477,7 @@ run_arg_get_ntype( run_arg_list_t *arglist, const char *name, cham_normtype_t de * ******************************************************************************* */ -void run_arg_destroy( run_arg_list_t *arglist ) +void run_arg_list_destroy( run_arg_list_t *arglist ) { run_arg_t *arg1, *arg2; @@ -492,6 +492,52 @@ void run_arg_destroy( run_arg_list_t *arglist ) arglist->tail = NULL; } +/** + ******************************************************************************** + * + * @brief Copy a run_arg list + * + ******************************************************************************* + * + * @param[in] arglist + * The list of running arguments to copy. + * + * @param[out] tailptr + * If tailptr is not NULL, on exit it containes the pointer to the tail + * of the list. + * + * @return The pointer to the head of the copy + * + ******************************************************************************* + */ +run_arg_list_t +run_arg_list_copy( const run_arg_list_t *list ) +{ + run_arg_list_t copy; + const run_arg_t *arg = list->head; + run_arg_t *copy_curr = NULL; + + copy.head = NULL; + copy.tail = NULL; + + /* Compute the size */ + while( arg != NULL ) { + copy_curr = malloc( sizeof( run_arg_t ) ); + memcpy( copy_curr, arg, sizeof( run_arg_t ) ); + if ( copy.head == NULL ) { + copy.head = copy_curr; + copy.tail = copy_curr; + } + else { + copy.tail->next = copy_curr; + copy.tail = copy_curr; + } + arg = arg->next; + } + + return copy; +} + /** ******************************************************************************** * @@ -512,29 +558,12 @@ void run_list_add_one( run_list_t *runlist, run_arg_t *arglist ) { - run_arg_t *arg = arglist; - run_arg_t *copy_curr = NULL; + run_arg_list_t list = { .head = arglist, .tail = NULL }; run_list_elt_t *run; run = malloc( sizeof( run_list_elt_t ) ); - run->args.head = NULL; - run->args.tail = NULL; run->next = NULL; - - /* Compute the size */ - while( arg != NULL ) { - copy_curr = malloc( sizeof( run_arg_t ) ); - memcpy( copy_curr, arg, sizeof( run_arg_t ) ); - if ( run->args.head == NULL ) { - run->args.head = copy_curr; - run->args.tail = copy_curr; - } - else { - run->args.tail->next = copy_curr; - run->args.tail = copy_curr; - } - arg = arg->next; - } + run->args = run_arg_list_copy( &list ); if ( runlist->head == NULL ) { assert( runlist->tail == NULL ); @@ -652,7 +681,7 @@ run_list_generate( const char **params ) void run_list_destroy( run_list_elt_t *run ) { - run_arg_destroy( &(run->args) ); + run_arg_list_destroy( &(run->args) ); free( run ); } @@ -697,7 +726,18 @@ run_print_header_partial( const char **list, int human, char *str ) if ( human ) { param = parameters_getbyname( *pname ); assert( param != NULL ); - rc = sprintf( str, " %*s", param->psize, *pname ); + switch ( param->valtype ) { + case TestTrans: + case TestUplo: + case TestDiag: + case TestSide: + case TestNormtype: + case TestString: + rc = sprintf( str, " %-*s", param->psize, *pname ); + break; + default: + rc = sprintf( str, " %*s", param->psize, *pname ); + } } else { rc = sprintf( str, ";%s", *pname ); @@ -740,7 +780,7 @@ run_print_header( const testing_t *test, } if ( human ) { - rc = sprintf( str_ptr, "%3s %12s", + rc = sprintf( str_ptr, "%3s %-12s", "Id", "Function" ); } else { @@ -860,7 +900,7 @@ run_print_line( const testing_t *test, const run_arg_list_t *arglist, } if ( human ) { - rc = sprintf( str_ptr, "%3d %12s", + rc = sprintf( str_ptr, "%3d %-12s", id, test->name ); } else { diff --git a/new-testing/testing_zauxiliary.c b/new-testing/testing_zauxiliary.c index dacbad2713aaf5a96e3ea788cd389920df5627e7..da33718fa107a862b1bfe1108f404b3bd4fbe57c 100644 --- a/new-testing/testing_zauxiliary.c +++ b/new-testing/testing_zauxiliary.c @@ -33,9 +33,10 @@ static parameter_t parameters[] = { { "id", "Id of the run", 0, PARAM_OUTPUT, 0, 3, TestValInt, {0}, NULL, NULL, sprint_int }, { NULL, "Options", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL }, - { "help", "Show this help", 'h', PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, - { "check", "Enable checking of the result", 'c', PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, - { "human", "Enable human readable mode", 'H', PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, + { "help", "Show this help", 'h', PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, + { "check", "Enable checking of the result", 'c', PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, + { "human", "Enable human readable mode", 'H', PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int }, + { "niter", "Perform multiple iteration per test", 'l', PARAM_OPTION, 1, 0, TestValInt, {1}, 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 }, @@ -74,9 +75,9 @@ static parameter_t parameters[] = { { "norm", "Value of the norm parameter", -17, PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 4, TestNormtype, {0}, NULL, pread_norm, sprint_norm }, { NULL, "Operation specific scalar", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL }, - { "alpha", "Value of the scalar alpha", 'x', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 12, TestValComplex64, {0}, NULL, pread_complex64, sprint_complex64 }, - { "beta", "Value of the scalar beta", 'y', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 12, TestValComplex64, {0}, NULL, pread_complex64, sprint_complex64 }, - { "bump", "Bump value to make a matrix diagonal dominant", 'z', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 12, TestValComplex64, {0}, NULL, pread_complex64, sprint_complex64 }, + { "alpha", "Value of the scalar alpha", 'x', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 13, TestValComplex64, {0}, NULL, pread_complex64, sprint_complex64 }, + { "beta", "Value of the scalar beta", 'y', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 13, TestValComplex64, {0}, NULL, pread_complex64, sprint_complex64 }, + { "bump", "Bump value to make a matrix diagonal dominant", 'z', PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 13, TestValComplex64, {0}, NULL, pread_complex64, sprint_complex64 }, { NULL, "QR/LQ parameters", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL }, { "qra", "Size of TS domain (=RH for householder trees)", -20, PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 3, TestValInt, {0}, NULL, pread_int, sprint_int }, @@ -85,16 +86,16 @@ static parameter_t parameters[] = { { "hlvl", "Tree used for high level reduction between nodes", -23, PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 4, TestValInt, {0}, NULL, pread_int, sprint_int }, { "domino", "Enable/Disable the domino between upper and lower trees", -24, PARAM_OPTION | PARAM_INPUT | PARAM_OUTPUT, 2, 6, TestValInt, {0}, NULL, pread_int, sprint_int }, - { "time", "Time in s", 1000, PARAM_OUTPUT, 2, 12, TestValFixdbl, {0}, NULL, pread_fixdbl, sprint_fixdbl }, - { "gflops", "GFlop/s", 1001, PARAM_OUTPUT, 2, 12, TestValFixdbl, {0}, NULL, pread_fixdbl, sprint_fixdbl }, + { "time", "Time in s", 1000, PARAM_OUTPUT, 2, 13, TestValFixdbl, {0}, NULL, pread_fixdbl, sprint_fixdbl }, + { "gflops", "GFlop/s", 1001, PARAM_OUTPUT, 2, 13, TestValFixdbl, {0}, NULL, pread_fixdbl, sprint_fixdbl }, { "RETURN", "Result of the testing: SUCCESS/FAILED", 1002, PARAM_OUTPUT, 2, 7, TestValInt, {0}, NULL, pread_int, sprint_check }, - { "||Ax-b||", "Norm of the residual", 1003, PARAM_OUTPUT, 2, 12, TestValDouble, {0}, NULL, pread_double, sprint_double }, + { "||Ax-b||", "Norm of the residual", 1003, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, { "||A-fact(A)||", "Norm of the residual", 1004, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, - { "||A||", "Norm of the matrix A", 1005, PARAM_OUTPUT, 2, 12, TestValDouble, {0}, NULL, pread_double, sprint_double }, - { "||B||", "Norm of the matrix B", 1006, PARAM_OUTPUT, 2, 12, TestValDouble, {0}, NULL, pread_double, sprint_double }, - { "||C||", "Norm of the matrix C", 1007, PARAM_OUTPUT, 2, 12, TestValDouble, {0}, NULL, pread_double, sprint_double }, - { "||b||", "Norm of the vector b", 1008, PARAM_OUTPUT, 2, 12, TestValDouble, {0}, NULL, pread_double, sprint_double }, - { "||x||", "Norm of the vector x", 1009, PARAM_OUTPUT, 2, 12, TestValDouble, {0}, NULL, pread_double, sprint_double }, + { "||A||", "Norm of the matrix A", 1005, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, + { "||B||", "Norm of the matrix B", 1006, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, + { "||C||", "Norm of the matrix C", 1007, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, + { "||b||", "Norm of the vector b", 1008, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, + { "||x||", "Norm of the vector x", 1009, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, { "||Ax-b||/N/eps/(||A||||x||+||b||", "", 1010, PARAM_OUTPUT, 2, 22, TestValDouble, {0}, NULL, pread_double, sprint_double }, { "||I-QQ'||", "Orthonormality of Q", 1011, PARAM_OUTPUT, 2, 13, TestValDouble, {0}, NULL, pread_double, sprint_double }, }; @@ -103,7 +104,13 @@ static parameter_t parameters[] = { void print_usage( const char* prog_name ) { - int rank = CHAMELEON_My_Mpi_Rank(); + int rank; + if ( CHAMELEON_Initialized() ) { + rank = CHAMELEON_Comm_rank(); + } + else { + rank = 0; + } if (rank == 0) { parameter_t *param = parameters; @@ -185,8 +192,10 @@ testing_gettest( const char *prog_name, } while( test != NULL ) { - /* Check the name without the precision */ - if ( strcasecmp( func_name, test->name + 1 ) == 0 ) { + /* Check the name with and without the precision */ + if ( (strcasecmp( func_name, test->name ) == 0) || + (strcasecmp( func_name, test->name + 1 ) == 0) ) + { break; } test = test->next; @@ -466,7 +475,7 @@ parameters_destroy() int main (int argc, char **argv) { - int ncores, ngpus, human, check; + int ncores, ngpus, human, check, i, niter; int rc, info = 0; int run_id = 0; char *func_name; @@ -487,6 +496,7 @@ int main (int argc, char **argv) { check = parameters_getvalue_int( "check" ); human = parameters_getvalue_int( "human" ); func_name = parameters_getvalue_str( "op" ); + niter = parameters_getvalue_int( "niter" ); CHAMELEON_Init( ncores, ngpus ); @@ -501,14 +511,18 @@ int main (int argc, char **argv) { run_print_header( test, check, human ); run = runlist->head; while ( run != NULL ) { - rc = test->fptr( &(run->args), check ); - - /* If rc < 0, we skipped the test */ - if ( rc >= 0 ) { - run_arg_add_int( &(run->args), "RETURN", rc ); - run_print_line( test, &(run->args), check, human, run_id ); - run_id++; - info += rc; + for(i=0; i<niter; i++) { + run_arg_list_t copy = run_arg_list_copy( &(run->args) ); + rc = test->fptr( ©, check ); + + /* If rc < 0, we skipped the test */ + if ( rc >= 0 ) { + run_arg_add_int( ©, "RETURN", rc ); + run_print_line( test, ©, check, human, run_id ); + run_id++; + info += rc; + } + run_arg_list_destroy( © ); } /* Move to next run */ diff --git a/new-testing/testing_zgeadd.c b/new-testing/testing_zgeadd.c index ac1146858e6de986806d52c503b7d94ad405a8a6..41eef6dc3e49be1d946367197d9957aff994e092 100644 --- a/new-testing/testing_zgeadd.c +++ b/new-testing/testing_zgeadd.c @@ -58,8 +58,8 @@ testing_zgeadd( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgeadd( M, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zgemm.c b/new-testing/testing_zgemm.c index fa36780c0948a3e68ac433c798c82cffe4336bee..129115404bd79fe40ddb9af379e2edd9e6b537fe 100644 --- a/new-testing/testing_zgemm.c +++ b/new-testing/testing_zgemm.c @@ -48,8 +48,8 @@ testing_zgemm( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zgemm( M, N, K ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zhemm.c b/new-testing/testing_zhemm.c index 85daf7c272c5553424592986d045737476f06259..b08ea7f9d7104d490a032545b2ba64fea165b68f 100644 --- a/new-testing/testing_zhemm.c +++ b/new-testing/testing_zhemm.c @@ -49,8 +49,8 @@ testing_zhemm( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zhemm( side, M, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zher2k.c b/new-testing/testing_zher2k.c index d1795043d296a338e01e3704fde21927970bbabe..470fa10826564c65e343aa7cb03b8112a010a377 100644 --- a/new-testing/testing_zher2k.c +++ b/new-testing/testing_zher2k.c @@ -49,7 +49,7 @@ testing_zher2k( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zher2k( K, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); beta = run_arg_get_double( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zlansy.c b/new-testing/testing_zlansy.c index b226ae5769329948f42819879ef70e78c43fa782..c9d310fb26ec86af6ac0530a2e15a62a6e8a15f2 100644 --- a/new-testing/testing_zlansy.c +++ b/new-testing/testing_zlansy.c @@ -66,7 +66,7 @@ testing_zlansy( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zlansy( norm_type, uplo, N ); - bump = run_arg_get_Complex64( args, "bump", bump ); + bump = run_arg_get_complex64( args, "bump", bump ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zlascal.c b/new-testing/testing_zlascal.c index 792f8f5d64c86d3513f0fce1f6f6688c5226a2f5..f3cd07a704f9ca2a3aca886112977a309fb280db 100644 --- a/new-testing/testing_zlascal.c +++ b/new-testing/testing_zlascal.c @@ -59,7 +59,7 @@ testing_zlascal( run_arg_list_t *args, int check ) 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. ); + 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; diff --git a/new-testing/testing_zsymm.c b/new-testing/testing_zsymm.c index 70f33ed52a6b6a4180014963f9a851f50216e760..dd72d9c7976d4aa19f84fd632b3e6bcaced35ce9 100644 --- a/new-testing/testing_zsymm.c +++ b/new-testing/testing_zsymm.c @@ -49,8 +49,8 @@ testing_zsymm( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zsymm( side, M, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zsyr2k.c b/new-testing/testing_zsyr2k.c index 508cd3dc41630182d5f6e997ef6a71fc283d276f..473b555ba42f2c96db7646ad7be1a7c262fd7b2b 100644 --- a/new-testing/testing_zsyr2k.c +++ b/new-testing/testing_zsyr2k.c @@ -49,8 +49,8 @@ testing_zsyr2k( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zher2k( K, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_zsyrk.c b/new-testing/testing_zsyrk.c index 4c6c8838c31522324710cf668c37373392a5adf4..a9429ebc396d18151e1d17dbc9eb9299625541a6 100644 --- a/new-testing/testing_zsyrk.c +++ b/new-testing/testing_zsyrk.c @@ -46,9 +46,9 @@ testing_zsyrk( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_zsyrk( K, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); - bump = run_arg_get_Complex64( args, "bump", bump ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); + bump = run_arg_get_complex64( args, "bump", bump ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_ztradd.c b/new-testing/testing_ztradd.c index 94ca773bfc86d2d958349deb2590992ca1bbad92..4fbd11f00b93be2e9302ad6ff72d36504398929f 100644 --- a/new-testing/testing_ztradd.c +++ b/new-testing/testing_ztradd.c @@ -72,8 +72,8 @@ testing_ztradd( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_ztradd( uplo, M, N ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); - beta = run_arg_get_Complex64( args, "beta", beta ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); + beta = run_arg_get_complex64( args, "beta", beta ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_ztrmm.c b/new-testing/testing_ztrmm.c index 5ce48376c987a21d6a729e5512631087c921d660..060bbae0d5433b64721df3a224cae6358a1b1025 100644 --- a/new-testing/testing_ztrmm.c +++ b/new-testing/testing_ztrmm.c @@ -46,7 +46,7 @@ testing_ztrmm( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_ztrmm( side, N, K ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testing_ztrsm.c b/new-testing/testing_ztrsm.c index 74bfa7bb6989005f0e95fedab57e04e69649af32..3560e1fb12cc3d97dd2bdfc0776624949102e560 100644 --- a/new-testing/testing_ztrsm.c +++ b/new-testing/testing_ztrsm.c @@ -46,7 +46,7 @@ testing_ztrsm( run_arg_list_t *args, int check ) cham_fixdbl_t t, gflops; cham_fixdbl_t flops = flops_ztrsm( side, N, K ); - alpha = run_arg_get_Complex64( args, "alpha", alpha ); + alpha = run_arg_get_complex64( args, "alpha", alpha ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); diff --git a/new-testing/testings.h b/new-testing/testings.h index b0ec579bbc8029e15cd9d1f339a36961db8a71c7..8b7a7298e1be21438ba363a3c48f6431055ccfc6 100644 --- a/new-testing/testings.h +++ b/new-testing/testings.h @@ -185,8 +185,8 @@ const run_arg_t *run_arg_get_byname( const run_arg_list_t *arglist, const char * int run_arg_get_int ( run_arg_list_t *arglist, const char *name, int defval ); float run_arg_get_float ( run_arg_list_t *arglist, const char *name, float defval ); double run_arg_get_double ( run_arg_list_t *arglist, const char *name, double defval ); -CHAMELEON_Complex32_t run_arg_get_Complex32( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex32_t defval ); -CHAMELEON_Complex64_t run_arg_get_Complex64( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex64_t defval ); +CHAMELEON_Complex32_t run_arg_get_complex32( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex32_t defval ); +CHAMELEON_Complex64_t run_arg_get_complex64( run_arg_list_t *arglist, const char *name, CHAMELEON_Complex64_t defval ); cham_trans_t run_arg_get_trans ( run_arg_list_t *arglist, const char *name, cham_trans_t defval ); cham_uplo_t run_arg_get_uplo ( run_arg_list_t *arglist, const char *name, cham_uplo_t defval ); cham_diag_t run_arg_get_diag ( run_arg_list_t *arglist, const char *name, cham_diag_t defval ); @@ -201,6 +201,9 @@ void run_print_header( const testing_t *test, int check, int human ); void run_print_line( const testing_t *test, const run_arg_list_t *arglist, int check, int human, int id ); +run_arg_list_t run_arg_list_copy( const run_arg_list_t *arglist ); +void run_arg_list_destroy( run_arg_list_t *arglist ); + void parameters_read( parameter_t *param, const char *values ); void parameters_read_file( const char *filename ); parameter_t *parameters_getbyname( const char *name ); diff --git a/new-testing/values.c b/new-testing/values.c index c07909703eaa37d6b0050570e5654560a4f4fc68..13f711436fed7803393d1d8707fc6c98cd6168df 100644 --- a/new-testing/values.c +++ b/new-testing/values.c @@ -317,7 +317,16 @@ val_t pread_norm( const char *str ) val_t pread_string( const char *str ) { val_t val; + int i, len = strlen( str ); val.str = strdup( str ); + for( i=0; i<len; i++ ) { + if ( (val.str[i] == '\n') || + (val.str[i] == ' ') ) + { + val.str[i] = '\0'; + break; + } + } return val; } @@ -349,7 +358,7 @@ char *sprint_float( val_t val, int human, int nbchar, char *str_in ) { int rc; if ( human ) { - rc = sprintf( str_in, " %*e", nbchar, val.sval ); + rc = sprintf( str_in, " %*e", chameleon_max( 13, nbchar ), val.sval ); } else { rc = sprintf( str_in, ";%e", val.sval ); @@ -367,7 +376,7 @@ char *sprint_double( val_t val, int human, int nbchar, char *str_in ) { int rc; if ( human ) { - rc = sprintf( str_in, " %*e", nbchar, val.dval ); + rc = sprintf( str_in, " %*e", chameleon_max( 13, nbchar ), val.dval ); } else { rc = sprintf( str_in, ";%e", val.dval ); @@ -385,7 +394,7 @@ char *sprint_complex32( val_t val, int human, int nbchar, char *str_in ) { int rc; if ( human ) { - rc = sprintf( str_in, " %e,%e", crealf(val.cval), cimagf(val.cval) ); + rc = sprintf( str_in, " (%*e,%*e)", chameleon_max( 13, nbchar ), crealf(val.cval), chameleon_max( 13, nbchar ), cimagf(val.cval) ); } else { rc = sprintf( str_in, ";%e,%e", crealf(val.cval), cimagf(val.cval) ); @@ -403,7 +412,7 @@ char *sprint_complex64( val_t val, int human, int nbchar, char *str_in ) { int rc; if ( human ) { - rc = sprintf( str_in, " %e,%e", creal(val.zval), cimag(val.zval) ); + rc = sprintf( str_in, " (%*e,%*e)", chameleon_max( 13, nbchar ), creal(val.zval), chameleon_max( 13, nbchar ), cimag(val.zval) ); } else { rc = sprintf( str_in, ";%e,%e", creal(val.zval), cimag(val.zval) ); diff --git a/runtime/starpu/control/runtime_control.c b/runtime/starpu/control/runtime_control.c index 1279986bfd8f58b172c77dacb59f9fff738ccfd7..14659f78513c60547bc74d06a8dba6f9bcf379ae 100644 --- a/runtime/starpu/control/runtime_control.c +++ b/runtime/starpu/control/runtime_control.c @@ -215,7 +215,7 @@ void RUNTIME_progress( CHAM_context_t *chamctxt ) int max; #if defined(CHAMELEON_USE_MPI) - if ( chamctxt->my_mpi_rank != 0 ) { + if ( RUNTIME_comm_rank( chamctxt ) != 0 ) { return; } #endif diff --git a/testing/testing_dgram.c b/testing/testing_dgram.c index 0bb2c73039c7b890fa8f674f86a3122e3ffa71ca..4aefca6e2efdf035cd7e982f4c405cbf3725015d 100644 --- a/testing/testing_dgram.c +++ b/testing/testing_dgram.c @@ -71,7 +71,7 @@ int testing_dgram(int argc, char **argv) eps = LAPACKE_dlamch_work('e'); - if (CHAMELEON_My_Mpi_Rank() == 0){ + if (CHAMELEON_Comm_rank() == 0){ printf("\n"); printf("------ TESTS FOR CHAMELEON GRAM ROUTINE ------- \n"); printf(" Size of the Matrix %d by %d\n", N, N); @@ -109,7 +109,7 @@ int testing_dgram(int argc, char **argv) /* Check the solution */ info_solution = check_solution(uplo[ua], N, Aref, Acham, LDA); - if (CHAMELEON_My_Mpi_Rank() == 0){ + if (CHAMELEON_Comm_rank() == 0){ if (info_solution == 0) { printf("***************************************************\n"); printf(" ---- TESTING GRAM (%s) ............... PASSED !\n", uplostr[ua]); @@ -173,13 +173,13 @@ static int check_solution(cham_uplo_t uplo, } eps = LAPACKE_dlamch_work('e'); - if (CHAMELEON_My_Mpi_Rank() == 0) + if (CHAMELEON_Comm_rank() == 0) printf("Rnorm %e, Anorm %e\n", Rnorm, Arefnorm); /* scale the norm in respect to Aref */ result = Rnorm / (Arefnorm * N * eps); - if (CHAMELEON_My_Mpi_Rank() == 0){ + if (CHAMELEON_Comm_rank() == 0){ printf("============\n"); printf("Checking the norm of the difference against reference GRAM \n"); printf("-- ||Acham - Aref||_oo/((||Aref||_oo.N.eps) = %e \n", @@ -187,12 +187,12 @@ static int check_solution(cham_uplo_t uplo, } if ( isnan(Rnorm) || isinf(Rnorm) || isnan(result) || isinf(result) || (result > 10.0) ) { - if (CHAMELEON_My_Mpi_Rank() == 0) + if (CHAMELEON_Comm_rank() == 0) printf("-- The solution is suspicious ! \n"); info_solution = 1; } else { - if (CHAMELEON_My_Mpi_Rank() == 0) + if (CHAMELEON_Comm_rank() == 0) printf("-- The solution is CORRECT ! \n"); info_solution= 0 ; } diff --git a/testing/testing_zgemm.c b/testing/testing_zgemm.c index 7244302ce95ec536e739cee892e370e49c4054bb..f6c2d151b45d797997e5c49edd5126af15cecdde 100644 --- a/testing/testing_zgemm.c +++ b/testing/testing_zgemm.c @@ -90,7 +90,7 @@ int testing_zgemm(int argc, char **argv) eps = LAPACKE_dlamch_work('e'); - if (CHAMELEON_My_Mpi_Rank() == 0){ + if (CHAMELEON_Comm_rank() == 0){ printf("\n"); printf("------ TESTS FOR CHAMELEON ZGEMM ROUTINE ------- \n"); printf(" Size of the Matrix %d by %d\n", M, N); @@ -130,7 +130,7 @@ int testing_zgemm(int argc, char **argv) /* Check the solution */ info_solution = check_solution(trans[ta], trans[tb], M, N, K, alpha, A, LDA, B, LDB, beta, Cinit, Cfinal, LDC); - if (CHAMELEON_My_Mpi_Rank() == 0){ + if (CHAMELEON_Comm_rank() == 0){ if (info_solution == 0) { printf("***************************************************\n"); printf(" ---- TESTING ZGEMM (%s, %s) ............... PASSED !\n", transstr[ta], transstr[tb]); @@ -198,12 +198,12 @@ static int check_solution(cham_trans_t transA, cham_trans_t transB, int M, int N Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', M, N, Cref, LDC, work); eps = LAPACKE_dlamch_work('e'); - if (CHAMELEON_My_Mpi_Rank() == 0) + if (CHAMELEON_Comm_rank() == 0) printf("Rnorm %e, Anorm %e, Bnorm %e, Cinitnorm %e, Cchamnorm %e, Clapacknorm %e\n", Rnorm, Anorm, Bnorm, Cinitnorm, Cchamnorm, Clapacknorm); result = Rnorm / ((Anorm + Bnorm + Cinitnorm) * N * eps); - if (CHAMELEON_My_Mpi_Rank() == 0){ + if (CHAMELEON_Comm_rank() == 0){ printf("============\n"); printf("Checking the norm of the difference against reference ZGEMM \n"); printf("-- ||Ccham - Clapack||_oo/((||A||_oo+||B||_oo+||C||_oo).N.eps) = %e \n", @@ -211,13 +211,13 @@ static int check_solution(cham_trans_t transA, cham_trans_t transB, int M, int N } if ( isnan(Rnorm) || isinf(Rnorm) || isnan(result) || isinf(result) || (result > 10.0) ) { - if (CHAMELEON_My_Mpi_Rank() == 0) + if (CHAMELEON_Comm_rank() == 0) printf("-- The solution is suspicious ! \n"); info_solution = 1; } else { - //printf("CHAMELEON_My_Mpi_Rank() : %d\n",CHAMELEON_My_Mpi_Rank()); - if (CHAMELEON_My_Mpi_Rank() == 0) + //printf("CHAMELEON_Comm_rank() : %d\n",CHAMELEON_Comm_rank()); + if (CHAMELEON_Comm_rank() == 0) printf("-- The solution is CORRECT ! \n"); info_solution= 0 ; } diff --git a/timing/time_zlange.c b/timing/time_zlange.c index 8db08f78152ac1fe0d27e97fae0fec97dc1a373c..feed6be11b5b15f33f1cf4f98f2b91c5022946b8 100644 --- a/timing/time_zlange.c +++ b/timing/time_zlange.c @@ -67,7 +67,7 @@ RunTest(int *iparam, double *dparam, chameleon_time_t *t_) result = result / ((double)M * (double)N); break; } - if ( CHAMELEON_My_Mpi_Rank() == 0 ) { + if ( CHAMELEON_Comm_rank() == 0 ) { dparam[IPARAM_ANORM] = normlapack; dparam[IPARAM_BNORM] = 0.; dparam[IPARAM_XNORM] = 1.; diff --git a/timing/time_zlange_tile.c b/timing/time_zlange_tile.c index 147c5955902ad793b4fe351e5640b8d308d084c4..1a5888e3798a89bf2fe83c6f185bbfde6e39f740 100644 --- a/timing/time_zlange_tile.c +++ b/timing/time_zlange_tile.c @@ -71,7 +71,7 @@ RunTest(int *iparam, double *dparam, chameleon_time_t *t_) result = result / ((double)M * (double)N); break; } - if ( CHAMELEON_My_Mpi_Rank() == 0 ) { + if ( CHAMELEON_Comm_rank() == 0 ) { dparam[IPARAM_ANORM] = normlapack; dparam[IPARAM_BNORM] = 0.; dparam[IPARAM_XNORM] = 1.; diff --git a/timing/timing.c b/timing/timing.c index 75e2a234d7c3b7f8a474b29eaa88dc6378806be7..953b18ebdc9b05f2445b5239c1a01f330c4e2aaf 100644 --- a/timing/timing.c +++ b/timing/timing.c @@ -115,7 +115,7 @@ Test(int64_t n, int *iparam) { (void)M;(void)N;(void)K;(void)NRHS; if ( (n < 0) || (thrdnbr < 0 ) ) { - if (gnuplot && (CHAMELEON_My_Mpi_Rank() == 0) ) { + if (gnuplot && (CHAMELEON_Comm_rank() == 0) ) { printf( "set title '%d_NUM_THREADS: ", thrdnbr ); for (i = 0; env[i][0]; ++i) { s = getenv( env[i] ); @@ -141,7 +141,7 @@ Test(int64_t n, int *iparam) { return 0; } - if ( CHAMELEON_My_Mpi_Rank() == 0) + if ( CHAMELEON_Comm_rank() == 0) printf( "%7d %7d %7d ", iparam[IPARAM_M], iparam[IPARAM_N], iparam[IPARAM_K] ); fflush( stdout ); @@ -216,7 +216,7 @@ Test(int64_t n, int *iparam) { gflops = sumgf / niter; sd = sqrt((sumgf2 - (sumgf*sumgf)/niter)/niter); - if ( CHAMELEON_My_Mpi_Rank() == 0) { + if ( CHAMELEON_Comm_rank() == 0) { printf( "%9.3f %9.2f +-%7.2f ", sumt/niter, gflops, sd); if (iparam[IPARAM_BOUND]) { @@ -681,7 +681,7 @@ timing_main(int *iparam, char *prog_name, int start, int stop, int step) { /* Layout conversion */ CHAMELEON_Set(CHAMELEON_TRANSLATION_MODE, iparam[IPARAM_INPLACE]); - if ( CHAMELEON_My_Mpi_Rank() == 0 ) { + if ( CHAMELEON_Comm_rank() == 0 ) { print_header( prog_name, iparam); }