From ec55b0be67ab33b47a8a413e9bf10b7fbdf4206b Mon Sep 17 00:00:00 2001 From: Aurelien Bouteiller Date: Fri, 3 Dec 2021 12:28:46 -0500 Subject: [PATCH] Return the proper PARSEC_HOOK_RETURN_ERROR in GPU error cases Signed-off-by: Aurelien Bouteiller --- src/zgemm_NN.jdf | 3 +-- src/zgemm_NN_summa.jdf | 3 +-- src/zgemm_NT.jdf | 3 +-- src/zgemm_NT_summa.jdf | 3 +-- src/zgemm_TN.jdf | 3 +-- src/zgemm_TN_summa.jdf | 3 +-- src/zgemm_TT.jdf | 3 +-- src/zgemm_TT_summa.jdf | 3 +-- src/zgetrf_nopiv.jdf | 3 +-- src/zpoinv_L.jdf | 9 +++------ src/zpoinv_U.jdf | 9 +++------ src/zpotrf_L.jdf | 13 ++++--------- src/zpotrf_U.jdf | 12 ++++-------- src/ztrsm_LLN.jdf | 3 +-- src/ztrsm_LLT.jdf | 3 +-- src/ztrsm_LUN.jdf | 3 +-- src/ztrsm_LUT.jdf | 3 +-- src/ztrsm_RLN.jdf | 3 +-- src/ztrsm_RLT.jdf | 3 +-- src/ztrsm_RUN.jdf | 3 +-- src/ztrsm_RUT.jdf | 3 +-- 21 files changed, 31 insertions(+), 63 deletions(-) diff --git a/src/zgemm_NN.jdf b/src/zgemm_NN.jdf index 9bcb9b2c..fe04a879 100644 --- a/src/zgemm_NN.jdf +++ b/src/zgemm_NN.jdf @@ -190,8 +190,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldbk, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_NN_summa.jdf b/src/zgemm_NN_summa.jdf index d1cfa5ea..f6a60d6e 100644 --- a/src/zgemm_NN_summa.jdf +++ b/src/zgemm_NN_summa.jdf @@ -237,8 +237,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldbk, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_NT.jdf b/src/zgemm_NT.jdf index 91def4a0..8fc8da8f 100644 --- a/src/zgemm_NT.jdf +++ b/src/zgemm_NT.jdf @@ -195,8 +195,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldbn, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_NT_summa.jdf b/src/zgemm_NT_summa.jdf index 08aa5660..476c36d7 100644 --- a/src/zgemm_NT_summa.jdf +++ b/src/zgemm_NT_summa.jdf @@ -237,8 +237,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldbn, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_TN.jdf b/src/zgemm_TN.jdf index 7232d3d9..f573ecda 100644 --- a/src/zgemm_TN.jdf +++ b/src/zgemm_TN.jdf @@ -195,8 +195,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldbk, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_TN_summa.jdf b/src/zgemm_TN_summa.jdf index f1e86ba8..c82251d2 100644 --- a/src/zgemm_TN_summa.jdf +++ b/src/zgemm_TN_summa.jdf @@ -236,8 +236,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldbk, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_TT.jdf b/src/zgemm_TT.jdf index 30d82d0c..f0baccb8 100644 --- a/src/zgemm_TT.jdf +++ b/src/zgemm_TT.jdf @@ -195,8 +195,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldbn, lbeta, (cuDoubleComplex*)C, ldcm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgemm_TT_summa.jdf b/src/zgemm_TT_summa.jdf index 385021c1..0ea2708c 100644 --- a/src/zgemm_TT_summa.jdf +++ b/src/zgemm_TT_summa.jdf @@ -239,8 +239,7 @@ BODY [type=CUDA if(status != CUBLAS_STATUS_SUCCESS){ printf("ISSUE\n"); } - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zgetrf_nopiv.jdf b/src/zgetrf_nopiv.jdf index 2fd2dfea..c457333d 100644 --- a/src/zgetrf_nopiv.jdf +++ b/src/zgetrf_nopiv.jdf @@ -230,8 +230,7 @@ BODY [type=CUDA (cuDoubleComplex*)B, ldak_B, zone, (cuDoubleComplex*)C, ldam_C); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zpoinv_L.jdf b/src/zpoinv_L.jdf index 5841af35..309e4b86 100644 --- a/src/zpoinv_L.jdf +++ b/src/zpoinv_L.jdf @@ -161,8 +161,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldan, zone, (cuDoubleComplex*)C, ldam ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -268,8 +267,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldak, zone, (cuDoubleComplex*)C, ldam ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -437,8 +435,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldak, zone, (cuDoubleComplex*)C, ldam ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zpoinv_U.jdf b/src/zpoinv_U.jdf index 2eb9a9b7..3db2a761 100644 --- a/src/zpoinv_U.jdf +++ b/src/zpoinv_U.jdf @@ -160,8 +160,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldak, zone, (cuDoubleComplex*)C, ldan ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -266,8 +265,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldak, zone, (cuDoubleComplex*)C, ldam ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -434,8 +432,7 @@ BODY [type=CUDA] (cuDoubleComplex*)B, ldan, zone, (cuDoubleComplex*)C, ldam ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zpotrf_L.jdf b/src/zpotrf_L.jdf index b2b0bd87..4a4c26c1 100644 --- a/src/zpotrf_L.jdf +++ b/src/zpotrf_L.jdf @@ -166,8 +166,7 @@ BODY [type=CUDA d_iinfo = (int*)(wp->tmpmem + wp->lwork * sizeof(cuDoubleComplex)); status = cusolverDnZpotrf( handles->cusolverDn_handle, cublas_uplo, tempkm, T, ldak, workspace, wp->lwork, d_iinfo); - PARSEC_CUDA_CHECK_ERROR( "cublasZpotrf_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZpotrf_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -238,12 +237,10 @@ BODY [type=CUDA] CUBLAS_OP_C, CUBLAS_DIAG_NON_UNIT, tempmm, descA->nb, &zone, T, ldak, C, ldam); - PARSEC_CUDA_CHECK_ERROR( "cublasZtrsm_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZtrsm_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END - BODY [type=RECURSIVE] { int tempmm = m == descA->mt-1 ? descA->m - m * descA->mb : descA->mb; @@ -346,8 +343,7 @@ BODY [type=CUDA] tempmm, descA->mb, &mzone, A, ldam_A, &zone, T, ldam_T); - PARSEC_CUDA_CHECK_ERROR( "cublasZherk_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZherk_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -469,8 +465,7 @@ BODY [type=CUDA &mzone, (cuDoubleComplex*)A, ldam_A, (cuDoubleComplex*)B, ldan_B, &zone, (cuDoubleComplex*)C, ldam_C ); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/zpotrf_U.jdf b/src/zpotrf_U.jdf index b7f5d1a1..1e184c48 100644 --- a/src/zpotrf_U.jdf +++ b/src/zpotrf_U.jdf @@ -165,8 +165,7 @@ BODY [type=CUDA d_iinfo = (int*)(wp->tmpmem + wp->lwork * sizeof(cuDoubleComplex)); status = cusolverDnZpotrf( handles->cusolverDn_handle, cublas_uplo, tempkn, T, ldak, workspace, wp->lwork, d_iinfo); - PARSEC_CUDA_CHECK_ERROR( "cublasZpotrf_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZpotrf_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -240,8 +239,7 @@ BODY [type=CUDA] CUBLAS_OP_C, CUBLAS_DIAG_NON_UNIT, descA->mb, tempnn, &zone, T, ldak_T, C, ldak_C); - PARSEC_CUDA_CHECK_ERROR( "cublasZtrsm_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZtrsm_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -349,8 +347,7 @@ BODY [type=CUDA] &mzone, A, ldak, &zone, T, ldan); - PARSEC_CUDA_CHECK_ERROR( "cublasZherk_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZherk_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END @@ -473,8 +470,7 @@ BODY [type=CUDA &mzone, (cuDoubleComplex*)A, ldak_A, (cuDoubleComplex*)B, ldak_B, &zone, (cuDoubleComplex*)C, ldam_C); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm_v2 ", status, - {return PARSEC_HOOK_RETURN_ERROR;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm_v2 ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); printlogcuda("CUDA_zgemm( %d, %d, %d )\n\t( %s, %s, %d, %d, %d, %f, A(%d,%d)[%p], %d, A(%d,%d)[%p], %d, %f, A(%d,%d)[%p], %d)\n", m, n, k, diff --git a/src/ztrsm_LLN.jdf b/src/ztrsm_LLN.jdf index 242fe6e4..b814593a 100644 --- a/src/ztrsm_LLN.jdf +++ b/src/ztrsm_LLN.jdf @@ -115,8 +115,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, ldbk, lalpha, (cuDoubleComplex*)E, ldb ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_LLT.jdf b/src/ztrsm_LLT.jdf index 666fc78a..2c0d708e 100644 --- a/src/ztrsm_LLT.jdf +++ b/src/ztrsm_LLT.jdf @@ -116,8 +116,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, ldb, lalpha, (cuDoubleComplex*)E, ldbm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_LUN.jdf b/src/ztrsm_LUN.jdf index de922c9f..838cc835 100644 --- a/src/ztrsm_LUN.jdf +++ b/src/ztrsm_LUN.jdf @@ -115,8 +115,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, ldb, lalpha, (cuDoubleComplex*)E, ldbm ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_LUT.jdf b/src/ztrsm_LUT.jdf index a156ab88..d8eb0950 100644 --- a/src/ztrsm_LUT.jdf +++ b/src/ztrsm_LUT.jdf @@ -115,8 +115,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, ldbk, lalpha, (cuDoubleComplex*)E, ldb ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_RLN.jdf b/src/ztrsm_RLN.jdf index 9383c66f..2cd6cc5e 100644 --- a/src/ztrsm_RLN.jdf +++ b/src/ztrsm_RLN.jdf @@ -114,8 +114,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, lda, lalpha, (cuDoubleComplex*)E, ldb ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_RLT.jdf b/src/ztrsm_RLT.jdf index 33de63c4..bf799e47 100644 --- a/src/ztrsm_RLT.jdf +++ b/src/ztrsm_RLT.jdf @@ -113,8 +113,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, ldan, zone, (cuDoubleComplex*)E, ldb ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_RUN.jdf b/src/ztrsm_RUN.jdf index 5bceec3b..9d2a59f6 100644 --- a/src/ztrsm_RUN.jdf +++ b/src/ztrsm_RUN.jdf @@ -115,8 +115,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, lda, lalpha, (cuDoubleComplex*)E, ldb ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END diff --git a/src/ztrsm_RUT.jdf b/src/ztrsm_RUT.jdf index 1d028794..6e4385f3 100644 --- a/src/ztrsm_RUT.jdf +++ b/src/ztrsm_RUT.jdf @@ -113,8 +113,7 @@ BODY [type=CUDA] (cuDoubleComplex*)D, ldan, zone, (cuDoubleComplex*)E, ldb ); status = cublasGetError(); - PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, - {return -1;} ); + PARSEC_CUDA_CHECK_ERROR( "cublasZgemm ", status, {return PARSEC_HOOK_RETURN_ERROR;} ); } END