mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
Minimize debug sttements in hash_ins
This commit is contained in:
@@ -139,7 +139,7 @@ Contains
|
||||
name='psb_r_m_e_rk1'
|
||||
call psb_erractionsave(err_act)
|
||||
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
|
||||
lb_ = lb
|
||||
@@ -170,7 +170,7 @@ Contains
|
||||
End If
|
||||
else
|
||||
dim = 0
|
||||
Allocate(rrax(lb_:ub_),stat=info)
|
||||
Allocate(rrax(lb_:ub_),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
err=4025
|
||||
call psb_errpush(err,name, l_err=(/len*1_psb_lpk_/), &
|
||||
@@ -178,7 +178,6 @@ Contains
|
||||
goto 9999
|
||||
end if
|
||||
endif
|
||||
if (debug) write(psb_err_unit,*) 'reallocate 2 info',info
|
||||
if (present(pad)) then
|
||||
!$omp parallel do private(i) shared(dim,len)
|
||||
do i=lb_-1+dim+1,lb_-1+len
|
||||
@@ -188,9 +187,8 @@ Contains
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 continue
|
||||
9999 continue
|
||||
info = err
|
||||
!write(0,*) 'e_realloc : ',info
|
||||
call psb_error_handler(err_act)
|
||||
return
|
||||
|
||||
@@ -988,8 +986,7 @@ Contains
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (psb_errstatus_fatal()) then
|
||||
write(0,*) 'From ensure_size: errstatus_fatal()'
|
||||
if (psb_errstatus_fatal()) then
|
||||
info=psb_err_from_subroutine_
|
||||
goto 9999
|
||||
end if
|
||||
@@ -1031,7 +1028,6 @@ Contains
|
||||
!$OMP END CRITICAL
|
||||
|
||||
if (info /= psb_success_) then
|
||||
write(0,*) 'From ensure_size: ',info,psb_err_from_subroutine_
|
||||
info=psb_err_from_subroutine_
|
||||
call psb_errpush(info,name,a_err='psb_realloc')
|
||||
goto 9999
|
||||
|
||||
@@ -375,6 +375,7 @@ contains
|
||||
if (lip < 0) then
|
||||
call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
|
||||
lip = tlip
|
||||
info = 0
|
||||
end if
|
||||
if (owned_) then
|
||||
if (lip<=nrow) then
|
||||
@@ -414,6 +415,7 @@ contains
|
||||
if (lip < 0) then
|
||||
call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
|
||||
lip = tlip
|
||||
info = 0
|
||||
end if
|
||||
if (owned_) then
|
||||
if (lip<=nrow) then
|
||||
@@ -503,6 +505,7 @@ contains
|
||||
if (lip < 0) then
|
||||
call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
|
||||
lip = tlip
|
||||
info = 0
|
||||
end if
|
||||
if (owned_) then
|
||||
if (lip<=nrow) then
|
||||
@@ -541,6 +544,7 @@ contains
|
||||
if (lip < 0) then
|
||||
call psb_hash_searchkey(ip,tlip,idxmap%hash,info)
|
||||
lip = tlip
|
||||
info = 0
|
||||
end if
|
||||
if (owned_) then
|
||||
if (lip<=nrow) then
|
||||
@@ -704,6 +708,7 @@ contains
|
||||
! $ OMP reduction(.AND.:isLoopValid)
|
||||
do i = 1, is
|
||||
info = 0
|
||||
if (.not. isLoopValid) cycle
|
||||
if (mask(i)) then
|
||||
ip = idx(i)
|
||||
if ((ip < 1 ).or.(ip>mglob)) then
|
||||
@@ -790,6 +795,7 @@ contains
|
||||
! $ OMP reduction(.AND.:isLoopValid)
|
||||
do i = 1, is
|
||||
info = 0
|
||||
if (.not. isLoopValid) cycle
|
||||
ip = idx(i)
|
||||
if ((ip < 1 ).or.(ip>mglob)) then
|
||||
idx(i) = -1
|
||||
@@ -867,10 +873,11 @@ contains
|
||||
! $ OMP shared(name,me,is,idx,ins_lck,mask,mglob,idxmap,ncol,nrow,laddsz) &
|
||||
! $ OMP private(i,ip,lip,tlip,nxt,info) &
|
||||
! $ OMP reduction(.AND.:isLoopValid)
|
||||
!$omp critical(hash_g2l_ins)
|
||||
|
||||
!$omp critical(hash_g2l_ins)
|
||||
do i = 1, is
|
||||
info = 0
|
||||
if (.not. isLoopValid) cycle
|
||||
if (mask(i)) then
|
||||
ip = idx(i)
|
||||
if ((ip < 1 ).or.(ip>mglob)) then
|
||||
@@ -905,6 +912,7 @@ contains
|
||||
! Index not found
|
||||
!write(0,*) me,name,' b hsik ',psb_errstatus_fatal()
|
||||
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()
|
||||
lip = tlip
|
||||
|
||||
@@ -918,6 +926,7 @@ contains
|
||||
ncol = MAX(ncol,nxt)
|
||||
call psb_ensure_size(ncol,idxmap%loc_to_glob,info,&
|
||||
& 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
|
||||
!write(0,*) 'Error spot 3', info
|
||||
call psb_errpush(psb_err_from_subroutine_ai_,name,&
|
||||
@@ -958,6 +967,7 @@ contains
|
||||
!$omp critical(hash_g2l_ins)
|
||||
do i = 1, is
|
||||
info = 0
|
||||
if (.not. isLoopValid) cycle
|
||||
ip = idx(i)
|
||||
if ((ip < 1 ).or.(ip>mglob)) then
|
||||
idx(i) = -1
|
||||
|
||||
@@ -449,7 +449,7 @@ contains
|
||||
hk = hk - hd
|
||||
if (hk < 0) hk = hk + hsize
|
||||
end do
|
||||
write(0,*) 'In searchinskey 3: ', info
|
||||
!write(0,*) 'In searchinskey 3: ', info
|
||||
end subroutine psb_hash_lsearchinskey
|
||||
|
||||
recursive subroutine psb_hash_isearchinskey(key,val,nextval,hash,info)
|
||||
|
||||
Reference in New Issue
Block a user