10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-26 06:14:43 +01:00

Fixed quicksort openmp

This commit is contained in:
Anthony Scemama 2018-10-15 12:16:21 +02:00
parent 22b9eb4fb9
commit b3d17a6479

View File

@ -37,7 +37,10 @@ BEGIN_TEMPLATE
integer,intent(in) :: isize integer,intent(in) :: isize
$type,intent(inout) :: x(isize) $type,intent(inout) :: x(isize)
integer,intent(inout) :: iorder(isize) integer,intent(inout) :: iorder(isize)
!$OMP PARALLEL integer :: tn
integer, external :: omp_get_thread_num
tn = omp_get_thread_num()
!$OMP PARALLEL if (tn == 0)
!$OMP SINGLE !$OMP SINGLE
call rec_$X_quicksort(x,iorder,isize,1,isize) call rec_$X_quicksort(x,iorder,isize,1,isize)
!$OMP END SINGLE !$OMP END SINGLE