Finish dual OMP/notOMP g2lv1_ins

master
sfilippone 1 year ago
parent 08c1ab0cd1
commit 3aa748b0e3

@ -652,7 +652,7 @@ contains
integer(psb_ipk_) :: me, np integer(psb_ipk_) :: me, np
character(len=20) :: name,ch_err character(len=20) :: name,ch_err
logical, allocatable :: mask_(:) logical, allocatable :: mask_(:)
logical :: use_openmp = .true. !!$ logical :: use_openmp = .true.
#ifdef OPENMP #ifdef OPENMP
integer(kind = OMP_lock_kind) :: ins_lck integer(kind = OMP_lock_kind) :: ins_lck
#endif #endif
@ -683,7 +683,6 @@ contains
mglob = idxmap%get_gr() mglob = idxmap%get_gr()
nrow = idxmap%get_lr() nrow = idxmap%get_lr()
!write(0,*) me,name,' before loop ',psb_errstatus_fatal() !write(0,*) me,name,' before loop ',psb_errstatus_fatal()
if (use_openmp) then
#ifdef OPENMP #ifdef OPENMP
!call OMP_init_lock(ins_lck) !call OMP_init_lock(ins_lck)
@ -1049,13 +1048,8 @@ contains
info = -1 info = -1
end if end if
!call OMP_destroy_lock(ins_lck) !call OMP_destroy_lock(ins_lck)
#endif #else
else if (.not.use_openmp) then !!$ else if (.not.use_openmp) then
#ifdef OPENMP
! $ omp parallel
! $ omp critical
!write(0,*) 'In cnv: ',omp_get_num_threads()
#endif
isLoopValid = .true. isLoopValid = .true.
if (idxmap%is_bld()) then if (idxmap%is_bld()) then
@ -1253,13 +1247,8 @@ contains
idx = -1 idx = -1
info = -1 info = -1
end if end if
#ifdef OPENMP
! $ omp end critical
! $ omp end parallel
#endif
if (.not. isLoopValid) goto 9999 if (.not. isLoopValid) goto 9999
end if #endif
!write(0,*) me,name,' after loop ',psb_errstatus_fatal() !write(0,*) me,name,' after loop ',psb_errstatus_fatal()
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

Loading…
Cancel
Save