1 This is libgomp.info, produced by makeinfo version 4.13 from
2 /d/gcc-4.7.2/gcc-4.7.2/libgomp/libgomp.texi.
4 Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation,
7 Permission is granted to copy, distribute and/or modify this document
8 under the terms of the GNU Free Documentation License, Version 1.3 or
9 any later version published by the Free Software Foundation; with the
10 Invariant Sections being "Funding Free Software", the Front-Cover texts
11 being (a) (see below), and with the Back-Cover Texts being (b) (see
12 below). A copy of the license is included in the section entitled "GNU
13 Free Documentation License".
15 (a) The FSF's Front-Cover Text is:
19 (b) The FSF's Back-Cover Text is:
21 You have freedom to copy and modify this GNU Manual, like GNU
22 software. Copies published by the Free Software Foundation raise
23 funds for GNU development.
25 INFO-DIR-SECTION GNU Libraries
27 * libgomp: (libgomp). GNU OpenMP runtime library
30 This manual documents the GNU implementation of the OpenMP API for
31 multi-platform shared-memory parallel programming in C/C++ and Fortran.
33 Published by the Free Software Foundation 51 Franklin Street, Fifth
34 Floor Boston, MA 02110-1301 USA
36 Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation,
39 Permission is granted to copy, distribute and/or modify this document
40 under the terms of the GNU Free Documentation License, Version 1.3 or
41 any later version published by the Free Software Foundation; with the
42 Invariant Sections being "Funding Free Software", the Front-Cover texts
43 being (a) (see below), and with the Back-Cover Texts being (b) (see
44 below). A copy of the license is included in the section entitled "GNU
45 Free Documentation License".
47 (a) The FSF's Front-Cover Text is:
51 (b) The FSF's Back-Cover Text is:
53 You have freedom to copy and modify this GNU Manual, like GNU
54 software. Copies published by the Free Software Foundation raise
55 funds for GNU development.
58 File: libgomp.info, Node: Top, Next: Enabling OpenMP, Up: (dir)
63 This manual documents the usage of libgomp, the GNU implementation of
64 the OpenMP (http://www.openmp.org) Application Programming Interface
65 (API) for multi-platform shared-memory parallel programming in C/C++
70 * Enabling OpenMP:: How to enable OpenMP for your applications.
71 * Runtime Library Routines:: The OpenMP runtime application programming
73 * Environment Variables:: Influencing runtime behavior with environment
75 * The libgomp ABI:: Notes on the external ABI presented by libgomp.
76 * Reporting Bugs:: How to report bugs in GNU OpenMP.
77 * Copying:: GNU general public license says
78 how you can copy and share libgomp.
79 * GNU Free Documentation License::
80 How you can copy and share this manual.
81 * Funding:: How to help assure continued work for free
83 * Index:: Index of this documentation.
86 File: libgomp.info, Node: Enabling OpenMP, Next: Runtime Library Routines, Prev: Top, Up: Top
91 To activate the OpenMP extensions for C/C++ and Fortran, the
92 compile-time flag `-fopenmp' must be specified. This enables the OpenMP
93 directive `#pragma omp' in C/C++ and `!$omp' directives in free form,
94 `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$' conditional
95 compilation sentinels in free form and `c$', `*$' and `!$' sentinels in
96 fixed form, for Fortran. The flag also arranges for automatic linking
97 of the OpenMP runtime library (*note Runtime Library Routines::).
99 A complete description of all OpenMP directives accepted may be
100 found in the OpenMP Application Program Interface
101 (http://www.openmp.org) manual, version 3.1.
104 File: libgomp.info, Node: Runtime Library Routines, Next: Environment Variables, Prev: Enabling OpenMP, Up: Top
106 2 Runtime Library Routines
107 **************************
109 The runtime routines described here are defined by section 3 of the
110 OpenMP specifications in version 3.1. The routines are structured in
111 following three parts:
113 Control threads, processors and the parallel environment.
117 * omp_get_active_level:: Number of active parallel regions
118 * omp_get_ancestor_thread_num:: Ancestor thread ID
119 * omp_get_dynamic:: Dynamic teams setting
120 * omp_get_level:: Number of parallel regions
121 * omp_get_max_active_levels:: Maximum number of active regions
122 * omp_get_max_threads:: Maximum number of threads of parallel region
123 * omp_get_nested:: Nested parallel regions
124 * omp_get_num_procs:: Number of processors online
125 * omp_get_num_threads:: Size of the active team
126 * omp_get_schedule:: Obtain the runtime scheduling method
127 * omp_get_team_size:: Number of threads in a team
128 * omp_get_thread_limit:: Maximum number of threads
129 * omp_get_thread_num:: Current thread ID
130 * omp_in_parallel:: Whether a parallel region is active
131 * omp_in_final:: Whether in final or included task region
132 * omp_set_dynamic:: Enable/disable dynamic teams
133 * omp_set_max_active_levels:: Limits the number of active parallel regions
134 * omp_set_nested:: Enable/disable nested parallel regions
135 * omp_set_num_threads:: Set upper team size limit
136 * omp_set_schedule:: Set the runtime scheduling method
138 Initialize, set, test, unset and destroy simple and nested locks.
142 * omp_init_lock:: Initialize simple lock
143 * omp_set_lock:: Wait for and set simple lock
144 * omp_test_lock:: Test and set simple lock if available
145 * omp_unset_lock:: Unset simple lock
146 * omp_destroy_lock:: Destroy simple lock
147 * omp_init_nest_lock:: Initialize nested lock
148 * omp_set_nest_lock:: Wait for and set simple lock
149 * omp_test_nest_lock:: Test and set nested lock if available
150 * omp_unset_nest_lock:: Unset nested lock
151 * omp_destroy_nest_lock:: Destroy nested lock
153 Portable, thread-based, wall clock timer.
157 * omp_get_wtick:: Get timer precision.
158 * omp_get_wtime:: Elapsed wall clock time.
161 File: libgomp.info, Node: omp_get_active_level, Next: omp_get_ancestor_thread_num, Up: Runtime Library Routines
163 2.1 `omp_get_active_level' - Number of parallel regions
164 =======================================================
167 This function returns the nesting level for the active parallel
168 blocks, which enclose the calling call.
171 _Prototype_: `int omp_get_active_level(void);'
174 _Interface_: `integer function omp_get_active_level()'
177 *note omp_get_level::, *note omp_get_max_active_levels::, *note
178 omp_set_max_active_levels::
181 OpenMP specifications v3.1 (http://www.openmp.org/), section
185 File: libgomp.info, Node: omp_get_ancestor_thread_num, Next: omp_get_dynamic, Prev: omp_get_active_level, Up: Runtime Library Routines
187 2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
188 ======================================================
191 This function returns the thread identification number for the
192 given nesting level of the current thread. For values of LEVEL
193 outside zero to `omp_get_level' -1 is returned; if LEVEL is
194 `omp_get_level' the result is identical to `omp_get_thread_num'.
197 _Prototype_: `int omp_get_ancestor_thread_num(int level);'
200 _Interface_: `integer function omp_get_ancestor_thread_num(level)'
204 *note omp_get_level::, *note omp_get_thread_num::, *note
208 OpenMP specifications v3.1 (http://www.openmp.org/), section
212 File: libgomp.info, Node: omp_get_dynamic, Next: omp_get_level, Prev: omp_get_ancestor_thread_num, Up: Runtime Library Routines
214 2.3 `omp_get_dynamic' - Dynamic teams setting
215 =============================================
218 This function returns `true' if enabled, `false' otherwise. Here,
219 `true' and `false' represent their language-specific counterparts.
221 The dynamic team setting may be initialized at startup by the
222 `OMP_DYNAMIC' environment variable or at runtime using
223 `omp_set_dynamic'. If undefined, dynamic adjustment is disabled by
227 _Prototype_: `int omp_get_dynamic(void);'
230 _Interface_: `logical function omp_get_dynamic()'
233 *note omp_set_dynamic::, *note OMP_DYNAMIC::
236 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.8.
239 File: libgomp.info, Node: omp_get_level, Next: omp_get_max_active_levels, Prev: omp_get_dynamic, Up: Runtime Library Routines
241 2.4 `omp_get_level' - Obtain the current nesting level
242 ======================================================
245 This function returns the nesting level for the parallel blocks,
246 which enclose the calling call.
249 _Prototype_: `int omp_get_level(void);'
252 _Interface_: `integer function omp_level()'
255 *note omp_get_active_level::
258 OpenMP specifications v3.1 (http://www.openmp.org/), section
262 File: libgomp.info, Node: omp_get_max_active_levels, Next: omp_get_max_threads, Prev: omp_get_level, Up: Runtime Library Routines
264 2.5 `omp_get_max_active_levels' - Maximum number of active regions
265 ==================================================================
268 This function obtains the maximum allowed number of nested, active
272 _Prototype_: `int omp_get_max_active_levels(void);'
275 _Interface_: `integer function omp_get_max_active_levels()'
278 *note omp_set_max_active_levels::, *note omp_get_active_level::
281 OpenMP specifications v3.1 (http://www.openmp.org/), section
285 File: libgomp.info, Node: omp_get_max_threads, Next: omp_get_nested, Prev: omp_get_max_active_levels, Up: Runtime Library Routines
287 2.6 `omp_get_max_threads' - Maximum number of threads of parallel region
288 ========================================================================
291 Return the maximum number of threads used for the current parallel
292 region that does not use the clause `num_threads'.
295 _Prototype_: `int omp_get_max_threads(void);'
298 _Interface_: `integer function omp_get_max_threads()'
301 *note omp_set_num_threads::, *note omp_set_dynamic::, *note
302 omp_get_thread_limit::
305 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.3.
308 File: libgomp.info, Node: omp_get_nested, Next: omp_get_num_procs, Prev: omp_get_max_threads, Up: Runtime Library Routines
310 2.7 `omp_get_nested' - Nested parallel regions
311 ==============================================
314 This function returns `true' if nested parallel regions are
315 enabled, `false' otherwise. Here, `true' and `false' represent
316 their language-specific counterparts.
318 Nested parallel regions may be initialized at startup by the
319 `OMP_NESTED' environment variable or at runtime using
320 `omp_set_nested'. If undefined, nested parallel regions are
324 _Prototype_: `int omp_get_nested(void);'
327 _Interface_: `logical function omp_get_nested()'
330 *note omp_set_nested::, *note OMP_NESTED::
333 OpenMP specifications v3.1 (http://www.openmp.org/), section
337 File: libgomp.info, Node: omp_get_num_procs, Next: omp_get_num_threads, Prev: omp_get_nested, Up: Runtime Library Routines
339 2.8 `omp_get_num_procs' - Number of processors online
340 =====================================================
343 Returns the number of processors online.
346 _Prototype_: `int omp_get_num_procs(void);'
349 _Interface_: `integer function omp_get_num_procs()'
352 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.5.
355 File: libgomp.info, Node: omp_get_num_threads, Next: omp_get_schedule, Prev: omp_get_num_procs, Up: Runtime Library Routines
357 2.9 `omp_get_num_threads' - Size of the active team
358 ===================================================
361 Returns the number of threads in the current team. In a sequential
362 section of the program `omp_get_num_threads' returns 1.
364 The default team size may be initialized at startup by the
365 `OMP_NUM_THREADS' environment variable. At runtime, the size of
366 the current team may be set either by the `NUM_THREADS' clause or
367 by `omp_set_num_threads'. If none of the above were used to define
368 a specific value and `OMP_DYNAMIC' is disabled, one thread per CPU
372 _Prototype_: `int omp_get_num_threads(void);'
375 _Interface_: `integer function omp_get_num_threads()'
378 *note omp_get_max_threads::, *note omp_set_num_threads::, *note
382 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.2.
385 File: libgomp.info, Node: omp_get_schedule, Next: omp_get_team_size, Prev: omp_get_num_threads, Up: Runtime Library Routines
387 2.10 `omp_get_schedule' - Obtain the runtime scheduling method
388 ==============================================================
391 Obtain the runtime scheduling method. The KIND argument will be
392 set to the value `omp_sched_static', `omp_sched_dynamic',
393 `omp_sched_guided' or `omp_sched_auto'. The second argument,
394 MODIFIER, is set to the chunk size.
397 _Prototype_: `void omp_schedule(omp_sched_t *kind, int *modifier);'
400 _Interface_: `subroutine omp_schedule(kind, modifier)'
401 `integer(kind=omp_sched_kind) kind'
405 *note omp_set_schedule::, *note OMP_SCHEDULE::
408 OpenMP specifications v3.1 (http://www.openmp.org/), section
412 File: libgomp.info, Node: omp_get_team_size, Next: omp_get_thread_limit, Prev: omp_get_schedule, Up: Runtime Library Routines
414 2.11 `omp_get_team_size' - Number of threads in a team
415 ======================================================
418 This function returns the number of threads in a thread team to
419 which either the current thread or its ancestor belongs. For
420 values of LEVEL outside zero to `omp_get_level', -1 is returned;
421 if LEVEL is zero, 1 is returned, and for `omp_get_level', the
422 result is identical to `omp_get_num_threads'.
425 _Prototype_: `int omp_get_team_size(int level);'
428 _Interface_: `integer function omp_get_team_size(level)'
432 *note omp_get_num_threads::, *note omp_get_level::, *note
433 omp_get_ancestor_thread_num::
436 OpenMP specifications v3.1 (http://www.openmp.org/), section
440 File: libgomp.info, Node: omp_get_thread_limit, Next: omp_get_thread_num, Prev: omp_get_team_size, Up: Runtime Library Routines
442 2.12 `omp_get_thread_limit' - Maximum number of threads
443 =======================================================
446 Return the maximum number of threads of the program.
449 _Prototype_: `int omp_get_thread_limit(void);'
452 _Interface_: `integer function omp_get_thread_limit()'
455 *note omp_get_max_threads::, *note OMP_THREAD_LIMIT::
458 OpenMP specifications v3.1 (http://www.openmp.org/), section
462 File: libgomp.info, Node: omp_get_thread_num, Next: omp_in_parallel, Prev: omp_get_thread_limit, Up: Runtime Library Routines
464 2.13 `omp_get_thread_num' - Current thread ID
465 =============================================
468 Returns a unique thread identification number within the current
469 team. In a sequential parts of the program, `omp_get_thread_num'
470 always returns 0. In parallel regions the return value varies from
471 0 to `omp_get_num_threads'-1 inclusive. The return value of the
472 master thread of a team is always 0.
475 _Prototype_: `int omp_get_thread_num(void);'
478 _Interface_: `integer function omp_get_thread_num()'
481 *note omp_get_num_threads::, *note omp_get_ancestor_thread_num::
484 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.4.
487 File: libgomp.info, Node: omp_in_parallel, Next: omp_in_final, Prev: omp_get_thread_num, Up: Runtime Library Routines
489 2.14 `omp_in_parallel' - Whether a parallel region is active
490 ============================================================
493 This function returns `true' if currently running in parallel,
494 `false' otherwise. Here, `true' and `false' represent their
495 language-specific counterparts.
498 _Prototype_: `int omp_in_parallel(void);'
501 _Interface_: `logical function omp_in_parallel()'
504 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.6.
507 File: libgomp.info, Node: omp_in_final, Next: omp_set_dynamic, Prev: omp_in_parallel, Up: Runtime Library Routines
509 2.15 `omp_in_final' - Whether in final or included task region
510 ==============================================================
513 This function returns `true' if currently running in a final or
514 included task region, `false' otherwise. Here, `true' and `false'
515 represent their language-specific counterparts.
518 _Prototype_: `int omp_in_final(void);'
521 _Interface_: `logical function omp_in_final()'
524 OpenMP specifications v3.1 (http://www.openmp.org/), section
528 File: libgomp.info, Node: omp_set_dynamic, Next: omp_set_max_active_levels, Prev: omp_in_final, Up: Runtime Library Routines
530 2.16 `omp_set_dynamic' - Enable/disable dynamic teams
531 =====================================================
534 Enable or disable the dynamic adjustment of the number of threads
535 within a team. The function takes the language-specific equivalent
536 of `true' and `false', where `true' enables dynamic adjustment of
537 team sizes and `false' disables it.
540 _Prototype_: `void omp_set_dynamic(int set);'
543 _Interface_: `subroutine omp_set_dynamic(set)'
544 `logical, intent(in) :: set'
547 *note OMP_DYNAMIC::, *note omp_get_dynamic::
550 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.7.
553 File: libgomp.info, Node: omp_set_max_active_levels, Next: omp_set_nested, Prev: omp_set_dynamic, Up: Runtime Library Routines
555 2.17 `omp_set_max_active_levels' - Limits the number of active parallel regions
556 ===============================================================================
559 This function limits the maximum allowed number of nested, active
563 _Prototype_: `void omp_set_max_active_levels(int max_levels);'
566 _Interface_: `subroutine omp_set_max_active_levels(max_levels)'
570 *note omp_get_max_active_levels::, *note omp_get_active_level::
573 OpenMP specifications v3.1 (http://www.openmp.org/), section
577 File: libgomp.info, Node: omp_set_nested, Next: omp_set_num_threads, Prev: omp_set_max_active_levels, Up: Runtime Library Routines
579 2.18 `omp_set_nested' - Enable/disable nested parallel regions
580 ==============================================================
583 Enable or disable nested parallel regions, i.e., whether team
584 members are allowed to create new teams. The function takes the
585 language-specific equivalent of `true' and `false', where `true'
586 enables dynamic adjustment of team sizes and `false' disables it.
589 _Prototype_: `void omp_set_nested(int set);'
592 _Interface_: `subroutine omp_set_nested(set)'
593 `logical, intent(in) :: set'
596 *note OMP_NESTED::, *note omp_get_nested::
599 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.9.
602 File: libgomp.info, Node: omp_set_num_threads, Next: omp_set_schedule, Prev: omp_set_nested, Up: Runtime Library Routines
604 2.19 `omp_set_num_threads' - Set upper team size limit
605 ======================================================
608 Specifies the number of threads used by default in subsequent
609 parallel sections, if those do not specify a `num_threads' clause.
610 The argument of `omp_set_num_threads' shall be a positive integer.
613 _Prototype_: `void omp_set_num_threads(int n);'
616 _Interface_: `subroutine omp_set_num_threads(n)'
617 `integer, intent(in) :: n'
620 *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note
621 omp_get_max_threads::
624 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.1.
627 File: libgomp.info, Node: omp_set_schedule, Next: omp_init_lock, Prev: omp_set_num_threads, Up: Runtime Library Routines
629 2.20 `omp_set_schedule' - Set the runtime scheduling method
630 ===========================================================
633 Sets the runtime scheduling method. The KIND argument can have the
634 value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
635 or `omp_sched_auto'. Except for `omp_sched_auto', the chunk size
636 is set to the value of MODIFIER if positive, or to the default
637 value if zero or negative. For `omp_sched_auto' the MODIFIER
641 _Prototype_: `void omp_set_schedule(omp_sched_t *kind, int
645 _Interface_: `subroutine omp_set_schedule(kind, modifier)'
646 `integer(kind=omp_sched_kind) kind'
650 *note omp_get_schedule:: *note OMP_SCHEDULE::
653 OpenMP specifications v3.1 (http://www.openmp.org/), section
657 File: libgomp.info, Node: omp_init_lock, Next: omp_set_lock, Prev: omp_set_schedule, Up: Runtime Library Routines
659 2.21 `omp_init_lock' - Initialize simple lock
660 =============================================
663 Initialize a simple lock. After initialization, the lock is in an
667 _Prototype_: `void omp_init_lock(omp_lock_t *lock);'
670 _Interface_: `subroutine omp_init_lock(lock)'
671 `integer(omp_lock_kind), intent(out) :: lock'
674 *note omp_destroy_lock::
677 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
680 File: libgomp.info, Node: omp_set_lock, Next: omp_test_lock, Prev: omp_init_lock, Up: Runtime Library Routines
682 2.22 `omp_set_lock' - Wait for and set simple lock
683 ==================================================
686 Before setting a simple lock, the lock variable must be
687 initialized by `omp_init_lock'. The calling thread is blocked
688 until the lock is available. If the lock is already held by the
689 current thread, a deadlock occurs.
692 _Prototype_: `void omp_set_lock(omp_lock_t *lock);'
695 _Interface_: `subroutine omp_set_lock(lock)'
696 `integer(omp_lock_kind), intent(inout) :: lock'
699 *note omp_init_lock::, *note omp_test_lock::, *note
703 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
706 File: libgomp.info, Node: omp_test_lock, Next: omp_unset_lock, Prev: omp_set_lock, Up: Runtime Library Routines
708 2.23 `omp_test_lock' - Test and set simple lock if available
709 ============================================================
712 Before setting a simple lock, the lock variable must be
713 initialized by `omp_init_lock'. Contrary to `omp_set_lock',
714 `omp_test_lock' does not block if the lock is not available. This
715 function returns `true' upon success, `false' otherwise. Here,
716 `true' and `false' represent their language-specific counterparts.
719 _Prototype_: `int omp_test_lock(omp_lock_t *lock);'
722 _Interface_: `logical function omp_test_lock(lock)'
723 `integer(omp_lock_kind), intent(inout) :: lock'
726 *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
729 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
732 File: libgomp.info, Node: omp_unset_lock, Next: omp_destroy_lock, Prev: omp_test_lock, Up: Runtime Library Routines
734 2.24 `omp_unset_lock' - Unset simple lock
735 =========================================
738 A simple lock about to be unset must have been locked by
739 `omp_set_lock' or `omp_test_lock' before. In addition, the lock
740 must be held by the thread calling `omp_unset_lock'. Then, the
741 lock becomes unlocked. If one or more threads attempted to set the
742 lock before, one of them is chosen to, again, set the lock to
746 _Prototype_: `void omp_unset_lock(omp_lock_t *lock);'
749 _Interface_: `subroutine omp_unset_lock(lock)'
750 `integer(omp_lock_kind), intent(inout) :: lock'
753 *note omp_set_lock::, *note omp_test_lock::
756 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
759 File: libgomp.info, Node: omp_destroy_lock, Next: omp_init_nest_lock, Prev: omp_unset_lock, Up: Runtime Library Routines
761 2.25 `omp_destroy_lock' - Destroy simple lock
762 =============================================
765 Destroy a simple lock. In order to be destroyed, a simple lock
766 must be in the unlocked state.
769 _Prototype_: `void omp_destroy_lock(omp_lock_t *lock);'
772 _Interface_: `subroutine omp_destroy_lock(lock)'
773 `integer(omp_lock_kind), intent(inout) :: lock'
776 *note omp_init_lock::
779 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
782 File: libgomp.info, Node: omp_init_nest_lock, Next: omp_set_nest_lock, Prev: omp_destroy_lock, Up: Runtime Library Routines
784 2.26 `omp_init_nest_lock' - Initialize nested lock
785 ==================================================
788 Initialize a nested lock. After initialization, the lock is in an
789 unlocked state and the nesting count is set to zero.
792 _Prototype_: `void omp_init_nest_lock(omp_nest_lock_t *lock);'
795 _Interface_: `subroutine omp_init_nest_lock(lock)'
796 `integer(omp_nest_lock_kind), intent(out) :: lock'
799 *note omp_destroy_nest_lock::
802 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
805 File: libgomp.info, Node: omp_set_nest_lock, Next: omp_test_nest_lock, Prev: omp_init_nest_lock, Up: Runtime Library Routines
807 2.27 `omp_set_nest_lock' - Wait for and set nested lock
808 =======================================================
811 Before setting a nested lock, the lock variable must be
812 initialized by `omp_init_nest_lock'. The calling thread is blocked
813 until the lock is available. If the lock is already held by the
814 current thread, the nesting count for the lock is incremented.
817 _Prototype_: `void omp_set_nest_lock(omp_nest_lock_t *lock);'
820 _Interface_: `subroutine omp_set_nest_lock(lock)'
821 `integer(omp_nest_lock_kind), intent(inout) :: lock'
824 *note omp_init_nest_lock::, *note omp_unset_nest_lock::
827 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
830 File: libgomp.info, Node: omp_test_nest_lock, Next: omp_unset_nest_lock, Prev: omp_set_nest_lock, Up: Runtime Library Routines
832 2.28 `omp_test_nest_lock' - Test and set nested lock if available
833 =================================================================
836 Before setting a nested lock, the lock variable must be
837 initialized by `omp_init_nest_lock'. Contrary to
838 `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
839 lock is not available. If the lock is already held by the current
840 thread, the new nesting count is returned. Otherwise, the return
844 _Prototype_: `int omp_test_nest_lock(omp_nest_lock_t *lock);'
847 _Interface_: `logical function omp_test_nest_lock(lock)'
848 `integer(omp_nest_lock_kind), intent(inout) :: lock'
851 *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
854 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
857 File: libgomp.info, Node: omp_unset_nest_lock, Next: omp_destroy_nest_lock, Prev: omp_test_nest_lock, Up: Runtime Library Routines
859 2.29 `omp_unset_nest_lock' - Unset nested lock
860 ==============================================
863 A nested lock about to be unset must have been locked by
864 `omp_set_nested_lock' or `omp_test_nested_lock' before. In
865 addition, the lock must be held by the thread calling
866 `omp_unset_nested_lock'. If the nesting count drops to zero, the
867 lock becomes unlocked. If one ore more threads attempted to set
868 the lock before, one of them is chosen to, again, set the lock to
872 _Prototype_: `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
875 _Interface_: `subroutine omp_unset_nest_lock(lock)'
876 `integer(omp_nest_lock_kind), intent(inout) :: lock'
879 *note omp_set_nest_lock::
882 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
885 File: libgomp.info, Node: omp_destroy_nest_lock, Next: omp_get_wtick, Prev: omp_unset_nest_lock, Up: Runtime Library Routines
887 2.30 `omp_destroy_nest_lock' - Destroy nested lock
888 ==================================================
891 Destroy a nested lock. In order to be destroyed, a nested lock
892 must be in the unlocked state and its nesting count must equal
896 _Prototype_: `void omp_destroy_nest_lock(omp_nest_lock_t *);'
899 _Interface_: `subroutine omp_destroy_nest_lock(lock)'
900 `integer(omp_nest_lock_kind), intent(inout) :: lock'
903 *note omp_init_lock::
906 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
909 File: libgomp.info, Node: omp_get_wtick, Next: omp_get_wtime, Prev: omp_destroy_nest_lock, Up: Runtime Library Routines
911 2.31 `omp_get_wtick' - Get timer precision
912 ==========================================
915 Gets the timer precision, i.e., the number of seconds between two
916 successive clock ticks.
919 _Prototype_: `double omp_get_wtick(void);'
922 _Interface_: `double precision function omp_get_wtick()'
925 *note omp_get_wtime::
928 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.2.
931 File: libgomp.info, Node: omp_get_wtime, Prev: omp_get_wtick, Up: Runtime Library Routines
933 2.32 `omp_get_wtime' - Elapsed wall clock time
934 ==============================================
937 Elapsed wall clock time in seconds. The time is measured per
938 thread, no guarantee can be made that two distinct threads measure
939 the same time. Time is measured from some "time in the past",
940 which is an arbitrary time guaranteed not to change during the
941 execution of the program.
944 _Prototype_: `double omp_get_wtime(void);'
947 _Interface_: `double precision function omp_get_wtime()'
950 *note omp_get_wtick::
953 OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.1.
956 File: libgomp.info, Node: Environment Variables, Next: The libgomp ABI, Prev: Runtime Library Routines, Up: Top
958 3 Environment Variables
959 ***********************
961 The variables `OMP_DYNAMIC', `OMP_MAX_ACTIVE_LEVELS', `OMP_NESTED',
962 `OMP_NUM_THREADS', `OMP_SCHEDULE', `OMP_STACKSIZE',`OMP_THREAD_LIMIT'
963 and `OMP_WAIT_POLICY' are defined by section 4 of the OpenMP
964 specifications in version 3.1, while `GOMP_CPU_AFFINITY' and
965 `GOMP_STACKSIZE' are GNU extensions.
969 * OMP_DYNAMIC:: Dynamic adjustment of threads
970 * OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions
971 * OMP_NESTED:: Nested parallel regions
972 * OMP_NUM_THREADS:: Specifies the number of threads to use
973 * OMP_STACKSIZE:: Set default thread stack size
974 * OMP_SCHEDULE:: How threads are scheduled
975 * OMP_THREAD_LIMIT:: Set the maximum number of threads
976 * OMP_WAIT_POLICY:: How waiting threads are handled
977 * OMP_PROC_BIND:: Whether theads may be moved between CPUs
978 * GOMP_CPU_AFFINITY:: Bind threads to specific CPUs
979 * GOMP_STACKSIZE:: Set default thread stack size
982 File: libgomp.info, Node: OMP_DYNAMIC, Next: OMP_MAX_ACTIVE_LEVELS, Up: Environment Variables
984 3.1 `OMP_DYNAMIC' - Dynamic adjustment of threads
985 =================================================
988 Enable or disable the dynamic adjustment of the number of threads
989 within a team. The value of this environment variable shall be
990 `TRUE' or `FALSE'. If undefined, dynamic adjustment is disabled by
994 *note omp_set_dynamic::
997 OpenMP specifications v3.1 (http://www.openmp.org/), section 4.3
1000 File: libgomp.info, Node: OMP_MAX_ACTIVE_LEVELS, Next: OMP_NESTED, Prev: OMP_DYNAMIC, Up: Environment Variables
1002 3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
1003 ===============================================================================
1006 Specifies the initial value for the maximum number of nested
1007 parallel regions. The value of this variable shall be a positive
1008 integer. If undefined, the number of active levels is unlimited.
1011 *note omp_set_max_active_levels::
1014 OpenMP specifications v3.1 (http://www.openmp.org/), section 4.8
1017 File: libgomp.info, Node: OMP_NESTED, Next: OMP_NUM_THREADS, Prev: OMP_MAX_ACTIVE_LEVELS, Up: Environment Variables
1019 3.3 `OMP_NESTED' - Nested parallel regions
1020 ==========================================
1023 Enable or disable nested parallel regions, i.e., whether team
1024 members are allowed to create new teams. The value of this
1025 environment variable shall be `TRUE' or `FALSE'. If undefined,
1026 nested parallel regions are disabled by default.
1029 *note omp_set_nested::
1032 OpenMP specifications v3.1 (http://www.openmp.org/), section 4.5
1035 File: libgomp.info, Node: OMP_NUM_THREADS, Next: OMP_STACKSIZE, Prev: OMP_NESTED, Up: Environment Variables
1037 3.4 `OMP_NUM_THREADS' - Specifies the number of threads to use
1038 ==============================================================
1041 Specifies the default number of threads to use in parallel
1042 regions. The value of this variable shall be a comma-separated
1043 list of positive integers; the value specified the number of
1044 threads to use for the corresponding nested level. If undefined
1045 one thread per CPU is used.
1048 *note omp_set_num_threads::
1051 OpenMP specifications v3.1 (http://www.openmp.org/), section 4.2
1054 File: libgomp.info, Node: OMP_SCHEDULE, Next: OMP_THREAD_LIMIT, Prev: OMP_STACKSIZE, Up: Environment Variables
1056 3.5 `OMP_SCHEDULE' - How threads are scheduled
1057 ==============================================
1060 Allows to specify `schedule type' and `chunk size'. The value of
1061 the variable shall have the form: `type[,chunk]' where `type' is
1062 one of `static', `dynamic', `guided' or `auto' The optional
1063 `chunk' size shall be a positive integer. If undefined, dynamic
1064 scheduling and a chunk size of 1 is used.
1067 *note omp_set_schedule::
1070 OpenMP specifications v3.1 (http://www.openmp.org/), sections
1074 File: libgomp.info, Node: OMP_STACKSIZE, Next: OMP_SCHEDULE, Prev: OMP_NUM_THREADS, Up: Environment Variables
1076 3.6 `OMP_STACKSIZE' - Set default thread stack size
1077 ===================================================
1080 Set the default thread stack size in kilobytes, unless the number
1081 is suffixed by `B', `K', `M' or `G', in which case the size is,
1082 respectively, in bytes, kilobytes, megabytes or gigabytes. This is
1083 different from `pthread_attr_setstacksize' which gets the number
1084 of bytes as an argument. If the stack size cannot be set due to
1085 system constraints, an error is reported and the initial stack
1086 size is left unchanged. If undefined, the stack size is system
1090 OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.6
1093 File: libgomp.info, Node: OMP_THREAD_LIMIT, Next: OMP_WAIT_POLICY, Prev: OMP_SCHEDULE, Up: Environment Variables
1095 3.7 `OMP_THREAD_LIMIT' - Set the maximum number of threads
1096 ==========================================================
1099 Specifies the number of threads to use for the whole program. The
1100 value of this variable shall be a positive integer. If undefined,
1101 the number of threads is not limited.
1104 *note OMP_NUM_THREADS:: *note omp_get_thread_limit::
1107 OpenMP specifications v3.1 (http://www.openmp.org/), section 4.9
1110 File: libgomp.info, Node: OMP_WAIT_POLICY, Next: OMP_PROC_BIND, Prev: OMP_THREAD_LIMIT, Up: Environment Variables
1112 3.8 `OMP_WAIT_POLICY' - How waiting threads are handled
1113 =======================================================
1116 Specifies whether waiting threads should be active or passive. If
1117 the value is `PASSIVE', waiting threads should not consume CPU
1118 power while waiting; while the value is `ACTIVE' specifies that
1122 OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.7
1125 File: libgomp.info, Node: OMP_PROC_BIND, Next: GOMP_CPU_AFFINITY, Prev: OMP_WAIT_POLICY, Up: Environment Variables
1127 3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
1128 ==============================================================
1131 Specifies whether threads may be moved between processors. If set
1132 to `true', OpenMP theads should not be moved, if set to `false'
1136 *note GOMP_CPU_AFFINITY::
1139 OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.4
1142 File: libgomp.info, Node: GOMP_CPU_AFFINITY, Next: GOMP_STACKSIZE, Prev: OMP_PROC_BIND, Up: Environment Variables
1144 3.10 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
1145 ========================================================
1148 Binds threads to specific CPUs. The variable should contain a
1149 space-separated or comma-separated list of CPUs. This list may
1150 contain different kinds of entries: either single CPU numbers in
1151 any order, a range of CPUs (M-N) or a range with some stride
1152 (M-N:S). CPU numbers are zero based. For example,
1153 `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
1154 to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
1155 CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
1156 10, 12, and 14 respectively and then start assigning back from the
1157 beginning of the list. `GOMP_CPU_AFFINITY=0' binds all threads to
1160 There is no GNU OpenMP library routine to determine whether a CPU
1161 affinity specification is in effect. As a workaround,
1162 language-specific library functions, e.g., `getenv' in C or
1163 `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
1164 setting of the `GOMP_CPU_AFFINITY' environment variable. A defined
1165 CPU affinity on startup cannot be changed or disabled during the
1166 runtime of the application.
1168 If this environment variable is omitted, the host system will
1169 handle the assignment of threads to CPUs.
1172 *note OMP_PROC_BIND::
1175 File: libgomp.info, Node: GOMP_STACKSIZE, Prev: GOMP_CPU_AFFINITY, Up: Environment Variables
1177 3.11 `GOMP_STACKSIZE' - Set default thread stack size
1178 =====================================================
1181 Set the default thread stack size in kilobytes. This is different
1182 from `pthread_attr_setstacksize' which gets the number of bytes as
1183 an argument. If the stack size cannot be set due to system
1184 constraints, an error is reported and the initial stack size is
1185 left unchanged. If undefined, the stack size is system dependent.
1188 *note OMP_STACKSIZE::
1191 GCC Patches Mailinglist
1192 (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC
1194 (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html)
1197 File: libgomp.info, Node: The libgomp ABI, Next: Reporting Bugs, Prev: Environment Variables, Up: Top
1202 The following sections present notes on the external ABI as presented
1203 by libgomp. Only maintainers should need them.
1207 * Implementing MASTER construct::
1208 * Implementing CRITICAL construct::
1209 * Implementing ATOMIC construct::
1210 * Implementing FLUSH construct::
1211 * Implementing BARRIER construct::
1212 * Implementing THREADPRIVATE construct::
1213 * Implementing PRIVATE clause::
1214 * Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses::
1215 * Implementing REDUCTION clause::
1216 * Implementing PARALLEL construct::
1217 * Implementing FOR construct::
1218 * Implementing ORDERED construct::
1219 * Implementing SECTIONS construct::
1220 * Implementing SINGLE construct::
1223 File: libgomp.info, Node: Implementing MASTER construct, Next: Implementing CRITICAL construct, Up: The libgomp ABI
1225 4.1 Implementing MASTER construct
1226 =================================
1228 if (omp_get_thread_num () == 0)
1231 Alternately, we generate two copies of the parallel subfunction and
1232 only include this in the version run by the master thread. Surely this
1233 is not worthwhile though...
1236 File: libgomp.info, Node: Implementing CRITICAL construct, Next: Implementing ATOMIC construct, Prev: Implementing MASTER construct, Up: The libgomp ABI
1238 4.2 Implementing CRITICAL construct
1239 ===================================
1241 Without a specified name,
1243 void GOMP_critical_start (void);
1244 void GOMP_critical_end (void);
1246 so that we don't get COPY relocations from libgomp to the main
1249 With a specified name, use omp_set_lock and omp_unset_lock with name
1250 being transformed into a variable declared like
1252 omp_lock_t gomp_critical_user_<name> __attribute__((common))
1254 Ideally the ABI would specify that all zero is a valid unlocked
1255 state, and so we wouldn't need to initialize this at startup.
1258 File: libgomp.info, Node: Implementing ATOMIC construct, Next: Implementing FLUSH construct, Prev: Implementing CRITICAL construct, Up: The libgomp ABI
1260 4.3 Implementing ATOMIC construct
1261 =================================
1263 The target should implement the `__sync' builtins.
1265 Failing that we could add
1267 void GOMP_atomic_enter (void)
1268 void GOMP_atomic_exit (void)
1270 which reuses the regular lock code, but with yet another lock object
1271 private to the library.
1274 File: libgomp.info, Node: Implementing FLUSH construct, Next: Implementing BARRIER construct, Prev: Implementing ATOMIC construct, Up: The libgomp ABI
1276 4.4 Implementing FLUSH construct
1277 ================================
1279 Expands to the `__sync_synchronize' builtin.
1282 File: libgomp.info, Node: Implementing BARRIER construct, Next: Implementing THREADPRIVATE construct, Prev: Implementing FLUSH construct, Up: The libgomp ABI
1284 4.5 Implementing BARRIER construct
1285 ==================================
1287 void GOMP_barrier (void)
1290 File: libgomp.info, Node: Implementing THREADPRIVATE construct, Next: Implementing PRIVATE clause, Prev: Implementing BARRIER construct, Up: The libgomp ABI
1292 4.6 Implementing THREADPRIVATE construct
1293 ========================================
1295 In _most_ cases we can map this directly to `__thread'. Except that
1296 OMP allows constructors for C++ objects. We can either refuse to
1297 support this (how often is it used?) or we can implement something akin
1300 Even more ideally, this ctor feature is handled by extensions to the
1301 main pthreads library. Failing that, we can have a set of entry points
1302 to register ctor functions to be called.
1305 File: libgomp.info, Node: Implementing PRIVATE clause, Next: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses, Prev: Implementing THREADPRIVATE construct, Up: The libgomp ABI
1307 4.7 Implementing PRIVATE clause
1308 ===============================
1310 In association with a PARALLEL, or within the lexical extent of a
1311 PARALLEL block, the variable becomes a local variable in the parallel
1314 In association with FOR or SECTIONS blocks, create a new automatic
1315 variable within the current function. This preserves the semantic of
1316 new variable creation.
1319 File: libgomp.info, Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses, Next: Implementing REDUCTION clause, Prev: Implementing PRIVATE clause, Up: The libgomp ABI
1321 4.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
1322 ========================================================================
1324 This seems simple enough for PARALLEL blocks. Create a private struct
1325 for communicating between the parent and subfunction. In the parent,
1326 copy in values for scalar and "small" structs; copy in addresses for
1327 others TREE_ADDRESSABLE types. In the subfunction, copy the value into
1330 It is not clear what to do with bare FOR or SECTION blocks. The
1331 only thing I can figure is that we do something like:
1333 #pragma omp for firstprivate(x) lastprivate(y)
1334 for (int i = 0; i < n; ++i)
1348 where the "x=x" and "y=y" assignments actually have different uids
1349 for the two variables, i.e. not something you could write directly in
1350 C. Presumably this only makes sense if the "outer" x and y are global
1353 COPYPRIVATE would work the same way, except the structure broadcast
1354 would have to happen via SINGLE machinery instead.
1357 File: libgomp.info, Node: Implementing REDUCTION clause, Next: Implementing PARALLEL construct, Prev: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses, Up: The libgomp ABI
1359 4.9 Implementing REDUCTION clause
1360 =================================
1362 The private struct mentioned in the previous section should have a
1363 pointer to an array of the type of the variable, indexed by the
1364 thread's TEAM_ID. The thread stores its final value into the array,
1365 and after the barrier, the master thread iterates over the array to
1369 File: libgomp.info, Node: Implementing PARALLEL construct, Next: Implementing FOR construct, Prev: Implementing REDUCTION clause, Up: The libgomp ABI
1371 4.10 Implementing PARALLEL construct
1372 ====================================
1374 #pragma omp parallel
1381 void subfunction (void *data)
1388 GOMP_parallel_start (subfunction, &data, num_threads);
1389 subfunction (&data);
1390 GOMP_parallel_end ();
1392 void GOMP_parallel_start (void (*fn)(void *), void *data, unsigned num_threads)
1394 The FN argument is the subfunction to be run in parallel.
1396 The DATA argument is a pointer to a structure used to communicate
1397 data in and out of the subfunction, as discussed above with respect to
1400 The NUM_THREADS argument is 1 if an IF clause is present and false,
1401 or the value of the NUM_THREADS clause, if present, or 0.
1403 The function needs to create the appropriate number of threads
1404 and/or launch them from the dock. It needs to create the team
1405 structure and assign team ids.
1407 void GOMP_parallel_end (void)
1409 Tears down the team and returns us to the previous
1410 `omp_in_parallel()' state.
1413 File: libgomp.info, Node: Implementing FOR construct, Next: Implementing ORDERED construct, Prev: Implementing PARALLEL construct, Up: The libgomp ABI
1415 4.11 Implementing FOR construct
1416 ===============================
1418 #pragma omp parallel for
1419 for (i = lb; i <= ub; i++)
1424 void subfunction (void *data)
1427 while (GOMP_loop_static_next (&_s0, &_e0))
1430 for (i = _s0; i < _e1; i++)
1433 GOMP_loop_end_nowait ();
1436 GOMP_parallel_loop_static (subfunction, NULL, 0, lb, ub+1, 1, 0);
1438 GOMP_parallel_end ();
1440 #pragma omp for schedule(runtime)
1441 for (i = 0; i < n; i++)
1448 if (GOMP_loop_runtime_start (0, n, 1, &_s0, &_e0))
1451 for (i = _s0, i < _e0; i++)
1453 } while (GOMP_loop_runtime_next (&_s0, _&e0));
1457 Note that while it looks like there is trickiness to propagating a
1458 non-constant STEP, there isn't really. We're explicitly allowed to
1459 evaluate it as many times as we want, and any variables involved should
1460 automatically be handled as PRIVATE or SHARED like any other variables.
1461 So the expression should remain evaluable in the subfunction. We can
1462 also pull it into a local variable if we like, but since its supposed
1463 to remain unchanged, we can also not if we like.
1465 If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
1466 able to get away with no work-sharing context at all, since we can
1467 simply perform the arithmetic directly in each thread to divide up the
1468 iterations. Which would mean that we wouldn't need to call any of
1471 There are separate routines for handling loops with an ORDERED
1472 clause. Bookkeeping for that is non-trivial...
1475 File: libgomp.info, Node: Implementing ORDERED construct, Next: Implementing SECTIONS construct, Prev: Implementing FOR construct, Up: The libgomp ABI
1477 4.12 Implementing ORDERED construct
1478 ===================================
1480 void GOMP_ordered_start (void)
1481 void GOMP_ordered_end (void)
1484 File: libgomp.info, Node: Implementing SECTIONS construct, Next: Implementing SINGLE construct, Prev: Implementing ORDERED construct, Up: The libgomp ABI
1486 4.13 Implementing SECTIONS construct
1487 ====================================
1491 #pragma omp sections
1503 for (i = GOMP_sections_start (3); i != 0; i = GOMP_sections_next ())
1519 File: libgomp.info, Node: Implementing SINGLE construct, Prev: Implementing SECTIONS construct, Up: The libgomp ABI
1521 4.14 Implementing SINGLE construct
1522 ==================================
1533 if (GOMP_single_start ())
1539 #pragma omp single copyprivate(x)
1544 datap = GOMP_single_copy_start ();
1549 GOMP_single_copy_end (&data);
1556 File: libgomp.info, Node: Reporting Bugs, Next: Copying, Prev: The libgomp ABI, Up: Top
1561 Bugs in the GNU OpenMP implementation should be reported via bugzilla
1562 (http://gcc.gnu.org/bugzilla/). For all cases, please add "openmp" to
1563 the keywords field in the bug report.
1566 File: libgomp.info, Node: Copying, Next: GNU Free Documentation License, Prev: Reporting Bugs, Up: Top
1568 GNU GENERAL PUBLIC LICENSE
1569 **************************
1571 Version 2, June 1991
1573 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
1574 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
1576 Everyone is permitted to copy and distribute verbatim copies
1577 of this license document, but changing it is not allowed.
1582 The licenses for most software are designed to take away your freedom
1583 to share and change it. By contrast, the GNU General Public License is
1584 intended to guarantee your freedom to share and change free
1585 software--to make sure the software is free for all its users. This
1586 General Public License applies to most of the Free Software
1587 Foundation's software and to any other program whose authors commit to
1588 using it. (Some other Free Software Foundation software is covered by
1589 the GNU Library General Public License instead.) You can apply it to
1592 When we speak of free software, we are referring to freedom, not
1593 price. Our General Public Licenses are designed to make sure that you
1594 have the freedom to distribute copies of free software (and charge for
1595 this service if you wish), that you receive source code or can get it
1596 if you want it, that you can change the software or use pieces of it in
1597 new free programs; and that you know you can do these things.
1599 To protect your rights, we need to make restrictions that forbid
1600 anyone to deny you these rights or to ask you to surrender the rights.
1601 These restrictions translate to certain responsibilities for you if you
1602 distribute copies of the software, or if you modify it.
1604 For example, if you distribute copies of such a program, whether
1605 gratis or for a fee, you must give the recipients all the rights that
1606 you have. You must make sure that they, too, receive or can get the
1607 source code. And you must show them these terms so they know their
1610 We protect your rights with two steps: (1) copyright the software,
1611 and (2) offer you this license which gives you legal permission to copy,
1612 distribute and/or modify the software.
1614 Also, for each author's protection and ours, we want to make certain
1615 that everyone understands that there is no warranty for this free
1616 software. If the software is modified by someone else and passed on, we
1617 want its recipients to know that what they have is not the original, so
1618 that any problems introduced by others will not reflect on the original
1619 authors' reputations.
1621 Finally, any free program is threatened constantly by software
1622 patents. We wish to avoid the danger that redistributors of a free
1623 program will individually obtain patent licenses, in effect making the
1624 program proprietary. To prevent this, we have made it clear that any
1625 patent must be licensed for everyone's free use or not licensed at all.
1627 The precise terms and conditions for copying, distribution and
1628 modification follow.
1630 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1631 0. This License applies to any program or other work which contains a
1632 notice placed by the copyright holder saying it may be distributed
1633 under the terms of this General Public License. The "Program",
1634 below, refers to any such program or work, and a "work based on
1635 the Program" means either the Program or any derivative work under
1636 copyright law: that is to say, a work containing the Program or a
1637 portion of it, either verbatim or with modifications and/or
1638 translated into another language. (Hereinafter, translation is
1639 included without limitation in the term "modification".) Each
1640 licensee is addressed as "you".
1642 Activities other than copying, distribution and modification are
1643 not covered by this License; they are outside its scope. The act
1644 of running the Program is not restricted, and the output from the
1645 Program is covered only if its contents constitute a work based on
1646 the Program (independent of having been made by running the
1647 Program). Whether that is true depends on what the Program does.
1649 1. You may copy and distribute verbatim copies of the Program's
1650 source code as you receive it, in any medium, provided that you
1651 conspicuously and appropriately publish on each copy an appropriate
1652 copyright notice and disclaimer of warranty; keep intact all the
1653 notices that refer to this License and to the absence of any
1654 warranty; and give any other recipients of the Program a copy of
1655 this License along with the Program.
1657 You may charge a fee for the physical act of transferring a copy,
1658 and you may at your option offer warranty protection in exchange
1661 2. You may modify your copy or copies of the Program or any portion
1662 of it, thus forming a work based on the Program, and copy and
1663 distribute such modifications or work under the terms of Section 1
1664 above, provided that you also meet all of these conditions:
1666 a. You must cause the modified files to carry prominent notices
1667 stating that you changed the files and the date of any change.
1669 b. You must cause any work that you distribute or publish, that
1670 in whole or in part contains or is derived from the Program
1671 or any part thereof, to be licensed as a whole at no charge
1672 to all third parties under the terms of this License.
1674 c. If the modified program normally reads commands interactively
1675 when run, you must cause it, when started running for such
1676 interactive use in the most ordinary way, to print or display
1677 an announcement including an appropriate copyright notice and
1678 a notice that there is no warranty (or else, saying that you
1679 provide a warranty) and that users may redistribute the
1680 program under these conditions, and telling the user how to
1681 view a copy of this License. (Exception: if the Program
1682 itself is interactive but does not normally print such an
1683 announcement, your work based on the Program is not required
1684 to print an announcement.)
1686 These requirements apply to the modified work as a whole. If
1687 identifiable sections of that work are not derived from the
1688 Program, and can be reasonably considered independent and separate
1689 works in themselves, then this License, and its terms, do not
1690 apply to those sections when you distribute them as separate
1691 works. But when you distribute the same sections as part of a
1692 whole which is a work based on the Program, the distribution of
1693 the whole must be on the terms of this License, whose permissions
1694 for other licensees extend to the entire whole, and thus to each
1695 and every part regardless of who wrote it.
1697 Thus, it is not the intent of this section to claim rights or
1698 contest your rights to work written entirely by you; rather, the
1699 intent is to exercise the right to control the distribution of
1700 derivative or collective works based on the Program.
1702 In addition, mere aggregation of another work not based on the
1703 Program with the Program (or with a work based on the Program) on
1704 a volume of a storage or distribution medium does not bring the
1705 other work under the scope of this License.
1707 3. You may copy and distribute the Program (or a work based on it,
1708 under Section 2) in object code or executable form under the terms
1709 of Sections 1 and 2 above provided that you also do one of the
1712 a. Accompany it with the complete corresponding machine-readable
1713 source code, which must be distributed under the terms of
1714 Sections 1 and 2 above on a medium customarily used for
1715 software interchange; or,
1717 b. Accompany it with a written offer, valid for at least three
1718 years, to give any third party, for a charge no more than your
1719 cost of physically performing source distribution, a complete
1720 machine-readable copy of the corresponding source code, to be
1721 distributed under the terms of Sections 1 and 2 above on a
1722 medium customarily used for software interchange; or,
1724 c. Accompany it with the information you received as to the offer
1725 to distribute corresponding source code. (This alternative is
1726 allowed only for noncommercial distribution and only if you
1727 received the program in object code or executable form with
1728 such an offer, in accord with Subsection b above.)
1730 The source code for a work means the preferred form of the work for
1731 making modifications to it. For an executable work, complete
1732 source code means all the source code for all modules it contains,
1733 plus any associated interface definition files, plus the scripts
1734 used to control compilation and installation of the executable.
1735 However, as a special exception, the source code distributed need
1736 not include anything that is normally distributed (in either
1737 source or binary form) with the major components (compiler,
1738 kernel, and so on) of the operating system on which the executable
1739 runs, unless that component itself accompanies the executable.
1741 If distribution of executable or object code is made by offering
1742 access to copy from a designated place, then offering equivalent
1743 access to copy the source code from the same place counts as
1744 distribution of the source code, even though third parties are not
1745 compelled to copy the source along with the object code.
1747 4. You may not copy, modify, sublicense, or distribute the Program
1748 except as expressly provided under this License. Any attempt
1749 otherwise to copy, modify, sublicense or distribute the Program is
1750 void, and will automatically terminate your rights under this
1751 License. However, parties who have received copies, or rights,
1752 from you under this License will not have their licenses
1753 terminated so long as such parties remain in full compliance.
1755 5. You are not required to accept this License, since you have not
1756 signed it. However, nothing else grants you permission to modify
1757 or distribute the Program or its derivative works. These actions
1758 are prohibited by law if you do not accept this License.
1759 Therefore, by modifying or distributing the Program (or any work
1760 based on the Program), you indicate your acceptance of this
1761 License to do so, and all its terms and conditions for copying,
1762 distributing or modifying the Program or works based on it.
1764 6. Each time you redistribute the Program (or any work based on the
1765 Program), the recipient automatically receives a license from the
1766 original licensor to copy, distribute or modify the Program
1767 subject to these terms and conditions. You may not impose any
1768 further restrictions on the recipients' exercise of the rights
1769 granted herein. You are not responsible for enforcing compliance
1770 by third parties to this License.
1772 7. If, as a consequence of a court judgment or allegation of patent
1773 infringement or for any other reason (not limited to patent
1774 issues), conditions are imposed on you (whether by court order,
1775 agreement or otherwise) that contradict the conditions of this
1776 License, they do not excuse you from the conditions of this
1777 License. If you cannot distribute so as to satisfy simultaneously
1778 your obligations under this License and any other pertinent
1779 obligations, then as a consequence you may not distribute the
1780 Program at all. For example, if a patent license would not permit
1781 royalty-free redistribution of the Program by all those who
1782 receive copies directly or indirectly through you, then the only
1783 way you could satisfy both it and this License would be to refrain
1784 entirely from distribution of the Program.
1786 If any portion of this section is held invalid or unenforceable
1787 under any particular circumstance, the balance of the section is
1788 intended to apply and the section as a whole is intended to apply
1789 in other circumstances.
1791 It is not the purpose of this section to induce you to infringe any
1792 patents or other property right claims or to contest validity of
1793 any such claims; this section has the sole purpose of protecting
1794 the integrity of the free software distribution system, which is
1795 implemented by public license practices. Many people have made
1796 generous contributions to the wide range of software distributed
1797 through that system in reliance on consistent application of that
1798 system; it is up to the author/donor to decide if he or she is
1799 willing to distribute software through any other system and a
1800 licensee cannot impose that choice.
1802 This section is intended to make thoroughly clear what is believed
1803 to be a consequence of the rest of this License.
1805 8. If the distribution and/or use of the Program is restricted in
1806 certain countries either by patents or by copyrighted interfaces,
1807 the original copyright holder who places the Program under this
1808 License may add an explicit geographical distribution limitation
1809 excluding those countries, so that distribution is permitted only
1810 in or among countries not thus excluded. In such case, this
1811 License incorporates the limitation as if written in the body of
1814 9. The Free Software Foundation may publish revised and/or new
1815 versions of the General Public License from time to time. Such
1816 new versions will be similar in spirit to the present version, but
1817 may differ in detail to address new problems or concerns.
1819 Each version is given a distinguishing version number. If the
1820 Program specifies a version number of this License which applies
1821 to it and "any later version", you have the option of following
1822 the terms and conditions either of that version or of any later
1823 version published by the Free Software Foundation. If the Program
1824 does not specify a version number of this License, you may choose
1825 any version ever published by the Free Software Foundation.
1827 10. If you wish to incorporate parts of the Program into other free
1828 programs whose distribution conditions are different, write to the
1829 author to ask for permission. For software which is copyrighted
1830 by the Free Software Foundation, write to the Free Software
1831 Foundation; we sometimes make exceptions for this. Our decision
1832 will be guided by the two goals of preserving the free status of
1833 all derivatives of our free software and of promoting the sharing
1834 and reuse of software generally.
1837 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
1838 WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
1839 LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
1840 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
1841 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
1842 NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1843 FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
1844 QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
1845 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
1846 SERVICING, REPAIR OR CORRECTION.
1848 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
1849 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
1850 MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
1851 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
1852 INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
1853 INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
1854 DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
1855 OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
1856 OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
1857 ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
1859 END OF TERMS AND CONDITIONS
1860 Appendix: How to Apply These Terms to Your New Programs
1861 =======================================================
1863 If you develop a new program, and you want it to be of the greatest
1864 possible use to the public, the best way to achieve this is to make it
1865 free software which everyone can redistribute and change under these
1868 To do so, attach the following notices to the program. It is safest
1869 to attach them to the start of each source file to most effectively
1870 convey the exclusion of warranty; and each file should have at least
1871 the "copyright" line and a pointer to where the full notice is found.
1873 ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
1874 Copyright (C) YEAR NAME OF AUTHOR
1876 This program is free software; you can redistribute it and/or modify
1877 it under the terms of the GNU General Public License as published by
1878 the Free Software Foundation; either version 2 of the License, or
1879 (at your option) any later version.
1881 This program is distributed in the hope that it will be useful,
1882 but WITHOUT ANY WARRANTY; without even the implied warranty of
1883 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1884 GNU General Public License for more details.
1886 You should have received a copy of the GNU General Public License
1887 along with this program; if not, write to the Free Software
1888 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
1890 Also add information on how to contact you by electronic and paper
1893 If the program is interactive, make it output a short notice like
1894 this when it starts in an interactive mode:
1896 Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR
1897 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1899 This is free software, and you are welcome to redistribute it
1900 under certain conditions; type `show c' for details.
1902 The hypothetical commands `show w' and `show c' should show the
1903 appropriate parts of the General Public License. Of course, the
1904 commands you use may be called something other than `show w' and `show
1905 c'; they could even be mouse-clicks or menu items--whatever suits your
1908 You should also get your employer (if you work as a programmer) or
1909 your school, if any, to sign a "copyright disclaimer" for the program,
1910 if necessary. Here is a sample; alter the names:
1912 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
1913 `Gnomovision' (which makes passes at compilers) written by James Hacker.
1915 SIGNATURE OF TY COON, 1 April 1989
1916 Ty Coon, President of Vice
1918 This General Public License does not permit incorporating your
1919 program into proprietary programs. If your program is a subroutine
1920 library, you may consider it more useful to permit linking proprietary
1921 applications with the library. If this is what you want to do, use the
1922 GNU Library General Public License instead of this License.
1925 File: libgomp.info, Node: GNU Free Documentation License, Next: Funding, Prev: Copying, Up: Top
1927 GNU Free Documentation License
1928 ******************************
1930 Version 1.3, 3 November 2008
1932 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
1935 Everyone is permitted to copy and distribute verbatim copies
1936 of this license document, but changing it is not allowed.
1940 The purpose of this License is to make a manual, textbook, or other
1941 functional and useful document "free" in the sense of freedom: to
1942 assure everyone the effective freedom to copy and redistribute it,
1943 with or without modifying it, either commercially or
1944 noncommercially. Secondarily, this License preserves for the
1945 author and publisher a way to get credit for their work, while not
1946 being considered responsible for modifications made by others.
1948 This License is a kind of "copyleft", which means that derivative
1949 works of the document must themselves be free in the same sense.
1950 It complements the GNU General Public License, which is a copyleft
1951 license designed for free software.
1953 We have designed this License in order to use it for manuals for
1954 free software, because free software needs free documentation: a
1955 free program should come with manuals providing the same freedoms
1956 that the software does. But this License is not limited to
1957 software manuals; it can be used for any textual work, regardless
1958 of subject matter or whether it is published as a printed book.
1959 We recommend this License principally for works whose purpose is
1960 instruction or reference.
1962 1. APPLICABILITY AND DEFINITIONS
1964 This License applies to any manual or other work, in any medium,
1965 that contains a notice placed by the copyright holder saying it
1966 can be distributed under the terms of this License. Such a notice
1967 grants a world-wide, royalty-free license, unlimited in duration,
1968 to use that work under the conditions stated herein. The
1969 "Document", below, refers to any such manual or work. Any member
1970 of the public is a licensee, and is addressed as "you". You
1971 accept the license if you copy, modify or distribute the work in a
1972 way requiring permission under copyright law.
1974 A "Modified Version" of the Document means any work containing the
1975 Document or a portion of it, either copied verbatim, or with
1976 modifications and/or translated into another language.
1978 A "Secondary Section" is a named appendix or a front-matter section
1979 of the Document that deals exclusively with the relationship of the
1980 publishers or authors of the Document to the Document's overall
1981 subject (or to related matters) and contains nothing that could
1982 fall directly within that overall subject. (Thus, if the Document
1983 is in part a textbook of mathematics, a Secondary Section may not
1984 explain any mathematics.) The relationship could be a matter of
1985 historical connection with the subject or with related matters, or
1986 of legal, commercial, philosophical, ethical or political position
1989 The "Invariant Sections" are certain Secondary Sections whose
1990 titles are designated, as being those of Invariant Sections, in
1991 the notice that says that the Document is released under this
1992 License. If a section does not fit the above definition of
1993 Secondary then it is not allowed to be designated as Invariant.
1994 The Document may contain zero Invariant Sections. If the Document
1995 does not identify any Invariant Sections then there are none.
1997 The "Cover Texts" are certain short passages of text that are
1998 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
1999 that says that the Document is released under this License. A
2000 Front-Cover Text may be at most 5 words, and a Back-Cover Text may
2001 be at most 25 words.
2003 A "Transparent" copy of the Document means a machine-readable copy,
2004 represented in a format whose specification is available to the
2005 general public, that is suitable for revising the document
2006 straightforwardly with generic text editors or (for images
2007 composed of pixels) generic paint programs or (for drawings) some
2008 widely available drawing editor, and that is suitable for input to
2009 text formatters or for automatic translation to a variety of
2010 formats suitable for input to text formatters. A copy made in an
2011 otherwise Transparent file format whose markup, or absence of
2012 markup, has been arranged to thwart or discourage subsequent
2013 modification by readers is not Transparent. An image format is
2014 not Transparent if used for any substantial amount of text. A
2015 copy that is not "Transparent" is called "Opaque".
2017 Examples of suitable formats for Transparent copies include plain
2018 ASCII without markup, Texinfo input format, LaTeX input format,
2019 SGML or XML using a publicly available DTD, and
2020 standard-conforming simple HTML, PostScript or PDF designed for
2021 human modification. Examples of transparent image formats include
2022 PNG, XCF and JPG. Opaque formats include proprietary formats that
2023 can be read and edited only by proprietary word processors, SGML or
2024 XML for which the DTD and/or processing tools are not generally
2025 available, and the machine-generated HTML, PostScript or PDF
2026 produced by some word processors for output purposes only.
2028 The "Title Page" means, for a printed book, the title page itself,
2029 plus such following pages as are needed to hold, legibly, the
2030 material this License requires to appear in the title page. For
2031 works in formats which do not have any title page as such, "Title
2032 Page" means the text near the most prominent appearance of the
2033 work's title, preceding the beginning of the body of the text.
2035 The "publisher" means any person or entity that distributes copies
2036 of the Document to the public.
2038 A section "Entitled XYZ" means a named subunit of the Document
2039 whose title either is precisely XYZ or contains XYZ in parentheses
2040 following text that translates XYZ in another language. (Here XYZ
2041 stands for a specific section name mentioned below, such as
2042 "Acknowledgements", "Dedications", "Endorsements", or "History".)
2043 To "Preserve the Title" of such a section when you modify the
2044 Document means that it remains a section "Entitled XYZ" according
2047 The Document may include Warranty Disclaimers next to the notice
2048 which states that this License applies to the Document. These
2049 Warranty Disclaimers are considered to be included by reference in
2050 this License, but only as regards disclaiming warranties: any other
2051 implication that these Warranty Disclaimers may have is void and
2052 has no effect on the meaning of this License.
2056 You may copy and distribute the Document in any medium, either
2057 commercially or noncommercially, provided that this License, the
2058 copyright notices, and the license notice saying this License
2059 applies to the Document are reproduced in all copies, and that you
2060 add no other conditions whatsoever to those of this License. You
2061 may not use technical measures to obstruct or control the reading
2062 or further copying of the copies you make or distribute. However,
2063 you may accept compensation in exchange for copies. If you
2064 distribute a large enough number of copies you must also follow
2065 the conditions in section 3.
2067 You may also lend copies, under the same conditions stated above,
2068 and you may publicly display copies.
2070 3. COPYING IN QUANTITY
2072 If you publish printed copies (or copies in media that commonly
2073 have printed covers) of the Document, numbering more than 100, and
2074 the Document's license notice requires Cover Texts, you must
2075 enclose the copies in covers that carry, clearly and legibly, all
2076 these Cover Texts: Front-Cover Texts on the front cover, and
2077 Back-Cover Texts on the back cover. Both covers must also clearly
2078 and legibly identify you as the publisher of these copies. The
2079 front cover must present the full title with all words of the
2080 title equally prominent and visible. You may add other material
2081 on the covers in addition. Copying with changes limited to the
2082 covers, as long as they preserve the title of the Document and
2083 satisfy these conditions, can be treated as verbatim copying in
2086 If the required texts for either cover are too voluminous to fit
2087 legibly, you should put the first ones listed (as many as fit
2088 reasonably) on the actual cover, and continue the rest onto
2091 If you publish or distribute Opaque copies of the Document
2092 numbering more than 100, you must either include a
2093 machine-readable Transparent copy along with each Opaque copy, or
2094 state in or with each Opaque copy a computer-network location from
2095 which the general network-using public has access to download
2096 using public-standard network protocols a complete Transparent
2097 copy of the Document, free of added material. If you use the
2098 latter option, you must take reasonably prudent steps, when you
2099 begin distribution of Opaque copies in quantity, to ensure that
2100 this Transparent copy will remain thus accessible at the stated
2101 location until at least one year after the last time you
2102 distribute an Opaque copy (directly or through your agents or
2103 retailers) of that edition to the public.
2105 It is requested, but not required, that you contact the authors of
2106 the Document well before redistributing any large number of
2107 copies, to give them a chance to provide you with an updated
2108 version of the Document.
2112 You may copy and distribute a Modified Version of the Document
2113 under the conditions of sections 2 and 3 above, provided that you
2114 release the Modified Version under precisely this License, with
2115 the Modified Version filling the role of the Document, thus
2116 licensing distribution and modification of the Modified Version to
2117 whoever possesses a copy of it. In addition, you must do these
2118 things in the Modified Version:
2120 A. Use in the Title Page (and on the covers, if any) a title
2121 distinct from that of the Document, and from those of
2122 previous versions (which should, if there were any, be listed
2123 in the History section of the Document). You may use the
2124 same title as a previous version if the original publisher of
2125 that version gives permission.
2127 B. List on the Title Page, as authors, one or more persons or
2128 entities responsible for authorship of the modifications in
2129 the Modified Version, together with at least five of the
2130 principal authors of the Document (all of its principal
2131 authors, if it has fewer than five), unless they release you
2132 from this requirement.
2134 C. State on the Title page the name of the publisher of the
2135 Modified Version, as the publisher.
2137 D. Preserve all the copyright notices of the Document.
2139 E. Add an appropriate copyright notice for your modifications
2140 adjacent to the other copyright notices.
2142 F. Include, immediately after the copyright notices, a license
2143 notice giving the public permission to use the Modified
2144 Version under the terms of this License, in the form shown in
2147 G. Preserve in that license notice the full lists of Invariant
2148 Sections and required Cover Texts given in the Document's
2151 H. Include an unaltered copy of this License.
2153 I. Preserve the section Entitled "History", Preserve its Title,
2154 and add to it an item stating at least the title, year, new
2155 authors, and publisher of the Modified Version as given on
2156 the Title Page. If there is no section Entitled "History" in
2157 the Document, create one stating the title, year, authors,
2158 and publisher of the Document as given on its Title Page,
2159 then add an item describing the Modified Version as stated in
2160 the previous sentence.
2162 J. Preserve the network location, if any, given in the Document
2163 for public access to a Transparent copy of the Document, and
2164 likewise the network locations given in the Document for
2165 previous versions it was based on. These may be placed in
2166 the "History" section. You may omit a network location for a
2167 work that was published at least four years before the
2168 Document itself, or if the original publisher of the version
2169 it refers to gives permission.
2171 K. For any section Entitled "Acknowledgements" or "Dedications",
2172 Preserve the Title of the section, and preserve in the
2173 section all the substance and tone of each of the contributor
2174 acknowledgements and/or dedications given therein.
2176 L. Preserve all the Invariant Sections of the Document,
2177 unaltered in their text and in their titles. Section numbers
2178 or the equivalent are not considered part of the section
2181 M. Delete any section Entitled "Endorsements". Such a section
2182 may not be included in the Modified Version.
2184 N. Do not retitle any existing section to be Entitled
2185 "Endorsements" or to conflict in title with any Invariant
2188 O. Preserve any Warranty Disclaimers.
2190 If the Modified Version includes new front-matter sections or
2191 appendices that qualify as Secondary Sections and contain no
2192 material copied from the Document, you may at your option
2193 designate some or all of these sections as invariant. To do this,
2194 add their titles to the list of Invariant Sections in the Modified
2195 Version's license notice. These titles must be distinct from any
2196 other section titles.
2198 You may add a section Entitled "Endorsements", provided it contains
2199 nothing but endorsements of your Modified Version by various
2200 parties--for example, statements of peer review or that the text
2201 has been approved by an organization as the authoritative
2202 definition of a standard.
2204 You may add a passage of up to five words as a Front-Cover Text,
2205 and a passage of up to 25 words as a Back-Cover Text, to the end
2206 of the list of Cover Texts in the Modified Version. Only one
2207 passage of Front-Cover Text and one of Back-Cover Text may be
2208 added by (or through arrangements made by) any one entity. If the
2209 Document already includes a cover text for the same cover,
2210 previously added by you or by arrangement made by the same entity
2211 you are acting on behalf of, you may not add another; but you may
2212 replace the old one, on explicit permission from the previous
2213 publisher that added the old one.
2215 The author(s) and publisher(s) of the Document do not by this
2216 License give permission to use their names for publicity for or to
2217 assert or imply endorsement of any Modified Version.
2219 5. COMBINING DOCUMENTS
2221 You may combine the Document with other documents released under
2222 this License, under the terms defined in section 4 above for
2223 modified versions, provided that you include in the combination
2224 all of the Invariant Sections of all of the original documents,
2225 unmodified, and list them all as Invariant Sections of your
2226 combined work in its license notice, and that you preserve all
2227 their Warranty Disclaimers.
2229 The combined work need only contain one copy of this License, and
2230 multiple identical Invariant Sections may be replaced with a single
2231 copy. If there are multiple Invariant Sections with the same name
2232 but different contents, make the title of each such section unique
2233 by adding at the end of it, in parentheses, the name of the
2234 original author or publisher of that section if known, or else a
2235 unique number. Make the same adjustment to the section titles in
2236 the list of Invariant Sections in the license notice of the
2239 In the combination, you must combine any sections Entitled
2240 "History" in the various original documents, forming one section
2241 Entitled "History"; likewise combine any sections Entitled
2242 "Acknowledgements", and any sections Entitled "Dedications". You
2243 must delete all sections Entitled "Endorsements."
2245 6. COLLECTIONS OF DOCUMENTS
2247 You may make a collection consisting of the Document and other
2248 documents released under this License, and replace the individual
2249 copies of this License in the various documents with a single copy
2250 that is included in the collection, provided that you follow the
2251 rules of this License for verbatim copying of each of the
2252 documents in all other respects.
2254 You may extract a single document from such a collection, and
2255 distribute it individually under this License, provided you insert
2256 a copy of this License into the extracted document, and follow
2257 this License in all other respects regarding verbatim copying of
2260 7. AGGREGATION WITH INDEPENDENT WORKS
2262 A compilation of the Document or its derivatives with other
2263 separate and independent documents or works, in or on a volume of
2264 a storage or distribution medium, is called an "aggregate" if the
2265 copyright resulting from the compilation is not used to limit the
2266 legal rights of the compilation's users beyond what the individual
2267 works permit. When the Document is included in an aggregate, this
2268 License does not apply to the other works in the aggregate which
2269 are not themselves derivative works of the Document.
2271 If the Cover Text requirement of section 3 is applicable to these
2272 copies of the Document, then if the Document is less than one half
2273 of the entire aggregate, the Document's Cover Texts may be placed
2274 on covers that bracket the Document within the aggregate, or the
2275 electronic equivalent of covers if the Document is in electronic
2276 form. Otherwise they must appear on printed covers that bracket
2277 the whole aggregate.
2281 Translation is considered a kind of modification, so you may
2282 distribute translations of the Document under the terms of section
2283 4. Replacing Invariant Sections with translations requires special
2284 permission from their copyright holders, but you may include
2285 translations of some or all Invariant Sections in addition to the
2286 original versions of these Invariant Sections. You may include a
2287 translation of this License, and all the license notices in the
2288 Document, and any Warranty Disclaimers, provided that you also
2289 include the original English version of this License and the
2290 original versions of those notices and disclaimers. In case of a
2291 disagreement between the translation and the original version of
2292 this License or a notice or disclaimer, the original version will
2295 If a section in the Document is Entitled "Acknowledgements",
2296 "Dedications", or "History", the requirement (section 4) to
2297 Preserve its Title (section 1) will typically require changing the
2302 You may not copy, modify, sublicense, or distribute the Document
2303 except as expressly provided under this License. Any attempt
2304 otherwise to copy, modify, sublicense, or distribute it is void,
2305 and will automatically terminate your rights under this License.
2307 However, if you cease all violation of this License, then your
2308 license from a particular copyright holder is reinstated (a)
2309 provisionally, unless and until the copyright holder explicitly
2310 and finally terminates your license, and (b) permanently, if the
2311 copyright holder fails to notify you of the violation by some
2312 reasonable means prior to 60 days after the cessation.
2314 Moreover, your license from a particular copyright holder is
2315 reinstated permanently if the copyright holder notifies you of the
2316 violation by some reasonable means, this is the first time you have
2317 received notice of violation of this License (for any work) from
2318 that copyright holder, and you cure the violation prior to 30 days
2319 after your receipt of the notice.
2321 Termination of your rights under this section does not terminate
2322 the licenses of parties who have received copies or rights from
2323 you under this License. If your rights have been terminated and
2324 not permanently reinstated, receipt of a copy of some or all of
2325 the same material does not give you any rights to use it.
2327 10. FUTURE REVISIONS OF THIS LICENSE
2329 The Free Software Foundation may publish new, revised versions of
2330 the GNU Free Documentation License from time to time. Such new
2331 versions will be similar in spirit to the present version, but may
2332 differ in detail to address new problems or concerns. See
2333 `http://www.gnu.org/copyleft/'.
2335 Each version of the License is given a distinguishing version
2336 number. If the Document specifies that a particular numbered
2337 version of this License "or any later version" applies to it, you
2338 have the option of following the terms and conditions either of
2339 that specified version or of any later version that has been
2340 published (not as a draft) by the Free Software Foundation. If
2341 the Document does not specify a version number of this License,
2342 you may choose any version ever published (not as a draft) by the
2343 Free Software Foundation. If the Document specifies that a proxy
2344 can decide which future versions of this License can be used, that
2345 proxy's public statement of acceptance of a version permanently
2346 authorizes you to choose that version for the Document.
2350 "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
2351 World Wide Web server that publishes copyrightable works and also
2352 provides prominent facilities for anybody to edit those works. A
2353 public wiki that anybody can edit is an example of such a server.
2354 A "Massive Multiauthor Collaboration" (or "MMC") contained in the
2355 site means any set of copyrightable works thus published on the MMC
2358 "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
2359 license published by Creative Commons Corporation, a not-for-profit
2360 corporation with a principal place of business in San Francisco,
2361 California, as well as future copyleft versions of that license
2362 published by that same organization.
2364 "Incorporate" means to publish or republish a Document, in whole or
2365 in part, as part of another Document.
2367 An MMC is "eligible for relicensing" if it is licensed under this
2368 License, and if all works that were first published under this
2369 License somewhere other than this MMC, and subsequently
2370 incorporated in whole or in part into the MMC, (1) had no cover
2371 texts or invariant sections, and (2) were thus incorporated prior
2372 to November 1, 2008.
2374 The operator of an MMC Site may republish an MMC contained in the
2375 site under CC-BY-SA on the same site at any time before August 1,
2376 2009, provided the MMC is eligible for relicensing.
2379 ADDENDUM: How to use this License for your documents
2380 ====================================================
2382 To use this License in a document you have written, include a copy of
2383 the License in the document and put the following copyright and license
2384 notices just after the title page:
2386 Copyright (C) YEAR YOUR NAME.
2387 Permission is granted to copy, distribute and/or modify this document
2388 under the terms of the GNU Free Documentation License, Version 1.3
2389 or any later version published by the Free Software Foundation;
2390 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
2391 Texts. A copy of the license is included in the section entitled ``GNU
2392 Free Documentation License''.
2394 If you have Invariant Sections, Front-Cover Texts and Back-Cover
2395 Texts, replace the "with...Texts." line with this:
2397 with the Invariant Sections being LIST THEIR TITLES, with
2398 the Front-Cover Texts being LIST, and with the Back-Cover Texts
2401 If you have Invariant Sections without Cover Texts, or some other
2402 combination of the three, merge those two alternatives to suit the
2405 If your document contains nontrivial examples of program code, we
2406 recommend releasing these examples in parallel under your choice of
2407 free software license, such as the GNU General Public License, to
2408 permit their use in free software.
2411 File: libgomp.info, Node: Funding, Next: Index, Prev: GNU Free Documentation License, Up: Top
2413 Funding Free Software
2414 *********************
2416 If you want to have more free software a few years from now, it makes
2417 sense for you to help encourage people to contribute funds for its
2418 development. The most effective approach known is to encourage
2419 commercial redistributors to donate.
2421 Users of free software systems can boost the pace of development by
2422 encouraging for-a-fee distributors to donate part of their selling price
2423 to free software developers--the Free Software Foundation, and others.
2425 The way to convince distributors to do this is to demand it and
2426 expect it from them. So when you compare distributors, judge them
2427 partly by how much they give to free software development. Show
2428 distributors they must compete to be the one who gives the most.
2430 To make this approach work, you must insist on numbers that you can
2431 compare, such as, "We will donate ten dollars to the Frobnitz project
2432 for each disk sold." Don't be satisfied with a vague promise, such as
2433 "A portion of the profits are donated," since it doesn't give a basis
2436 Even a precise fraction "of the profits from this disk" is not very
2437 meaningful, since creative accounting and unrelated business decisions
2438 can greatly alter what fraction of the sales price counts as profit.
2439 If the price you pay is $50, ten percent of the profit is probably less
2440 than a dollar; it might be a few cents, or nothing at all.
2442 Some redistributors do development work themselves. This is useful
2443 too; but to keep everyone honest, you need to inquire how much they do,
2444 and what kind. Some kinds of development make much more long-term
2445 difference than others. For example, maintaining a separate version of
2446 a program contributes very little; maintaining the standard version of a
2447 program for the whole community contributes much. Easy new ports
2448 contribute little, since someone else would surely do them; difficult
2449 ports such as adding a new CPU to the GNU Compiler Collection
2450 contribute more; major new features or packages contribute the most.
2452 By establishing the idea that supporting further development is "the
2453 proper thing to do" when distributing free software for a fee, we can
2454 assure a steady flow of resources into making more free software.
2456 Copyright (C) 1994 Free Software Foundation, Inc.
2457 Verbatim copying and redistribution of this section is permitted
2458 without royalty; alteration is not permitted.
2461 File: libgomp.info, Node: Index, Prev: Funding, Up: Top
2469 * Environment Variable <1>: GOMP_STACKSIZE. (line 6)
2470 * Environment Variable <2>: GOMP_CPU_AFFINITY. (line 6)
2471 * Environment Variable <3>: OMP_PROC_BIND. (line 6)
2472 * Environment Variable <4>: OMP_WAIT_POLICY. (line 6)
2473 * Environment Variable <5>: OMP_THREAD_LIMIT. (line 6)
2474 * Environment Variable <6>: OMP_STACKSIZE. (line 6)
2475 * Environment Variable <7>: OMP_SCHEDULE. (line 6)
2476 * Environment Variable <8>: OMP_NUM_THREADS. (line 6)
2477 * Environment Variable <9>: OMP_NESTED. (line 6)
2478 * Environment Variable <10>: OMP_MAX_ACTIVE_LEVELS. (line 6)
2479 * Environment Variable: OMP_DYNAMIC. (line 6)
2480 * FDL, GNU Free Documentation License: GNU Free Documentation License.
2482 * Implementation specific setting <1>: GOMP_STACKSIZE. (line 6)
2483 * Implementation specific setting <2>: OMP_SCHEDULE. (line 6)
2484 * Implementation specific setting <3>: OMP_NUM_THREADS. (line 6)
2485 * Implementation specific setting: OMP_NESTED. (line 6)
2486 * Introduction: Top. (line 6)
2492 Node: Enabling OpenMP
\7f3257
2493 Node: Runtime Library Routines
\7f4042
2494 Node: omp_get_active_level
\7f6490
2495 Node: omp_get_ancestor_thread_num
\7f7194
2496 Node: omp_get_dynamic
\7f8121
2497 Node: omp_get_level
\7f8999
2498 Node: omp_get_max_active_levels
\7f9623
2499 Node: omp_get_max_threads
\7f10326
2500 Node: omp_get_nested
\7f11082
2501 Node: omp_get_num_procs
\7f11994
2502 Node: omp_get_num_threads
\7f12512
2503 Node: omp_get_schedule
\7f13594
2504 Node: omp_get_team_size
\7f14515
2505 Node: omp_get_thread_limit
\7f15477
2506 Node: omp_get_thread_num
\7f16100
2507 Node: omp_in_parallel
\7f16968
2508 Node: omp_in_final
\7f17615
2509 Node: omp_set_dynamic
\7f18286
2510 Node: omp_set_max_active_levels
\7f19123
2511 Node: omp_set_nested
\7f19903
2512 Node: omp_set_num_threads
\7f20782
2513 Node: omp_set_schedule
\7f21618
2514 Node: omp_init_lock
\7f22690
2515 Node: omp_set_lock
\7f23341
2516 Node: omp_test_lock
\7f24192
2517 Node: omp_unset_lock
\7f25163
2518 Node: omp_destroy_lock
\7f26089
2519 Node: omp_init_nest_lock
\7f26763
2520 Node: omp_set_nest_lock
\7f27496
2521 Node: omp_test_nest_lock
\7f28407
2522 Node: omp_unset_nest_lock
\7f29436
2523 Node: omp_destroy_nest_lock
\7f30446
2524 Node: omp_get_wtick
\7f31194
2525 Node: omp_get_wtime
\7f31785
2526 Node: Environment Variables
\7f32559
2527 Node: OMP_DYNAMIC
\7f33687
2528 Node: OMP_MAX_ACTIVE_LEVELS
\7f34255
2529 Node: OMP_NESTED
\7f34894
2530 Node: OMP_NUM_THREADS
\7f35498
2531 Node: OMP_SCHEDULE
\7f36186
2532 Node: OMP_STACKSIZE
\7f36880
2533 Node: OMP_THREAD_LIMIT
\7f37706
2534 Node: OMP_WAIT_POLICY
\7f38301
2535 Node: OMP_PROC_BIND
\7f38862
2536 Node: GOMP_CPU_AFFINITY
\7f39420
2537 Node: GOMP_STACKSIZE
\7f40961
2538 Node: The libgomp ABI
\7f41771
2539 Node: Implementing MASTER construct
\7f42570
2540 Node: Implementing CRITICAL construct
\7f42984
2541 Node: Implementing ATOMIC construct
\7f43723
2542 Node: Implementing FLUSH construct
\7f44204
2543 Node: Implementing BARRIER construct
\7f44475
2544 Node: Implementing THREADPRIVATE construct
\7f44744
2545 Node: Implementing PRIVATE clause
\7f45396
2546 Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
\7f45977
2547 Node: Implementing REDUCTION clause
\7f47301
2548 Node: Implementing PARALLEL construct
\7f47858
2549 Node: Implementing FOR construct
\7f49115
2550 Node: Implementing ORDERED construct
\7f51113
2551 Node: Implementing SECTIONS construct
\7f51419
2552 Node: Implementing SINGLE construct
\7f52185
2553 Node: Reporting Bugs
\7f52847
2554 Node: Copying
\7f53157
2555 Node: GNU Free Documentation License
\7f72367
2556 Node: Funding
\7f97509
2557 Node: Index
\7f100026