From a688b4e3d35374a8f655d56707651113813b3e3f Mon Sep 17 00:00:00 2001 From: Mike Wall Date: Mon, 3 Jul 2023 14:14:29 -0400 Subject: [PATCH] Fix rocSPARSE bug causing progress issues Issues: o Ellpack progress tests were failing for rocSPARSE build o Progress benchmark was also failing for N>=6000 Fix: o bml_sort_rocsparse_ellpack was obtaining nnz from host array o changed this to obtain nnz from device array --- src/C-interface/ellpack/bml_allocate_ellpack_typed.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/C-interface/ellpack/bml_allocate_ellpack_typed.c b/src/C-interface/ellpack/bml_allocate_ellpack_typed.c index fe3cc548..ff9e9175 100644 --- a/src/C-interface/ellpack/bml_allocate_ellpack_typed.c +++ b/src/C-interface/ellpack/bml_allocate_ellpack_typed.c @@ -441,7 +441,10 @@ void TYPED_FUNC( size_t lworkInBytes = 0; char *dwork = NULL; - nnz = csrRowPtr[N]; +#pragma omp target map(to:N) map(from:nnz) + { + nnz = csrRowPtr[N]; + } // Temporary array for sorting csrVal_tmp = (REAL_T *) malloc(sizeof(REAL_T)* nnz);