Example A.7 clarification

Discuss the OpenMP 3.1 API Specifications with the OpenMP Arch. Review Board. (Read Only)

Example A.7 clarification

Postby nathanweeks » Sat Oct 08, 2011 11:43 am

I have a question regarding Example A.7. Lines 11-15 on p. 177 state:
The call to the omp_set_dynamic routine with argument 0 in C/C++, or .FALSE. in Fortran, disables the dynamic adjustment of the number of threads in OpenMP implementations that support it. In this case, 10 threads are provided. Note that in case of an error the OpenMP implementation is free to abort the program or to supply any number of threads available.

Does "in case of an error" mean "if the number of threads available is less than the number of threads requested"?
Last edited by nathanweeks on Sat Oct 22, 2011 7:16 am, edited 1 time in total.
Nathan Weeks
Iowa State University HPC Group
Posts: 41
Joined: Sun May 17, 2009 6:19 am
Location: Iowa State University

Re: Example A.7 clarification

Postby hhj » Fri Oct 14, 2011 9:29 am

Yes, you are correct. Part of the intention of this example is to illustrate the outcome from Algorithm 2.1 in Section 2.4.1 (Determining the Number of Threads for a parallel Region), on pages 36-37:
else if (dyn-var = false) and (ThreadsRequested > ThreadsAvailable)
then behavior is implementation defined;

-Henry Jin
Posts: 17
Joined: Thu May 01, 2008 11:59 am

Return to OpenMP 3.1 API Specifications

Who is online

Users browsing this forum: No registered users and 1 guest