OMP threads cap fix
parent
c5e086f16c
commit
7b781aec09
|
@ -21,7 +21,7 @@
|
||||||
integer i, j, k
|
integer i, j, k
|
||||||
integer int_az_off
|
integer int_az_off
|
||||||
integer i_na
|
integer i_na
|
||||||
integer ith, thnum
|
integer ith, thnum, ithorig
|
||||||
|
|
||||||
integer ii, jj
|
integer ii, jj
|
||||||
integer chipi, chipj
|
integer chipi, chipj
|
||||||
|
@ -82,6 +82,7 @@
|
||||||
!$OMP END MASTER
|
!$OMP END MASTER
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
|
ithorig = ith
|
||||||
ith = min(ith,8)
|
ith = min(ith,8)
|
||||||
print *, 'Number of threads: ', ith
|
print *, 'Number of threads: ', ith
|
||||||
call omp_set_num_threads(ith)
|
call omp_set_num_threads(ith)
|
||||||
|
@ -283,6 +284,8 @@
|
||||||
deallocate(rout)
|
deallocate(rout)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
!Reset number of threads
|
||||||
|
call omp_set_num_threads(ithorig)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue