Commit 77cb5270 authored by Mathieu Faverge's avatar Mathieu Faverge

Fix memory leak with temporary descriptors

parent 55051a20
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
* Parallel tile LU factorization - dynamic scheduling * Parallel tile LU factorization - dynamic scheduling
*/ */
void chameleon_pzgetrf_incpiv( CHAM_desc_t *A, CHAM_desc_t *L, CHAM_desc_t *D, int *IPIV, void chameleon_pzgetrf_incpiv( CHAM_desc_t *A, CHAM_desc_t *L, CHAM_desc_t *D, int *IPIV,
RUNTIME_sequence_t *sequence, RUNTIME_request_t *request ) RUNTIME_sequence_t *sequence, RUNTIME_request_t *request )
{ {
CHAM_context_t *chamctxt; CHAM_context_t *chamctxt;
RUNTIME_option_t options; RUNTIME_option_t options;
......
...@@ -436,11 +436,8 @@ void chameleon_pzhetrd_he2hb(cham_uplo_t uplo, ...@@ -436,11 +436,8 @@ void chameleon_pzhetrd_he2hb(cham_uplo_t uplo,
RUNTIME_options_finalize(&options, chamctxt); RUNTIME_options_finalize(&options, chamctxt);
CHAMELEON_Sequence_Wait(sequence); CHAMELEON_Sequence_Wait(sequence);
chameleon_desc_mat_free(D); CHAMELEON_Desc_Destroy( &D );
free(D); CHAMELEON_Desc_Destroy( &AT );
chameleon_desc_mat_free(AT);
free(AT);
(void)E; (void)E;
} }
...@@ -297,6 +297,7 @@ int CHAMELEON_zgelqf_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, ...@@ -297,6 +297,7 @@ int CHAMELEON_zgelqf_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -297,6 +297,7 @@ int CHAMELEON_zgelqf_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t ...@@ -297,6 +297,7 @@ int CHAMELEON_zgelqf_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -339,6 +339,7 @@ int CHAMELEON_zgelqs_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *B, ...@@ -339,6 +339,7 @@ int CHAMELEON_zgelqs_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *B,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -346,6 +346,7 @@ int CHAMELEON_zgelqs_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t ...@@ -346,6 +346,7 @@ int CHAMELEON_zgelqs_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -435,6 +435,7 @@ int CHAMELEON_zgels_Tile_Async( cham_trans_t trans, CHAM_desc_t *A, ...@@ -435,6 +435,7 @@ int CHAMELEON_zgels_Tile_Async( cham_trans_t trans, CHAM_desc_t *A,
CHAMELEON_Desc_Flush( B, sequence ); CHAMELEON_Desc_Flush( B, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -427,6 +427,7 @@ int CHAMELEON_zgels_param_Tile_Async( const libhqr_tree_t *qrtree, cham_trans_t ...@@ -427,6 +427,7 @@ int CHAMELEON_zgels_param_Tile_Async( const libhqr_tree_t *qrtree, cham_trans_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -296,6 +296,7 @@ int CHAMELEON_zgeqrf_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, ...@@ -296,6 +296,7 @@ int CHAMELEON_zgeqrf_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -307,6 +307,7 @@ int CHAMELEON_zgeqrf_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t ...@@ -307,6 +307,7 @@ int CHAMELEON_zgeqrf_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -334,6 +334,7 @@ int CHAMELEON_zgeqrs_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *B, ...@@ -334,6 +334,7 @@ int CHAMELEON_zgeqrs_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *B,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -335,6 +335,7 @@ int CHAMELEON_zgeqrs_param_Tile_Async( const libhqr_tree_t *qrtree, ...@@ -335,6 +335,7 @@ int CHAMELEON_zgeqrs_param_Tile_Async( const libhqr_tree_t *qrtree,
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -331,6 +331,7 @@ int CHAMELEON_zgesv_incpiv_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *L, int *IPIV ...@@ -331,6 +331,7 @@ int CHAMELEON_zgesv_incpiv_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *L, int *IPIV
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
CHAMELEON_Desc_Flush( B, sequence ); CHAMELEON_Desc_Flush( B, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -632,6 +632,7 @@ int CHAMELEON_zgesvd_Tile_Async( cham_job_t jobu, cham_job_t jobvt, ...@@ -632,6 +632,7 @@ int CHAMELEON_zgesvd_Tile_Async( cham_job_t jobu, cham_job_t jobvt,
free(E); free(E);
if ( Dptr ) { if ( Dptr ) {
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -298,6 +298,7 @@ int CHAMELEON_zgetrf_incpiv_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *L, int *IPI ...@@ -298,6 +298,7 @@ int CHAMELEON_zgetrf_incpiv_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *L, int *IPI
CHAMELEON_Desc_Flush( L, sequence ); CHAMELEON_Desc_Flush( L, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -535,6 +535,7 @@ int CHAMELEON_zheevd_Tile_Async( cham_job_t jobz, cham_uplo_t uplo, ...@@ -535,6 +535,7 @@ int CHAMELEON_zheevd_Tile_Async( cham_job_t jobz, cham_uplo_t uplo,
free(V); free(V);
free(E); free(E);
if (Dptr != NULL) { if (Dptr != NULL) {
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -430,6 +430,7 @@ int CHAMELEON_zhetrd_Tile_Async( cham_job_t jobz, ...@@ -430,6 +430,7 @@ int CHAMELEON_zhetrd_Tile_Async( cham_job_t jobz,
} }
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */
if (Dptr != NULL) { if (Dptr != NULL) {
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
chameleon_desc_mat_free( &descAB ); chameleon_desc_mat_free( &descAB );
......
...@@ -426,6 +426,7 @@ int CHAMELEON_ztpgqrt_Tile_Async( int L, ...@@ -426,6 +426,7 @@ int CHAMELEON_ztpgqrt_Tile_Async( int L,
CHAMELEON_Desc_Flush( Q2, sequence ); CHAMELEON_Desc_Flush( Q2, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -322,6 +322,7 @@ int CHAMELEON_zunglq_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *Q, ...@@ -322,6 +322,7 @@ int CHAMELEON_zunglq_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *Q,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -321,6 +321,7 @@ int CHAMELEON_zunglq_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t ...@@ -321,6 +321,7 @@ int CHAMELEON_zunglq_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -319,6 +319,7 @@ int CHAMELEON_zungqr_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *Q, ...@@ -319,6 +319,7 @@ int CHAMELEON_zungqr_Tile_Async( CHAM_desc_t *A, CHAM_desc_t *T, CHAM_desc_t *Q,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -319,6 +319,7 @@ int CHAMELEON_zungqr_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t ...@@ -319,6 +319,7 @@ int CHAMELEON_zungqr_param_Tile_Async( const libhqr_tree_t *qrtree, CHAM_desc_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -383,6 +383,7 @@ int CHAMELEON_zunmlq_Tile_Async( cham_side_t side, cham_trans_t trans, ...@@ -383,6 +383,7 @@ int CHAMELEON_zunmlq_Tile_Async( cham_side_t side, cham_trans_t trans,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -382,6 +382,7 @@ int CHAMELEON_zunmlq_param_Tile_Async( const libhqr_tree_t *qrtree, cham_side_t ...@@ -382,6 +382,7 @@ int CHAMELEON_zunmlq_param_Tile_Async( const libhqr_tree_t *qrtree, cham_side_t
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -390,6 +390,7 @@ int CHAMELEON_zunmqr_Tile_Async( cham_side_t side, cham_trans_t trans, ...@@ -390,6 +390,7 @@ int CHAMELEON_zunmqr_Tile_Async( cham_side_t side, cham_trans_t trans,
CHAMELEON_Desc_Flush( T, sequence ); CHAMELEON_Desc_Flush( T, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
...@@ -389,6 +389,7 @@ int CHAMELEON_zunmqr_param_Tile_Async( const libhqr_tree_t *qrtree, ...@@ -389,6 +389,7 @@ int CHAMELEON_zunmqr_param_Tile_Async( const libhqr_tree_t *qrtree,
CHAMELEON_Desc_Flush( TT, sequence ); CHAMELEON_Desc_Flush( TT, sequence );
CHAMELEON_Desc_Flush( Dptr, sequence ); CHAMELEON_Desc_Flush( Dptr, sequence );
chameleon_sequence_wait( chamctxt, sequence ); chameleon_sequence_wait( chamctxt, sequence );
RUNTIME_desc_destroy( Dptr );
chameleon_desc_mat_free( Dptr ); chameleon_desc_mat_free( Dptr );
} }
(void)D; (void)D;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment