Test which checks the omp single private directive. 2.0 omp singel private omp critical,omp flush,omp single nowait INTEGER FUNCTION single_private() IMPLICIT NONE INTEGER nr_iterations, i INTEGER result INTEGER nr_threads_in_single, myresult, myit COMMON /orphvars/ result,nr_iterations INCLUDE "omp_testsuite.f" nr_threads_in_single=0 result=0 myresult=0 myit=0 nr_iterations=0 !$omp parallel private(i, myresult, myit) myresult = 0 myit = 0 nr_threads_in_single=0 !$omp barrier DO i=0, LOOPCOUNT -1 !$omp single private(nr_threads_in_single) nr_threads_in_single = 0 !$omp flush nr_threads_in_single = nr_threads_in_single + 1 !$omp flush myit = myit + 1 myresult = myresult + nr_threads_in_single !$omp end single nowait END DO !$omp critical result = result + nr_threads_in_single nr_iterations = nr_iterations + myit !$omp end critical !$omp end parallel WRITE(1,*) "result is",result,"nr_it is",nr_iterations IF ( result .EQ. 0 .AND. nr_iterations .EQ. LOOPCOUNT) THEN = 1 ELSE = 0 END IF END