Test which checks the omp parallel for if directive. Needs at least two threads.
2.0
omp parallel do if
INTEGER FUNCTION par_do_if()
IMPLICIT NONE
INTEGER omp_get_num_threads
INTEGER sum,known_sum, i, num_threads
INTEGER control
INCLUDE "omp_testsuite.f"
sum = 0
control = 0
!$omp parallel do if (control == 1)
DO i=1, LOOPCOUNT
sum = sum + i
num_threads = omp_get_num_threads ()
END DO
!$omp end parallel do
WRITE (1,*) "Number of threads determined by:"\
"omg_get_num_threasd:", num_threads
known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
IF ( known_sum .EQ. sum .AND. num_threads .EQ. 1) THEN
= 1
ELSE
= 0
END IF
END