Commit e1129800 authored by Mathieu Faverge's avatar Mathieu Faverge

Add cleanup

parent 6a341c23
......@@ -130,12 +130,14 @@ int MORSE_zbuild( MORSE_enum uplo, int M, int N,
/* Call the tile interface */
MORSE_zbuild_Tile_Async(uplo, &descA, user_data, user_build_callback, sequence, &request );
/* Submit the matrix conversion back */
morse_ztile2lap( morse, &descAl, &descAt,
MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -169,8 +169,9 @@ int MORSE_zgeadd(MORSE_enum trans, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -135,7 +135,8 @@ int MORSE_zgelqf(int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -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);
}
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -132,7 +132,8 @@ int MORSE_zgelqf_param(const libhqr_tree_t *qrtree, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -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);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -154,8 +154,9 @@ int MORSE_zgelqs(int M, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
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,
}
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -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_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -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);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -196,8 +196,9 @@ int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -428,7 +429,7 @@ int MORSE_zgels_Tile_Async(MORSE_enum trans, MORSE_desc_t *A,
free(subB);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -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_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -416,7 +417,7 @@ int MORSE_zgels_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum trans,
free(subB);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -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_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -134,7 +134,8 @@ int MORSE_zgeqrf(int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -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);
}
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -137,7 +137,8 @@ int MORSE_zgeqrf_param(const libhqr_tree_t *qrtree, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -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);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -154,8 +154,9 @@ int MORSE_zgeqrs(int M, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
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,
free(subB);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -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_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -325,7 +326,7 @@ int MORSE_zgeqrs_param_Tile_Async(const libhqr_tree_t *qrtree,
free(subB);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -153,8 +153,9 @@ int MORSE_zgesv_incpiv(int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -152,8 +152,9 @@ int MORSE_zgesv_nopiv(int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -227,7 +227,8 @@ int MORSE_zgesvd(MORSE_enum jobu, MORSE_enum jobvt,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -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 );
}
#endif /* !defined(CHAMELEON_SIMULATION) */
morse_desc_mat_free(&descAB);
morse_ztile2lap_cleanup( morse, &descABl, &descABt );
/* Transform U and Vt into tile format */
if ( jobu != MorseNoVec ) {
......@@ -626,7 +627,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
morse_desc_mat_free( &descVT );
free(E);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -136,7 +136,8 @@ int MORSE_zgetrf_incpiv(int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -129,7 +129,8 @@ int MORSE_zgetrf_nopiv(int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -157,8 +157,9 @@ int MORSE_zgetrs_incpiv(MORSE_enum trans, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -151,8 +151,9 @@ int MORSE_zgetrs_nopiv(MORSE_enum trans, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -165,7 +165,8 @@ int MORSE_zheevd(MORSE_enum jobz, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -465,7 +466,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
/* V from LAPACKE_zstedc refers to V (lapack layout) */
/* 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_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_desc_mat_free(&(descQ2)); morse_desc_mat_free(&(descV)) );
if (uplo == MorseLower)
......@@ -520,15 +521,16 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
morse_sequence_wait(morse, sequence);
free(subA); free(subQ); free(subT);
morse_desc_mat_free(&descQ2);
morse_ztile2lap_cleanup( morse, &descQ2l, &descQ2t );
free(Q2);
morse_desc_mat_free(&descV);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descVl, &descVt );
free(V);
free(E);
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
(void)D;
return MORSE_SUCCESS;
......
......@@ -191,9 +191,10 @@ int MORSE_zhemm(MORSE_enum side, MORSE_enum uplo, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -195,9 +195,10 @@ int MORSE_zher2k(MORSE_enum uplo, MORSE_enum trans, int N, int K,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -179,8 +179,9 @@ int MORSE_zherk(MORSE_enum uplo, MORSE_enum trans, int N, int K,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -179,7 +179,8 @@ int MORSE_zhetrd(MORSE_enum jobz, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......@@ -429,9 +430,9 @@ int MORSE_zhetrd_Tile_Async(MORSE_enum jobz,
}
#endif /* !defined(CHAMELEON_SIMULATION) */
if (Dptr != NULL) {
morse_desc_mat_free(Dptr);
morse_ztile2lap_cleanup( morse, &Dptrl, &Dptrt );
}
morse_desc_mat_free(&descAB);
morse_ztile2lap_cleanup( morse, &descABl, &descABt );
(void)D;
return MORSE_SUCCESS;
}
......@@ -145,8 +145,9 @@ int MORSE_zlacpy(MORSE_enum uplo, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_sequence_destroy(morse, sequence);
return MORSE_SUCCESS;
......
......@@ -148,7 +148,8 @@ double MORSE_zlange(MORSE_enum norm, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_sequence_destroy(morse, sequence);
return value;
......
......@@ -148,7 +148,8 @@ double MORSE_zlanhe(MORSE_enum norm, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_sequence_destroy(morse, sequence);
return value;
......
......@@ -145,7 +145,8 @@ double MORSE_zlansy(MORSE_enum norm, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_sequence_destroy(morse, sequence);
return value;
......
......@@ -165,7 +165,8 @@ double MORSE_zlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_sequence_destroy(morse, sequence);
return value;
......
......@@ -125,7 +125,7 @@ int MORSE_zlascal(MORSE_enum uplo, int M, int N,
morse_ztile2lap( morse, &descAl, &descAt,
MorseUpperLower, sequence, &request );
RUNTIME_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -138,7 +138,8 @@ int MORSE_zlaset(MORSE_enum uplo, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_sequence_destroy(morse, sequence);
return MORSE_SUCCESS;
......
......@@ -134,7 +134,8 @@ int MORSE_zlauum(MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -125,7 +125,8 @@ int MORSE_zplghe( double bump, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -125,7 +125,8 @@ int MORSE_zplgsy( MORSE_Complex64_t bump, MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -122,7 +122,8 @@ int MORSE_zplrnt( int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -166,8 +166,9 @@ int MORSE_zposv(MORSE_enum uplo, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -131,7 +131,8 @@ int MORSE_zpotri(MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -149,9 +149,10 @@ int MORSE_zpotrimm(MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -148,8 +148,9 @@ int MORSE_zpotrs(MORSE_enum uplo, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -191,9 +191,10 @@ int MORSE_zsymm(MORSE_enum side, MORSE_enum uplo, int M, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -195,9 +195,10 @@ int MORSE_zsyr2k(MORSE_enum uplo, MORSE_enum trans, int N, int K,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -179,8 +179,9 @@ int MORSE_zsyrk(MORSE_enum uplo, MORSE_enum trans, int N, int K,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descC);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -163,8 +163,9 @@ int MORSE_zsysv(MORSE_enum uplo, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -135,7 +135,8 @@ int MORSE_zsytrf(MORSE_enum uplo, int N,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -147,8 +147,9 @@ int MORSE_zsytrs(MORSE_enum uplo, int N, int NRHS,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descA);
morse_desc_mat_free(&descB);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
......
......@@ -228,10 +228,11 @@ int MORSE_ztpgqrt( int M, int N, int K, int L,
morse_sequence_wait(morse, sequence);
morse_desc_mat_free(&descV1);
morse_desc_mat_free(&descV2);
morse_desc_mat_free(&descQ1);
morse_desc_mat_free(&descQ2);
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descV1l, &descV1t );
morse_ztile2lap_cleanup( morse, &descV2l, &descV2t );
morse_ztile2lap_cleanup( morse, &descQ1l, &descQ1t );
morse_ztile2lap_cleanup( morse, &descQ2l, &descQ2t );
status = sequence->status;