diff options
author | Tobias Burnus <burnus@net-b.de> | 2008-11-04 19:16:17 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2008-11-04 19:16:17 +0100 |
commit | 5c6ed53afc63d941494bb6c9f0640ad7160031b3 (patch) | |
tree | 865b3c519ac9d0df0b5dcd05badf877c3f45f6a5 /libgomp/libgomp.texi | |
parent | d793c2a59404318d082c3f78590734f82e24497c (diff) | |
download | gcc-5c6ed53afc63d941494bb6c9f0640ad7160031b3.zip gcc-5c6ed53afc63d941494bb6c9f0640ad7160031b3.tar.gz gcc-5c6ed53afc63d941494bb6c9f0640ad7160031b3.tar.bz2 |
re PR libgomp/37935 (omp_set_schedule not documented in libgomp.texi)
2008-11-04 Tobias Burnus <burnus@net-b.de>
PR libgomp/37935
* libgomp.texi (Runtime library routines, environment
* variables):
Update for OpenMP version 3.0.
From-SVN: r141583
Diffstat (limited to 'libgomp/libgomp.texi')
-rw-r--r-- | libgomp/libgomp.texi | 467 |
1 files changed, 407 insertions, 60 deletions
diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index edc3790..5e68aad 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -116,7 +116,7 @@ arranges for automatic linking of the OpenMP runtime library A complete description of all OpenMP directives accepted may be found in the @uref{http://www.openmp.org, OpenMP Application Program Interface} manual, -version 2.5. +version 3.0. @c --------------------------------------------------------------------- @@ -127,21 +127,31 @@ version 2.5. @chapter Runtime Library Routines The runtime routines described here are defined by section 3 of the OpenMP -specifications in version 2.5. +specifications in version 3.0. The routines are structured in following +three parts: Control threads, processors and the parallel environment. @menu -* omp_get_dynamic:: Dynamic teams setting -* omp_get_max_threads:: Maximum number of threads -* omp_get_nested:: Nested parallel regions -* omp_get_num_procs:: Number of processors online -* omp_get_num_threads:: Size of the active team -* omp_get_thread_num:: Current thread ID -* omp_in_parallel:: Whether a parallel region is active -* omp_set_dynamic:: Enable/disable dynamic teams -* omp_set_nested:: Enable/disable nested parallel regions -* omp_set_num_threads:: Set upper team size limit +* omp_get_active_level:: Number of active parallel regions +* omp_get_ancestor_thread_num:: Ancestor thread ID +* omp_get_dynamic:: Dynamic teams setting +* omp_get_level:: Number of parallel regions +* omp_get_max_active_levels:: Maximal number of active regions +* omp_get_max_threads:: Maximal number of threads of parallel region +* omp_get_nested:: Nested parallel regions +* omp_get_num_procs:: Number of processors online +* omp_get_num_threads:: Size of the active team +* omp_get_schedule:: Obtain the runtime scheduling method +* omp_get_team_size:: Number of threads in a team +* omp_get_thread_limit:: Maximal number of threads +* omp_get_thread_num:: Current thread ID +* omp_in_parallel:: Whether a parallel region is active +* omp_set_dynamic:: Enable/disable dynamic teams +* omp_set_max_active_levels:: Limits the number of active parallel regions +* omp_set_nested:: Enable/disable nested parallel regions +* omp_set_num_threads:: Set upper team size limit +* omp_set_schedule:: Set the runtime scheduling method @end menu Initialize, set, test, unset and destroy simple and nested locks. @@ -166,6 +176,63 @@ Portable, thread-based, wall clock timer. * omp_get_wtime:: Elapsed wall clock time. @end menu + + +@node omp_get_active_level +@section @code{omp_get_active_level} -- Number of parallel regions +@table @asis +@item @emph{Description}: +This function returns the nesting level for the active parallel blocks, +which enclose the calling call. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_get_active_level();} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{integer omp_get_active_level()} +@end multitable + +@item @emph{See also}: +@ref{omp_get_level}, @ref{omp_get_max_active_levels}, @ref{omp_set_max_active_levels} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.19. +@end table + + + +@node omp_get_ancestor_thread_num +@section @code{omp_get_ancestor_thread_num} -- Ancestor thread ID +@table @asis +@item @emph{Description}: +This function returns the thread identification number for the given +nesting level of the current thread. For values of @var{level} outside +zero to @code{omp_get_level} -1 is returned; if @var{level} is +@code{omp_get_level} the result is identical to @code{omp_get_thread_num}. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_get_ancestor_thread_num(int level);} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{integer omp_ancestor_thread_num(level)} +@item @tab @code{integer level} +@end multitable + +@item @emph{See also}: +@ref{omp_get_level}, @ref{omp_get_thread_num}, @ref{omp_get_team_size} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.17. +@end table + + + @node omp_get_dynamic @section @code{omp_get_dynamic} -- Dynamic teams setting @table @asis @@ -193,17 +260,68 @@ disabled by default. @ref{omp_set_dynamic}, @ref{OMP_DYNAMIC} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.8. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.8. +@end table + + + +@node omp_get_level +@section @code{omp_get_level} -- Obtain the current nesting level +@table @asis +@item @emph{Description}: +This function returns the nesting level for the parallel blocks, +which enclose the calling call. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_get level();} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{integer omp_level()} +@end multitable + +@item @emph{See also}: +@ref{omp_get_active_level} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.16. +@end table + + + +@node omp_get_max_active_levels +@section @code{omp_set_max_active_levels} -- Maximal number of active regions +@table @asis +@item @emph{Description}: +This function obtains the maximally allowed number of nested, active parallel regions. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_get_max_active_levels();} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{int omp_get_max_active_levels()} +@end multitable + +@item @emph{See also}: +@ref{omp_set_max_active_levels}, @ref{omp_get_active_level} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.14. @end table @node omp_get_max_threads -@section @code{omp_get_max_threads} -- Maximum number of threads +@section @code{omp_get_max_threads} -- Maximal number of threads of parallel region @table @asis @item @emph{Description}: -Return the maximum number of threads used for parallel regions that do -not use the clause @code{num_threads}. +Return the maximal number of threads used for the current parallel region +that does not use the clause @code{num_threads}. @item @emph{C/C++}: @multitable @columnfractions .20 .80 @@ -216,10 +334,10 @@ not use the clause @code{num_threads}. @end multitable @item @emph{See also}: -@ref{omp_set_num_threads}, @ref{omp_set_dynamic} +@ref{omp_set_num_threads}, @ref{omp_set_dynamic}, @ref{omp_get_thread_limit} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.3. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.3. @end table @@ -251,7 +369,7 @@ disabled by default. @ref{omp_set_nested}, @ref{OMP_NESTED} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.10. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.10. @end table @@ -273,7 +391,7 @@ Returns the number of processors online. @end multitable @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.5. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.5. @end table @@ -306,7 +424,92 @@ one thread per CPU online is used. @ref{omp_get_max_threads}, @ref{omp_set_num_threads}, @ref{OMP_NUM_THREADS} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.2. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.2. +@end table + + + +@node omp_get_schedule +@section @code{omp_get_schedule} -- Obtain the runtime scheduling method +@table @asis +@item @emph{Description}: +Obtain runtime the scheduling method. The @var{kind} argument will be +set to the value @code{omp_sched_static}, @code{omp_sched_dynamic}, +@code{opm_sched_guided} or @code{auto}. The second argument, @var{modifier}, +is set to the chunk size. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{omp_schedule(omp_sched_t * kind, int *modifier);} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{subroutine omp_schedule(kind, modifier)} +@item @tab @code{integer(kind=omp_sched_kind) kind} +@item @tab @code{integer modifier} +@end multitable + +@item @emph{See also}: +@ref{omp_set_schedule}, @ref{OMP_SCHEDULE} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.12. +@end table + + + +@node omp_get_team_size +@section @code{omp_get_team_size} -- Number of threads in a team +@table @asis +@item @emph{Description}: +This function returns the number of threads in a thread team to which +either the current thread or its ancestor belongs. For values of @var{level} +outside zero to @code{omp_get_level} -1 is returned; if @var{level} is zero +1 is returned and for @code{omp_get_level} the result is identical +to @code{omp_get_num_threads}. + +@item @emph{C/C++}: +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_get_time_size(int level);} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{integer function omp_get_team_size(level)} +@item @tab @code{integer level} +@end multitable + +@item @emph{See also}: +@ref{omp_get_num_threads}, @ref{omp_get_level}, @ref{omp_get_ancestor_thread_num} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.18. +@end table + + + +@node omp_get_thread_limit +@section @code{omp_get_thread_limit} -- Maximal number of threads +@table @asis +@item @emph{Description}: +Return the maximal number of threads of the program. + +@item @emph{C/C++}: +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_get_thread_limit();} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{integer function omp_get_thread_limit()} +@end multitable + +@item @emph{See also}: +@ref{omp_get_max_threads}, @ref{OMP_THREAD_LIMIT} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.13. @end table @@ -315,9 +518,10 @@ one thread per CPU online is used. @section @code{omp_get_thread_num} -- Current thread ID @table @asis @item @emph{Description}: -Unique thread identification number. In a sequential parts of the program, -@code{omp_get_thread_num} always returns 0. In parallel regions the return -value varies from 0 to @code{omp_get_max_threads}-1 inclusive. The return +Unique thread identification number within the current team. +In a sequential parts of the program, @code{omp_get_thread_num} +always returns 0. In parallel regions the return value varies +from 0 to @code{omp_get_num_threads}-1 inclusive. The return value of the master thread of a team is always 0. @item @emph{C/C++}: @@ -331,10 +535,10 @@ value of the master thread of a team is always 0. @end multitable @item @emph{See also}: -@ref{omp_get_max_threads} +@ref{omp_get_num_threads}, @ref{omp_get_ancestor_thread_num} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.4. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.4. @end table @@ -358,7 +562,7 @@ their language-specific counterparts. @end multitable @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.6. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.6. @end table @@ -386,7 +590,33 @@ adjustment of team sizes and @code{false} disables it. @ref{OMP_DYNAMIC}, @ref{omp_get_dynamic} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.7. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.7. +@end table + + + +@node omp_set_max_active_levels +@section @code{omp_set_max_active_levels} -- Limits the number of active parallel regions +@table @asis +@item @emph{Description}: +This function limits the maximally allowed number of nested, active parallel regions. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{omp_set_max_active_levels(int max_levels);} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{omp_max_active_levels(max_levels)} +@item @tab @code{integer max_levels} +@end multitable + +@item @emph{See also}: +@ref{omp_get_max_active_levels}, @ref{omp_get_active_level} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.14. @end table @@ -415,7 +645,7 @@ dynamic adjustment of team sizes and @code{false} disables it. @ref{OMP_NESTED}, @ref{omp_get_nested} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.9. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.9. @end table @@ -443,7 +673,40 @@ argument of @code{omp_set_num_threads} shall be a positive integer. @ref{OMP_NUM_THREADS}, @ref{omp_get_num_threads}, @ref{omp_get_max_threads} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.1. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.1. +@end table + + + +@node omp_set_schedule +@section @code{omp_set_schedule} -- Set the runtime scheduling method +@table @asis +@item @emph{Description}: +Sets the runtime scheduling method. The @var{kind} argument can have the +value @code{omp_sched_static}, @code{omp_sched_dynamic}, +@code{opm_sched_guided} or @code{omp_sched_auto}. Except for +@code{omp_sched_auto}, the chunk size is set to the value of +@var{modifier} if positive or to the default value if zero or negative. +For @code{omp_sched_auto} the @var{modifier} argument is ignored. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_schedule(omp_sched_t * kind, int *modifier);} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{subroutine omp_schedule(kind, modifier)} +@item @tab @code{integer(kind=omp_sched_kind) kind} +@item @tab @code{integer modifier} +@end multitable + +@item @emph{See also}: +@ref{omp_get_schedule} +@ref{OMP_SCHEDULE} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.11. @end table @@ -470,7 +733,7 @@ an unlocked state. @ref{omp_destroy_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.1. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.1. @end table @@ -499,7 +762,7 @@ a deadlock occurs. @ref{omp_init_lock}, @ref{omp_test_lock}, @ref{omp_unset_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.3. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.3. @end table @@ -530,7 +793,7 @@ does not block if the lock is not available. This function returns @ref{omp_init_lock}, @ref{omp_set_lock}, @ref{omp_set_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.5. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.5. @end table @@ -560,7 +823,7 @@ again, set the lock for itself. @ref{omp_set_lock}, @ref{omp_test_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.4. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.4. @end table @@ -587,7 +850,7 @@ in the unlocked state. @ref{omp_init_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.2. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.2. @end table @@ -614,7 +877,7 @@ an unlocked state and the nesting count is set to zero. @ref{omp_destroy_nest_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.1. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.1. @end table @@ -642,7 +905,7 @@ nesting count for the lock in incremented. @ref{omp_init_nest_lock}, @ref{omp_unset_nest_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.3. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.3. @end table @@ -674,7 +937,7 @@ is returned. Otherwise, the return value equals zero. @ref{omp_init_lock}, @ref{omp_set_lock}, @ref{omp_set_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.5. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.5. @end table @@ -704,7 +967,7 @@ one of them is chosen to, again, set the lock for itself. @ref{omp_set_nest_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.4. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.4. @end table @@ -731,7 +994,7 @@ in the unlocked state and its nesting count must equal zero. @ref{omp_init_lock} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.2. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.2. @end table @@ -757,7 +1020,7 @@ successive clock ticks. @ref{omp_get_wtime} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.4.2. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.4.2. @end table @@ -785,7 +1048,7 @@ the seconds since the Epoch (00:00:00 UTC, January 1, 1970) are returned. @ref{omp_get_wtick} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.4.1. +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.4.1. @end table @@ -797,25 +1060,30 @@ the seconds since the Epoch (00:00:00 UTC, January 1, 1970) are returned. @node Environment Variables @chapter Environment Variables -The variables @env{OMP_DYNAMIC}, @env{OMP_NESTED}, @env{OMP_NUM_THREADS} and -@env{OMP_SCHEDULE} are defined by section 4 of the OpenMP specifications in -version 2.5, while @env{GOMP_CPU_AFFINITY} and @env{GOMP_STACKSIZE} are GNU +The variables @env{OMP_DYNAMIC}, @env{OMP_MAX_ACTIVE_LEVELS}, +@env{OMP_NESTED}, @env{OMP_NUM_THREADS}, @env{OMP_SCHEDULE}, +@env{OMP_STACKSIZE},@env{OMP_THREAD_LIMIT} and @env{OMP_WAIT_POLICY} +are defined by section 4 of the OpenMP specifications in version 3.0, +while @env{GOMP_CPU_AFFINITY} and @env{GOMP_STACKSIZE} are GNU extensions. @menu -* OMP_DYNAMIC:: Dynamic adjustment of threads -* OMP_NESTED:: Nested parallel regions -* OMP_NUM_THREADS:: Specifies the number of threads to use -* OMP_SCHEDULE:: How threads are scheduled -* GOMP_CPU_AFFINITY:: Bind threads to specific CPUs -* GOMP_STACKSIZE:: Set default thread stack size +* OMP_DYNAMIC:: Dynamic adjustment of threads +* OMP_MAX_ACTIVE_LEVELS:: Set the maximal number of nested parallel regions +* OMP_NESTED:: Nested parallel regions +* OMP_NUM_THREADS:: Specifies the number of threads to use +* OMP_STACKSIZE:: Set default thread stack size +* OMP_SCHEDULE:: How threads are scheduled +* OMP_THREAD_LIMIT:: Set the maximal number of threads +* OMP_WAIT_POLICY:: How waiting threads are handled +* GOMP_CPU_AFFINITY:: Bind threads to specific CPUs +* GOMP_STACKSIZE:: Set default thread stack size @end menu @node OMP_DYNAMIC @section @env{OMP_DYNAMIC} -- Dynamic adjustment of threads @cindex Environment Variable -@cindex Implementation specific setting @table @asis @item @emph{Description}: Enable or disable the dynamic adjustment of the number of threads @@ -827,7 +1095,25 @@ disabled by default. @ref{omp_set_dynamic} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 4.3 +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.3 +@end table + + + +@node OMP_MAX_ACTIVE_LEVELS +@section @env{OMP_MAX_ACTIVE_LEVELS} -- Set the maximal number of nested parallel regions +@cindex Environment Variable +@table @asis +@item @emph{Description}: +Specifies the initial value for the maximal number of nested parallel +regions. The value of this variable shall be positive integer. +If undefined, the number of active levels is unlimited. + +@item @emph{See also}: +@ref{omp_set_max_active_levels} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.7 @end table @@ -847,7 +1133,7 @@ regions are disabled by default. @ref{omp_set_nested} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 4.4 +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.4 @end table @@ -866,7 +1152,7 @@ per CPU online is used. @ref{omp_set_num_threads} @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 4.2 +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.2 @end table @@ -879,12 +1165,70 @@ per CPU online is used. @item @emph{Description}: Allows to specify @code{schedule type} and @code{chunk size}. The value of the variable shall have the form: @code{type[,chunk]} where -@code{type} is one of @code{static}, @code{dynamic} or @code{guided}. -The optional @code{chunk size} shall be a positive integer. If undefined, +@code{type} is one of @code{static}, @code{dynamic}, @code{guided} or @code{auto} +The optional @code{chunk} size shall be a positive integer. If undefined, dynamic scheduling and a chunk size of 1 is used. +@item @emph{See also}: +@ref{omp_set_schedule} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, sections 2.5.1 and 4.1 +@end table + + + +@node OMP_STACKSIZE +@section @env{OMP_STACKSIZE} -- Set default thread stack size +@cindex Environment Variable +@table @asis +@item @emph{Description}: +Set the default thread stack size in kilobytes, unless the number +is suffixed by @code{B}, @code{K}, @code{M} or @code{G}, in which +case the size is, respectively, in bytes, kilobytes, megabytes +or gigabytes. This is different from @code{pthread_attr_setstacksize} +which gets the number of bytes as an argument. If the stacksize can not +be set due to system constraints, an error is reported and the initial +stacksize is left unchanged. If undefined, the stack size is system +dependent. + @item @emph{Reference}: -@uref{http://www.openmp.org/, OpenMP specifications v2.5}, sections 2.5.1 and 4.1 +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, sections 4.5 +@end table + + + +@node OMP_THREAD_LIMIT +@section @env{OMP_THREAD_LIMIT} -- Set the maximal number of threads +@cindex Environment Variable +@table @asis +@item @emph{Description}: +Specifies the number of threads to use for the whole program. The +value of this variable shall be positive integer. If undefined, +the number of threads is not limited. + +@item @emph{See also}: +@ref{OMP_NUM_THREADS} +@ref{omp_get_thread_limit} + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.8 +@end table + + + +@node OMP_WAIT_POLICY +@section @env{OMP_WAIT_POLICY} -- How waiting threads are handled +@cindex Environment Variable +@table @asis +@item @emph{Description}: +Specifies whether waiting threads should be active or passive. If +the value is @code{PASSIVE}, waiting threads should not consume CPU +power while waiting; while the value is @code{ACTIVE} specifies that +they should. + +@item @emph{Reference}: +@uref{http://www.openmp.org/, OpenMP specifications v3.0}, sections 4.6 @end table @@ -923,12 +1267,15 @@ assignment of threads to CPUs. @cindex Implementation specific setting @table @asis @item @emph{Description}: -Set the default thread stack size in kilobytes. This is in opposition -to @code{pthread_attr_setstacksize} which gets the number of bytes as an +Set the default thread stack size in kilobytes. This is different from +@code{pthread_attr_setstacksize} which gets the number of bytes as an argument. If the stacksize can not be set due to system constraints, an error is reported and the initial stacksize is left unchanged. If undefined, the stack size is system dependent. +@item @emph{See also}: +@ref{GOMP_STACKSIZE} + @item @emph{Reference}: @uref{http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html, GCC Patches Mailinglist}, |