Commit 1d9ea4a7 authored by PRUVOST Florent's avatar PRUVOST Florent

save the exit status of kernels when possible

parent 9b9aea35
Pipeline #44078 passed with stages
in 13 minutes and 32 seconds
......@@ -35,12 +35,9 @@ void CORE_zlag2c_quark(Quark *quark)
int ldb;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info;
quark_unpack_args_8(quark, m, n, A, lda, B, ldb, sequence, request);
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,
......
......@@ -47,6 +47,8 @@ void INSERT_TASK_zgetrf( const RUNTIME_option_t *options,
STARPU_VALUE, &IPIV, sizeof(int*),
STARPU_VALUE, &check_info, sizeof(cham_bool_t),
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_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
......@@ -66,11 +68,18 @@ static void cl_zgetrf_cpu_func(void *descr[], void *cl_arg)
int *IPIV;
cham_bool_t check_info;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 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 );
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......
......@@ -113,6 +113,8 @@ void INSERT_TASK_zgetrf_incpiv(const RUNTIME_option_t *options,
STARPU_VALUE, &iinfo, sizeof(int),
STARPU_SCRATCH, options->ws_worker,
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_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
......@@ -134,13 +136,18 @@ static void cl_zgetrf_incpiv_cpu_func(void *descr[], void *cl_arg)
int *IPIV;
cham_bool_t check_info;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 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);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......
......@@ -92,6 +92,8 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options,
STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
STARPU_VALUE, &lda, 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_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
......@@ -112,11 +114,18 @@ static void cl_zgetrf_nopiv_cpu_func(void *descr[], void *cl_arg)
CHAMELEON_Complex64_t *A;
int lda;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 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);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......
......@@ -51,6 +51,8 @@ void INSERT_TASK_zpotrf(const RUNTIME_option_t *options,
STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
STARPU_VALUE, &lda, 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_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
......@@ -69,12 +71,18 @@ static void cl_zpotrf_cpu_func(void *descr[], void *cl_arg)
CHAMELEON_Complex64_t *A;
int lda;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 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);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......
......@@ -53,6 +53,8 @@ void INSERT_TASK_ztrtri(const RUNTIME_option_t *options,
STARPU_RW, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
STARPU_VALUE, &lda, 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_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
......@@ -71,12 +73,18 @@ static void cl_ztrtri_cpu_func(void *descr[], void *cl_arg)
CHAMELEON_Complex64_t *A;
int LDA;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 0;
A = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &uplo, &diag, &N, &LDA, &iinfo);
starpu_codelet_unpack_args(cl_arg, &uplo, &diag, &N, &LDA, &iinfo, &sequence, &request);
CORE_ztrtri(uplo, diag, N, A, LDA, &info);
if ( (sequence->status == CHAMELEON_SUCCESS) && (info != 0) ) {
RUNTIME_sequence_flush( NULL, sequence, request, iinfo+info );
}
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......
......@@ -130,6 +130,8 @@ void INSERT_TASK_ztstrf(const RUNTIME_option_t *options,
STARPU_VALUE, &nb, sizeof(int),
STARPU_VALUE, &check_info, sizeof(cham_bool_t),
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_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
......@@ -158,7 +160,8 @@ static void cl_ztstrf_cpu_func(void *descr[], void *cl_arg)
int ldwork;
cham_bool_t check_info;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
int info = 0;
U = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
......@@ -166,9 +169,15 @@ static void cl_ztstrf_cpu_func(void *descr[], void *cl_arg)
L = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[2]);
WORK = (CHAMELEON_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[3]);
starpu_codelet_unpack_args(cl_arg, &m, &n, &ib, &nb, &ldu, &lda, &ldl, &IPIV, &d_work, &ldwork, &check_info, &iinfo);
starpu_codelet_unpack_args(cl_arg, &m, &n, &ib, &nb, &ldu, &lda, &ldl,
&IPIV, &d_work, &ldwork, &check_info, &iinfo,
&sequence, &request);
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 );
}
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......
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