1 / 6

OpenMP Quiz

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.

lhague
Download Presentation

OpenMP Quiz

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OpenMP Quiz

  2. 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

  3. 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

  4. 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

  5. Within a parallel region, declared variables are by default ________ . • Private • Local (c) Loco (d) Shared (e) None of the other answers

More Related