Test if the compiler support nested parallelism. 2.5 nestedtest omp critical INTEGER FUNCTION omp_nested() IMPLICIT NONE INCLUDE "omp_testsuite.f" INTEGER counter COMMON /orphvars/ counter counter =0 !$ CALL OMP_SET_NESTED(.TRUE.) !#ifdef _OPENMP ! CALL OMP_SET_NESTED(.TRUE.) !#endif !$ CALL OMP_SET_NESTED(.FALSE.) !#ifdef _OPENMP ! CALL OMP_SET_NESTED(.FALSE.) !#endif !$omp parallel !$omp critical counter = counter + 1 !$omp end critical !$omp parallel !$omp critical counter = counter - 1 !$omp end critical !$omp end parallel !$omp end parallel IF (counter .EQ. 0 ) THEN WRITE (1,*) "Counter was 0" = 0 ELSE WRITE (1,*) "Counter was", counter = 1 END IF END FUNCTION