Commit 22967f1a authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'error_code' into 'master'

save the exit status of kernels when possible

Closes #64

See merge request solverstack/chameleon!117
parents 9b9aea35 355f28be
...@@ -30,7 +30,7 @@ CORE_map_parsec( parsec_execution_stream_t *context, ...@@ -30,7 +30,7 @@ CORE_map_parsec( parsec_execution_stream_t *context,
void *op_args; void *op_args;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, desc, uplo, m, n, data, operator, op_args ); this_task, &desc, &uplo, &m, &n, &data, &operator, &op_args );
operator( desc, uplo, m, n, data, op_args ); operator( desc, uplo, m, n, data, op_args );
(void)context; (void)context;
......
...@@ -31,13 +31,19 @@ CORE_zgetrf_parsec( parsec_execution_stream_t *context, ...@@ -31,13 +31,19 @@ CORE_zgetrf_parsec( parsec_execution_stream_t *context,
int *IPIV; int *IPIV;
cham_bool_t *check_info; cham_bool_t *check_info;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info; int info;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &m, &n, &A, &lda, &IPIV, &check_info, &iinfo ); this_task, &m, &n, &A, &lda, &IPIV, &check_info, &iinfo, &sequence, &request );
CORE_zgetrf( m, n, A, lda, IPIV, &info ); CORE_zgetrf( m, n, A, lda, IPIV, &info );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
(void)context; (void)context;
return PARSEC_HOOK_RETURN_DONE; return PARSEC_HOOK_RETURN_DONE;
} }
...@@ -52,12 +58,14 @@ void INSERT_TASK_zgetrf(const RUNTIME_option_t *options, ...@@ -52,12 +58,14 @@ void INSERT_TASK_zgetrf(const RUNTIME_option_t *options,
parsec_dtd_taskpool_insert_task( parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_zgetrf_parsec, options->priority, "getrf", PARSEC_dtd_taskpool, CORE_zgetrf_parsec, options->priority, "getrf",
sizeof(int), &m, VALUE, sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE, sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY, PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY,
sizeof(int), &lda, VALUE, sizeof(int), &lda, VALUE,
sizeof(int)*nb, IPIV, SCRATCH, sizeof(int)*nb, IPIV, SCRATCH,
sizeof(cham_bool_t), &check_info, VALUE, sizeof(cham_bool_t), &check_info, VALUE,
sizeof(int), &iinfo, VALUE, sizeof(int), &iinfo, VALUE,
sizeof(RUNTIME_sequence_t*), &(options->sequence), VALUE,
sizeof(RUNTIME_request_t*), &(options->request), VALUE,
PARSEC_DTD_ARG_END ); PARSEC_DTD_ARG_END );
} }
...@@ -86,14 +86,19 @@ CORE_zgetrf_incpiv_parsec( parsec_execution_stream_t *context, ...@@ -86,14 +86,19 @@ CORE_zgetrf_incpiv_parsec( parsec_execution_stream_t *context,
int *IPIV; int *IPIV;
cham_bool_t *check_info; cham_bool_t *check_info;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info; int info;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &m, &n, &ib, &A, &lda, &IPIV, &check_info, &iinfo ); this_task, &m, &n, &ib, &A, &lda, &IPIV, &check_info, &iinfo, &sequence, &request );
CORE_zgetrf_incpiv( m, n, ib, A, lda, IPIV, &info ); CORE_zgetrf_incpiv( m, n, ib, A, lda, IPIV, &info );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
(void)context; (void)context;
return PARSEC_HOOK_RETURN_DONE; return PARSEC_HOOK_RETURN_DONE;
} }
...@@ -109,14 +114,16 @@ void INSERT_TASK_zgetrf_incpiv( const RUNTIME_option_t *options, ...@@ -109,14 +114,16 @@ void INSERT_TASK_zgetrf_incpiv( const RUNTIME_option_t *options,
parsec_dtd_taskpool_insert_task( parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_zgetrf_incpiv_parsec, options->priority, "getrf_inc", PARSEC_dtd_taskpool, CORE_zgetrf_incpiv_parsec, options->priority, "getrf_inc",
sizeof(int), &m, VALUE, sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE, sizeof(int), &n, VALUE,
sizeof(int), &ib, VALUE, sizeof(int), &ib, VALUE,
PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY, PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY,
sizeof(int), &lda, VALUE, sizeof(int), &lda, VALUE,
sizeof(int*), &IPIV, VALUE, sizeof(int*), &IPIV, VALUE,
sizeof(int), &check_info, VALUE, sizeof(int), &check_info, VALUE,
sizeof(int), &iinfo, VALUE, sizeof(int), &iinfo, VALUE,
sizeof(RUNTIME_sequence_t*), &(options->sequence), VALUE,
sizeof(RUNTIME_request_t*), &(options->request), VALUE,
PARSEC_DTD_ARG_END ); PARSEC_DTD_ARG_END );
(void)L; (void)L;
......
...@@ -77,13 +77,19 @@ CORE_zgetrf_nopiv_parsec( parsec_execution_stream_t *context, ...@@ -77,13 +77,19 @@ CORE_zgetrf_nopiv_parsec( parsec_execution_stream_t *context,
CHAMELEON_Complex64_t *A; CHAMELEON_Complex64_t *A;
int lda; int lda;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info; int info;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &m, &n, &ib, &A, &lda, &iinfo ); this_task, &m, &n, &ib, &A, &lda, &iinfo, &sequence, &request );
CORE_zgetrf_nopiv( m, n, ib, A, lda, &info ); CORE_zgetrf_nopiv( m, n, ib, A, lda, &info );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
(void)context; (void)context;
return PARSEC_HOOK_RETURN_DONE; return PARSEC_HOOK_RETURN_DONE;
} }
...@@ -97,12 +103,14 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options, ...@@ -97,12 +103,14 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options,
parsec_dtd_taskpool_insert_task( parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_zgetrf_nopiv_parsec, options->priority, "getrf_nopiv", PARSEC_dtd_taskpool, CORE_zgetrf_nopiv_parsec, options->priority, "getrf_nopiv",
sizeof(int), &m, VALUE, sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE, sizeof(int), &n, VALUE,
sizeof(int), &ib, VALUE, sizeof(int), &ib, VALUE,
PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY, PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY,
sizeof(int), &lda, VALUE, sizeof(int), &lda, VALUE,
sizeof(int), &iinfo, VALUE, sizeof(int), &iinfo, VALUE,
sizeof(RUNTIME_sequence_t*), &(options->sequence), VALUE,
sizeof(RUNTIME_request_t*), &(options->request), VALUE,
PARSEC_DTD_ARG_END ); PARSEC_DTD_ARG_END );
(void)nb; (void)nb;
......
...@@ -35,7 +35,6 @@ CORE_zlag2c_parsec( parsec_execution_stream_t *context, ...@@ -35,7 +35,6 @@ CORE_zlag2c_parsec( parsec_execution_stream_t *context,
int lda; int lda;
CHAMELEON_Complex32_t *B; CHAMELEON_Complex32_t *B;
int ldb; int ldb;
int info;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &m, &n, &A, &lda, &B, &ldb ); this_task, &m, &n, &A, &lda, &B, &ldb );
......
...@@ -31,16 +31,19 @@ CORE_zpotrf_parsec( parsec_execution_stream_t *context, ...@@ -31,16 +31,19 @@ CORE_zpotrf_parsec( parsec_execution_stream_t *context,
{ {
cham_uplo_t uplo; cham_uplo_t uplo;
int tempkm, ldak, iinfo, info; int tempkm, ldak, iinfo, info;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
CHAMELEON_Complex64_t *A; CHAMELEON_Complex64_t *A;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &uplo, &tempkm, &A, &ldak, &iinfo ); this_task, &uplo, &tempkm, &A, &ldak, &iinfo, &sequence, &request );
CORE_zpotrf( uplo, tempkm, A, ldak, &info ); CORE_zpotrf( uplo, tempkm, A, ldak, &info );
/* if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) { */ if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
/* RUNTIME_sequence_flush( (CHAM_context_t*)quark, sequence, request, iinfo+info ); */ RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
/* } */ }
(void)context; (void)context;
(void)info; (void)info;
(void)iinfo; (void)iinfo;
...@@ -56,11 +59,13 @@ void INSERT_TASK_zpotrf(const RUNTIME_option_t *options, ...@@ -56,11 +59,13 @@ void INSERT_TASK_zpotrf(const RUNTIME_option_t *options,
parsec_dtd_taskpool_insert_task( parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_zpotrf_parsec, options->priority, "potrf", PARSEC_dtd_taskpool, CORE_zpotrf_parsec, options->priority, "potrf",
sizeof(int), &uplo, VALUE, sizeof(int), &uplo, VALUE,
sizeof(int), &n, VALUE, sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY, PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY,
sizeof(int), &lda, VALUE, sizeof(int), &lda, VALUE,
sizeof(int), &iinfo, VALUE, sizeof(int), &iinfo, VALUE,
sizeof(RUNTIME_sequence_t*), &(options->sequence), VALUE,
sizeof(RUNTIME_request_t*), &(options->request), VALUE,
PARSEC_DTD_ARG_END ); PARSEC_DTD_ARG_END );
(void)nb; (void)nb;
......
...@@ -30,13 +30,19 @@ CORE_ztrtri_parsec( parsec_execution_stream_t *context, ...@@ -30,13 +30,19 @@ CORE_ztrtri_parsec( parsec_execution_stream_t *context,
CHAMELEON_Complex64_t *A; CHAMELEON_Complex64_t *A;
int LDA; int LDA;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info; int info;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &uplo, &diag, &N, &A, &LDA, &iinfo ); this_task, &uplo, &diag, &N, &A, &LDA, &iinfo, &sequence, &request );
CORE_ztrtri( uplo, diag, N, A, LDA, &info ); CORE_ztrtri( uplo, diag, N, A, LDA, &info );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
(void)context; (void)context;
return PARSEC_HOOK_RETURN_DONE; return PARSEC_HOOK_RETURN_DONE;
} }
...@@ -51,12 +57,14 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options, ...@@ -51,12 +57,14 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options,
parsec_dtd_taskpool_insert_task( parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_ztrtri_parsec, options->priority, "trtri", PARSEC_dtd_taskpool, CORE_ztrtri_parsec, options->priority, "trtri",
sizeof(int), &uplo, VALUE, sizeof(int), &uplo, VALUE,
sizeof(int), &diag, VALUE, sizeof(int), &diag, VALUE,
sizeof(int), &n, VALUE, sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY, PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY,
sizeof(int), &lda, VALUE, sizeof(int), &lda, VALUE,
sizeof(int), &iinfo, VALUE, sizeof(int), &iinfo, VALUE,
sizeof(RUNTIME_sequence_t*), &(options->sequence), VALUE,
sizeof(RUNTIME_request_t*), &(options->request), VALUE,
PARSEC_DTD_ARG_END ); PARSEC_DTD_ARG_END );
(void)nb; (void)nb;
......
...@@ -39,14 +39,19 @@ CORE_ztstrf_parsec( parsec_execution_stream_t *context, ...@@ -39,14 +39,19 @@ CORE_ztstrf_parsec( parsec_execution_stream_t *context,
int ldwork; int ldwork;
cham_bool_t *check_info; cham_bool_t *check_info;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info; int info;
parsec_dtd_unpack_args( parsec_dtd_unpack_args(
this_task, &m, &n, &ib, &nb, &U, &ldu, &A, &lda, &L, &ldl, &IPIV, &WORK, &ldwork, &check_info, &iinfo ); this_task, &m, &n, &ib, &nb, &U, &ldu, &A, &lda, &L, &ldl, &IPIV, &WORK, &ldwork, &check_info, &iinfo, &sequence, &request );
CORE_ztstrf( m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, &info ); CORE_ztstrf( m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, &info );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
(void)context; (void)context;
return PARSEC_HOOK_RETURN_DONE; return PARSEC_HOOK_RETURN_DONE;
} }
...@@ -63,21 +68,23 @@ void INSERT_TASK_ztstrf(const RUNTIME_option_t *options, ...@@ -63,21 +68,23 @@ void INSERT_TASK_ztstrf(const RUNTIME_option_t *options,
parsec_dtd_taskpool_insert_task( parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_ztstrf_parsec, options->priority, "tstrf", PARSEC_dtd_taskpool, CORE_ztstrf_parsec, options->priority, "tstrf",
sizeof(int), &m, VALUE, sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE, sizeof(int), &n, VALUE,
sizeof(int), &ib, VALUE, sizeof(int), &ib, VALUE,
sizeof(int), &nb, VALUE, sizeof(int), &nb, VALUE,
PASSED_BY_REF, RTBLKADDR( U, CHAMELEON_Complex64_t, Um, Un ), chameleon_parsec_get_arena_index( U ) | INOUT, PASSED_BY_REF, RTBLKADDR( U, CHAMELEON_Complex64_t, Um, Un ), chameleon_parsec_get_arena_index( U ) | INOUT,
sizeof(int), &ldu, VALUE, sizeof(int), &ldu, VALUE,
PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY, PASSED_BY_REF, RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), chameleon_parsec_get_arena_index( A ) | INOUT | AFFINITY,
sizeof(int), &lda, VALUE, sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( L, CHAMELEON_Complex64_t, Lm, Ln ), chameleon_parsec_get_arena_index( L ) | OUTPUT, PASSED_BY_REF, RTBLKADDR( L, CHAMELEON_Complex64_t, Lm, Ln ), chameleon_parsec_get_arena_index( L ) | OUTPUT,
sizeof(int), &ldl, VALUE, sizeof(int), &ldl, VALUE,
sizeof(int*), &IPIV, VALUE, sizeof(int*), &IPIV, VALUE,
sizeof(CHAMELEON_Complex64_t)*ib*nb, NULL, SCRATCH, sizeof(CHAMELEON_Complex64_t)*ib*nb, NULL, SCRATCH,
sizeof(int), &nb, VALUE, sizeof(int), &nb, VALUE,
sizeof(int), &check_info, VALUE, sizeof(int), &check_info, VALUE,
sizeof(int), &iinfo, VALUE, sizeof(int), &iinfo, VALUE,
sizeof(RUNTIME_sequence_t*), &(options->sequence), VALUE,
sizeof(RUNTIME_request_t*), &(options->request), VALUE,
PARSEC_DTD_ARG_END ); PARSEC_DTD_ARG_END );
(void)nb; (void)nb;
......
...@@ -35,12 +35,9 @@ void CORE_zlag2c_quark(Quark *quark) ...@@ -35,12 +35,9 @@ void CORE_zlag2c_quark(Quark *quark)
int ldb; int ldb;
RUNTIME_sequence_t *sequence; RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request; RUNTIME_request_t *request;
int info;
quark_unpack_args_8(quark, m, n, A, lda, B, ldb, sequence, request); quark_unpack_args_8(quark, m, n, A, lda, B, ldb, sequence, request);
CORE_zlag2c( m, n, A, lda, B, ldb); CORE_zlag2c( m, n, A, lda, B, ldb);
if (sequence->status == CHAMELEON_SUCCESS && info != 0)
RUNTIME_sequence_flush(quark, sequence, request, info);
} }
void INSERT_TASK_zlag2c(const RUNTIME_option_t *options, void INSERT_TASK_zlag2c(const RUNTIME_option_t *options,
......
...@@ -47,6 +47,8 @@ void INSERT_TASK_zgetrf( const RUNTIME_option_t *options, ...@@ -47,6 +47,8 @@ void INSERT_TASK_zgetrf( const RUNTIME_option_t *options,
STARPU_VALUE, &IPIV, sizeof(int*), STARPU_VALUE, &IPIV, sizeof(int*),
STARPU_VALUE, &check_info, sizeof(cham_bool_t), STARPU_VALUE, &check_info, sizeof(cham_bool_t),
STARPU_VALUE, &iinfo, sizeof(int), STARPU_VALUE, &iinfo, sizeof(int),
STARPU_VALUE, &(options->sequence), sizeof(RUNTIME_sequence_t*),
STARPU_VALUE, &(options->request), sizeof(RUNTIME_request_t*),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME) #if defined(CHAMELEON_CODELETS_HAVE_NAME)
...@@ -66,11 +68,18 @@ static void cl_zgetrf_cpu_func(void *descr[], void *cl_arg) ...@@ -66,11 +68,18 @@ static void cl_zgetrf_cpu_func(void *descr[], void *cl_arg)
int *IPIV; int *IPIV;
cham_bool_t check_info; cham_bool_t check_info;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 0; int info = 0;
A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]); A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &m, &n, &lda, &IPIV, &check_info, &iinfo);
starpu_codelet_unpack_args(cl_arg, &m, &n, &lda, &IPIV, &check_info, &iinfo, &sequence, &request);
CORE_zgetrf( m, n, A, lda, IPIV, &info ); CORE_zgetrf( m, n, A, lda, IPIV, &info );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
} }
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */
......
...@@ -113,6 +113,8 @@ void INSERT_TASK_zgetrf_incpiv(const RUNTIME_option_t *options, ...@@ -113,6 +113,8 @@ void INSERT_TASK_zgetrf_incpiv(const RUNTIME_option_t *options,
STARPU_VALUE, &iinfo, sizeof(int), STARPU_VALUE, &iinfo, sizeof(int),
STARPU_SCRATCH, options->ws_worker, STARPU_SCRATCH, options->ws_worker,
STARPU_VALUE, &h_work, sizeof(CHAMELEON_starpu_ws_t *), STARPU_VALUE, &h_work, sizeof(CHAMELEON_starpu_ws_t *),
STARPU_VALUE, &(options->sequence), sizeof(RUNTIME_sequence_t*),
STARPU_VALUE, &(options->request), sizeof(RUNTIME_request_t*),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME) #if defined(CHAMELEON_CODELETS_HAVE_NAME)
...@@ -134,13 +136,18 @@ static void cl_zgetrf_incpiv_cpu_func(void *descr[], void *cl_arg) ...@@ -134,13 +136,18 @@ static void cl_zgetrf_incpiv_cpu_func(void *descr[], void *cl_arg)
int *IPIV; int *IPIV;
cham_bool_t check_info; cham_bool_t check_info;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 0; int info = 0;
A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]); A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &m, &n, &ib, &lda, &ldl, &IPIV, &check_info, &iinfo, &h_work); starpu_codelet_unpack_args(cl_arg, &m, &n, &ib, &lda, &ldl, &IPIV, &check_info, &iinfo, &h_work, &sequence, &request);
CORE_zgetrf_incpiv(m, n, ib, A, lda, IPIV, &info); CORE_zgetrf_incpiv(m, n, ib, A, lda, IPIV, &info);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
} }
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */
......
...@@ -92,6 +92,8 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options, ...@@ -92,6 +92,8 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options,
STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An), STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
STARPU_VALUE, &lda, sizeof(int), STARPU_VALUE, &lda, sizeof(int),
STARPU_VALUE, &iinfo, sizeof(int), STARPU_VALUE, &iinfo, sizeof(int),
STARPU_VALUE, &(options->sequence), sizeof(RUNTIME_sequence_t*),
STARPU_VALUE, &(options->request), sizeof(RUNTIME_request_t*),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME) #if defined(CHAMELEON_CODELETS_HAVE_NAME)
...@@ -112,11 +114,18 @@ static void cl_zgetrf_nopiv_cpu_func(void *descr[], void *cl_arg) ...@@ -112,11 +114,18 @@ static void cl_zgetrf_nopiv_cpu_func(void *descr[], void *cl_arg)
CHAMELEON_Complex64_t *A; CHAMELEON_Complex64_t *A;
int lda; int lda;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 0; int info = 0;
A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]); A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &m, &n, &ib, &lda, &iinfo);
starpu_codelet_unpack_args(cl_arg, &m, &n, &ib, &lda, &iinfo, &sequence, &request);
CORE_zgetrf_nopiv(m, n, ib, A, lda, &info); CORE_zgetrf_nopiv(m, n, ib, A, lda, &info);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
} }
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */
......
...@@ -51,6 +51,8 @@ void INSERT_TASK_zpotrf(const RUNTIME_option_t *options, ...@@ -51,6 +51,8 @@ void INSERT_TASK_zpotrf(const RUNTIME_option_t *options,
STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An), STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
STARPU_VALUE, &lda, sizeof(int), STARPU_VALUE, &lda, sizeof(int),
STARPU_VALUE, &iinfo, sizeof(int), STARPU_VALUE, &iinfo, sizeof(int),
STARPU_VALUE, &(options->sequence), sizeof(RUNTIME_sequence_t*),
STARPU_VALUE, &(options->request), sizeof(RUNTIME_request_t*),
/* STARPU_SCRATCH, options->ws_worker, */ /* STARPU_SCRATCH, options->ws_worker, */
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
...@@ -69,12 +71,18 @@ static void cl_zpotrf_cpu_func(void *descr[], void *cl_arg) ...@@ -69,12 +71,18 @@ static void cl_zpotrf_cpu_func(void *descr[], void *cl_arg)
CHAMELEON_Complex64_t *A; CHAMELEON_Complex64_t *A;
int lda; int lda;
int iinfo; int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 0; int info = 0;
A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]); A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &uplo, &n, &lda, &iinfo); starpu_codelet_unpack_args(cl_arg, &uplo, &n, &lda, &iinfo, &sequence, &request);
CORE_zpotrf(uplo, n, A, lda, &info); CORE_zpotrf(uplo, n, A, lda, &info);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
} }
#endif /* !defined(CHAMELEON_SIMULATION) */ #endif /* !defined(CHAMELEON_SIMULATION) */