Minimize debug sttements in hash_ins

omp-walther
sfilippone 2 years ago
parent 1941affe7a
commit db0e4db507

@ -139,7 +139,7 @@ Contains
name='psb_r_m_e_rk1' name='psb_r_m_e_rk1'
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
info=psb_success_ info=psb_success_
if (debug) write(psb_err_unit,*) 'e_reallocate D',len if (debug) write(psb_err_unit,*) 'reallocate D',len
if (present(lb)) then if (present(lb)) then
lb_ = lb lb_ = lb
@ -178,7 +178,6 @@ Contains
goto 9999 goto 9999
end if end if
endif endif
if (debug) write(psb_err_unit,*) 'reallocate 2 info',info
if (present(pad)) then if (present(pad)) then
!$omp parallel do private(i) shared(dim,len) !$omp parallel do private(i) shared(dim,len)
do i=lb_-1+dim+1,lb_-1+len do i=lb_-1+dim+1,lb_-1+len
@ -190,7 +189,6 @@ Contains
9999 continue 9999 continue
info = err info = err
!write(0,*) 'e_realloc : ',info
call psb_error_handler(err_act) call psb_error_handler(err_act)
return return
@ -989,7 +987,6 @@ Contains
info = psb_success_ info = psb_success_
if (psb_errstatus_fatal()) then if (psb_errstatus_fatal()) then
write(0,*) 'From ensure_size: errstatus_fatal()'
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
goto 9999 goto 9999
end if end if
@ -1031,7 +1028,6 @@ Contains
!$OMP END CRITICAL !$OMP END CRITICAL
if (info /= psb_success_) then if (info /= psb_success_) then
write(0,*) 'From ensure_size: ',info,psb_err_from_subroutine_
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
call psb_errpush(info,name,a_err='psb_realloc') call psb_errpush(info,name,a_err='psb_realloc')
goto 9999 goto 9999

@ -375,6 +375,7 @@ contains
if (lip < 0) then if (lip < 0) then
call psb_hash_searchkey(ip,tlip,idxmap%hash,info) call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
lip = tlip lip = tlip
info = 0
end if end if
if (owned_) then if (owned_) then
if (lip<=nrow) then if (lip<=nrow) then
@ -414,6 +415,7 @@ contains
if (lip < 0) then if (lip < 0) then
call psb_hash_searchkey(ip,tlip,idxmap%hash,info) call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
lip = tlip lip = tlip
info = 0
end if end if
if (owned_) then if (owned_) then
if (lip<=nrow) then if (lip<=nrow) then
@ -503,6 +505,7 @@ contains
if (lip < 0) then if (lip < 0) then
call psb_hash_searchkey(ip,tlip,idxmap%hash,info) call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
lip = tlip lip = tlip
info = 0
end if end if
if (owned_) then if (owned_) then
if (lip<=nrow) then if (lip<=nrow) then
@ -541,6 +544,7 @@ contains
if (lip < 0) then if (lip < 0) then
call psb_hash_searchkey(ip,tlip,idxmap%hash,info) call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
lip = tlip lip = tlip
info = 0
end if end if
if (owned_) then if (owned_) then
if (lip<=nrow) then if (lip<=nrow) then
@ -704,6 +708,7 @@ contains
! $ OMP reduction(.AND.:isLoopValid) ! $ OMP reduction(.AND.:isLoopValid)
do i = 1, is do i = 1, is
info = 0 info = 0
if (.not. isLoopValid) cycle
if (mask(i)) then if (mask(i)) then
ip = idx(i) ip = idx(i)
if ((ip < 1 ).or.(ip>mglob)) then if ((ip < 1 ).or.(ip>mglob)) then
@ -790,6 +795,7 @@ contains
! $ OMP reduction(.AND.:isLoopValid) ! $ OMP reduction(.AND.:isLoopValid)
do i = 1, is do i = 1, is
info = 0 info = 0
if (.not. isLoopValid) cycle
ip = idx(i) ip = idx(i)
if ((ip < 1 ).or.(ip>mglob)) then if ((ip < 1 ).or.(ip>mglob)) then
idx(i) = -1 idx(i) = -1
@ -867,10 +873,11 @@ contains
! $ OMP shared(name,me,is,idx,ins_lck,mask,mglob,idxmap,ncol,nrow,laddsz) & ! $ OMP shared(name,me,is,idx,ins_lck,mask,mglob,idxmap,ncol,nrow,laddsz) &
! $ OMP private(i,ip,lip,tlip,nxt,info) & ! $ OMP private(i,ip,lip,tlip,nxt,info) &
! $ OMP reduction(.AND.:isLoopValid) ! $ OMP reduction(.AND.:isLoopValid)
!$omp critical(hash_g2l_ins)
!$omp critical(hash_g2l_ins)
do i = 1, is do i = 1, is
info = 0 info = 0
if (.not. isLoopValid) cycle
if (mask(i)) then if (mask(i)) then
ip = idx(i) ip = idx(i)
if ((ip < 1 ).or.(ip>mglob)) then if ((ip < 1 ).or.(ip>mglob)) then
@ -905,6 +912,7 @@ contains
! Index not found ! Index not found
!write(0,*) me,name,' b hsik ',psb_errstatus_fatal() !write(0,*) me,name,' b hsik ',psb_errstatus_fatal()
call psb_hash_searchinskey(ip,tlip,nxt,idxmap%hash,info) call psb_hash_searchinskey(ip,tlip,nxt,idxmap%hash,info)
if (psb_errstatus_fatal()) write(0,*) me,name,' a hsik ',info,omp_get_thread_num()
!write(0,*) me,name,' a hsik ',psb_errstatus_fatal() !write(0,*) me,name,' a hsik ',psb_errstatus_fatal()
lip = tlip lip = tlip
@ -918,6 +926,7 @@ contains
ncol = MAX(ncol,nxt) ncol = MAX(ncol,nxt)
call psb_ensure_size(ncol,idxmap%loc_to_glob,info,& call psb_ensure_size(ncol,idxmap%loc_to_glob,info,&
& pad=-1_psb_lpk_,addsz=laddsz) & pad=-1_psb_lpk_,addsz=laddsz)
if (psb_errstatus_fatal()) write(0,*) me,name,' a esz ',info,omp_get_thread_num()
if (info /= psb_success_) then if (info /= psb_success_) then
!write(0,*) 'Error spot 3', info !write(0,*) 'Error spot 3', info
call psb_errpush(psb_err_from_subroutine_ai_,name,& call psb_errpush(psb_err_from_subroutine_ai_,name,&
@ -958,6 +967,7 @@ contains
!$omp critical(hash_g2l_ins) !$omp critical(hash_g2l_ins)
do i = 1, is do i = 1, is
info = 0 info = 0
if (.not. isLoopValid) cycle
ip = idx(i) ip = idx(i)
if ((ip < 1 ).or.(ip>mglob)) then if ((ip < 1 ).or.(ip>mglob)) then
idx(i) = -1 idx(i) = -1

@ -449,7 +449,7 @@ contains
hk = hk - hd hk = hk - hd
if (hk < 0) hk = hk + hsize if (hk < 0) hk = hk + hsize
end do end do
write(0,*) 'In searchinskey 3: ', info !write(0,*) 'In searchinskey 3: ', info
end subroutine psb_hash_lsearchinskey end subroutine psb_hash_lsearchinskey
recursive subroutine psb_hash_isearchinskey(key,val,nextval,hash,info) recursive subroutine psb_hash_isearchinskey(key,val,nextval,hash,info)

Loading…
Cancel
Save