diff --git a/compute/pzhetrd_he2hb.c b/compute/pzhetrd_he2hb.c index 288cc93828c06a1d2bd1412435d59b5cc589a2b2..8d763d0bda5bf260c8f5abfb89cf438a4ed63b06 100644 --- a/compute/pzhetrd_he2hb.c +++ b/compute/pzhetrd_he2hb.c @@ -102,7 +102,7 @@ void chameleon_pzhetrd_he2hb(cham_uplo_t uplo, tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb; INSERT_TASK_zhe2ge( &options, - uplo, tempkn, tempkn, A->mb, + uplo, tempkn, tempkn, A->mb, A(k, k), D(k) ); } diff --git a/compute/zcesca.c b/compute/zcesca.c index 76489d42f9b1241c701703cd9e7075cf7984381f..552ec9d6e416d7bb7d7aaa46ff3fe19b862594af 100644 --- a/compute/zcesca.c +++ b/compute/zcesca.c @@ -290,6 +290,8 @@ int CHAMELEON_zcesca(int center, int scale, cham_store_t axis, CHAM_desc_t *descSC = chameleon_desc_submatrix( &(ws->Wgcol), 0, 0, 1, N ); CHAMELEON_zDesc2Lap( ChamUpperLower, descSR, SR, M ); CHAMELEON_zDesc2Lap( ChamUpperLower, descSC, SC, 1 ); + free( descSR ); + free( descSC ); } /* Cleanup the temporary data */ @@ -348,7 +350,7 @@ int CHAMELEON_zcesca(int center, int scale, cham_store_t axis, * */ int CHAMELEON_zcesca_Tile( int center, int scale, cham_store_t axis, CHAM_desc_t *A, - CHAMELEON_Complex64_t *SR, CHAMELEON_Complex64_t *SC) + CHAMELEON_Complex64_t *SR, CHAMELEON_Complex64_t *SC ) { CHAM_context_t *chamctxt; RUNTIME_sequence_t *sequence = NULL; @@ -391,6 +393,8 @@ int CHAMELEON_zcesca_Tile( int center, int scale, cham_store_t axis, CHAM_desc_t CHAM_desc_t *descSC = chameleon_desc_submatrix( &(ws->Wgcol), 0, 0, 1, A->ln ); CHAMELEON_zDesc2Lap( ChamUpperLower, descSR, SR, A->lm ); CHAMELEON_zDesc2Lap( ChamUpperLower, descSC, SC, 1 ); + free( descSR ); + free( descSC ); } CHAMELEON_zcesca_WS_Free( ws ); diff --git a/compute/zgesvd.c b/compute/zgesvd.c index 945783ccb79308d7b53b209644d91fc61dfc5e93..6d99d73b2a5d7025a0326b9a4354b3535e82ee8d 100644 --- a/compute/zgesvd.c +++ b/compute/zgesvd.c @@ -493,25 +493,25 @@ int CHAMELEON_zgesvd_Tile_Async( cham_job_t jobu, cham_job_t jobvt, int info, nru, ncvt; switch ( jobu ) { - case ChamOVec : + /* case ChamOVec : */ case ChamAllVec : nru = M; break; - case ChamSVec : - nru = MINMN; - break; + /* case ChamSVec : */ + /* nru = MINMN; */ + /* break; */ case ChamNoVec : default: nru = 0; } switch ( jobvt ) { - case ChamOVec : + /* case ChamOVec : */ case ChamAllVec : ncvt = N; break; - case ChamSVec : - ncvt = MINMN; - break; + /* case ChamSVec : */ + /* ncvt = MINMN; */ + /* break; */ case ChamNoVec : default: ncvt = 0; diff --git a/compute/zgetrf.c b/compute/zgetrf.c index 4a39cb5bba18ff489c69d81858626b5cdf955bbd..44d57502a84287db609f701b64a74f8a489aada0 100644 --- a/compute/zgetrf.c +++ b/compute/zgetrf.c @@ -315,6 +315,17 @@ CHAMELEON_zgetrf_Tile( CHAM_desc_t *A, CHAM_desc_t *IPIV ) * On entry, the M-by-N matrix to be factored. * On exit, the tile factors L and U from the factorization. * + * @param[in,out] IPIV + * On entry, the descriptor of an min(M, N)-by-1 matrix that may not + * have been initialized. + * On exit, the pivot vector generated during the factorization. + * + * @param[in,out] user_ws + * The opaque pointer to pre-allocated getrf workspace through + * CHAMELEON_zgetrf_WS_Alloc(). If user_ws is NULL, it is automatically + * allocated, but BE CAREFULL as it switches the call from asynchronous + * to synchronous call. + * * @param[in] sequence * Identifies the sequence of function calls that this call belongs to * (for completion checks and exception handling purposes). @@ -351,10 +362,6 @@ CHAMELEON_zgetrf_Tile_Async( CHAM_desc_t *A, chameleon_fatal_error( "CHAMELEON_zgetrf_Tile_Async", "CHAMELEON_zgetrf_Tile_Async is only available with StarPU" ); return CHAMELEON_ERR_NOT_INITIALIZED; } - if ( user_ws == NULL ) { - chameleon_fatal_error( "CHAMELEON_zgetrf_Tile_Async", "NULL user_ws" ); - return CHAMELEON_ERR_NOT_INITIALIZED; - } if ( sequence == NULL ) { chameleon_fatal_error( "CHAMELEON_zgetrf_Tile_Async", "NULL sequence" ); return CHAMELEON_ERR_UNALLOCATED; diff --git a/compute/zheevd.c b/compute/zheevd.c index 140311a5f39ca3866dde88dc27c1a21eae3318b7..7d5421877a8d1a4a040a30963cfc81e1d3b33f61 100644 --- a/compute/zheevd.c +++ b/compute/zheevd.c @@ -507,7 +507,7 @@ int CHAMELEON_zheevd_Tile_Async( cham_job_t jobz, cham_uplo_t uplo, #if defined(CHAMELEON_COPY_DIAG) { int m = chameleon_min(A->mt, A->nt) * A->mb; - chameleon_zdesc_alloc(D, A->mb, A->nb, m, A->n, 0, 0, m, A->n, ); + chameleon_zdesc_alloc(D, A->mb, A->nb, m, A->n, 0, 0, m, A->n, CHAMELEON_zgemm_WS_Free( gemm_ws ) ); Dptr = &D; } #endif diff --git a/control/auxiliary.h b/control/auxiliary.h index f4246973b61cc3b62c462a100a49d0bbc961749b..b7502ac7061a3b3a06b5c8067b2d90db28de5200 100644 --- a/control/auxiliary.h +++ b/control/auxiliary.h @@ -35,89 +35,6 @@ extern "C" { #endif -/* - * Get environment variable - */ -#if defined(CHAMELEON_OS_WINDOWS) - -static inline int -chameleon_setenv( const char *var, const char *value, int overwrite ) { - return !(SetEnvironmentVariable( var, value )); -} - -static inline char * -chameleon_getenv( const char *var ) { - char *str; - int len = 512; - int rc; - str = (char*)malloc(len * sizeof(char)); - rc = GetEnvironmentVariable(var, str, len); - if (rc == 0) { - free(str); - str = NULL; - } - return str; -} - -static inline void -chameleon_cleanenv( char *str ) { - if (str != NULL) free(str); -} - -#else /* Other OS systems */ - -static inline int -chameleon_setenv( const char *var, const char *value, int overwrite ) { - return setenv( var, value, overwrite ); -} - -static inline char * -chameleon_getenv( const char *var ) { - return getenv( var ); -} - -static inline void -chameleon_cleanenv( char *str ) { - (void)str; -} - -#endif - - -static inline int -chameleon_env_is_set_to(char * str, char * value) { - char * val; - if ( (val = chameleon_getenv(str)) && - !strcmp(val, value)) - return 1; - return 0; -} - -static inline int -chameleon_env_on_off( char * str, int default_value ) { - if ( chameleon_env_is_set_to(str, "1") ) { - return CHAMELEON_TRUE; - } - if ( chameleon_env_is_set_to(str, "0") ) { - return CHAMELEON_FALSE; - } - return default_value; -} - -static inline int -chameleon_getenv_get_value_int(char * string, int default_value) { - long int ret; - char *str = chameleon_getenv(string); - if (str == NULL) return default_value; - - if ( sscanf( str, "%ld", &ret ) != 1 ) { - perror("sscanf"); - return default_value; - } - - return (int)ret; -} - /** * Internal routines */ diff --git a/control/common.h b/control/common.h index ef06cffb0568edde5cbc6d601ca6d4ad2a0a32c0..4c4d4acb5bfeecb9bb245122afd1ed6da1272a0d 100644 --- a/control/common.h +++ b/control/common.h @@ -11,11 +11,11 @@ * * @brief Chameleon common header file * - * @version 1.2.0 + * @version 1.3.0 * @author Mathieu Faverge * @author Cedric Castagnede * @author Florent Pruvost - * @date 2022-02-22 + * @date 2023-07-06 * */ /** @@ -72,6 +72,7 @@ #include "control/context.h" #include "control/descriptor.h" #include "control/async.h" +#include "chameleon/getenv.h" /** * Global shortcuts @@ -133,6 +134,57 @@ static inline int chameleon_asprintf( char **strp, const char *fmt, ... ) return rc; } +#if defined(CHAMELEON_KERNELS_TRACE) +static inline char *chameleon_codelet_name( char *kname, int nbtiles, ... ) +{ + int nbchar = 256; + char output[256]; + char *strptr = output; + va_list ap; + int rc, i; + + rc = snprintf( strptr, nbchar, "%s(", kname ); + if ( rc < 0 ) { + return NULL; + } + strptr += rc; + nbchar -= rc; + + va_start( ap, nbtiles ); + for( i=0; i<nbtiles; i++ ) + { + CHAM_tile_t *tile = va_arg( ap, CHAM_tile_t* ); + if ( i > 0 ) { + strptr[0] = ','; + strptr++; + nbchar--; + } + rc = snprintf( strptr, nbchar, " %s", tile->name ); + if ( rc < 0 ) { + return NULL; + } + strptr += rc; + nbchar -= rc; + } + va_end( ap ); + + if ( nbchar < 3 ) { + return NULL; + } + strptr[0] = ' '; + strptr[1] = ')'; + strptr[2] = '\0'; + + return strndup( output, 255 ); +} +#else +static inline char *chameleon_codelet_name( char *kname, int nbtiles, ... ) +{ + (void)nbtiles; + return kname; +} +#endif + #ifdef __cplusplus } #endif diff --git a/control/descriptor_helpers.c b/control/descriptor_helpers.c index f11e487d32d578577534de023b37179765e263ff..87846e3a5709f9127aaf3fa4dfc72084ab3ae469 100644 --- a/control/descriptor_helpers.c +++ b/control/descriptor_helpers.c @@ -139,6 +139,15 @@ int chameleon_getrankof_custom_init( custom_dist_t **custom_dist, return CHAMELEON_ERR_ILLEGAL_VALUE; } + if ( (dist_m <= 0 ) || (dist_n <= 0) ) { + char message[300]; + snprintf( message, 300, "Incorrect values for dist_m(%d) and/or dist_n(%d)", dist_m, dist_n ); + chameleon_error( "chameleon_getrankof_custom_init", message ); + free( result ); + fclose( f ); + return CHAMELEON_ERR_ILLEGAL_VALUE; + } + result->dist_m = dist_m; result->dist_n = dist_n; diff --git a/gpucublas/compute/cuda_dlag2h.cu b/gpucublas/compute/cuda_dlag2h.cu index 8136c248fd9ff2c02a4910b251f282acdbe4cc77..000fc7454655c9a493ee970179fc28192f27f04b 100644 --- a/gpucublas/compute/cuda_dlag2h.cu +++ b/gpucublas/compute/cuda_dlag2h.cu @@ -133,6 +133,7 @@ CUDA_dlag2h( int m, int n, cublasHandle_t handle ) { cudaStream_t stream; + cudaError_t err; double rmax; if ( m < 0 ) { @@ -166,6 +167,13 @@ CUDA_dlag2h( int m, int n, cuda_dlag2h_kernel<<< grid, threads, 0, stream >>>( m, n, A, lda, HA, ldha, rmax ); + err = cudaGetLastError(); + if ( err != cudaSuccess ) + { + fprintf( stderr, "CUDA_dlag2h failed to launch CUDA kernel %s\n", cudaGetErrorString(err) ); + return CHAMELEON_ERR_UNEXPECTED; + } + return 0; } @@ -261,6 +269,7 @@ CUDA_hlag2d( int m, int n, cublasHandle_t handle ) { cudaStream_t stream; + cudaError_t err; if ( m < 0 ) { return -1; @@ -286,5 +295,12 @@ CUDA_hlag2d( int m, int n, cublasGetStream( handle, &stream ); cuda_hlag2d_kernel<<< grid, threads, 0, stream >>> ( m, n, HA, ldha, A, lda ); + err = cudaGetLastError(); + if ( err != cudaSuccess ) + { + fprintf( stderr, "CUDA_hlag2d failed to launch CUDA kernel %s\n", cudaGetErrorString(err) ); + return CHAMELEON_ERR_UNEXPECTED; + } + return 0; } diff --git a/gpucublas/compute/cuda_zlag2c.cu b/gpucublas/compute/cuda_zlag2c.cu index cf3f35062fbe336c1c8f72119c659ba99e4693da..8b1fdfe7105a13cdb983a60de735d29d790eb38b 100644 --- a/gpucublas/compute/cuda_zlag2c.cu +++ b/gpucublas/compute/cuda_zlag2c.cu @@ -152,6 +152,7 @@ CUDA_zlag2c( int m, int n, cublasHandle_t handle ) { cudaStream_t stream; + cudaError_t err; double rmax; if ( m < 0 ) { @@ -180,6 +181,13 @@ CUDA_zlag2c( int m, int n, cuda_zlag2c_kernel<<< grid, threads, 0, stream >>>( m, n, A, lda, SA, ldsa, rmax ); + err = cudaGetLastError(); + if ( err != cudaSuccess ) + { + fprintf( stderr, "CUDA_zlag2c failed to launch CUDA kernel %s\n", cudaGetErrorString(err) ); + return CHAMELEON_ERR_UNEXPECTED; + } + return 0; } @@ -275,6 +283,7 @@ CUDA_clag2z( int m, int n, cublasHandle_t handle ) { cudaStream_t stream; + cudaError_t err; if ( m < 0 ) { return -1; @@ -300,5 +309,12 @@ CUDA_clag2z( int m, int n, cublasGetStream( handle, &stream ); cuda_clag2z_kernel<<< grid, threads, 0, stream >>> ( m, n, SA, ldsa, A, lda ); + err = cudaGetLastError(); + if ( err != cudaSuccess ) + { + fprintf( stderr, "CUDA_clag2z failed to launch CUDA kernel %s\n", cudaGetErrorString(err) ); + return CHAMELEON_ERR_UNEXPECTED; + } + return 0; } diff --git a/gpucublas/include/gpucublas.h b/gpucublas/include/gpucublas.h index 8e7d4c3afa4d0165e2961c7791ae2dd2f12b3871..2305b4f9be07ee8f06d2ce6154fd1d55c0ece938 100644 --- a/gpucublas/include/gpucublas.h +++ b/gpucublas/include/gpucublas.h @@ -15,7 +15,7 @@ * @author Florent Pruvost * @author Mathieu Faverge * @author Nathalie Furmento - * @date 2023-07-04 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -39,6 +39,7 @@ #include <cuda_fp16.h> #endif +#include <cuda_runtime_api.h> #include <cublas_v2.h> #define CUBLAS_SADDR(_a_) (&(_a_)) diff --git a/include/chameleon/getenv.h b/include/chameleon/getenv.h new file mode 100644 index 0000000000000000000000000000000000000000..3151067446def980b186227e1a22237f211ae24a --- /dev/null +++ b/include/chameleon/getenv.h @@ -0,0 +1,123 @@ +/** + * + * @file getenv.h + * + * @copyright 2009-2014 The University of Tennessee and The University of + * Tennessee Research Foundation. All rights reserved. + * @copyright 2012-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + *** + * + * @brief Chameleon auxiliary file to manage environment variables. Must be included after chameleon.h. + * + * @version 1.2.0 + * @author Jakub Kurzak + * @author Piotr Luszczek + * @author Emmanuel Agullo + * @author Cedric Castagnede + * @author Florent Pruvost + * @author Mathieu Faverge + * @author Loris Lucido + * @date 2022-02-22 + * + */ +#ifndef _chameleon_getenv_h_ +#define _chameleon_getenv_h_ + +#include <string.h> +#include <stdlib.h> +#include <stdio.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Get environment variable + */ +#if defined(CHAMELEON_OS_WINDOWS) + +static inline int +chameleon_setenv( const char *var, const char *value, int overwrite ) { + return !(SetEnvironmentVariable( var, value )); +} + +static inline char * +chameleon_getenv( const char *var ) { + char *str; + int len = 512; + int rc; + str = (char*)malloc(len * sizeof(char)); + rc = GetEnvironmentVariable(var, str, len); + if (rc == 0) { + free(str); + str = NULL; + } + return str; +} + +static inline void +chameleon_cleanenv( char *str ) { + if (str != NULL) free(str); +} + +#else /* Other OS systems */ + +static inline int +chameleon_setenv( const char *var, const char *value, int overwrite ) { + return setenv( var, value, overwrite ); +} + +static inline char * +chameleon_getenv( const char *var ) { + return getenv( var ); +} + +static inline void +chameleon_cleanenv( char *str ) { + (void)str; +} + +#endif + + +static inline int +chameleon_env_is_set_to(char * str, char * value) { + char * val; + if ( (val = chameleon_getenv(str)) && + !strcmp(val, value)) + return 1; + return 0; +} + +static inline int +chameleon_env_on_off( char * str, int default_value ) { + if ( chameleon_env_is_set_to(str, "1") ) { + return CHAMELEON_TRUE; + } + if ( chameleon_env_is_set_to(str, "0") ) { + return CHAMELEON_FALSE; + } + return default_value; +} + +static inline int +chameleon_getenv_get_value_int(char * string, int default_value) { + long int ret; + char *str = chameleon_getenv(string); + if (str == NULL) return default_value; + + if ( sscanf( str, "%ld", &ret ) != 1 ) { + perror("sscanf"); + return default_value; + } + + return (int)ret; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _chameleon_getenv_h_ */ diff --git a/runtime/starpu/codelets/codelet_zgemm.c b/runtime/starpu/codelets/codelet_zgemm.c index 53f241f899d219846396b802e54a27df9eeeb749..cf9b4b168f1abdfe222b1cd3be504b7dfb6bf38b 100644 --- a/runtime/starpu/codelets/codelet_zgemm.c +++ b/runtime/starpu/codelets/codelet_zgemm.c @@ -11,7 +11,7 @@ * * @brief Chameleon zgemm StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -24,7 +24,7 @@ * @author Lucas Nesi * @author Loris Lucido * @author Terry Cojean - * @date 2023-01-30 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -38,10 +38,7 @@ struct cl_zgemm_args_s { int n; int k; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; - CHAM_tile_t *tileB; CHAMELEON_Complex64_t beta; - CHAM_tile_t *tileC; }; #if !defined(CHAMELEON_SIMULATION) @@ -172,10 +169,7 @@ void INSERT_TASK_zgemm_Astat( const RUNTIME_option_t *options, clargs->n = n; clargs->k = k; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback for profiling information */ @@ -194,14 +188,11 @@ void INSERT_TASK_zgemm_Astat( const RUNTIME_option_t *options, accessC = STARPU_RW; } -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 3, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( @@ -259,10 +250,7 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options, clargs->n = n; clargs->k = k; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback for profiling information */ @@ -271,15 +259,11 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options, /* Reduce the C access if needed */ accessC = ( beta == 0. ) ? STARPU_W : (STARPU_RW | ((beta == 1.) ? STARPU_COMMUTE : 0)); -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s, %s )", cl_name, - clargs->tileA->name, clargs->tileB->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 3, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_zhemm.c b/runtime/starpu/codelets/codelet_zhemm.c index d59d9f11586a1af9e9dbf4cedfecea4c90e3ba75..67fe91b28888f1532966332f275683e9c6ba5717 100644 --- a/runtime/starpu/codelets/codelet_zhemm.c +++ b/runtime/starpu/codelets/codelet_zhemm.c @@ -11,7 +11,7 @@ * * @brief Chameleon zhemm StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Loris Lucido - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c * */ @@ -33,10 +33,7 @@ struct cl_zhemm_args_s { int m; int n; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; - CHAM_tile_t *tileB; CHAMELEON_Complex64_t beta; - CHAM_tile_t *tileC; }; #if !defined(CHAMELEON_SIMULATION) @@ -164,10 +161,7 @@ void INSERT_TASK_zhemm_Astat( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback for profiling information */ @@ -186,14 +180,11 @@ void INSERT_TASK_zhemm_Astat( const RUNTIME_option_t *options, accessC = STARPU_RW; } -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 3, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( @@ -250,10 +241,7 @@ void INSERT_TASK_zhemm( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback for profiling information */ @@ -262,14 +250,11 @@ void INSERT_TASK_zhemm( const RUNTIME_option_t *options, /* Reduce the C access if needed */ accessC = ( beta == 0. ) ? STARPU_W : (STARPU_RW | ((beta == 1.) ? STARPU_COMMUTE : 0)); -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 3, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_zherk.c b/runtime/starpu/codelets/codelet_zherk.c index c07ecb157fd7378d91ede9cb0f586baf154138b4..c53607f9d1034671d29bb2a4160d26e535daf598 100644 --- a/runtime/starpu/codelets/codelet_zherk.c +++ b/runtime/starpu/codelets/codelet_zherk.c @@ -11,7 +11,7 @@ * * @brief Chameleon zherk StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -21,7 +21,7 @@ * @author Florent Pruvost * @author Gwenole Lucas * @author Loris Lucido - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c * */ @@ -34,9 +34,7 @@ struct cl_zherk_args_s { int n; int k; double alpha; - CHAM_tile_t *tileA; double beta; - CHAM_tile_t *tileC; }; #if !defined(CHAMELEON_SIMULATION) @@ -140,9 +138,7 @@ void INSERT_TASK_zherk( const RUNTIME_option_t *options, clargs->n = n; clargs->k = k; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback fro profiling information */ @@ -151,14 +147,10 @@ void INSERT_TASK_zherk( const RUNTIME_option_t *options, /* Reduce the C access if needed */ accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW; -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s )", cl_name, clargs->tileA->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 2, + A->get_blktile( A, Am, An ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_zlacpy.c b/runtime/starpu/codelets/codelet_zlacpy.c index b5251bf9c285f116bb58a70419dba29bdc0a50ce..5a0deb8da5757a4c9120703de5b82459adc0da00 100644 --- a/runtime/starpu/codelets/codelet_zlacpy.c +++ b/runtime/starpu/codelets/codelet_zlacpy.c @@ -11,7 +11,7 @@ * * @brief Chameleon zlacpy StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Julien Langou * @author Henricus Bouwmeester * @author Mathieu Faverge @@ -21,7 +21,7 @@ * @author Florent Pruvost * @author Samuel Thibault * @author Alycia Lisito - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -36,8 +36,6 @@ struct cl_zlacpy_args_s { int displB; int lda; int ldb; - CHAM_tile_t *tileA; - CHAM_tile_t *tileB; }; #if !defined(CHAMELEON_SIMULATION) @@ -102,8 +100,6 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options, clargs->n = n; clargs->displA = displA; clargs->displB = displB; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->lda = lda; clargs->ldb = ldb; } @@ -154,10 +150,8 @@ void INSERT_TASK_zlacpy( const RUNTIME_option_t *options, clargs->n = n; clargs->displA = 0; clargs->displB = 0; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); - clargs->lda = clargs->tileA->ld; - clargs->ldb = clargs->tileB->ld; + clargs->lda = A->get_blktile( A, Am, An )->ld; + clargs->ldb = B->get_blktile( B, Bm, Bn )->ld; } /* Callback fro profiling information */ diff --git a/runtime/starpu/codelets/codelet_zlascal.c b/runtime/starpu/codelets/codelet_zlascal.c index b76a71824883b3adc8c164286bb88d3212ed0aa1..19162d6388142d66808bd436e959aa048dc2b831 100644 --- a/runtime/starpu/codelets/codelet_zlascal.c +++ b/runtime/starpu/codelets/codelet_zlascal.c @@ -11,13 +11,13 @@ * * @brief Chameleon zlascal StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Dalal Sukkari * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -29,7 +29,6 @@ struct cl_zlascal_args_s { int m; int n; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; }; #if !defined(CHAMELEON_SIMULATION) @@ -82,7 +81,6 @@ void INSERT_TASK_zlascal( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); } /* Callback fro profiling information */ diff --git a/runtime/starpu/codelets/codelet_zlaset.c b/runtime/starpu/codelets/codelet_zlaset.c index 335c1fe1017783e9a4703f516ef24f904570f209..c6acdc531ba2b8b9245aca7716885672caf0a5be 100644 --- a/runtime/starpu/codelets/codelet_zlaset.c +++ b/runtime/starpu/codelets/codelet_zlaset.c @@ -11,7 +11,7 @@ * * @brief Chameleon zlaset StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Mathieu Faverge * @author Emmanuel Agullo @@ -19,7 +19,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -32,7 +32,6 @@ struct cl_zlaset_args_s { int n; CHAMELEON_Complex64_t alpha; CHAMELEON_Complex64_t beta; - CHAM_tile_t *tileA; }; #if !defined(CHAMELEON_SIMULATION) @@ -76,7 +75,6 @@ void INSERT_TASK_zlaset( const RUNTIME_option_t *options, clargs->n = n; clargs->alpha = alpha; clargs->beta = beta; - clargs->tileA = A->get_blktile( A, Am, An ); } /* Callback fro profiling information */ diff --git a/runtime/starpu/codelets/codelet_zlauum.c b/runtime/starpu/codelets/codelet_zlauum.c index bbdb2899a5758606e5a518975c3b5b3bb076368b..bc49ece66b29f26d901891c3ca6900bbee749a87 100644 --- a/runtime/starpu/codelets/codelet_zlauum.c +++ b/runtime/starpu/codelets/codelet_zlauum.c @@ -11,7 +11,7 @@ * * @brief Chameleon zlauum StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Julien Langou * @author Henricus Bouwmeester * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -29,8 +29,7 @@ struct cl_zlauum_args_s { cham_uplo_t uplo; - int n; - CHAM_tile_t *tileA; + int n; }; #if !defined(CHAMELEON_SIMULATION) @@ -70,19 +69,14 @@ void INSERT_TASK_zlauum( const RUNTIME_option_t *options, clargs = malloc( sizeof( struct cl_zlauum_args_s ) ); clargs->uplo = uplo; clargs->n = n; - clargs->tileA = A->get_blktile( A, Am, An ); } /* Callback fro profiling information */ callback = options->profiling ? cl_zlauum_callback : NULL; -#if defined(CHAMELEON_KERNELS_TRACE) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s )", cl_name, clargs->tileA->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 1, + A->get_blktile( A, Am, An ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_zplghe.c b/runtime/starpu/codelets/codelet_zplghe.c index c1abe29ead8e0624ea8f7c431ca2bf5459357d2a..34bee5797a5c7355a33d073c7b275ed6dcc5eadf 100644 --- a/runtime/starpu/codelets/codelet_zplghe.c +++ b/runtime/starpu/codelets/codelet_zplghe.c @@ -11,7 +11,7 @@ * * @brief Chameleon zplghe StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Piotr Luszczek * @author Pierre Lemarinier * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c * */ @@ -31,7 +31,6 @@ struct cl_zplghe_args_s { double bump; int m; int n; - CHAM_tile_t *tileA; int bigM; int m0; int n0; @@ -76,7 +75,6 @@ void INSERT_TASK_zplghe( const RUNTIME_option_t *options, clargs->bump = bump; clargs->m = m; clargs->n = n; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->bigM = bigM; clargs->m0 = m0; clargs->n0 = n0; diff --git a/runtime/starpu/codelets/codelet_zplgsy.c b/runtime/starpu/codelets/codelet_zplgsy.c index 3ad1ab5fa5d701d575b8ea04e0b624ecc867b25b..e39a3c69bc23ba9e16cbc9fce04734ea0332917c 100644 --- a/runtime/starpu/codelets/codelet_zplgsy.c +++ b/runtime/starpu/codelets/codelet_zplgsy.c @@ -11,7 +11,7 @@ * * @brief Chameleon zplgsy StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Piotr Luszczek * @author Pierre Lemarinier * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -31,7 +31,6 @@ struct cl_zplgsy_args_s { CHAMELEON_Complex64_t bump; int m; int n; - CHAM_tile_t *tileA; int bigM; int m0; int n0; @@ -76,7 +75,6 @@ void INSERT_TASK_zplgsy( const RUNTIME_option_t *options, clargs->bump = bump; clargs->m = m; clargs->n = n; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->bigM = bigM; clargs->m0 = m0; clargs->n0 = n0; diff --git a/runtime/starpu/codelets/codelet_zplrnt.c b/runtime/starpu/codelets/codelet_zplrnt.c index df95bf5d2189bf8d481f4178ef3444d4f2cfc8f5..33a2bee23ca7b7ee93ebe9bbbc3d6f7cff2ff00b 100644 --- a/runtime/starpu/codelets/codelet_zplrnt.c +++ b/runtime/starpu/codelets/codelet_zplrnt.c @@ -11,7 +11,7 @@ * * @brief Chameleon zplrnt StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Piotr Luszczek * @author Pierre Lemarinier * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -30,7 +30,6 @@ struct cl_zplrnt_args_s { int m; int n; - CHAM_tile_t *tileA; int bigM; int m0; int n0; @@ -75,7 +74,6 @@ void INSERT_TASK_zplrnt( const RUNTIME_option_t *options, clargs = malloc( sizeof( struct cl_zplrnt_args_s ) ); clargs->m = m; clargs->n = n; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->bigM = bigM; clargs->m0 = m0; clargs->n0 = n0; diff --git a/runtime/starpu/codelets/codelet_zpotrf.c b/runtime/starpu/codelets/codelet_zpotrf.c index dc3024575ba9ab387992b4034fb7df070a044bb8..b8b18765db71cecf6a9f79a4b3a333cb272f165d 100644 --- a/runtime/starpu/codelets/codelet_zpotrf.c +++ b/runtime/starpu/codelets/codelet_zpotrf.c @@ -11,7 +11,7 @@ * * @brief Chameleon zpotrf StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -21,7 +21,7 @@ * @author Florent Pruvost * @author Samuel Thibault * @author Terry Cojean - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -31,7 +31,6 @@ struct cl_zpotrf_args_s { cham_uplo_t uplo; int n; - CHAM_tile_t *tileA; int iinfo; RUNTIME_sequence_t *sequence; RUNTIME_request_t *request; @@ -84,7 +83,6 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options, clargs = malloc( sizeof( struct cl_zpotrf_args_s ) ); clargs->uplo = uplo; clargs->n = n; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->iinfo = iinfo; clargs->sequence = options->sequence; clargs->request = options->request; @@ -93,13 +91,9 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options, /* Callback fro profiling information */ callback = options->profiling ? cl_zpotrf_callback : NULL; -#if defined(CHAMELEON_KERNELS_TRACE) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s )", cl_name, clargs->tileA->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 1, + A->get_blktile( A, Am, An ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_zsymm.c b/runtime/starpu/codelets/codelet_zsymm.c index 865e8563f127a8198e1b41c79b7161335939022f..ed8dea80b401d87dc8bd953c169eb11d2945cb7d 100644 --- a/runtime/starpu/codelets/codelet_zsymm.c +++ b/runtime/starpu/codelets/codelet_zsymm.c @@ -11,7 +11,7 @@ * * @brief Chameleon zsymm StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -21,7 +21,7 @@ * @author Florent Pruvost * @author Romain Peressoni * @author Loris Lucido - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -34,10 +34,7 @@ struct cl_zsymm_args_s { int m; int n; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; - CHAM_tile_t *tileB; CHAMELEON_Complex64_t beta; - CHAM_tile_t *tileC; }; #if !defined(CHAMELEON_SIMULATION) @@ -165,10 +162,7 @@ void INSERT_TASK_zsymm_Astat( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback for profiling information */ @@ -187,14 +181,11 @@ void INSERT_TASK_zsymm_Astat( const RUNTIME_option_t *options, accessC = STARPU_RW; } -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 3, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( @@ -251,10 +242,7 @@ void INSERT_TASK_zsymm( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback for profiling information */ @@ -263,14 +251,11 @@ void INSERT_TASK_zsymm( const RUNTIME_option_t *options, /* Reduce the C access if needed */ accessC = ( beta == 0. ) ? STARPU_W : (STARPU_RW | ((beta == 1.) ? STARPU_COMMUTE : 0)); -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 3, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_zsyrk.c b/runtime/starpu/codelets/codelet_zsyrk.c index 049dfd4b889a15b1b87f80e280f281de12e13863..f11dd4158341615defeb35755d8c8dcabb28ebce 100644 --- a/runtime/starpu/codelets/codelet_zsyrk.c +++ b/runtime/starpu/codelets/codelet_zsyrk.c @@ -11,7 +11,7 @@ * * @brief Chameleon zsyrk StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -22,7 +22,7 @@ * @author Gwenole Lucas * @author Terry Cojean * @author Loris Lucido - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -35,9 +35,7 @@ struct cl_zsyrk_args_s { int n; int k; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; CHAMELEON_Complex64_t beta; - CHAM_tile_t *tileC; }; #if !defined(CHAMELEON_SIMULATION) @@ -141,9 +139,7 @@ void INSERT_TASK_zsyrk( const RUNTIME_option_t *options, clargs->n = n; clargs->k = k; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->beta = beta; - clargs->tileC = C->get_blktile( C, Cm, Cn ); } /* Callback fro profiling information */ @@ -152,14 +148,9 @@ void INSERT_TASK_zsyrk( const RUNTIME_option_t *options, /* Reduce the C access if needed */ accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW; -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s )", cl_name, clargs->tileA->name, clargs->tileC->name ); - cl_name = cl_fullname; - } -#endif + cl_name = chameleon_codelet_name( cl_name, 2, + A->get_blktile( A, Am, An ), + C->get_blktile( C, Cm, Cn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_ztradd.c b/runtime/starpu/codelets/codelet_ztradd.c index 8a6f28764b689581db36bbfd6e5f36175dc9add6..66fc4da3ee1e6ee84595881561b6157c6c5e2b07 100644 --- a/runtime/starpu/codelets/codelet_ztradd.c +++ b/runtime/starpu/codelets/codelet_ztradd.c @@ -11,12 +11,12 @@ * * @brief Chameleon ztradd StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Mathieu Faverge * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -29,9 +29,7 @@ struct cl_ztradd_args_s { int m; int n; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; CHAMELEON_Complex64_t beta; - CHAM_tile_t *tileB; }; #if !defined(CHAMELEON_SIMULATION) @@ -86,9 +84,7 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->beta = beta; - clargs->tileB = B->get_blktile( B, Bm, Bn ); } /* Callback fro profiling information */ diff --git a/runtime/starpu/codelets/codelet_ztrmm.c b/runtime/starpu/codelets/codelet_ztrmm.c index 31e9dd3fef53ef3b389f2c78df0486f5991fbb7e..36b31640cc56bf85d19a31900af7aab3d4ca43c0 100644 --- a/runtime/starpu/codelets/codelet_ztrmm.c +++ b/runtime/starpu/codelets/codelet_ztrmm.c @@ -11,7 +11,7 @@ * * @brief Chameleon ztrmm StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Julien Langou * @author Henricus Bouwmeester * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Loris Lucido - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -35,8 +35,6 @@ struct cl_ztrmm_args_s { int m; int n; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; - CHAM_tile_t *tileB; }; #if !defined(CHAMELEON_SIMULATION) @@ -135,21 +133,15 @@ void INSERT_TASK_ztrmm( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); } /* Callback fro profiling information */ callback = options->profiling ? cl_ztrmm_callback : NULL; -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 2, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_ztrsm.c b/runtime/starpu/codelets/codelet_ztrsm.c index 1ce23594d3f7928c03ba049e9ee043abee4c7c5a..901eeb7809ec81505559b2c3e83b4f7a4c7e1bb3 100644 --- a/runtime/starpu/codelets/codelet_ztrsm.c +++ b/runtime/starpu/codelets/codelet_ztrsm.c @@ -11,7 +11,7 @@ * * @brief Chameleon ztrsm StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Hatem Ltaief * @author Jakub Kurzak * @author Mathieu Faverge @@ -22,7 +22,7 @@ * @author Gwenole Lucas * @author Loris Lucido * @author Terry Cojean - * @date 2023-01-30 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -37,8 +37,6 @@ struct cl_ztrsm_args_s { int m; int n; CHAMELEON_Complex64_t alpha; - CHAM_tile_t *tileA; - CHAM_tile_t *tileB; }; #if !defined(CHAMELEON_SIMULATION) @@ -139,21 +137,15 @@ void INSERT_TASK_ztrsm( const RUNTIME_option_t *options, clargs->m = m; clargs->n = n; clargs->alpha = alpha; - clargs->tileA = A->get_blktile( A, Am, An ); - clargs->tileB = B->get_blktile( B, Bm, Bn ); } /* Callback fro profiling information */ callback = options->profiling ? cl_ztrsm_callback : NULL; -#if defined(CHAMELEON_KERNELS_TRACE) - if ( clargs != NULL ) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s, %s )", cl_name, clargs->tileA->name, clargs->tileB->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 2, + A->get_blktile( A, Am, An ), + B->get_blktile( B, Bm, Bn ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/codelets/codelet_ztrtri.c b/runtime/starpu/codelets/codelet_ztrtri.c index 91680c63a3caccbb50813b62c22b4cf2b441091c..19499f058f32c493d6be3216439f18e84de15d0e 100644 --- a/runtime/starpu/codelets/codelet_ztrtri.c +++ b/runtime/starpu/codelets/codelet_ztrtri.c @@ -11,7 +11,7 @@ * * @brief Chameleon ztrtri StarPU codelet * - * @version 1.2.0 + * @version 1.3.0 * @author Julien Langou * @author Henricus Bouwmeester * @author Mathieu Faverge @@ -20,7 +20,7 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * @precisions normal z -> c d s * */ @@ -31,7 +31,6 @@ struct cl_ztrtri_args_s { cham_uplo_t uplo; cham_diag_t diag; int n; - CHAM_tile_t *tileA; int iinfo; RUNTIME_sequence_t *sequence; RUNTIME_request_t *request; @@ -81,7 +80,6 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options, clargs->uplo = uplo; clargs->diag = diag; clargs->n = n; - clargs->tileA = A->get_blktile( A, Am, An ); clargs->iinfo = iinfo; clargs->sequence = options->sequence; clargs->request = options->request; @@ -90,13 +88,8 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options, /* Callback fro profiling information */ callback = options->profiling ? cl_ztrtri_callback : NULL; -#if defined(CHAMELEON_KERNELS_TRACE) - { - char *cl_fullname; - chameleon_asprintf( &cl_fullname, "%s( %s )", cl_name, clargs->tileA->name ); - cl_name = cl_fullname; - } -#endif + /* Refine name */ + cl_name = chameleon_codelet_name( cl_name, 1, A->get_blktile( A, Am, An ) ); /* Insert the task */ rt_starpu_insert_task( diff --git a/runtime/starpu/include/chameleon_starpu.h.in b/runtime/starpu/include/chameleon_starpu.h.in index 6eceaf063d23bfda2f7e6a2eb4ea1f402f929241..8e77d14a9dea84153c6b0672d63cecb3c71ed077 100644 --- a/runtime/starpu/include/chameleon_starpu.h.in +++ b/runtime/starpu/include/chameleon_starpu.h.in @@ -19,7 +19,7 @@ * @author Samuel Thibault * @author Loris Lucido * @author Terry Cojean - * @date 2023-07-05 + * @date 2023-07-06 * */ #ifndef _chameleon_starpu_h_ @@ -119,12 +119,6 @@ static inline int cham_to_starpu_access( cham_access_t accessA ) { /* * MPI Redefinitions */ -#if defined(CHAMELEON_RUNTIME_SYNC) -#define TASK_SYNCHRONOUS , STARPU_TASK_SYNCHRONOUS, 1 -#else -#define TASK_SYNCHRONOUS -#endif - #if defined(CHAMELEON_USE_MPI) #if defined(CHAMELEON_RUNTIME_SYNC) diff --git a/runtime/starpu/interface/cham_tile_interface.c b/runtime/starpu/interface/cham_tile_interface.c index 51e6a4b041fb50ff2f98f52f5830799875bc7af4..27eb801cb266a0038e77b19e04e729b68b3270f4 100644 --- a/runtime/starpu/interface/cham_tile_interface.c +++ b/runtime/starpu/interface/cham_tile_interface.c @@ -9,11 +9,11 @@ * * @brief Chameleon tile interface for StarPU * - * @version 1.2.0 + * @version 1.3.0 * @author Mathieu Faverge * @author Gwenole Lucas * @author Samuel Thibault - * @date 2022-02-22 + * @date 2023-07-06 * */ #include "chameleon_starpu.h" @@ -297,16 +297,9 @@ cti_display( starpu_data_handle_t handle, FILE *f ) starpu_cham_tile_interface_t *cham_tile_interface = (starpu_cham_tile_interface_t *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM); -#if defined(CHAMELEON_KERNELS_TRACE) - fprintf( f, "%s{.m=%u,.n=%u}", - cham_tile_interface->tile.name, - cham_tile_interface->tile.m, - cham_tile_interface->tile.n ); -#else fprintf( f, "%u\t%u\t", cham_tile_interface->tile.m, cham_tile_interface->tile.n ); -#endif } static int diff --git a/testing/parameters.c b/testing/parameters.c index 745f1c15648ecd3ca2bc6921e994407399724585..c3a7dcd900b63b4b002ec2d8e0132b97f7a84596 100644 --- a/testing/parameters.c +++ b/testing/parameters.c @@ -160,10 +160,10 @@ parameters_read_list( parameter_t *param, previous = current; current = current->next; } + assert( current == NULL ); token = strtok_r( str, delim, &saveptr ); while ( token != NULL ) { - assert( current == NULL ); current = calloc( 1, sizeof(vallist_t) ); /* Read the value */ @@ -179,7 +179,6 @@ parameters_read_list( parameter_t *param, } previous = current; - current = NULL; /* Move to the next token */ token = strtok_r( NULL, delim, &saveptr ); @@ -261,9 +260,9 @@ parameters_read_intrange( parameter_t *param, previous = current; current = current->next; } + assert( current == NULL ); while ( start <= end ) { - assert( current == NULL ); current = calloc( 1, sizeof(vallist_t) ); /* Read the value */ @@ -279,7 +278,6 @@ parameters_read_intrange( parameter_t *param, } previous = current; - current = NULL; start += step; } diff --git a/testing/testing_zgepdf_qr.c b/testing/testing_zgepdf_qr.c index 5c3f0059685aa342762285003bab6b79b5b5f68a..8c6c297c08aae4b99533d1cac0047d624e6d7039 100644 --- a/testing/testing_zgepdf_qr.c +++ b/testing/testing_zgepdf_qr.c @@ -19,6 +19,7 @@ * */ #include <chameleon.h> +#include <chameleon/getenv.h> #if !defined(CHAMELEON_SIMULATION) #include <coreblas/lapacke.h> #include <coreblas/cblas.h> @@ -58,7 +59,7 @@ testing_zgepdf_qr_desc( run_arg_list_t *args, int check ) CHAM_desc_t *descA1, *descA2, *descQ1, *descQ2; CHAM_desc_t *TS1, *TT1, *TS2, *TT2; libhqr_tree_t qrtreeT, qrtreeB; - int zqdwh_opt_id = 1; + int zqdwh_opt_id = chameleon_env_on_off( "CHAMELEON_TESTING_GEPDF_OPTID", CHAMELEON_TRUE ); CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); CHAMELEON_Set( CHAMELEON_INNER_BLOCK_SIZE, ib );