diff --git a/compute/pzhetrd_he2hb.c b/compute/pzhetrd_he2hb.c index 74c3396149dfc3a4e1d34e129ca2676dcb31f7f8..98301f2b214dc8ddfda207f630f4c324c8137ef0 100644 --- a/compute/pzhetrd_he2hb.c +++ b/compute/pzhetrd_he2hb.c @@ -99,6 +99,7 @@ void morse_pzhetrd_he2hb(MORSE_enum uplo, MorseComplexDouble, A->mb, A->nb, (A->mb*A->nb), chameleon_min(A->mt, A->nt) * A->mb, A->nb, 0, 0, chameleon_min(A->mt, A->nt) * A->mb, A->nb, 1, 1); morse_desc_mat_alloc( AT ); + RUNTIME_desc_create( AT ); /* Let's extract the diagonal in a temporary copy that contains A and A' */ for (k = 1; k < A->nt; k++){ diff --git a/control/compute_z.h b/control/compute_z.h index 617fbff4740188ef2c5d1494d8495e817bc2b362..168277b4be24bcdaf37024488cfc93aef9e0cfb1 100644 --- a/control/compute_z.h +++ b/control/compute_z.h @@ -42,7 +42,8 @@ descA = morse_desc_init_diag( \ MorseComplexDouble, (mb), (nb), ((mb)*(nb)), \ (m), (n), (i), (j), (m), (n), p, q); \ - morse_desc_mat_alloc( &(descA) ); + morse_desc_mat_alloc( &(descA) ); \ + RUNTIME_desc_create( &(descA) ); #define morse_zdesc_alloc( descA, mb, nb, lm, ln, i, j, m, n, free) \ descA = morse_desc_init( \ @@ -52,7 +53,8 @@ morse_error( __func__, "morse_desc_mat_alloc() failed"); \ {free;}; \ return MORSE_ERR_OUT_OF_RESOURCES; \ - } + } \ + RUNTIME_desc_create( &(descA) ); /***************************************************************************//** * Declarations of internal sequential functions @@ -175,17 +177,15 @@ morse_zlap2tile( MORSE_context_t *morse, *descAt = morse_desc_init( MorseComplexDouble, mb, nb, (mb)*(nb), lm, ln, 0, 0, m, n, 1, 1 ); - RUNTIME_desc_create( descAl ); - RUNTIME_desc_create( descAt ); - if ( MORSE_TRANSLATION == MORSE_OUTOFPLACE ) { if ( morse_desc_mat_alloc( descAt ) ) { morse_error( "morse_zlap2tile", "morse_desc_mat_alloc() failed"); - - RUNTIME_desc_destroy( descAl ); - RUNTIME_desc_destroy( descAt ); return MORSE_ERR_OUT_OF_RESOURCES; } + + RUNTIME_desc_create( descAl ); + RUNTIME_desc_create( descAt ); + if ( mode & MorseDescInput ) { morse_pzlacpy( uplo, descAl, descAt, seq, req ); } @@ -193,6 +193,10 @@ morse_zlap2tile( MORSE_context_t *morse, else { morse_fatal_error( "morse_zlap2tile", "INPLACE translation not supported yet"); descAt->mat = A; + + RUNTIME_desc_create( descAl ); + RUNTIME_desc_create( descAt ); + if ( mode & MorseDescInput ) { /* MORSE_zgecfi_Async( lm, ln, A, MorseCM, mb, nb, */ /* MorseCCRB, mb, nb, seq, req ); */ diff --git a/control/descriptor.c b/control/descriptor.c index c9d121c510e5dc404aa7671e1d8da31ab949b208..74dab8e340254dcd70d0153708b81bdde653161b 100644 --- a/control/descriptor.c +++ b/control/descriptor.c @@ -307,7 +307,6 @@ int morse_desc_check(const MORSE_desc_t *desc) **/ int morse_desc_mat_alloc( MORSE_desc_t *desc ) { - size_t size = (size_t)(desc->llm) * (size_t)(desc->lln) * (size_t)MORSE_Element_Size(desc->dtyp); if ((desc->mat = RUNTIME_malloc(size)) == NULL) { @@ -317,7 +316,6 @@ int morse_desc_mat_alloc( MORSE_desc_t *desc ) /* The matrix has already been registered by the Runtime alloc */ desc->register_mat = 0; - RUNTIME_desc_create(desc); return MORSE_SUCCESS; } @@ -327,8 +325,6 @@ int morse_desc_mat_alloc( MORSE_desc_t *desc ) **/ int morse_desc_mat_free( MORSE_desc_t *desc ) { - RUNTIME_desc_destroy( desc ); - if ( (desc->mat != NULL) && (desc->use_mat == 1 ) && (desc->alloc_mat == 1 ) ) diff --git a/control/workspace.c b/control/workspace.c index efcb49f8c9f5be51ed3f9cbf6cdc3bcaff815b69..852402979c754194e26fec04c906ea8dfe47b941 100644 --- a/control/workspace.c +++ b/control/workspace.c @@ -94,6 +94,8 @@ int morse_alloc_ibnb_tile(int M, int N, MORSE_enum func, int type, MORSE_desc_t return MORSE_ERR_OUT_OF_RESOURCES; } + RUNTIME_desc_create( *desc ); + /* Check that everything is ok */ status = morse_desc_check(*desc); if (status != MORSE_SUCCESS) { @@ -156,6 +158,8 @@ int morse_alloc_ipiv(int M, int N, MORSE_enum func, int type, MORSE_desc_t **des return MORSE_ERR_OUT_OF_RESOURCES; } + RUNTIME_desc_create( *desc ); + return MORSE_SUCCESS; } diff --git a/coreblas/compute/core_zgetrf_incpiv.c b/coreblas/compute/core_zgetrf_incpiv.c index 220d8794e04617a0632f892ac51ec1e8ed6a6724..52456b02751661c7d2cf7bea897fb8d09ea23b7f 100644 --- a/coreblas/compute/core_zgetrf_incpiv.c +++ b/coreblas/compute/core_zgetrf_incpiv.c @@ -86,9 +86,9 @@ * ******************************************************************************/ -int CORE_zgetrf_incpiv(int M, int N, int IB, - MORSE_Complex64_t *A, int LDA, - int *IPIV, int *INFO) +int CORE_zgetrf_incpiv( int M, int N, int IB, + MORSE_Complex64_t *A, int LDA, + int *IPIV, int *INFO ) { int i, j, k, sb; int iinfo;