From d8ed01218dcf12c7698b6f2471cebcb05c174055 Mon Sep 17 00:00:00 2001 From: sfilippone Date: Thu, 9 May 2024 12:30:06 +0200 Subject: [PATCH] Cleanup hash_map using new indx_map%set_lc --- base/modules/desc/psb_hash_map_mod.F90 | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/base/modules/desc/psb_hash_map_mod.F90 b/base/modules/desc/psb_hash_map_mod.F90 index 8695fb93..c3d833c6 100644 --- a/base/modules/desc/psb_hash_map_mod.F90 +++ b/base/modules/desc/psb_hash_map_mod.F90 @@ -660,7 +660,7 @@ contains logical, intent(in), optional :: mask(:) integer(psb_ipk_), intent(in), optional :: lidx(:) - integer(psb_ipk_) :: i, is, lip, nrow, ncol, inxt,& + integer(psb_ipk_) :: i, is, lip, nrow, ncol,& & err_act integer(psb_lpk_) :: mglob, ip, nxt, tlip type(psb_ctxt_type) :: ctxt @@ -706,7 +706,7 @@ contains if (present(mask)) then !$omp parallel do default(none) schedule(dynamic) & !$omp shared(lidx,mask,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & - !$omp private(i,ip,lip,tlip,nxt,inxt,info) & + !$omp private(i,ip,lip,tlip,nxt,info) & !$omp reduction(.AND.:isLoopValid) do i = 1, is if (mask(i)) then @@ -746,8 +746,8 @@ contains isLoopValid = .false. end if idxmap%loc_to_glob(nxt) = ip - inxt = max(ncol,nxt) - call idxmap%set_lc(inxt) + nxt = max(ncol,nxt) + call idxmap%set_lc(nxt) endif idx(i) = lip info = psb_success_ @@ -770,7 +770,7 @@ contains !$omp parallel do default(none) schedule(dynamic) & !$omp shared(lidx,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & - !$omp private(i,ip,lip,tlip,nxt,inxt,info) & + !$omp private(i,ip,lip,tlip,nxt,info) & !$omp reduction(.AND.:isLoopValid) do i = 1, is ip = idx(i) @@ -809,8 +809,8 @@ contains isLoopValid = .false. end if idxmap%loc_to_glob(nxt) = ip - inxt = max(ncol,nxt) - call idxmap%set_lc(inxt) + nxt = max(ncol,nxt) + call idxmap%set_lc(nxt) endif idx(i) = lip info = psb_success_ @@ -832,7 +832,7 @@ contains if (present(mask)) then !$omp parallel do default(none) schedule(dynamic) & !$omp shared(mask,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & - !$omp private(i,ip,lip,tlip,nxt,inxt,info) & + !$omp private(i,ip,lip,tlip,nxt,info) & !$omp reduction(.AND.:isLoopValid) do i = 1, is if (mask(i)) then @@ -868,9 +868,8 @@ contains & a_err='psb_ensure_size',i_err=(/info/)) isLoopValid = .false. end if - inxt = nxt - idxmap%loc_to_glob(inxt) = ip - call idxmap%set_lc(inxt) + idxmap%loc_to_glob(nxt) = ip + call idxmap%set_lc(nxt) endif idx(i) = lip info = psb_success_ @@ -892,7 +891,7 @@ contains !$omp parallel do default(none) schedule(dynamic) & !$omp shared(name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & - !$omp private(i,ip,lip,tlip,nxt,inxt,info) & + !$omp private(i,ip,lip,tlip,nxt,info) & !$omp reduction(.AND.:isLoopValid) do i = 1, is ip = idx(i) @@ -927,9 +926,8 @@ contains & a_err='psb_ensure_size',i_err=(/info/)) isLoopValid = .false. end if - inxt = nxt - idxmap%loc_to_glob(inxt) = ip - call idxmap%set_lc(inxt) + idxmap%loc_to_glob(nxt) = ip + call idxmap%set_lc(nxt) endif idx(i) = lip info = psb_success_