60 likes | 105 Views
OpenMP Quiz. Why is OpenMP designed such that it necessary to place the opening braces on a new line after an OpenMP directive rather than on the same line? For example: # pragma omp parallel { ... }. Because Dr. Ferner said so.
E N D
Why is OpenMP designed such that it necessary to place the opening braces on a new line after an OpenMP directive rather than on the same line? For example: #pragma omp parallel { ... } • Because Dr. Ferner said so. • You do not need to place the braces on the next line. It can be on the same line. • So that compilers that do no recognize the directive can still continue with the next line without a syntax error and interpret the code as sequential code. • None of the other answers
Which directive must precede the directive: #pragma omp sections (not necessarily immediately)? • #pragma omp section (b) #pragma omp parallel (c) None (d) #pragma omp master (e) None of the other answers
When compiling an OpenMP program with gcc, what flag must be included? • -fopenmp • #pragma omp parallel (c) –o hello (d) ./openmp (e) None of the other answers
Within a parallel region, declared variables are by default ________ . • Private • Local (c) Loco (d) Shared (e) None of the other answers