Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rd4@computer:~$ cat f.f90
- program test3
- integer :: counter
- counter = 0
- !$omp parallel reduction(+: count)
- counter = counter + 1
- print *, 'Count=', counter
- !$omp end parallel
- print *, 'Real count=', counter
- end program
- rd4@computer:~$ gfortran -fopenmp f.f90 -o test3 && ./test3
- Count= 4
- Count= 4
- Count= 4
- Count= 4
- Real count= 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement