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

Loading…
Cancel
Save