Test which checks the if clause of the omp task directive. The idear of the tests is to generate a tasks in a single region and pause it immediately. The parent thread now shall set a counter variable which the paused task shall evaluate when woke up. 3.0 omp task if omp single,omp flush #include #include #include "omp_testsuite.h" #include "omp_my_sleep.h" int omp_task_if(FILE * logFile){ int condition_false; int count; int result; count=0; condition_false = (logFile == NULL); #pragma omp parallel { #pragma omp single { #pragma omp task if (condition_false) shared(count, result) { my_sleep (SLEEPTIME_LONG); //#pragma omp flush (count) result = (0 == count); } /* end of omp task */ count = 1; //#pragma omp flush (count) } /* end of single */ } /*end of parallel */ return result; }