Example A.7 clarification

Discuss the OpenMP 3.1 API Specifications with the OpenMP Arch. Review Board. (Read Only)
Forum rules
The OpenMP Forums are now closed to new posts. Please visit Stack Overflow if you are in need of help: https://stackoverflow.com/questions/tagged/openmp
Locked
nathanweeks
Posts: 41
Joined: Sun May 17, 2009 6:19 am
Location: Iowa State University
Contact:

Example A.7 clarification

Post by nathanweeks »

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
http://weeks.public.iastate.edu/

hhj
Posts: 17
Joined: Thu May 01, 2008 11:59 am

Re: Example A.7 clarification

Post by hhj »

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

Locked