Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9aeafbb5 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

starpu/lacpy: Fix a huge memory leak whan using the starpu_data_cpy family...

starpu/lacpy: Fix a huge memory leak whan using the starpu_data_cpy family functions instead of lacpy
parent 506fd629
No related branches found
No related tags found
1 merge request!425Disable StarPU/lapcy optimization for now and Fix a major issue with descriptor global allocation in distributed
......@@ -132,12 +132,10 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
int displA, const CHAM_desc_t *A, int Am, int An, int lda,
int displB, const CHAM_desc_t *B, int Bm, int Bn, int ldb )
{
struct cl_zlacpy_args_s *clargs = NULL;
void (*callback)(void*);
int exec = 0;
char *cl_name = "zlacpyx";
CHAM_tile_t *tileA = A->get_blktile( A, Am, An );
CHAM_tile_t *tileB = B->get_blktile( B, Bm, Bn );
int exec = 0;
char *cl_name = "zlacpyx";
CHAM_tile_t *tileA = A->get_blktile( A, Am, An );
CHAM_tile_t *tileB = B->get_blktile( B, Bm, Bn );
/* Handle cache */
CHAMELEON_BEGIN_ACCESS_DECLARATION;
......@@ -146,20 +144,6 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
exec = __chameleon_need_exec;
CHAMELEON_END_ACCESS_DECLARATION;
if ( exec ) {
clargs = malloc( sizeof( struct cl_zlacpy_args_s ) );
clargs->uplo = uplo;
clargs->m = m;
clargs->n = n;
clargs->displA = displA;
clargs->displB = displB;
clargs->lda = lda;
clargs->ldb = ldb;
}
/* Callback fro profiling information */
callback = options->profiling ? cl_zlacpyx_callback : NULL;
#if !defined(CHAMELEON_USE_MPI) || defined(HAVE_STARPU_MPI_DATA_CPY_PRIORITY)
/* Insert the task */
if ( (uplo == ChamUpperLower) &&
......@@ -180,6 +164,23 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
else
#endif
{
struct cl_zlacpy_args_s *clargs = NULL;
void (*callback)(void*);
if ( exec ) {
clargs = malloc( sizeof( struct cl_zlacpy_args_s ) );
clargs->uplo = uplo;
clargs->m = m;
clargs->n = n;
clargs->displA = displA;
clargs->displB = displB;
clargs->lda = lda;
clargs->ldb = ldb;
}
/* Callback fro profiling information */
callback = options->profiling ? cl_zlacpyx_callback : NULL;
/* Insert the task */
rt_starpu_insert_task(
&cl_zlacpyx,
......@@ -208,12 +209,10 @@ void INSERT_TASK_zlacpy( const RUNTIME_option_t *options,
const CHAM_desc_t *A, int Am, int An,
const CHAM_desc_t *B, int Bm, int Bn )
{
struct cl_zlacpy_args_s *clargs = NULL;
void (*callback)(void*);
int exec = 0;
char *cl_name = "zlacpy";
CHAM_tile_t *tileA = A->get_blktile( A, Am, An );
CHAM_tile_t *tileB = B->get_blktile( B, Bm, Bn );
int exec = 0;
char *cl_name = "zlacpy";
CHAM_tile_t *tileA = A->get_blktile( A, Am, An );
CHAM_tile_t *tileB = B->get_blktile( B, Bm, Bn );
/* Handle cache */
CHAMELEON_BEGIN_ACCESS_DECLARATION;
......@@ -222,20 +221,6 @@ void INSERT_TASK_zlacpy( const RUNTIME_option_t *options,
exec = __chameleon_need_exec;
CHAMELEON_END_ACCESS_DECLARATION;
if ( exec ) {
clargs = malloc( sizeof( struct cl_zlacpy_args_s ) );
clargs->uplo = uplo;
clargs->m = m;
clargs->n = n;
clargs->displA = 0;
clargs->displB = 0;
clargs->lda = tileA->ld;
clargs->ldb = tileB->ld;
}
/* Callback fro profiling information */
callback = options->profiling ? cl_zlacpy_callback : NULL;
#if !defined(CHAMELEON_USE_MPI) || defined(HAVE_STARPU_MPI_DATA_CPY_PRIORITY)
/* Insert the task */
if ( (uplo == ChamUpperLower) &&
......@@ -255,6 +240,23 @@ void INSERT_TASK_zlacpy( const RUNTIME_option_t *options,
else
#endif
{
struct cl_zlacpy_args_s *clargs = NULL;
void (*callback)(void*);
if ( exec ) {
clargs = malloc( sizeof( struct cl_zlacpy_args_s ) );
clargs->uplo = uplo;
clargs->m = m;
clargs->n = n;
clargs->displA = 0;
clargs->displB = 0;
clargs->lda = tileA->ld;
clargs->ldb = tileB->ld;
}
/* Callback for profiling information */
callback = options->profiling ? cl_zlacpy_callback : NULL;
rt_starpu_insert_task(
&cl_zlacpy,
/* Task codelet arguments */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment