#pragma omp ordered
may only appear inside #pragma omp for ordered
construct.
why following openmp code containing ordered "construct" does not execute?
-
03-06-2023 - |
Pregunta
i am trying to execute following code , though i know that "syntactically" ordered construct should appear within the for loop, but why the code gets stucked within ordered clause i.e. execution should have given me a straight away "syntax error".
omp_set_num_threads(11);
#pragma omp parallel
{
// 1
#pragma omp ordered
{
printf("\n%d ",omp_get_thread_num());//this statement is not getting executed
}//ordered omp pragma
}//parallel omp pragma
the print statement at //1 was successful i even tried to remove ompgetthreadnum() but still no avail.
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow