Commit e1129800 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Add cleanup

parent 6a341c23
...@@ -130,12 +130,14 @@ int MORSE_zbuild( MORSE_enum uplo, int M, int N, ...@@ -130,12 +130,14 @@ int MORSE_zbuild( MORSE_enum uplo, int M, int N,
/* Call the tile interface */ /* Call the tile interface */
MORSE_zbuild_Tile_Async(uplo, &descA, user_data, user_build_callback, sequence, &request ); MORSE_zbuild_Tile_Async(uplo, &descA, user_data, user_build_callback, sequence, &request );
/* Submit the matrix conversion back */
morse_ztile2lap( morse, &descAl, &descAt, morse_ztile2lap( morse, &descAl, &descAt,
MorseUpperLower, sequence, &request ); MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -169,8 +169,9 @@ int MORSE_zgeadd(MORSE_enum trans, int M, int N, ...@@ -169,8 +169,9 @@ int MORSE_zgeadd(MORSE_enum trans, int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -135,7 +135,8 @@ int MORSE_zgelqf(int M, int N, ...@@ -135,7 +135,8 @@ int MORSE_zgelqf(int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -292,7 +293,7 @@ int MORSE_zgelqf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, ...@@ -292,7 +293,7 @@ int MORSE_zgelqf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T,
morse_pzgelqfrh(A, T, Dptr, MORSE_RHBLK, sequence, request); morse_pzgelqfrh(A, T, Dptr, MORSE_RHBLK, sequence, request);
} }
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -132,7 +132,8 @@ int MORSE_zgelqf_param(const libhqr_tree_t *qrtree, int M, int N, ...@@ -132,7 +132,8 @@ int MORSE_zgelqf_param(const libhqr_tree_t *qrtree, int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -288,7 +289,7 @@ int MORSE_zgelqf_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, ...@@ -288,7 +289,7 @@ int MORSE_zgelqf_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A,
morse_pzgelqf_param(qrtree, A, TS, TT, Dptr, sequence, request); morse_pzgelqf_param(qrtree, A, TS, TT, Dptr, sequence, request);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -154,8 +154,9 @@ int MORSE_zgelqs(int M, int N, int NRHS, ...@@ -154,8 +154,9 @@ int MORSE_zgelqs(int M, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -332,7 +333,7 @@ int MORSE_zgelqs_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B, ...@@ -332,7 +333,7 @@ int MORSE_zgelqs_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B,
} }
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -156,8 +156,9 @@ int MORSE_zgelqs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS, ...@@ -156,8 +156,9 @@ int MORSE_zgelqs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -335,7 +336,7 @@ int MORSE_zgelqs_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, ...@@ -335,7 +336,7 @@ int MORSE_zgelqs_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A,
morse_pzunmlq_param(qrtree, MorseLeft, MorseConjTrans, A, B, TS, TT, Dptr, sequence, request); morse_pzunmlq_param(qrtree, MorseLeft, MorseConjTrans, A, B, TS, TT, Dptr, sequence, request);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -196,8 +196,9 @@ int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS, ...@@ -196,8 +196,9 @@ int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -428,7 +429,7 @@ int MORSE_zgels_Tile_Async(MORSE_enum trans, MORSE_desc_t *A, ...@@ -428,7 +429,7 @@ int MORSE_zgels_Tile_Async(MORSE_enum trans, MORSE_desc_t *A,
free(subB); free(subB);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -197,8 +197,9 @@ int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int ...@@ -197,8 +197,9 @@ int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -416,7 +417,7 @@ int MORSE_zgels_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum trans, ...@@ -416,7 +417,7 @@ int MORSE_zgels_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum trans,
free(subB); free(subB);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -228,9 +228,10 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K, ...@@ -228,9 +228,10 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_desc_mat_free(&descC); morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -134,7 +134,8 @@ int MORSE_zgeqrf(int M, int N, ...@@ -134,7 +134,8 @@ int MORSE_zgeqrf(int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -291,7 +292,7 @@ int MORSE_zgeqrf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, ...@@ -291,7 +292,7 @@ int MORSE_zgeqrf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T,
morse_pzgeqrfrh(A, T, Dptr, MORSE_RHBLK, sequence, request); morse_pzgeqrfrh(A, T, Dptr, MORSE_RHBLK, sequence, request);
} }
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -137,7 +137,8 @@ int MORSE_zgeqrf_param(const libhqr_tree_t *qrtree, int M, int N, ...@@ -137,7 +137,8 @@ int MORSE_zgeqrf_param(const libhqr_tree_t *qrtree, int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -298,7 +299,7 @@ int MORSE_zgeqrf_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, ...@@ -298,7 +299,7 @@ int MORSE_zgeqrf_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A,
morse_pzgeqrf_param(qrtree, A, TS, TT, Dptr, sequence, request); morse_pzgeqrf_param(qrtree, A, TS, TT, Dptr, sequence, request);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -154,8 +154,9 @@ int MORSE_zgeqrs(int M, int N, int NRHS, ...@@ -154,8 +154,9 @@ int MORSE_zgeqrs(int M, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -328,7 +329,7 @@ int MORSE_zgeqrs_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B, ...@@ -328,7 +329,7 @@ int MORSE_zgeqrs_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B,
free(subB); free(subB);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -149,8 +149,9 @@ int MORSE_zgeqrs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS, ...@@ -149,8 +149,9 @@ int MORSE_zgeqrs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -325,7 +326,7 @@ int MORSE_zgeqrs_param_Tile_Async(const libhqr_tree_t *qrtree, ...@@ -325,7 +326,7 @@ int MORSE_zgeqrs_param_Tile_Async(const libhqr_tree_t *qrtree,
free(subB); free(subB);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -153,8 +153,9 @@ int MORSE_zgesv_incpiv(int N, int NRHS, ...@@ -153,8 +153,9 @@ int MORSE_zgesv_incpiv(int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -152,8 +152,9 @@ int MORSE_zgesv_nopiv(int N, int NRHS, ...@@ -152,8 +152,9 @@ int MORSE_zgesv_nopiv(int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -227,7 +227,8 @@ int MORSE_zgesvd(MORSE_enum jobu, MORSE_enum jobvt, ...@@ -227,7 +227,8 @@ int MORSE_zgesvd(MORSE_enum jobu, MORSE_enum jobvt,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -547,7 +548,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt, ...@@ -547,7 +548,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
fprintf(stderr, "MORSE_zgesvd_Tile_Async: LAPACKE_zgbbrd = %d\n", info ); fprintf(stderr, "MORSE_zgesvd_Tile_Async: LAPACKE_zgbbrd = %d\n", info );
} }
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */
morse_desc_mat_free(&descAB); morse_ztile2lap_cleanup( morse, &descABl, &descABt );
/* Transform U and Vt into tile format */ /* Transform U and Vt into tile format */
if ( jobu != MorseNoVec ) { if ( jobu != MorseNoVec ) {
...@@ -626,7 +627,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt, ...@@ -626,7 +627,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
morse_desc_mat_free( &descVT ); morse_desc_mat_free( &descVT );
free(E); free(E);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -136,7 +136,8 @@ int MORSE_zgetrf_incpiv(int M, int N, ...@@ -136,7 +136,8 @@ int MORSE_zgetrf_incpiv(int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -129,7 +129,8 @@ int MORSE_zgetrf_nopiv(int M, int N, ...@@ -129,7 +129,8 @@ int MORSE_zgetrf_nopiv(int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -157,8 +157,9 @@ int MORSE_zgetrs_incpiv(MORSE_enum trans, int N, int NRHS, ...@@ -157,8 +157,9 @@ int MORSE_zgetrs_incpiv(MORSE_enum trans, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -151,8 +151,9 @@ int MORSE_zgetrs_nopiv(MORSE_enum trans, int N, int NRHS, ...@@ -151,8 +151,9 @@ int MORSE_zgetrs_nopiv(MORSE_enum trans, int N, int NRHS,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -165,7 +165,8 @@ int MORSE_zheevd(MORSE_enum jobz, MORSE_enum uplo, int N, ...@@ -165,7 +165,8 @@ int MORSE_zheevd(MORSE_enum jobz, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
...@@ -465,7 +466,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo, ...@@ -465,7 +466,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
/* V from LAPACKE_zstedc refers to V (lapack layout) */ /* V from LAPACKE_zstedc refers to V (lapack layout) */
/* The final eigenvectors are (Q1 Q2 V) or (Q1^h Q2 V) */ /* The final eigenvectors are (Q1 Q2 V) or (Q1^h Q2 V) */
morse_zooplap2tile( descQ2, Q2, NB, NB, N, N, 0, 0, N, N, sequence, request, morse_zooplap2tile( descQ2, Q2, NB, NB, N, N, 0, 0, N, N, sequence, request,
morse_desc_mat_free(&(descQ2)) ); morse_ztile2lap_cleanup( morse, &(descQ2)) l, &(descQ2)) t );
morse_zooplap2tile( descV, V, NB, NB, N, N, 0, 0, N, N, sequence, request, morse_zooplap2tile( descV, V, NB, NB, N, N, 0, 0, N, N, sequence, request,
morse_desc_mat_free(&(descQ2)); morse_desc_mat_free(&(descV)) ); morse_desc_mat_free(&(descQ2)); morse_desc_mat_free(&(descV)) );
if (uplo == MorseLower) if (uplo == MorseLower)
...@@ -520,15 +521,16 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo, ...@@ -520,15 +521,16 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
free(subA); free(subQ); free(subT); free(subA); free(subQ); free(subT);
morse_desc_mat_free(&descQ2); morse_ztile2lap_cleanup( morse, &descQ2l, &descQ2t );
free(Q2); free(Q2);
morse_desc_mat_free(&descV); /* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descVl, &descVt );
free(V); free(V);
free(E); free(E);
if (Dptr != NULL) { if (Dptr != NULL) {
morse_desc_mat_free(Dptr); morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
} }
(void)D; (void)D;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -191,9 +191,10 @@ int MORSE_zhemm(MORSE_enum side, MORSE_enum uplo, int M, int N, ...@@ -191,9 +191,10 @@ int MORSE_zhemm(MORSE_enum side, MORSE_enum uplo, int M, int N,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_desc_mat_free(&descC); morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status; status = sequence->status;
morse_sequence_destroy(morse, sequence); morse_sequence_destroy(morse, sequence);
......
...@@ -195,9 +195,10 @@ int MORSE_zher2k(MORSE_enum uplo, MORSE_enum trans, int N, int K, ...@@ -195,9 +195,10 @@ int MORSE_zher2k(MORSE_enum uplo, MORSE_enum trans, int N, int K,
morse_sequence_wait(morse, sequence); morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA); /* Cleanup the temporary data */
morse_desc_mat_free(&descB); morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_desc_mat_free(&descC);