libgomp.info revision 1.5
1This is libgomp.info, produced by makeinfo version 4.12 from 2/space/rguenther/gcc-5.4.0/gcc-5.4.0/libgomp/libgomp.texi. 3 4Copyright (C) 2006-2015 Free Software Foundation, Inc. 5 6 Permission is granted to copy, distribute and/or modify this document 7under the terms of the GNU Free Documentation License, Version 1.3 or 8any later version published by the Free Software Foundation; with the 9Invariant Sections being "Funding Free Software", the Front-Cover texts 10being (a) (see below), and with the Back-Cover Texts being (b) (see 11below). A copy of the license is included in the section entitled "GNU 12Free Documentation License". 13 14 (a) The FSF's Front-Cover Text is: 15 16 A GNU Manual 17 18 (b) The FSF's Back-Cover Text is: 19 20 You have freedom to copy and modify this GNU Manual, like GNU 21software. Copies published by the Free Software Foundation raise 22funds for GNU development. 23 24INFO-DIR-SECTION GNU Libraries 25START-INFO-DIR-ENTRY 26* libgomp: (libgomp). GNU Offloading and Multi Processing Runtime Library. 27END-INFO-DIR-ENTRY 28 29 This manual documents libgomp, the GNU Offloading and Multi 30Processing Runtime library. This is the GNU implementation of the 31OpenMP and OpenACC APIs for parallel and accelerator programming in 32C/C++ and Fortran. 33 34 Published by the Free Software Foundation 51 Franklin Street, Fifth 35Floor Boston, MA 02110-1301 USA 36 37 Copyright (C) 2006-2015 Free Software Foundation, Inc. 38 39 Permission is granted to copy, distribute and/or modify this document 40under the terms of the GNU Free Documentation License, Version 1.3 or 41any later version published by the Free Software Foundation; with the 42Invariant Sections being "Funding Free Software", the Front-Cover texts 43being (a) (see below), and with the Back-Cover Texts being (b) (see 44below). A copy of the license is included in the section entitled "GNU 45Free Documentation License". 46 47 (a) The FSF's Front-Cover Text is: 48 49 A GNU Manual 50 51 (b) The FSF's Back-Cover Text is: 52 53 You have freedom to copy and modify this GNU Manual, like GNU 54software. Copies published by the Free Software Foundation raise 55funds for GNU development. 56 57 58File: libgomp.info, Node: Top, Next: Enabling OpenMP, Up: (dir) 59 60Introduction 61************ 62 63This manual documents the usage of libgomp, the GNU Offloading and 64Multi Processing Runtime Library. This includes the GNU implementation 65of the OpenMP (http://www.openmp.org) Application Programming Interface 66(API) for multi-platform shared-memory parallel programming in C/C++ 67and Fortran, and the GNU implementation of the OpenACC 68(http://www.openacc.org/) Application Programming Interface (API) for 69offloading of code to accelerator devices in C/C++ and Fortran. 70 71 Originally, libgomp implemented the GNU OpenMP Runtime Library. 72Based on this, support for OpenACC and offloading (both OpenACC and 73OpenMP 4's target construct) has been added later on, and the library's 74name changed to GNU Offloading and Multi Processing Runtime Library. 75 76* Menu: 77 78* Enabling OpenMP:: How to enable OpenMP for your applications. 79* Runtime Library Routines:: The OpenMP runtime application programming 80 interface. 81* Environment Variables:: Influencing runtime behavior with environment 82 variables. 83* The libgomp ABI:: Notes on the external ABI presented by libgomp. 84* Reporting Bugs:: How to report bugs in the GNU Offloading and 85 Multi Processing Runtime Library. 86* Copying:: GNU general public license says 87 how you can copy and share libgomp. 88* GNU Free Documentation License:: 89 How you can copy and share this manual. 90* Funding:: How to help assure continued work for free 91 software. 92* Library Index:: Index of this documentation. 93 94 95File: libgomp.info, Node: Enabling OpenMP, Next: Runtime Library Routines, Prev: Top, Up: Top 96 971 Enabling OpenMP 98***************** 99 100To activate the OpenMP extensions for C/C++ and Fortran, the 101compile-time flag `-fopenmp' must be specified. This enables the 102OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free 103form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$' 104conditional compilation sentinels in free form and `c$', `*$' and `!$' 105sentinels in fixed form, for Fortran. The flag also arranges for 106automatic linking of the OpenMP runtime library (*note Runtime Library 107Routines::). 108 109 A complete description of all OpenMP directives accepted may be 110found in the OpenMP Application Program Interface 111(http://www.openmp.org) manual, version 4.0. 112 113 114File: libgomp.info, Node: Runtime Library Routines, Next: Environment Variables, Prev: Enabling OpenMP, Up: Top 115 1162 Runtime Library Routines 117************************** 118 119The runtime routines described here are defined by Section 3 of the 120OpenMP specification in version 4.0. The routines are structured in 121following three parts: 122 123* Menu: 124 125Control threads, processors and the parallel environment. They have C 126linkage, and do not throw exceptions. 127 128* omp_get_active_level:: Number of active parallel regions 129* omp_get_ancestor_thread_num:: Ancestor thread ID 130* omp_get_cancellation:: Whether cancellation support is enabled 131* omp_get_default_device:: Get the default device for target regions 132* omp_get_dynamic:: Dynamic teams setting 133* omp_get_level:: Number of parallel regions 134* omp_get_max_active_levels:: Maximum number of active regions 135* omp_get_max_threads:: Maximum number of threads of parallel region 136* omp_get_nested:: Nested parallel regions 137* omp_get_num_devices:: Number of target devices 138* omp_get_num_procs:: Number of processors online 139* omp_get_num_teams:: Number of teams 140* omp_get_num_threads:: Size of the active team 141* omp_get_proc_bind:: Whether theads may be moved between CPUs 142* omp_get_schedule:: Obtain the runtime scheduling method 143* omp_get_team_num:: Get team number 144* omp_get_team_size:: Number of threads in a team 145* omp_get_thread_limit:: Maximum number of threads 146* omp_get_thread_num:: Current thread ID 147* omp_in_parallel:: Whether a parallel region is active 148* omp_in_final:: Whether in final or included task region 149* omp_is_initial_device:: Whether executing on the host device 150* omp_set_default_device:: Set the default device for target regions 151* omp_set_dynamic:: Enable/disable dynamic teams 152* omp_set_max_active_levels:: Limits the number of active parallel regions 153* omp_set_nested:: Enable/disable nested parallel regions 154* omp_set_num_threads:: Set upper team size limit 155* omp_set_schedule:: Set the runtime scheduling method 156 157Initialize, set, test, unset and destroy simple and nested locks. 158 159* omp_init_lock:: Initialize simple lock 160* omp_set_lock:: Wait for and set simple lock 161* omp_test_lock:: Test and set simple lock if available 162* omp_unset_lock:: Unset simple lock 163* omp_destroy_lock:: Destroy simple lock 164* omp_init_nest_lock:: Initialize nested lock 165* omp_set_nest_lock:: Wait for and set simple lock 166* omp_test_nest_lock:: Test and set nested lock if available 167* omp_unset_nest_lock:: Unset nested lock 168* omp_destroy_nest_lock:: Destroy nested lock 169 170Portable, thread-based, wall clock timer. 171 172* omp_get_wtick:: Get timer precision. 173* omp_get_wtime:: Elapsed wall clock time. 174 175 176File: libgomp.info, Node: omp_get_active_level, Next: omp_get_ancestor_thread_num, Up: Runtime Library Routines 177 1782.1 `omp_get_active_level' - Number of parallel regions 179======================================================= 180 181_Description_: 182 This function returns the nesting level for the active parallel 183 blocks, which enclose the calling call. 184 185_C/C++_ 186 _Prototype_: `int omp_get_active_level(void);' 187 188_Fortran_: 189 _Interface_: `integer function omp_get_active_level()' 190 191_See also_: 192 *note omp_get_level::, *note omp_get_max_active_levels::, *note 193 omp_set_max_active_levels:: 194 195_Reference_: 196 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.20. 197 198 199File: libgomp.info, Node: omp_get_ancestor_thread_num, Next: omp_get_cancellation, Prev: omp_get_active_level, Up: Runtime Library Routines 200 2012.2 `omp_get_ancestor_thread_num' - Ancestor thread ID 202====================================================== 203 204_Description_: 205 This function returns the thread identification number for the 206 given nesting level of the current thread. For values of LEVEL 207 outside zero to `omp_get_level' -1 is returned; if LEVEL is 208 `omp_get_level' the result is identical to `omp_get_thread_num'. 209 210_C/C++_ 211 _Prototype_: `int omp_get_ancestor_thread_num(int level);' 212 213_Fortran_: 214 _Interface_: `integer function omp_get_ancestor_thread_num(level)' 215 `integer level' 216 217_See also_: 218 *note omp_get_level::, *note omp_get_thread_num::, *note 219 omp_get_team_size:: 220 221_Reference_: 222 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.18. 223 224 225File: libgomp.info, Node: omp_get_cancellation, Next: omp_get_default_device, Prev: omp_get_ancestor_thread_num, Up: Runtime Library Routines 226 2272.3 `omp_get_cancellation' - Whether cancellation support is enabled 228==================================================================== 229 230_Description_: 231 This function returns `true' if cancellation is activated, `false' 232 otherwise. Here, `true' and `false' represent their 233 language-specific counterparts. Unless `OMP_CANCELLATION' is set 234 true, cancellations are deactivated. 235 236_C/C++_: 237 _Prototype_: `int omp_get_cancellation(void);' 238 239_Fortran_: 240 _Interface_: `logical function omp_get_cancellation()' 241 242_See also_: 243 *note OMP_CANCELLATION:: 244 245_Reference_: 246 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.9. 247 248 249File: libgomp.info, Node: omp_get_default_device, Next: omp_get_dynamic, Prev: omp_get_cancellation, Up: Runtime Library Routines 250 2512.4 `omp_get_default_device' - Get the default device for target regions 252======================================================================== 253 254_Description_: 255 Get the default device for target regions without device clause. 256 257_C/C++_: 258 _Prototype_: `int omp_get_default_device(void);' 259 260_Fortran_: 261 _Interface_: `integer function omp_get_default_device()' 262 263_See also_: 264 *note OMP_DEFAULT_DEVICE::, *note omp_set_default_device:: 265 266_Reference_: 267 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.24. 268 269 270File: libgomp.info, Node: omp_get_dynamic, Next: omp_get_level, Prev: omp_get_default_device, Up: Runtime Library Routines 271 2722.5 `omp_get_dynamic' - Dynamic teams setting 273============================================= 274 275_Description_: 276 This function returns `true' if enabled, `false' otherwise. Here, 277 `true' and `false' represent their language-specific counterparts. 278 279 The dynamic team setting may be initialized at startup by the 280 `OMP_DYNAMIC' environment variable or at runtime using 281 `omp_set_dynamic'. If undefined, dynamic adjustment is disabled 282 by default. 283 284_C/C++_: 285 _Prototype_: `int omp_get_dynamic(void);' 286 287_Fortran_: 288 _Interface_: `logical function omp_get_dynamic()' 289 290_See also_: 291 *note omp_set_dynamic::, *note OMP_DYNAMIC:: 292 293_Reference_: 294 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.8. 295 296 297File: libgomp.info, Node: omp_get_level, Next: omp_get_max_active_levels, Prev: omp_get_dynamic, Up: Runtime Library Routines 298 2992.6 `omp_get_level' - Obtain the current nesting level 300====================================================== 301 302_Description_: 303 This function returns the nesting level for the parallel blocks, 304 which enclose the calling call. 305 306_C/C++_ 307 _Prototype_: `int omp_get_level(void);' 308 309_Fortran_: 310 _Interface_: `integer function omp_level()' 311 312_See also_: 313 *note omp_get_active_level:: 314 315_Reference_: 316 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.17. 317 318 319File: libgomp.info, Node: omp_get_max_active_levels, Next: omp_get_max_threads, Prev: omp_get_level, Up: Runtime Library Routines 320 3212.7 `omp_get_max_active_levels' - Maximum number of active regions 322================================================================== 323 324_Description_: 325 This function obtains the maximum allowed number of nested, active 326 parallel regions. 327 328_C/C++_ 329 _Prototype_: `int omp_get_max_active_levels(void);' 330 331_Fortran_: 332 _Interface_: `integer function omp_get_max_active_levels()' 333 334_See also_: 335 *note omp_set_max_active_levels::, *note omp_get_active_level:: 336 337_Reference_: 338 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.16. 339 340 341File: libgomp.info, Node: omp_get_max_threads, Next: omp_get_nested, Prev: omp_get_max_active_levels, Up: Runtime Library Routines 342 3432.8 `omp_get_max_threads' - Maximum number of threads of parallel region 344======================================================================== 345 346_Description_: 347 Return the maximum number of threads used for the current parallel 348 region that does not use the clause `num_threads'. 349 350_C/C++_: 351 _Prototype_: `int omp_get_max_threads(void);' 352 353_Fortran_: 354 _Interface_: `integer function omp_get_max_threads()' 355 356_See also_: 357 *note omp_set_num_threads::, *note omp_set_dynamic::, *note 358 omp_get_thread_limit:: 359 360_Reference_: 361 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.3. 362 363 364File: libgomp.info, Node: omp_get_nested, Next: omp_get_num_devices, Prev: omp_get_max_threads, Up: Runtime Library Routines 365 3662.9 `omp_get_nested' - Nested parallel regions 367============================================== 368 369_Description_: 370 This function returns `true' if nested parallel regions are 371 enabled, `false' otherwise. Here, `true' and `false' represent 372 their language-specific counterparts. 373 374 Nested parallel regions may be initialized at startup by the 375 `OMP_NESTED' environment variable or at runtime using 376 `omp_set_nested'. If undefined, nested parallel regions are 377 disabled by default. 378 379_C/C++_: 380 _Prototype_: `int omp_get_nested(void);' 381 382_Fortran_: 383 _Interface_: `logical function omp_get_nested()' 384 385_See also_: 386 *note omp_set_nested::, *note OMP_NESTED:: 387 388_Reference_: 389 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.11. 390 391 392File: libgomp.info, Node: omp_get_num_devices, Next: omp_get_num_procs, Prev: omp_get_nested, Up: Runtime Library Routines 393 3942.10 `omp_get_num_devices' - Number of target devices 395===================================================== 396 397_Description_: 398 Returns the number of target devices. 399 400_C/C++_: 401 _Prototype_: `int omp_get_num_devices(void);' 402 403_Fortran_: 404 _Interface_: `integer function omp_get_num_devices()' 405 406_Reference_: 407 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.25. 408 409 410File: libgomp.info, Node: omp_get_num_procs, Next: omp_get_num_teams, Prev: omp_get_num_devices, Up: Runtime Library Routines 411 4122.11 `omp_get_num_procs' - Number of processors online 413====================================================== 414 415_Description_: 416 Returns the number of processors online on that device. 417 418_C/C++_: 419 _Prototype_: `int omp_get_num_procs(void);' 420 421_Fortran_: 422 _Interface_: `integer function omp_get_num_procs()' 423 424_Reference_: 425 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.5. 426 427 428File: libgomp.info, Node: omp_get_num_teams, Next: omp_get_num_threads, Prev: omp_get_num_procs, Up: Runtime Library Routines 429 4302.12 `omp_get_num_teams' - Number of teams 431========================================== 432 433_Description_: 434 Returns the number of teams in the current team region. 435 436_C/C++_: 437 _Prototype_: `int omp_get_num_teams(void);' 438 439_Fortran_: 440 _Interface_: `integer function omp_get_num_teams()' 441 442_Reference_: 443 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.26. 444 445 446File: libgomp.info, Node: omp_get_num_threads, Next: omp_get_proc_bind, Prev: omp_get_num_teams, Up: Runtime Library Routines 447 4482.13 `omp_get_num_threads' - Size of the active team 449==================================================== 450 451_Description_: 452 Returns the number of threads in the current team. In a 453 sequential section of the program `omp_get_num_threads' returns 1. 454 455 The default team size may be initialized at startup by the 456 `OMP_NUM_THREADS' environment variable. At runtime, the size of 457 the current team may be set either by the `NUM_THREADS' clause or 458 by `omp_set_num_threads'. If none of the above were used to 459 define a specific value and `OMP_DYNAMIC' is disabled, one thread 460 per CPU online is used. 461 462_C/C++_: 463 _Prototype_: `int omp_get_num_threads(void);' 464 465_Fortran_: 466 _Interface_: `integer function omp_get_num_threads()' 467 468_See also_: 469 *note omp_get_max_threads::, *note omp_set_num_threads::, *note 470 OMP_NUM_THREADS:: 471 472_Reference_: 473 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.2. 474 475 476File: libgomp.info, Node: omp_get_proc_bind, Next: omp_get_schedule, Prev: omp_get_num_threads, Up: Runtime Library Routines 477 4782.14 `omp_get_proc_bind' - Whether theads may be moved between CPUs 479=================================================================== 480 481_Description_: 482 This functions returns the currently active thread affinity 483 policy, which is set via `OMP_PROC_BIND'. Possible values are 484 `omp_proc_bind_false', `omp_proc_bind_true', 485 `omp_proc_bind_master', `omp_proc_bind_close' and 486 `omp_proc_bind_spread'. 487 488_C/C++_: 489 _Prototype_: `omp_proc_bind_t omp_get_proc_bind(void);' 490 491_Fortran_: 492 _Interface_: `integer(kind=omp_proc_bind_kind) function 493 omp_get_proc_bind()' 494 495_See also_: 496 *note OMP_PROC_BIND::, *note OMP_PLACES::, *note 497 GOMP_CPU_AFFINITY::, 498 499_Reference_: 500 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.22. 501 502 503File: libgomp.info, Node: omp_get_schedule, Next: omp_get_team_num, Prev: omp_get_proc_bind, Up: Runtime Library Routines 504 5052.15 `omp_get_schedule' - Obtain the runtime scheduling method 506============================================================== 507 508_Description_: 509 Obtain the runtime scheduling method. The KIND argument will be 510 set to the value `omp_sched_static', `omp_sched_dynamic', 511 `omp_sched_guided' or `omp_sched_auto'. The second argument, 512 MODIFIER, is set to the chunk size. 513 514_C/C++_ 515 _Prototype_: `void omp_get_schedule(omp_sched_t *kind, int 516 *modifier);' 517 518_Fortran_: 519 _Interface_: `subroutine omp_get_schedule(kind, modifier)' 520 `integer(kind=omp_sched_kind) kind' 521 `integer modifier' 522 523_See also_: 524 *note omp_set_schedule::, *note OMP_SCHEDULE:: 525 526_Reference_: 527 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.13. 528 529 530File: libgomp.info, Node: omp_get_team_num, Next: omp_get_team_size, Prev: omp_get_schedule, Up: Runtime Library Routines 531 5322.16 `omp_get_team_num' - Get team number 533========================================= 534 535_Description_: 536 Returns the team number of the calling thread. 537 538_C/C++_: 539 _Prototype_: `int omp_get_team_num(void);' 540 541_Fortran_: 542 _Interface_: `integer function omp_get_team_num()' 543 544_Reference_: 545 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.27. 546 547 548File: libgomp.info, Node: omp_get_team_size, Next: omp_get_thread_limit, Prev: omp_get_team_num, Up: Runtime Library Routines 549 5502.17 `omp_get_team_size' - Number of threads in a team 551====================================================== 552 553_Description_: 554 This function returns the number of threads in a thread team to 555 which either the current thread or its ancestor belongs. For 556 values of LEVEL outside zero to `omp_get_level', -1 is returned; 557 if LEVEL is zero, 1 is returned, and for `omp_get_level', the 558 result is identical to `omp_get_num_threads'. 559 560_C/C++_: 561 _Prototype_: `int omp_get_team_size(int level);' 562 563_Fortran_: 564 _Interface_: `integer function omp_get_team_size(level)' 565 `integer level' 566 567_See also_: 568 *note omp_get_num_threads::, *note omp_get_level::, *note 569 omp_get_ancestor_thread_num:: 570 571_Reference_: 572 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.19. 573 574 575File: libgomp.info, Node: omp_get_thread_limit, Next: omp_get_thread_num, Prev: omp_get_team_size, Up: Runtime Library Routines 576 5772.18 `omp_get_thread_limit' - Maximum number of threads 578======================================================= 579 580_Description_: 581 Return the maximum number of threads of the program. 582 583_C/C++_: 584 _Prototype_: `int omp_get_thread_limit(void);' 585 586_Fortran_: 587 _Interface_: `integer function omp_get_thread_limit()' 588 589_See also_: 590 *note omp_get_max_threads::, *note OMP_THREAD_LIMIT:: 591 592_Reference_: 593 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.14. 594 595 596File: libgomp.info, Node: omp_get_thread_num, Next: omp_in_parallel, Prev: omp_get_thread_limit, Up: Runtime Library Routines 597 5982.19 `omp_get_thread_num' - Current thread ID 599============================================= 600 601_Description_: 602 Returns a unique thread identification number within the current 603 team. In a sequential parts of the program, `omp_get_thread_num' 604 always returns 0. In parallel regions the return value varies 605 from 0 to `omp_get_num_threads'-1 inclusive. The return value of 606 the master thread of a team is always 0. 607 608_C/C++_: 609 _Prototype_: `int omp_get_thread_num(void);' 610 611_Fortran_: 612 _Interface_: `integer function omp_get_thread_num()' 613 614_See also_: 615 *note omp_get_num_threads::, *note omp_get_ancestor_thread_num:: 616 617_Reference_: 618 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.4. 619 620 621File: libgomp.info, Node: omp_in_parallel, Next: omp_in_final, Prev: omp_get_thread_num, Up: Runtime Library Routines 622 6232.20 `omp_in_parallel' - Whether a parallel region is active 624============================================================ 625 626_Description_: 627 This function returns `true' if currently running in parallel, 628 `false' otherwise. Here, `true' and `false' represent their 629 language-specific counterparts. 630 631_C/C++_: 632 _Prototype_: `int omp_in_parallel(void);' 633 634_Fortran_: 635 _Interface_: `logical function omp_in_parallel()' 636 637_Reference_: 638 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.6. 639 640 641File: libgomp.info, Node: omp_in_final, Next: omp_is_initial_device, Prev: omp_in_parallel, Up: Runtime Library Routines 642 6432.21 `omp_in_final' - Whether in final or included task region 644============================================================== 645 646_Description_: 647 This function returns `true' if currently running in a final or 648 included task region, `false' otherwise. Here, `true' and `false' 649 represent their language-specific counterparts. 650 651_C/C++_: 652 _Prototype_: `int omp_in_final(void);' 653 654_Fortran_: 655 _Interface_: `logical function omp_in_final()' 656 657_Reference_: 658 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.21. 659 660 661File: libgomp.info, Node: omp_is_initial_device, Next: omp_set_default_device, Prev: omp_in_final, Up: Runtime Library Routines 662 6632.22 `omp_is_initial_device' - Whether executing on the host device 664=================================================================== 665 666_Description_: 667 This function returns `true' if currently running on the host 668 device, `false' otherwise. Here, `true' and `false' represent 669 their language-specific counterparts. 670 671_C/C++_: 672 _Prototype_: `int omp_is_initial_device(void);' 673 674_Fortran_: 675 _Interface_: `logical function omp_is_initial_device()' 676 677_Reference_: 678 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.28. 679 680 681File: libgomp.info, Node: omp_set_default_device, Next: omp_set_dynamic, Prev: omp_is_initial_device, Up: Runtime Library Routines 682 6832.23 `omp_set_default_device' - Set the default device for target regions 684========================================================================= 685 686_Description_: 687 Set the default device for target regions without device clause. 688 The argument shall be a nonnegative device number. 689 690_C/C++_: 691 _Prototype_: `void omp_set_default_device(int device_num);' 692 693_Fortran_: 694 _Interface_: `subroutine omp_set_default_device(device_num)' 695 `integer device_num' 696 697_See also_: 698 *note OMP_DEFAULT_DEVICE::, *note omp_get_default_device:: 699 700_Reference_: 701 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.23. 702 703 704File: libgomp.info, Node: omp_set_dynamic, Next: omp_set_max_active_levels, Prev: omp_set_default_device, Up: Runtime Library Routines 705 7062.24 `omp_set_dynamic' - Enable/disable dynamic teams 707===================================================== 708 709_Description_: 710 Enable or disable the dynamic adjustment of the number of threads 711 within a team. The function takes the language-specific equivalent 712 of `true' and `false', where `true' enables dynamic adjustment of 713 team sizes and `false' disables it. 714 715_C/C++_: 716 _Prototype_: `void omp_set_dynamic(int dynamic_threads);' 717 718_Fortran_: 719 _Interface_: `subroutine omp_set_dynamic(dynamic_threads)' 720 `logical, intent(in) :: dynamic_threads' 721 722_See also_: 723 *note OMP_DYNAMIC::, *note omp_get_dynamic:: 724 725_Reference_: 726 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.7. 727 728 729File: libgomp.info, Node: omp_set_max_active_levels, Next: omp_set_nested, Prev: omp_set_dynamic, Up: Runtime Library Routines 730 7312.25 `omp_set_max_active_levels' - Limits the number of active parallel regions 732=============================================================================== 733 734_Description_: 735 This function limits the maximum allowed number of nested, active 736 parallel regions. 737 738_C/C++_ 739 _Prototype_: `void omp_set_max_active_levels(int max_levels);' 740 741_Fortran_: 742 _Interface_: `subroutine omp_set_max_active_levels(max_levels)' 743 `integer max_levels' 744 745_See also_: 746 *note omp_get_max_active_levels::, *note omp_get_active_level:: 747 748_Reference_: 749 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.15. 750 751 752File: libgomp.info, Node: omp_set_nested, Next: omp_set_num_threads, Prev: omp_set_max_active_levels, Up: Runtime Library Routines 753 7542.26 `omp_set_nested' - Enable/disable nested parallel regions 755============================================================== 756 757_Description_: 758 Enable or disable nested parallel regions, i.e., whether team 759 members are allowed to create new teams. The function takes the 760 language-specific equivalent of `true' and `false', where `true' 761 enables dynamic adjustment of team sizes and `false' disables it. 762 763_C/C++_: 764 _Prototype_: `void omp_set_nested(int nested);' 765 766_Fortran_: 767 _Interface_: `subroutine omp_set_nested(nested)' 768 `logical, intent(in) :: nested' 769 770_See also_: 771 *note OMP_NESTED::, *note omp_get_nested:: 772 773_Reference_: 774 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.10. 775 776 777File: libgomp.info, Node: omp_set_num_threads, Next: omp_set_schedule, Prev: omp_set_nested, Up: Runtime Library Routines 778 7792.27 `omp_set_num_threads' - Set upper team size limit 780====================================================== 781 782_Description_: 783 Specifies the number of threads used by default in subsequent 784 parallel sections, if those do not specify a `num_threads' clause. 785 The argument of `omp_set_num_threads' shall be a positive integer. 786 787_C/C++_: 788 _Prototype_: `void omp_set_num_threads(int num_threads);' 789 790_Fortran_: 791 _Interface_: `subroutine omp_set_num_threads(num_threads)' 792 `integer, intent(in) :: num_threads' 793 794_See also_: 795 *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note 796 omp_get_max_threads:: 797 798_Reference_: 799 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.1. 800 801 802File: libgomp.info, Node: omp_set_schedule, Next: omp_init_lock, Prev: omp_set_num_threads, Up: Runtime Library Routines 803 8042.28 `omp_set_schedule' - Set the runtime scheduling method 805=========================================================== 806 807_Description_: 808 Sets the runtime scheduling method. The KIND argument can have the 809 value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided' 810 or `omp_sched_auto'. Except for `omp_sched_auto', the chunk size 811 is set to the value of MODIFIER if positive, or to the default 812 value if zero or negative. For `omp_sched_auto' the MODIFIER 813 argument is ignored. 814 815_C/C++_ 816 _Prototype_: `void omp_set_schedule(omp_sched_t kind, int 817 modifier);' 818 819_Fortran_: 820 _Interface_: `subroutine omp_set_schedule(kind, modifier)' 821 `integer(kind=omp_sched_kind) kind' 822 `integer modifier' 823 824_See also_: 825 *note omp_get_schedule:: *note OMP_SCHEDULE:: 826 827_Reference_: 828 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.12. 829 830 831File: libgomp.info, Node: omp_init_lock, Next: omp_set_lock, Prev: omp_set_schedule, Up: Runtime Library Routines 832 8332.29 `omp_init_lock' - Initialize simple lock 834============================================= 835 836_Description_: 837 Initialize a simple lock. After initialization, the lock is in an 838 unlocked state. 839 840_C/C++_: 841 _Prototype_: `void omp_init_lock(omp_lock_t *lock);' 842 843_Fortran_: 844 _Interface_: `subroutine omp_init_lock(svar)' 845 `integer(omp_lock_kind), intent(out) :: svar' 846 847_See also_: 848 *note omp_destroy_lock:: 849 850_Reference_: 851 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.1. 852 853 854File: libgomp.info, Node: omp_set_lock, Next: omp_test_lock, Prev: omp_init_lock, Up: Runtime Library Routines 855 8562.30 `omp_set_lock' - Wait for and set simple lock 857================================================== 858 859_Description_: 860 Before setting a simple lock, the lock variable must be 861 initialized by `omp_init_lock'. The calling thread is blocked 862 until the lock is available. If the lock is already held by the 863 current thread, a deadlock occurs. 864 865_C/C++_: 866 _Prototype_: `void omp_set_lock(omp_lock_t *lock);' 867 868_Fortran_: 869 _Interface_: `subroutine omp_set_lock(svar)' 870 `integer(omp_lock_kind), intent(inout) :: svar' 871 872_See also_: 873 *note omp_init_lock::, *note omp_test_lock::, *note 874 omp_unset_lock:: 875 876_Reference_: 877 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.3. 878 879 880File: libgomp.info, Node: omp_test_lock, Next: omp_unset_lock, Prev: omp_set_lock, Up: Runtime Library Routines 881 8822.31 `omp_test_lock' - Test and set simple lock if available 883============================================================ 884 885_Description_: 886 Before setting a simple lock, the lock variable must be 887 initialized by `omp_init_lock'. Contrary to `omp_set_lock', 888 `omp_test_lock' does not block if the lock is not available. This 889 function returns `true' upon success, `false' otherwise. Here, 890 `true' and `false' represent their language-specific counterparts. 891 892_C/C++_: 893 _Prototype_: `int omp_test_lock(omp_lock_t *lock);' 894 895_Fortran_: 896 _Interface_: `logical function omp_test_lock(svar)' 897 `integer(omp_lock_kind), intent(inout) :: svar' 898 899_See also_: 900 *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock:: 901 902_Reference_: 903 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.5. 904 905 906File: libgomp.info, Node: omp_unset_lock, Next: omp_destroy_lock, Prev: omp_test_lock, Up: Runtime Library Routines 907 9082.32 `omp_unset_lock' - Unset simple lock 909========================================= 910 911_Description_: 912 A simple lock about to be unset must have been locked by 913 `omp_set_lock' or `omp_test_lock' before. In addition, the lock 914 must be held by the thread calling `omp_unset_lock'. Then, the 915 lock becomes unlocked. If one or more threads attempted to set 916 the lock before, one of them is chosen to, again, set the lock to 917 itself. 918 919_C/C++_: 920 _Prototype_: `void omp_unset_lock(omp_lock_t *lock);' 921 922_Fortran_: 923 _Interface_: `subroutine omp_unset_lock(svar)' 924 `integer(omp_lock_kind), intent(inout) :: svar' 925 926_See also_: 927 *note omp_set_lock::, *note omp_test_lock:: 928 929_Reference_: 930 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.4. 931 932 933File: libgomp.info, Node: omp_destroy_lock, Next: omp_init_nest_lock, Prev: omp_unset_lock, Up: Runtime Library Routines 934 9352.33 `omp_destroy_lock' - Destroy simple lock 936============================================= 937 938_Description_: 939 Destroy a simple lock. In order to be destroyed, a simple lock 940 must be in the unlocked state. 941 942_C/C++_: 943 _Prototype_: `void omp_destroy_lock(omp_lock_t *lock);' 944 945_Fortran_: 946 _Interface_: `subroutine omp_destroy_lock(svar)' 947 `integer(omp_lock_kind), intent(inout) :: svar' 948 949_See also_: 950 *note omp_init_lock:: 951 952_Reference_: 953 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.2. 954 955 956File: libgomp.info, Node: omp_init_nest_lock, Next: omp_set_nest_lock, Prev: omp_destroy_lock, Up: Runtime Library Routines 957 9582.34 `omp_init_nest_lock' - Initialize nested lock 959================================================== 960 961_Description_: 962 Initialize a nested lock. After initialization, the lock is in an 963 unlocked state and the nesting count is set to zero. 964 965_C/C++_: 966 _Prototype_: `void omp_init_nest_lock(omp_nest_lock_t *lock);' 967 968_Fortran_: 969 _Interface_: `subroutine omp_init_nest_lock(nvar)' 970 `integer(omp_nest_lock_kind), intent(out) :: nvar' 971 972_See also_: 973 *note omp_destroy_nest_lock:: 974 975_Reference_: 976 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.1. 977 978 979File: libgomp.info, Node: omp_set_nest_lock, Next: omp_test_nest_lock, Prev: omp_init_nest_lock, Up: Runtime Library Routines 980 9812.35 `omp_set_nest_lock' - Wait for and set nested lock 982======================================================= 983 984_Description_: 985 Before setting a nested lock, the lock variable must be 986 initialized by `omp_init_nest_lock'. The calling thread is 987 blocked until the lock is available. If the lock is already held 988 by the current thread, the nesting count for the lock is 989 incremented. 990 991_C/C++_: 992 _Prototype_: `void omp_set_nest_lock(omp_nest_lock_t *lock);' 993 994_Fortran_: 995 _Interface_: `subroutine omp_set_nest_lock(nvar)' 996 `integer(omp_nest_lock_kind), intent(inout) :: nvar' 997 998_See also_: 999 *note omp_init_nest_lock::, *note omp_unset_nest_lock:: 1000 1001_Reference_: 1002 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.3. 1003 1004 1005File: libgomp.info, Node: omp_test_nest_lock, Next: omp_unset_nest_lock, Prev: omp_set_nest_lock, Up: Runtime Library Routines 1006 10072.36 `omp_test_nest_lock' - Test and set nested lock if available 1008================================================================= 1009 1010_Description_: 1011 Before setting a nested lock, the lock variable must be 1012 initialized by `omp_init_nest_lock'. Contrary to 1013 `omp_set_nest_lock', `omp_test_nest_lock' does not block if the 1014 lock is not available. If the lock is already held by the current 1015 thread, the new nesting count is returned. Otherwise, the return 1016 value equals zero. 1017 1018_C/C++_: 1019 _Prototype_: `int omp_test_nest_lock(omp_nest_lock_t *lock);' 1020 1021_Fortran_: 1022 _Interface_: `logical function omp_test_nest_lock(nvar)' 1023 `integer(omp_nest_lock_kind), intent(inout) :: nvar' 1024 1025_See also_: 1026 *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock:: 1027 1028_Reference_: 1029 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.5. 1030 1031 1032File: libgomp.info, Node: omp_unset_nest_lock, Next: omp_destroy_nest_lock, Prev: omp_test_nest_lock, Up: Runtime Library Routines 1033 10342.37 `omp_unset_nest_lock' - Unset nested lock 1035============================================== 1036 1037_Description_: 1038 A nested lock about to be unset must have been locked by 1039 `omp_set_nested_lock' or `omp_test_nested_lock' before. In 1040 addition, the lock must be held by the thread calling 1041 `omp_unset_nested_lock'. If the nesting count drops to zero, the 1042 lock becomes unlocked. If one ore more threads attempted to set 1043 the lock before, one of them is chosen to, again, set the lock to 1044 itself. 1045 1046_C/C++_: 1047 _Prototype_: `void omp_unset_nest_lock(omp_nest_lock_t *lock);' 1048 1049_Fortran_: 1050 _Interface_: `subroutine omp_unset_nest_lock(nvar)' 1051 `integer(omp_nest_lock_kind), intent(inout) :: nvar' 1052 1053_See also_: 1054 *note omp_set_nest_lock:: 1055 1056_Reference_: 1057 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.4. 1058 1059 1060File: libgomp.info, Node: omp_destroy_nest_lock, Next: omp_get_wtick, Prev: omp_unset_nest_lock, Up: Runtime Library Routines 1061 10622.38 `omp_destroy_nest_lock' - Destroy nested lock 1063================================================== 1064 1065_Description_: 1066 Destroy a nested lock. In order to be destroyed, a nested lock 1067 must be in the unlocked state and its nesting count must equal 1068 zero. 1069 1070_C/C++_: 1071 _Prototype_: `void omp_destroy_nest_lock(omp_nest_lock_t *);' 1072 1073_Fortran_: 1074 _Interface_: `subroutine omp_destroy_nest_lock(nvar)' 1075 `integer(omp_nest_lock_kind), intent(inout) :: nvar' 1076 1077_See also_: 1078 *note omp_init_lock:: 1079 1080_Reference_: 1081 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.2. 1082 1083 1084File: libgomp.info, Node: omp_get_wtick, Next: omp_get_wtime, Prev: omp_destroy_nest_lock, Up: Runtime Library Routines 1085 10862.39 `omp_get_wtick' - Get timer precision 1087========================================== 1088 1089_Description_: 1090 Gets the timer precision, i.e., the number of seconds between two 1091 successive clock ticks. 1092 1093_C/C++_: 1094 _Prototype_: `double omp_get_wtick(void);' 1095 1096_Fortran_: 1097 _Interface_: `double precision function omp_get_wtick()' 1098 1099_See also_: 1100 *note omp_get_wtime:: 1101 1102_Reference_: 1103 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.4.2. 1104 1105 1106File: libgomp.info, Node: omp_get_wtime, Prev: omp_get_wtick, Up: Runtime Library Routines 1107 11082.40 `omp_get_wtime' - Elapsed wall clock time 1109============================================== 1110 1111_Description_: 1112 Elapsed wall clock time in seconds. The time is measured per 1113 thread, no guarantee can be made that two distinct threads measure 1114 the same time. Time is measured from some "time in the past", 1115 which is an arbitrary time guaranteed not to change during the 1116 execution of the program. 1117 1118_C/C++_: 1119 _Prototype_: `double omp_get_wtime(void);' 1120 1121_Fortran_: 1122 _Interface_: `double precision function omp_get_wtime()' 1123 1124_See also_: 1125 *note omp_get_wtick:: 1126 1127_Reference_: 1128 OpenMP specification v4.0 (http://www.openmp.org/), Section 3.4.1. 1129 1130 1131File: libgomp.info, Node: Environment Variables, Next: The libgomp ABI, Prev: Runtime Library Routines, Up: Top 1132 11333 Environment Variables 1134*********************** 1135 1136The environment variables which beginning with `OMP_' are defined by 1137section 4 of the OpenMP specification in version 4.0, while those 1138beginning with `GOMP_' are GNU extensions. 1139 1140* Menu: 1141 1142* OMP_CANCELLATION:: Set whether cancellation is activated 1143* OMP_DISPLAY_ENV:: Show OpenMP version and environment variables 1144* OMP_DEFAULT_DEVICE:: Set the device used in target regions 1145* OMP_DYNAMIC:: Dynamic adjustment of threads 1146* OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions 1147* OMP_NESTED:: Nested parallel regions 1148* OMP_NUM_THREADS:: Specifies the number of threads to use 1149* OMP_PROC_BIND:: Whether theads may be moved between CPUs 1150* OMP_PLACES:: Specifies on which CPUs the theads should be placed 1151* OMP_STACKSIZE:: Set default thread stack size 1152* OMP_SCHEDULE:: How threads are scheduled 1153* OMP_THREAD_LIMIT:: Set the maximum number of threads 1154* OMP_WAIT_POLICY:: How waiting threads are handled 1155* GOMP_CPU_AFFINITY:: Bind threads to specific CPUs 1156* GOMP_DEBUG:: Enable debugging output 1157* GOMP_STACKSIZE:: Set default thread stack size 1158* GOMP_SPINCOUNT:: Set the busy-wait spin count 1159 1160 1161File: libgomp.info, Node: OMP_CANCELLATION, Next: OMP_DISPLAY_ENV, Up: Environment Variables 1162 11633.1 `OMP_CANCELLATION' - Set whether cancellation is activated 1164============================================================== 1165 1166_Description_: 1167 If set to `TRUE', the cancellation is activated. If set to 1168 `FALSE' or if unset, cancellation is disabled and the `cancel' 1169 construct is ignored. 1170 1171_See also_: 1172 *note omp_get_cancellation:: 1173 1174_Reference_: 1175 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.11 1176 1177 1178File: libgomp.info, Node: OMP_DISPLAY_ENV, Next: OMP_DEFAULT_DEVICE, Prev: OMP_CANCELLATION, Up: Environment Variables 1179 11803.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables 1181===================================================================== 1182 1183_Description_: 1184 If set to `TRUE', the OpenMP version number and the values 1185 associated with the OpenMP environment variables are printed to 1186 `stderr'. If set to `VERBOSE', it additionally shows the value of 1187 the environment variables which are GNU extensions. If undefined 1188 or set to `FALSE', this information will not be shown. 1189 1190_Reference_: 1191 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.12 1192 1193 1194File: libgomp.info, Node: OMP_DEFAULT_DEVICE, Next: OMP_DYNAMIC, Prev: OMP_DISPLAY_ENV, Up: Environment Variables 1195 11963.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions 1197================================================================ 1198 1199_Description_: 1200 Set to choose the device which is used in a `target' region, 1201 unless the value is overridden by `omp_set_default_device' or by a 1202 `device' clause. The value shall be the nonnegative device 1203 number. If no device with the given device number exists, the code 1204 is executed on the host. If unset, device number 0 will be used. 1205 1206_See also_: 1207 *note omp_get_default_device::, *note omp_set_default_device::, 1208 1209_Reference_: 1210 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.11 1211 1212 1213File: libgomp.info, Node: OMP_DYNAMIC, Next: OMP_MAX_ACTIVE_LEVELS, Prev: OMP_DEFAULT_DEVICE, Up: Environment Variables 1214 12153.4 `OMP_DYNAMIC' - Dynamic adjustment of threads 1216================================================= 1217 1218_Description_: 1219 Enable or disable the dynamic adjustment of the number of threads 1220 within a team. The value of this environment variable shall be 1221 `TRUE' or `FALSE'. If undefined, dynamic adjustment is disabled 1222 by default. 1223 1224_See also_: 1225 *note omp_set_dynamic:: 1226 1227_Reference_: 1228 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.3 1229 1230 1231File: libgomp.info, Node: OMP_MAX_ACTIVE_LEVELS, Next: OMP_NESTED, Prev: OMP_DYNAMIC, Up: Environment Variables 1232 12333.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions 1234=============================================================================== 1235 1236_Description_: 1237 Specifies the initial value for the maximum number of nested 1238 parallel regions. The value of this variable shall be a positive 1239 integer. If undefined, the number of active levels is unlimited. 1240 1241_See also_: 1242 *note omp_set_max_active_levels:: 1243 1244_Reference_: 1245 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.9 1246 1247 1248File: libgomp.info, Node: OMP_NESTED, Next: OMP_NUM_THREADS, Prev: OMP_MAX_ACTIVE_LEVELS, Up: Environment Variables 1249 12503.6 `OMP_NESTED' - Nested parallel regions 1251========================================== 1252 1253_Description_: 1254 Enable or disable nested parallel regions, i.e., whether team 1255 members are allowed to create new teams. The value of this 1256 environment variable shall be `TRUE' or `FALSE'. If undefined, 1257 nested parallel regions are disabled by default. 1258 1259_See also_: 1260 *note omp_set_nested:: 1261 1262_Reference_: 1263 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.6 1264 1265 1266File: libgomp.info, Node: OMP_NUM_THREADS, Next: OMP_PROC_BIND, Prev: OMP_NESTED, Up: Environment Variables 1267 12683.7 `OMP_NUM_THREADS' - Specifies the number of threads to use 1269============================================================== 1270 1271_Description_: 1272 Specifies the default number of threads to use in parallel 1273 regions. The value of this variable shall be a comma-separated 1274 list of positive integers; the value specified the number of 1275 threads to use for the corresponding nested level. If undefined 1276 one thread per CPU is used. 1277 1278_See also_: 1279 *note omp_set_num_threads:: 1280 1281_Reference_: 1282 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.2 1283 1284 1285File: libgomp.info, Node: OMP_PROC_BIND, Next: OMP_PLACES, Prev: OMP_NUM_THREADS, Up: Environment Variables 1286 12873.8 `OMP_PROC_BIND' - Whether theads may be moved between CPUs 1288============================================================== 1289 1290_Description_: 1291 Specifies whether threads may be moved between processors. If set 1292 to `TRUE', OpenMP theads should not be moved; if set to `FALSE' 1293 they may be moved. Alternatively, a comma separated list with the 1294 values `MASTER', `CLOSE' and `SPREAD' can be used to specify the 1295 thread affinity policy for the corresponding nesting level. With 1296 `MASTER' the worker threads are in the same place partition as the 1297 master thread. With `CLOSE' those are kept close to the master 1298 thread in contiguous place partitions. And with `SPREAD' a sparse 1299 distribution across the place partitions is used. 1300 1301 When undefined, `OMP_PROC_BIND' defaults to `TRUE' when 1302 `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise. 1303 1304_See also_: 1305 *note OMP_PLACES::, *note GOMP_CPU_AFFINITY::, *note 1306 omp_get_proc_bind:: 1307 1308_Reference_: 1309 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.4 1310 1311 1312File: libgomp.info, Node: OMP_PLACES, Next: OMP_STACKSIZE, Prev: OMP_PROC_BIND, Up: Environment Variables 1313 13143.9 `OMP_PLACES' - Specifies on which CPUs the theads should be placed 1315====================================================================== 1316 1317_Description_: 1318 The thread placement can be either specified using an abstract 1319 name or by an explicit list of the places. The abstract names 1320 `threads', `cores' and `sockets' can be optionally followed by a 1321 positive number in parentheses, which denotes the how many places 1322 shall be created. With `threads' each place corresponds to a 1323 single hardware thread; `cores' to a single core with the 1324 corresponding number of hardware threads; and with `sockets' the 1325 place corresponds to a single socket. The resulting placement can 1326 be shown by setting the `OMP_DISPLAY_ENV' environment variable. 1327 1328 Alternatively, the placement can be specified explicitly as 1329 comma-separated list of places. A place is specified by set of 1330 nonnegative numbers in curly braces, denoting the denoting the 1331 hardware threads. The hardware threads belonging to a place can 1332 either be specified as comma-separated list of nonnegative thread 1333 numbers or using an interval. Multiple places can also be either 1334 specified by a comma-separated list of places or by an interval. 1335 To specify an interval, a colon followed by the count is placed 1336 after after the hardware thread number or the place. Optionally, 1337 the length can be followed by a colon and the stride number - 1338 otherwise a unit stride is assumed. For instance, the following 1339 specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9}, 1340 {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'. 1341 1342 If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and 1343 `OMP_PROC_BIND' is either unset or `false', threads may be moved 1344 between CPUs following no placement policy. 1345 1346_See also_: 1347 *note OMP_PROC_BIND::, *note GOMP_CPU_AFFINITY::, *note 1348 omp_get_proc_bind::, *note OMP_DISPLAY_ENV:: 1349 1350_Reference_: 1351 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.5 1352 1353 1354File: libgomp.info, Node: OMP_STACKSIZE, Next: OMP_SCHEDULE, Prev: OMP_PLACES, Up: Environment Variables 1355 13563.10 `OMP_STACKSIZE' - Set default thread stack size 1357==================================================== 1358 1359_Description_: 1360 Set the default thread stack size in kilobytes, unless the number 1361 is suffixed by `B', `K', `M' or `G', in which case the size is, 1362 respectively, in bytes, kilobytes, megabytes or gigabytes. This 1363 is different from `pthread_attr_setstacksize' which gets the 1364 number of bytes as an argument. If the stack size cannot be set 1365 due to system constraints, an error is reported and the initial 1366 stack size is left unchanged. If undefined, the stack size is 1367 system dependent. 1368 1369_Reference_: 1370 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.7 1371 1372 1373File: libgomp.info, Node: OMP_SCHEDULE, Next: OMP_THREAD_LIMIT, Prev: OMP_STACKSIZE, Up: Environment Variables 1374 13753.11 `OMP_SCHEDULE' - How threads are scheduled 1376=============================================== 1377 1378_Description_: 1379 Allows to specify `schedule type' and `chunk size'. The value of 1380 the variable shall have the form: `type[,chunk]' where `type' is 1381 one of `static', `dynamic', `guided' or `auto' The optional 1382 `chunk' size shall be a positive integer. If undefined, dynamic 1383 scheduling and a chunk size of 1 is used. 1384 1385_See also_: 1386 *note omp_set_schedule:: 1387 1388_Reference_: 1389 OpenMP specification v4.0 (http://www.openmp.org/), Sections 2.7.1 1390 and 4.1 1391 1392 1393File: libgomp.info, Node: OMP_THREAD_LIMIT, Next: OMP_WAIT_POLICY, Prev: OMP_SCHEDULE, Up: Environment Variables 1394 13953.12 `OMP_THREAD_LIMIT' - Set the maximum number of threads 1396=========================================================== 1397 1398_Description_: 1399 Specifies the number of threads to use for the whole program. The 1400 value of this variable shall be a positive integer. If undefined, 1401 the number of threads is not limited. 1402 1403_See also_: 1404 *note OMP_NUM_THREADS::, *note omp_get_thread_limit:: 1405 1406_Reference_: 1407 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.10 1408 1409 1410File: libgomp.info, Node: OMP_WAIT_POLICY, Next: GOMP_CPU_AFFINITY, Prev: OMP_THREAD_LIMIT, Up: Environment Variables 1411 14123.13 `OMP_WAIT_POLICY' - How waiting threads are handled 1413======================================================== 1414 1415_Description_: 1416 Specifies whether waiting threads should be active or passive. If 1417 the value is `PASSIVE', waiting threads should not consume CPU 1418 power while waiting; while the value is `ACTIVE' specifies that 1419 they should. If undefined, threads wait actively for a short time 1420 before waiting passively. 1421 1422_See also_: 1423 *note GOMP_SPINCOUNT:: 1424 1425_Reference_: 1426 OpenMP specification v4.0 (http://www.openmp.org/), Section 4.8 1427 1428 1429File: libgomp.info, Node: GOMP_CPU_AFFINITY, Next: GOMP_DEBUG, Prev: OMP_WAIT_POLICY, Up: Environment Variables 1430 14313.14 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs 1432======================================================== 1433 1434_Description_: 1435 Binds threads to specific CPUs. The variable should contain a 1436 space-separated or comma-separated list of CPUs. This list may 1437 contain different kinds of entries: either single CPU numbers in 1438 any order, a range of CPUs (M-N) or a range with some stride 1439 (M-N:S). CPU numbers are zero based. For example, 1440 `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread 1441 to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to 1442 CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 1443 10, 12, and 14 respectively and then start assigning back from the 1444 beginning of the list. `GOMP_CPU_AFFINITY=0' binds all threads to 1445 CPU 0. 1446 1447 There is no libgomp library routine to determine whether a CPU 1448 affinity specification is in effect. As a workaround, 1449 language-specific library functions, e.g., `getenv' in C or 1450 `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the 1451 setting of the `GOMP_CPU_AFFINITY' environment variable. A 1452 defined CPU affinity on startup cannot be changed or disabled 1453 during the runtime of the application. 1454 1455 If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set, 1456 `OMP_PROC_BIND' has a higher precedence. If neither has been set 1457 and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to 1458 `FALSE', the host system will handle the assignment of threads to 1459 CPUs. 1460 1461_See also_: 1462 *note OMP_PLACES::, *note OMP_PROC_BIND:: 1463 1464 1465File: libgomp.info, Node: GOMP_DEBUG, Next: GOMP_STACKSIZE, Prev: GOMP_CPU_AFFINITY, Up: Environment Variables 1466 14673.15 `GOMP_DEBUG' - Enable debugging output 1468=========================================== 1469 1470_Description_: 1471 Enable debugging output. The variable should be set to `0' 1472 (disabled, also the default if not set), or `1' (enabled). 1473 1474 If enabled, some debugging output will be printed during execution. 1475 This is currently not specified in more detail, and subject to 1476 change. 1477 1478 1479File: libgomp.info, Node: GOMP_STACKSIZE, Next: GOMP_SPINCOUNT, Prev: GOMP_DEBUG, Up: Environment Variables 1480 14813.16 `GOMP_STACKSIZE' - Set default thread stack size 1482===================================================== 1483 1484_Description_: 1485 Set the default thread stack size in kilobytes. This is different 1486 from `pthread_attr_setstacksize' which gets the number of bytes as 1487 an argument. If the stack size cannot be set due to system 1488 constraints, an error is reported and the initial stack size is 1489 left unchanged. If undefined, the stack size is system dependent. 1490 1491_See also_: 1492 *note OMP_STACKSIZE:: 1493 1494_Reference_: 1495 GCC Patches Mailinglist 1496 (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC 1497 Patches Mailinglist 1498 (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html) 1499 1500 1501File: libgomp.info, Node: GOMP_SPINCOUNT, Prev: GOMP_STACKSIZE, Up: Environment Variables 1502 15033.17 `GOMP_SPINCOUNT' - Set the busy-wait spin count 1504==================================================== 1505 1506_Description_: 1507 Determines how long a threads waits actively with consuming CPU 1508 power before waiting passively without consuming CPU power. The 1509 value may be either `INFINITE', `INFINITY' to always wait actively 1510 or an integer which gives the number of spins of the busy-wait 1511 loop. The integer may optionally be followed by the following 1512 suffixes acting as multiplication factors: `k' (kilo, thousand), 1513 `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion). 1514 If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE', 1515 300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion 1516 is used when `OMP_WAIT_POLICY' is `ACTIVE'. If there are more 1517 OpenMP threads than available CPUs, 1000 and 100 spins are used 1518 for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively; 1519 unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is 1520 `PASSIVE'. 1521 1522_See also_: 1523 *note OMP_WAIT_POLICY:: 1524 1525 1526File: libgomp.info, Node: The libgomp ABI, Next: Reporting Bugs, Prev: Environment Variables, Up: Top 1527 15284 The libgomp ABI 1529***************** 1530 1531The following sections present notes on the external ABI as presented 1532by libgomp. Only maintainers should need them. 1533 1534* Menu: 1535 1536* Implementing MASTER construct:: 1537* Implementing CRITICAL construct:: 1538* Implementing ATOMIC construct:: 1539* Implementing FLUSH construct:: 1540* Implementing BARRIER construct:: 1541* Implementing THREADPRIVATE construct:: 1542* Implementing PRIVATE clause:: 1543* Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses:: 1544* Implementing REDUCTION clause:: 1545* Implementing PARALLEL construct:: 1546* Implementing FOR construct:: 1547* Implementing ORDERED construct:: 1548* Implementing SECTIONS construct:: 1549* Implementing SINGLE construct:: 1550 1551 1552File: libgomp.info, Node: Implementing MASTER construct, Next: Implementing CRITICAL construct, Up: The libgomp ABI 1553 15544.1 Implementing MASTER construct 1555================================= 1556 1557 if (omp_get_thread_num () == 0) 1558 block 1559 1560 Alternately, we generate two copies of the parallel subfunction and 1561only include this in the version run by the master thread. Surely this 1562is not worthwhile though... 1563 1564 1565File: libgomp.info, Node: Implementing CRITICAL construct, Next: Implementing ATOMIC construct, Prev: Implementing MASTER construct, Up: The libgomp ABI 1566 15674.2 Implementing CRITICAL construct 1568=================================== 1569 1570Without a specified name, 1571 1572 void GOMP_critical_start (void); 1573 void GOMP_critical_end (void); 1574 1575 so that we don't get COPY relocations from libgomp to the main 1576application. 1577 1578 With a specified name, use omp_set_lock and omp_unset_lock with name 1579being transformed into a variable declared like 1580 1581 omp_lock_t gomp_critical_user_<name> __attribute__((common)) 1582 1583 Ideally the ABI would specify that all zero is a valid unlocked 1584state, and so we wouldn't need to initialize this at startup. 1585 1586 1587File: libgomp.info, Node: Implementing ATOMIC construct, Next: Implementing FLUSH construct, Prev: Implementing CRITICAL construct, Up: The libgomp ABI 1588 15894.3 Implementing ATOMIC construct 1590================================= 1591 1592The target should implement the `__sync' builtins. 1593 1594 Failing that we could add 1595 1596 void GOMP_atomic_enter (void) 1597 void GOMP_atomic_exit (void) 1598 1599 which reuses the regular lock code, but with yet another lock object 1600private to the library. 1601 1602 1603File: libgomp.info, Node: Implementing FLUSH construct, Next: Implementing BARRIER construct, Prev: Implementing ATOMIC construct, Up: The libgomp ABI 1604 16054.4 Implementing FLUSH construct 1606================================ 1607 1608Expands to the `__sync_synchronize' builtin. 1609 1610 1611File: libgomp.info, Node: Implementing BARRIER construct, Next: Implementing THREADPRIVATE construct, Prev: Implementing FLUSH construct, Up: The libgomp ABI 1612 16134.5 Implementing BARRIER construct 1614================================== 1615 1616 void GOMP_barrier (void) 1617 1618 1619File: libgomp.info, Node: Implementing THREADPRIVATE construct, Next: Implementing PRIVATE clause, Prev: Implementing BARRIER construct, Up: The libgomp ABI 1620 16214.6 Implementing THREADPRIVATE construct 1622======================================== 1623 1624In _most_ cases we can map this directly to `__thread'. Except that 1625OMP allows constructors for C++ objects. We can either refuse to 1626support this (how often is it used?) or we can implement something akin 1627to .ctors. 1628 1629 Even more ideally, this ctor feature is handled by extensions to the 1630main pthreads library. Failing that, we can have a set of entry points 1631to register ctor functions to be called. 1632 1633 1634File: libgomp.info, Node: Implementing PRIVATE clause, Next: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses, Prev: Implementing THREADPRIVATE construct, Up: The libgomp ABI 1635 16364.7 Implementing PRIVATE clause 1637=============================== 1638 1639In association with a PARALLEL, or within the lexical extent of a 1640PARALLEL block, the variable becomes a local variable in the parallel 1641subfunction. 1642 1643 In association with FOR or SECTIONS blocks, create a new automatic 1644variable within the current function. This preserves the semantic of 1645new variable creation. 1646 1647 1648File: libgomp.info, Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses, Next: Implementing REDUCTION clause, Prev: Implementing PRIVATE clause, Up: The libgomp ABI 1649 16504.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses 1651======================================================================== 1652 1653This seems simple enough for PARALLEL blocks. Create a private struct 1654for communicating between the parent and subfunction. In the parent, 1655copy in values for scalar and "small" structs; copy in addresses for 1656others TREE_ADDRESSABLE types. In the subfunction, copy the value into 1657the local variable. 1658 1659 It is not clear what to do with bare FOR or SECTION blocks. The 1660only thing I can figure is that we do something like: 1661 1662 #pragma omp for firstprivate(x) lastprivate(y) 1663 for (int i = 0; i < n; ++i) 1664 body; 1665 1666 which becomes 1667 1668 { 1669 int x = x, y; 1670 1671 // for stuff 1672 1673 if (i == n) 1674 y = y; 1675 } 1676 1677 where the "x=x" and "y=y" assignments actually have different uids 1678for the two variables, i.e. not something you could write directly in 1679C. Presumably this only makes sense if the "outer" x and y are global 1680variables. 1681 1682 COPYPRIVATE would work the same way, except the structure broadcast 1683would have to happen via SINGLE machinery instead. 1684 1685 1686File: libgomp.info, Node: Implementing REDUCTION clause, Next: Implementing PARALLEL construct, Prev: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses, Up: The libgomp ABI 1687 16884.9 Implementing REDUCTION clause 1689================================= 1690 1691The private struct mentioned in the previous section should have a 1692pointer to an array of the type of the variable, indexed by the 1693thread's TEAM_ID. The thread stores its final value into the array, 1694and after the barrier, the master thread iterates over the array to 1695collect the values. 1696 1697 1698File: libgomp.info, Node: Implementing PARALLEL construct, Next: Implementing FOR construct, Prev: Implementing REDUCTION clause, Up: The libgomp ABI 1699 17004.10 Implementing PARALLEL construct 1701==================================== 1702 1703 #pragma omp parallel 1704 { 1705 body; 1706 } 1707 1708 becomes 1709 1710 void subfunction (void *data) 1711 { 1712 use data; 1713 body; 1714 } 1715 1716 setup data; 1717 GOMP_parallel_start (subfunction, &data, num_threads); 1718 subfunction (&data); 1719 GOMP_parallel_end (); 1720 1721 void GOMP_parallel_start (void (*fn)(void *), void *data, unsigned num_threads) 1722 1723 The FN argument is the subfunction to be run in parallel. 1724 1725 The DATA argument is a pointer to a structure used to communicate 1726data in and out of the subfunction, as discussed above with respect to 1727FIRSTPRIVATE et al. 1728 1729 The NUM_THREADS argument is 1 if an IF clause is present and false, 1730or the value of the NUM_THREADS clause, if present, or 0. 1731 1732 The function needs to create the appropriate number of threads 1733and/or launch them from the dock. It needs to create the team 1734structure and assign team ids. 1735 1736 void GOMP_parallel_end (void) 1737 1738 Tears down the team and returns us to the previous 1739`omp_in_parallel()' state. 1740 1741 1742File: libgomp.info, Node: Implementing FOR construct, Next: Implementing ORDERED construct, Prev: Implementing PARALLEL construct, Up: The libgomp ABI 1743 17444.11 Implementing FOR construct 1745=============================== 1746 1747 #pragma omp parallel for 1748 for (i = lb; i <= ub; i++) 1749 body; 1750 1751 becomes 1752 1753 void subfunction (void *data) 1754 { 1755 long _s0, _e0; 1756 while (GOMP_loop_static_next (&_s0, &_e0)) 1757 { 1758 long _e1 = _e0, i; 1759 for (i = _s0; i < _e1; i++) 1760 body; 1761 } 1762 GOMP_loop_end_nowait (); 1763 } 1764 1765 GOMP_parallel_loop_static (subfunction, NULL, 0, lb, ub+1, 1, 0); 1766 subfunction (NULL); 1767 GOMP_parallel_end (); 1768 1769 #pragma omp for schedule(runtime) 1770 for (i = 0; i < n; i++) 1771 body; 1772 1773 becomes 1774 1775 { 1776 long i, _s0, _e0; 1777 if (GOMP_loop_runtime_start (0, n, 1, &_s0, &_e0)) 1778 do { 1779 long _e1 = _e0; 1780 for (i = _s0, i < _e0; i++) 1781 body; 1782 } while (GOMP_loop_runtime_next (&_s0, _&e0)); 1783 GOMP_loop_end (); 1784 } 1785 1786 Note that while it looks like there is trickiness to propagating a 1787non-constant STEP, there isn't really. We're explicitly allowed to 1788evaluate it as many times as we want, and any variables involved should 1789automatically be handled as PRIVATE or SHARED like any other variables. 1790So the expression should remain evaluable in the subfunction. We can 1791also pull it into a local variable if we like, but since its supposed 1792to remain unchanged, we can also not if we like. 1793 1794 If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be 1795able to get away with no work-sharing context at all, since we can 1796simply perform the arithmetic directly in each thread to divide up the 1797iterations. Which would mean that we wouldn't need to call any of 1798these routines. 1799 1800 There are separate routines for handling loops with an ORDERED 1801clause. Bookkeeping for that is non-trivial... 1802 1803 1804File: libgomp.info, Node: Implementing ORDERED construct, Next: Implementing SECTIONS construct, Prev: Implementing FOR construct, Up: The libgomp ABI 1805 18064.12 Implementing ORDERED construct 1807=================================== 1808 1809 void GOMP_ordered_start (void) 1810 void GOMP_ordered_end (void) 1811 1812 1813File: libgomp.info, Node: Implementing SECTIONS construct, Next: Implementing SINGLE construct, Prev: Implementing ORDERED construct, Up: The libgomp ABI 1814 18154.13 Implementing SECTIONS construct 1816==================================== 1817 1818A block as 1819 1820 #pragma omp sections 1821 { 1822 #pragma omp section 1823 stmt1; 1824 #pragma omp section 1825 stmt2; 1826 #pragma omp section 1827 stmt3; 1828 } 1829 1830 becomes 1831 1832 for (i = GOMP_sections_start (3); i != 0; i = GOMP_sections_next ()) 1833 switch (i) 1834 { 1835 case 1: 1836 stmt1; 1837 break; 1838 case 2: 1839 stmt2; 1840 break; 1841 case 3: 1842 stmt3; 1843 break; 1844 } 1845 GOMP_barrier (); 1846 1847 1848File: libgomp.info, Node: Implementing SINGLE construct, Prev: Implementing SECTIONS construct, Up: The libgomp ABI 1849 18504.14 Implementing SINGLE construct 1851================================== 1852 1853A block like 1854 1855 #pragma omp single 1856 { 1857 body; 1858 } 1859 1860 becomes 1861 1862 if (GOMP_single_start ()) 1863 body; 1864 GOMP_barrier (); 1865 1866 while 1867 1868 #pragma omp single copyprivate(x) 1869 body; 1870 1871 becomes 1872 1873 datap = GOMP_single_copy_start (); 1874 if (datap == NULL) 1875 { 1876 body; 1877 data.x = x; 1878 GOMP_single_copy_end (&data); 1879 } 1880 else 1881 x = datap->x; 1882 GOMP_barrier (); 1883 1884 1885File: libgomp.info, Node: Reporting Bugs, Next: Copying, Prev: The libgomp ABI, Up: Top 1886 18875 Reporting Bugs 1888**************** 1889 1890Bugs in the GNU Offloading and Multi Processing Runtime Library should 1891be reported via Bugzilla (http://gcc.gnu.org/bugzilla/). Please add 1892"openacc", or "openmp", or both to the keywords field in the bug 1893report, as appropriate. 1894 1895 1896File: libgomp.info, Node: Copying, Next: GNU Free Documentation License, Prev: Reporting Bugs, Up: Top 1897 1898GNU General Public License 1899************************** 1900 1901 Version 3, 29 June 2007 1902 1903 Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/' 1904 1905 Everyone is permitted to copy and distribute verbatim copies of this 1906 license document, but changing it is not allowed. 1907 1908Preamble 1909======== 1910 1911The GNU General Public License is a free, copyleft license for software 1912and other kinds of works. 1913 1914 The licenses for most software and other practical works are designed 1915to take away your freedom to share and change the works. By contrast, 1916the GNU General Public License is intended to guarantee your freedom to 1917share and change all versions of a program-to make sure it remains free 1918software for all its users. We, the Free Software Foundation, use the 1919GNU General Public License for most of our software; it applies also to 1920any other work released this way by its authors. You can apply it to 1921your programs, too. 1922 1923 When we speak of free software, we are referring to freedom, not 1924price. Our General Public Licenses are designed to make sure that you 1925have the freedom to distribute copies of free software (and charge for 1926them if you wish), that you receive source code or can get it if you 1927want it, that you can change the software or use pieces of it in new 1928free programs, and that you know you can do these things. 1929 1930 To protect your rights, we need to prevent others from denying you 1931these rights or asking you to surrender the rights. Therefore, you 1932have certain responsibilities if you distribute copies of the software, 1933or if you modify it: responsibilities to respect the freedom of others. 1934 1935 For example, if you distribute copies of such a program, whether 1936gratis or for a fee, you must pass on to the recipients the same 1937freedoms that you received. You must make sure that they, too, receive 1938or can get the source code. And you must show them these terms so they 1939know their rights. 1940 1941 Developers that use the GNU GPL protect your rights with two steps: 1942(1) assert copyright on the software, and (2) offer you this License 1943giving you legal permission to copy, distribute and/or modify it. 1944 1945 For the developers' and authors' protection, the GPL clearly explains 1946that there is no warranty for this free software. For both users' and 1947authors' sake, the GPL requires that modified versions be marked as 1948changed, so that their problems will not be attributed erroneously to 1949authors of previous versions. 1950 1951 Some devices are designed to deny users access to install or run 1952modified versions of the software inside them, although the 1953manufacturer can do so. This is fundamentally incompatible with the 1954aim of protecting users' freedom to change the software. The 1955systematic pattern of such abuse occurs in the area of products for 1956individuals to use, which is precisely where it is most unacceptable. 1957Therefore, we have designed this version of the GPL to prohibit the 1958practice for those products. If such problems arise substantially in 1959other domains, we stand ready to extend this provision to those domains 1960in future versions of the GPL, as needed to protect the freedom of 1961users. 1962 1963 Finally, every program is threatened constantly by software patents. 1964States should not allow patents to restrict development and use of 1965software on general-purpose computers, but in those that do, we wish to 1966avoid the special danger that patents applied to a free program could 1967make it effectively proprietary. To prevent this, the GPL assures that 1968patents cannot be used to render the program non-free. 1969 1970 The precise terms and conditions for copying, distribution and 1971modification follow. 1972 1973TERMS AND CONDITIONS 1974==================== 1975 1976 0. Definitions. 1977 1978 "This License" refers to version 3 of the GNU General Public 1979 License. 1980 1981 "Copyright" also means copyright-like laws that apply to other 1982 kinds of works, such as semiconductor masks. 1983 1984 "The Program" refers to any copyrightable work licensed under this 1985 License. Each licensee is addressed as "you". "Licensees" and 1986 "recipients" may be individuals or organizations. 1987 1988 To "modify" a work means to copy from or adapt all or part of the 1989 work in a fashion requiring copyright permission, other than the 1990 making of an exact copy. The resulting work is called a "modified 1991 version" of the earlier work or a work "based on" the earlier work. 1992 1993 A "covered work" means either the unmodified Program or a work 1994 based on the Program. 1995 1996 To "propagate" a work means to do anything with it that, without 1997 permission, would make you directly or secondarily liable for 1998 infringement under applicable copyright law, except executing it 1999 on a computer or modifying a private copy. Propagation includes 2000 copying, distribution (with or without modification), making 2001 available to the public, and in some countries other activities as 2002 well. 2003 2004 To "convey" a work means any kind of propagation that enables other 2005 parties to make or receive copies. Mere interaction with a user 2006 through a computer network, with no transfer of a copy, is not 2007 conveying. 2008 2009 An interactive user interface displays "Appropriate Legal Notices" 2010 to the extent that it includes a convenient and prominently visible 2011 feature that (1) displays an appropriate copyright notice, and (2) 2012 tells the user that there is no warranty for the work (except to 2013 the extent that warranties are provided), that licensees may 2014 convey the work under this License, and how to view a copy of this 2015 License. If the interface presents a list of user commands or 2016 options, such as a menu, a prominent item in the list meets this 2017 criterion. 2018 2019 1. Source Code. 2020 2021 The "source code" for a work means the preferred form of the work 2022 for making modifications to it. "Object code" means any 2023 non-source form of a work. 2024 2025 A "Standard Interface" means an interface that either is an 2026 official standard defined by a recognized standards body, or, in 2027 the case of interfaces specified for a particular programming 2028 language, one that is widely used among developers working in that 2029 language. 2030 2031 The "System Libraries" of an executable work include anything, 2032 other than the work as a whole, that (a) is included in the normal 2033 form of packaging a Major Component, but which is not part of that 2034 Major Component, and (b) serves only to enable use of the work 2035 with that Major Component, or to implement a Standard Interface 2036 for which an implementation is available to the public in source 2037 code form. A "Major Component", in this context, means a major 2038 essential component (kernel, window system, and so on) of the 2039 specific operating system (if any) on which the executable work 2040 runs, or a compiler used to produce the work, or an object code 2041 interpreter used to run it. 2042 2043 The "Corresponding Source" for a work in object code form means all 2044 the source code needed to generate, install, and (for an executable 2045 work) run the object code and to modify the work, including 2046 scripts to control those activities. However, it does not include 2047 the work's System Libraries, or general-purpose tools or generally 2048 available free programs which are used unmodified in performing 2049 those activities but which are not part of the work. For example, 2050 Corresponding Source includes interface definition files 2051 associated with source files for the work, and the source code for 2052 shared libraries and dynamically linked subprograms that the work 2053 is specifically designed to require, such as by intimate data 2054 communication or control flow between those subprograms and other 2055 parts of the work. 2056 2057 The Corresponding Source need not include anything that users can 2058 regenerate automatically from other parts of the Corresponding 2059 Source. 2060 2061 The Corresponding Source for a work in source code form is that 2062 same work. 2063 2064 2. Basic Permissions. 2065 2066 All rights granted under this License are granted for the term of 2067 copyright on the Program, and are irrevocable provided the stated 2068 conditions are met. This License explicitly affirms your unlimited 2069 permission to run the unmodified Program. The output from running 2070 a covered work is covered by this License only if the output, 2071 given its content, constitutes a covered work. This License 2072 acknowledges your rights of fair use or other equivalent, as 2073 provided by copyright law. 2074 2075 You may make, run and propagate covered works that you do not 2076 convey, without conditions so long as your license otherwise 2077 remains in force. You may convey covered works to others for the 2078 sole purpose of having them make modifications exclusively for 2079 you, or provide you with facilities for running those works, 2080 provided that you comply with the terms of this License in 2081 conveying all material for which you do not control copyright. 2082 Those thus making or running the covered works for you must do so 2083 exclusively on your behalf, under your direction and control, on 2084 terms that prohibit them from making any copies of your 2085 copyrighted material outside their relationship with you. 2086 2087 Conveying under any other circumstances is permitted solely under 2088 the conditions stated below. Sublicensing is not allowed; section 2089 10 makes it unnecessary. 2090 2091 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 2092 2093 No covered work shall be deemed part of an effective technological 2094 measure under any applicable law fulfilling obligations under 2095 article 11 of the WIPO copyright treaty adopted on 20 December 2096 1996, or similar laws prohibiting or restricting circumvention of 2097 such measures. 2098 2099 When you convey a covered work, you waive any legal power to forbid 2100 circumvention of technological measures to the extent such 2101 circumvention is effected by exercising rights under this License 2102 with respect to the covered work, and you disclaim any intention 2103 to limit operation or modification of the work as a means of 2104 enforcing, against the work's users, your or third parties' legal 2105 rights to forbid circumvention of technological measures. 2106 2107 4. Conveying Verbatim Copies. 2108 2109 You may convey verbatim copies of the Program's source code as you 2110 receive it, in any medium, provided that you conspicuously and 2111 appropriately publish on each copy an appropriate copyright notice; 2112 keep intact all notices stating that this License and any 2113 non-permissive terms added in accord with section 7 apply to the 2114 code; keep intact all notices of the absence of any warranty; and 2115 give all recipients a copy of this License along with the Program. 2116 2117 You may charge any price or no price for each copy that you convey, 2118 and you may offer support or warranty protection for a fee. 2119 2120 5. Conveying Modified Source Versions. 2121 2122 You may convey a work based on the Program, or the modifications to 2123 produce it from the Program, in the form of source code under the 2124 terms of section 4, provided that you also meet all of these 2125 conditions: 2126 2127 a. The work must carry prominent notices stating that you 2128 modified it, and giving a relevant date. 2129 2130 b. The work must carry prominent notices stating that it is 2131 released under this License and any conditions added under 2132 section 7. This requirement modifies the requirement in 2133 section 4 to "keep intact all notices". 2134 2135 c. You must license the entire work, as a whole, under this 2136 License to anyone who comes into possession of a copy. This 2137 License will therefore apply, along with any applicable 2138 section 7 additional terms, to the whole of the work, and all 2139 its parts, regardless of how they are packaged. This License 2140 gives no permission to license the work in any other way, but 2141 it does not invalidate such permission if you have separately 2142 received it. 2143 2144 d. If the work has interactive user interfaces, each must display 2145 Appropriate Legal Notices; however, if the Program has 2146 interactive interfaces that do not display Appropriate Legal 2147 Notices, your work need not make them do so. 2148 2149 A compilation of a covered work with other separate and independent 2150 works, which are not by their nature extensions of the covered 2151 work, and which are not combined with it such as to form a larger 2152 program, in or on a volume of a storage or distribution medium, is 2153 called an "aggregate" if the compilation and its resulting 2154 copyright are not used to limit the access or legal rights of the 2155 compilation's users beyond what the individual works permit. 2156 Inclusion of a covered work in an aggregate does not cause this 2157 License to apply to the other parts of the aggregate. 2158 2159 6. Conveying Non-Source Forms. 2160 2161 You may convey a covered work in object code form under the terms 2162 of sections 4 and 5, provided that you also convey the 2163 machine-readable Corresponding Source under the terms of this 2164 License, in one of these ways: 2165 2166 a. Convey the object code in, or embodied in, a physical product 2167 (including a physical distribution medium), accompanied by the 2168 Corresponding Source fixed on a durable physical medium 2169 customarily used for software interchange. 2170 2171 b. Convey the object code in, or embodied in, a physical product 2172 (including a physical distribution medium), accompanied by a 2173 written offer, valid for at least three years and valid for 2174 as long as you offer spare parts or customer support for that 2175 product model, to give anyone who possesses the object code 2176 either (1) a copy of the Corresponding Source for all the 2177 software in the product that is covered by this License, on a 2178 durable physical medium customarily used for software 2179 interchange, for a price no more than your reasonable cost of 2180 physically performing this conveying of source, or (2) access 2181 to copy the Corresponding Source from a network server at no 2182 charge. 2183 2184 c. Convey individual copies of the object code with a copy of 2185 the written offer to provide the Corresponding Source. This 2186 alternative is allowed only occasionally and noncommercially, 2187 and only if you received the object code with such an offer, 2188 in accord with subsection 6b. 2189 2190 d. Convey the object code by offering access from a designated 2191 place (gratis or for a charge), and offer equivalent access 2192 to the Corresponding Source in the same way through the same 2193 place at no further charge. You need not require recipients 2194 to copy the Corresponding Source along with the object code. 2195 If the place to copy the object code is a network server, the 2196 Corresponding Source may be on a different server (operated 2197 by you or a third party) that supports equivalent copying 2198 facilities, provided you maintain clear directions next to 2199 the object code saying where to find the Corresponding Source. 2200 Regardless of what server hosts the Corresponding Source, you 2201 remain obligated to ensure that it is available for as long 2202 as needed to satisfy these requirements. 2203 2204 e. Convey the object code using peer-to-peer transmission, 2205 provided you inform other peers where the object code and 2206 Corresponding Source of the work are being offered to the 2207 general public at no charge under subsection 6d. 2208 2209 2210 A separable portion of the object code, whose source code is 2211 excluded from the Corresponding Source as a System Library, need 2212 not be included in conveying the object code work. 2213 2214 A "User Product" is either (1) a "consumer product", which means 2215 any tangible personal property which is normally used for personal, 2216 family, or household purposes, or (2) anything designed or sold for 2217 incorporation into a dwelling. In determining whether a product 2218 is a consumer product, doubtful cases shall be resolved in favor of 2219 coverage. For a particular product received by a particular user, 2220 "normally used" refers to a typical or common use of that class of 2221 product, regardless of the status of the particular user or of the 2222 way in which the particular user actually uses, or expects or is 2223 expected to use, the product. A product is a consumer product 2224 regardless of whether the product has substantial commercial, 2225 industrial or non-consumer uses, unless such uses represent the 2226 only significant mode of use of the product. 2227 2228 "Installation Information" for a User Product means any methods, 2229 procedures, authorization keys, or other information required to 2230 install and execute modified versions of a covered work in that 2231 User Product from a modified version of its Corresponding Source. 2232 The information must suffice to ensure that the continued 2233 functioning of the modified object code is in no case prevented or 2234 interfered with solely because modification has been made. 2235 2236 If you convey an object code work under this section in, or with, 2237 or specifically for use in, a User Product, and the conveying 2238 occurs as part of a transaction in which the right of possession 2239 and use of the User Product is transferred to the recipient in 2240 perpetuity or for a fixed term (regardless of how the transaction 2241 is characterized), the Corresponding Source conveyed under this 2242 section must be accompanied by the Installation Information. But 2243 this requirement does not apply if neither you nor any third party 2244 retains the ability to install modified object code on the User 2245 Product (for example, the work has been installed in ROM). 2246 2247 The requirement to provide Installation Information does not 2248 include a requirement to continue to provide support service, 2249 warranty, or updates for a work that has been modified or 2250 installed by the recipient, or for the User Product in which it 2251 has been modified or installed. Access to a network may be denied 2252 when the modification itself materially and adversely affects the 2253 operation of the network or violates the rules and protocols for 2254 communication across the network. 2255 2256 Corresponding Source conveyed, and Installation Information 2257 provided, in accord with this section must be in a format that is 2258 publicly documented (and with an implementation available to the 2259 public in source code form), and must require no special password 2260 or key for unpacking, reading or copying. 2261 2262 7. Additional Terms. 2263 2264 "Additional permissions" are terms that supplement the terms of 2265 this License by making exceptions from one or more of its 2266 conditions. Additional permissions that are applicable to the 2267 entire Program shall be treated as though they were included in 2268 this License, to the extent that they are valid under applicable 2269 law. If additional permissions apply only to part of the Program, 2270 that part may be used separately under those permissions, but the 2271 entire Program remains governed by this License without regard to 2272 the additional permissions. 2273 2274 When you convey a copy of a covered work, you may at your option 2275 remove any additional permissions from that copy, or from any part 2276 of it. (Additional permissions may be written to require their own 2277 removal in certain cases when you modify the work.) You may place 2278 additional permissions on material, added by you to a covered work, 2279 for which you have or can give appropriate copyright permission. 2280 2281 Notwithstanding any other provision of this License, for material 2282 you add to a covered work, you may (if authorized by the copyright 2283 holders of that material) supplement the terms of this License 2284 with terms: 2285 2286 a. Disclaiming warranty or limiting liability differently from 2287 the terms of sections 15 and 16 of this License; or 2288 2289 b. Requiring preservation of specified reasonable legal notices 2290 or author attributions in that material or in the Appropriate 2291 Legal Notices displayed by works containing it; or 2292 2293 c. Prohibiting misrepresentation of the origin of that material, 2294 or requiring that modified versions of such material be 2295 marked in reasonable ways as different from the original 2296 version; or 2297 2298 d. Limiting the use for publicity purposes of names of licensors 2299 or authors of the material; or 2300 2301 e. Declining to grant rights under trademark law for use of some 2302 trade names, trademarks, or service marks; or 2303 2304 f. Requiring indemnification of licensors and authors of that 2305 material by anyone who conveys the material (or modified 2306 versions of it) with contractual assumptions of liability to 2307 the recipient, for any liability that these contractual 2308 assumptions directly impose on those licensors and authors. 2309 2310 All other non-permissive additional terms are considered "further 2311 restrictions" within the meaning of section 10. If the Program as 2312 you received it, or any part of it, contains a notice stating that 2313 it is governed by this License along with a term that is a further 2314 restriction, you may remove that term. If a license document 2315 contains a further restriction but permits relicensing or 2316 conveying under this License, you may add to a covered work 2317 material governed by the terms of that license document, provided 2318 that the further restriction does not survive such relicensing or 2319 conveying. 2320 2321 If you add terms to a covered work in accord with this section, you 2322 must place, in the relevant source files, a statement of the 2323 additional terms that apply to those files, or a notice indicating 2324 where to find the applicable terms. 2325 2326 Additional terms, permissive or non-permissive, may be stated in 2327 the form of a separately written license, or stated as exceptions; 2328 the above requirements apply either way. 2329 2330 8. Termination. 2331 2332 You may not propagate or modify a covered work except as expressly 2333 provided under this License. Any attempt otherwise to propagate or 2334 modify it is void, and will automatically terminate your rights 2335 under this License (including any patent licenses granted under 2336 the third paragraph of section 11). 2337 2338 However, if you cease all violation of this License, then your 2339 license from a particular copyright holder is reinstated (a) 2340 provisionally, unless and until the copyright holder explicitly 2341 and finally terminates your license, and (b) permanently, if the 2342 copyright holder fails to notify you of the violation by some 2343 reasonable means prior to 60 days after the cessation. 2344 2345 Moreover, your license from a particular copyright holder is 2346 reinstated permanently if the copyright holder notifies you of the 2347 violation by some reasonable means, this is the first time you have 2348 received notice of violation of this License (for any work) from 2349 that copyright holder, and you cure the violation prior to 30 days 2350 after your receipt of the notice. 2351 2352 Termination of your rights under this section does not terminate 2353 the licenses of parties who have received copies or rights from 2354 you under this License. If your rights have been terminated and 2355 not permanently reinstated, you do not qualify to receive new 2356 licenses for the same material under section 10. 2357 2358 9. Acceptance Not Required for Having Copies. 2359 2360 You are not required to accept this License in order to receive or 2361 run a copy of the Program. Ancillary propagation of a covered work 2362 occurring solely as a consequence of using peer-to-peer 2363 transmission to receive a copy likewise does not require 2364 acceptance. However, nothing other than this License grants you 2365 permission to propagate or modify any covered work. These actions 2366 infringe copyright if you do not accept this License. Therefore, 2367 by modifying or propagating a covered work, you indicate your 2368 acceptance of this License to do so. 2369 2370 10. Automatic Licensing of Downstream Recipients. 2371 2372 Each time you convey a covered work, the recipient automatically 2373 receives a license from the original licensors, to run, modify and 2374 propagate that work, subject to this License. You are not 2375 responsible for enforcing compliance by third parties with this 2376 License. 2377 2378 An "entity transaction" is a transaction transferring control of an 2379 organization, or substantially all assets of one, or subdividing an 2380 organization, or merging organizations. If propagation of a 2381 covered work results from an entity transaction, each party to that 2382 transaction who receives a copy of the work also receives whatever 2383 licenses to the work the party's predecessor in interest had or 2384 could give under the previous paragraph, plus a right to 2385 possession of the Corresponding Source of the work from the 2386 predecessor in interest, if the predecessor has it or can get it 2387 with reasonable efforts. 2388 2389 You may not impose any further restrictions on the exercise of the 2390 rights granted or affirmed under this License. For example, you 2391 may not impose a license fee, royalty, or other charge for 2392 exercise of rights granted under this License, and you may not 2393 initiate litigation (including a cross-claim or counterclaim in a 2394 lawsuit) alleging that any patent claim is infringed by making, 2395 using, selling, offering for sale, or importing the Program or any 2396 portion of it. 2397 2398 11. Patents. 2399 2400 A "contributor" is a copyright holder who authorizes use under this 2401 License of the Program or a work on which the Program is based. 2402 The work thus licensed is called the contributor's "contributor 2403 version". 2404 2405 A contributor's "essential patent claims" are all patent claims 2406 owned or controlled by the contributor, whether already acquired or 2407 hereafter acquired, that would be infringed by some manner, 2408 permitted by this License, of making, using, or selling its 2409 contributor version, but do not include claims that would be 2410 infringed only as a consequence of further modification of the 2411 contributor version. For purposes of this definition, "control" 2412 includes the right to grant patent sublicenses in a manner 2413 consistent with the requirements of this License. 2414 2415 Each contributor grants you a non-exclusive, worldwide, 2416 royalty-free patent license under the contributor's essential 2417 patent claims, to make, use, sell, offer for sale, import and 2418 otherwise run, modify and propagate the contents of its 2419 contributor version. 2420 2421 In the following three paragraphs, a "patent license" is any 2422 express agreement or commitment, however denominated, not to 2423 enforce a patent (such as an express permission to practice a 2424 patent or covenant not to sue for patent infringement). To 2425 "grant" such a patent license to a party means to make such an 2426 agreement or commitment not to enforce a patent against the party. 2427 2428 If you convey a covered work, knowingly relying on a patent 2429 license, and the Corresponding Source of the work is not available 2430 for anyone to copy, free of charge and under the terms of this 2431 License, through a publicly available network server or other 2432 readily accessible means, then you must either (1) cause the 2433 Corresponding Source to be so available, or (2) arrange to deprive 2434 yourself of the benefit of the patent license for this particular 2435 work, or (3) arrange, in a manner consistent with the requirements 2436 of this License, to extend the patent license to downstream 2437 recipients. "Knowingly relying" means you have actual knowledge 2438 that, but for the patent license, your conveying the covered work 2439 in a country, or your recipient's use of the covered work in a 2440 country, would infringe one or more identifiable patents in that 2441 country that you have reason to believe are valid. 2442 2443 If, pursuant to or in connection with a single transaction or 2444 arrangement, you convey, or propagate by procuring conveyance of, a 2445 covered work, and grant a patent license to some of the parties 2446 receiving the covered work authorizing them to use, propagate, 2447 modify or convey a specific copy of the covered work, then the 2448 patent license you grant is automatically extended to all 2449 recipients of the covered work and works based on it. 2450 2451 A patent license is "discriminatory" if it does not include within 2452 the scope of its coverage, prohibits the exercise of, or is 2453 conditioned on the non-exercise of one or more of the rights that 2454 are specifically granted under this License. You may not convey a 2455 covered work if you are a party to an arrangement with a third 2456 party that is in the business of distributing software, under 2457 which you make payment to the third party based on the extent of 2458 your activity of conveying the work, and under which the third 2459 party grants, to any of the parties who would receive the covered 2460 work from you, a discriminatory patent license (a) in connection 2461 with copies of the covered work conveyed by you (or copies made 2462 from those copies), or (b) primarily for and in connection with 2463 specific products or compilations that contain the covered work, 2464 unless you entered into that arrangement, or that patent license 2465 was granted, prior to 28 March 2007. 2466 2467 Nothing in this License shall be construed as excluding or limiting 2468 any implied license or other defenses to infringement that may 2469 otherwise be available to you under applicable patent law. 2470 2471 12. No Surrender of Others' Freedom. 2472 2473 If conditions are imposed on you (whether by court order, 2474 agreement or otherwise) that contradict the conditions of this 2475 License, they do not excuse you from the conditions of this 2476 License. If you cannot convey a covered work so as to satisfy 2477 simultaneously your obligations under this License and any other 2478 pertinent obligations, then as a consequence you may not convey it 2479 at all. For example, if you agree to terms that obligate you to 2480 collect a royalty for further conveying from those to whom you 2481 convey the Program, the only way you could satisfy both those 2482 terms and this License would be to refrain entirely from conveying 2483 the Program. 2484 2485 13. Use with the GNU Affero General Public License. 2486 2487 Notwithstanding any other provision of this License, you have 2488 permission to link or combine any covered work with a work licensed 2489 under version 3 of the GNU Affero General Public License into a 2490 single combined work, and to convey the resulting work. The terms 2491 of this License will continue to apply to the part which is the 2492 covered work, but the special requirements of the GNU Affero 2493 General Public License, section 13, concerning interaction through 2494 a network will apply to the combination as such. 2495 2496 14. Revised Versions of this License. 2497 2498 The Free Software Foundation may publish revised and/or new 2499 versions of the GNU General Public License from time to time. 2500 Such new versions will be similar in spirit to the present 2501 version, but may differ in detail to address new problems or 2502 concerns. 2503 2504 Each version is given a distinguishing version number. If the 2505 Program specifies that a certain numbered version of the GNU 2506 General Public License "or any later version" applies to it, you 2507 have the option of following the terms and conditions either of 2508 that numbered version or of any later version published by the 2509 Free Software Foundation. If the Program does not specify a 2510 version number of the GNU General Public License, you may choose 2511 any version ever published by the Free Software Foundation. 2512 2513 If the Program specifies that a proxy can decide which future 2514 versions of the GNU General Public License can be used, that 2515 proxy's public statement of acceptance of a version permanently 2516 authorizes you to choose that version for the Program. 2517 2518 Later license versions may give you additional or different 2519 permissions. However, no additional obligations are imposed on any 2520 author or copyright holder as a result of your choosing to follow a 2521 later version. 2522 2523 15. Disclaimer of Warranty. 2524 2525 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 2526 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE 2527 COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" 2528 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 2529 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2530 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE 2531 RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. 2532 SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 2533 NECESSARY SERVICING, REPAIR OR CORRECTION. 2534 2535 16. Limitation of Liability. 2536 2537 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 2538 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES 2539 AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU 2540 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 2541 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE 2542 THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA 2543 BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 2544 PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 2545 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF 2546 THE POSSIBILITY OF SUCH DAMAGES. 2547 2548 17. Interpretation of Sections 15 and 16. 2549 2550 If the disclaimer of warranty and limitation of liability provided 2551 above cannot be given local legal effect according to their terms, 2552 reviewing courts shall apply local law that most closely 2553 approximates an absolute waiver of all civil liability in 2554 connection with the Program, unless a warranty or assumption of 2555 liability accompanies a copy of the Program in return for a fee. 2556 2557 2558END OF TERMS AND CONDITIONS 2559=========================== 2560 2561How to Apply These Terms to Your New Programs 2562============================================= 2563 2564If you develop a new program, and you want it to be of the greatest 2565possible use to the public, the best way to achieve this is to make it 2566free software which everyone can redistribute and change under these 2567terms. 2568 2569 To do so, attach the following notices to the program. It is safest 2570to attach them to the start of each source file to most effectively 2571state the exclusion of warranty; and each file should have at least the 2572"copyright" line and a pointer to where the full notice is found. 2573 2574 ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. 2575 Copyright (C) YEAR NAME OF AUTHOR 2576 2577 This program is free software: you can redistribute it and/or modify 2578 it under the terms of the GNU General Public License as published by 2579 the Free Software Foundation, either version 3 of the License, or (at 2580 your option) any later version. 2581 2582 This program is distributed in the hope that it will be useful, but 2583 WITHOUT ANY WARRANTY; without even the implied warranty of 2584 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2585 General Public License for more details. 2586 2587 You should have received a copy of the GNU General Public License 2588 along with this program. If not, see `http://www.gnu.org/licenses/'. 2589 2590 Also add information on how to contact you by electronic and paper 2591mail. 2592 2593 If the program does terminal interaction, make it output a short 2594notice like this when it starts in an interactive mode: 2595 2596 PROGRAM Copyright (C) YEAR NAME OF AUTHOR 2597 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 2598 This is free software, and you are welcome to redistribute it 2599 under certain conditions; type `show c' for details. 2600 2601 The hypothetical commands `show w' and `show c' should show the 2602appropriate parts of the General Public License. Of course, your 2603program's commands might be different; for a GUI interface, you would 2604use an "about box". 2605 2606 You should also get your employer (if you work as a programmer) or 2607school, if any, to sign a "copyright disclaimer" for the program, if 2608necessary. For more information on this, and how to apply and follow 2609the GNU GPL, see `http://www.gnu.org/licenses/'. 2610 2611 The GNU General Public License does not permit incorporating your 2612program into proprietary programs. If your program is a subroutine 2613library, you may consider it more useful to permit linking proprietary 2614applications with the library. If this is what you want to do, use the 2615GNU Lesser General Public License instead of this License. But first, 2616please read `http://www.gnu.org/philosophy/why-not-lgpl.html'. 2617 2618 2619File: libgomp.info, Node: GNU Free Documentation License, Next: Funding, Prev: Copying, Up: Top 2620 2621GNU Free Documentation License 2622****************************** 2623 2624 Version 1.3, 3 November 2008 2625 2626 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. 2627 `http://fsf.org/' 2628 2629 Everyone is permitted to copy and distribute verbatim copies 2630 of this license document, but changing it is not allowed. 2631 2632 0. PREAMBLE 2633 2634 The purpose of this License is to make a manual, textbook, or other 2635 functional and useful document "free" in the sense of freedom: to 2636 assure everyone the effective freedom to copy and redistribute it, 2637 with or without modifying it, either commercially or 2638 noncommercially. Secondarily, this License preserves for the 2639 author and publisher a way to get credit for their work, while not 2640 being considered responsible for modifications made by others. 2641 2642 This License is a kind of "copyleft", which means that derivative 2643 works of the document must themselves be free in the same sense. 2644 It complements the GNU General Public License, which is a copyleft 2645 license designed for free software. 2646 2647 We have designed this License in order to use it for manuals for 2648 free software, because free software needs free documentation: a 2649 free program should come with manuals providing the same freedoms 2650 that the software does. But this License is not limited to 2651 software manuals; it can be used for any textual work, regardless 2652 of subject matter or whether it is published as a printed book. 2653 We recommend this License principally for works whose purpose is 2654 instruction or reference. 2655 2656 1. APPLICABILITY AND DEFINITIONS 2657 2658 This License applies to any manual or other work, in any medium, 2659 that contains a notice placed by the copyright holder saying it 2660 can be distributed under the terms of this License. Such a notice 2661 grants a world-wide, royalty-free license, unlimited in duration, 2662 to use that work under the conditions stated herein. The 2663 "Document", below, refers to any such manual or work. Any member 2664 of the public is a licensee, and is addressed as "you". You 2665 accept the license if you copy, modify or distribute the work in a 2666 way requiring permission under copyright law. 2667 2668 A "Modified Version" of the Document means any work containing the 2669 Document or a portion of it, either copied verbatim, or with 2670 modifications and/or translated into another language. 2671 2672 A "Secondary Section" is a named appendix or a front-matter section 2673 of the Document that deals exclusively with the relationship of the 2674 publishers or authors of the Document to the Document's overall 2675 subject (or to related matters) and contains nothing that could 2676 fall directly within that overall subject. (Thus, if the Document 2677 is in part a textbook of mathematics, a Secondary Section may not 2678 explain any mathematics.) The relationship could be a matter of 2679 historical connection with the subject or with related matters, or 2680 of legal, commercial, philosophical, ethical or political position 2681 regarding them. 2682 2683 The "Invariant Sections" are certain Secondary Sections whose 2684 titles are designated, as being those of Invariant Sections, in 2685 the notice that says that the Document is released under this 2686 License. If a section does not fit the above definition of 2687 Secondary then it is not allowed to be designated as Invariant. 2688 The Document may contain zero Invariant Sections. If the Document 2689 does not identify any Invariant Sections then there are none. 2690 2691 The "Cover Texts" are certain short passages of text that are 2692 listed, as Front-Cover Texts or Back-Cover Texts, in the notice 2693 that says that the Document is released under this License. A 2694 Front-Cover Text may be at most 5 words, and a Back-Cover Text may 2695 be at most 25 words. 2696 2697 A "Transparent" copy of the Document means a machine-readable copy, 2698 represented in a format whose specification is available to the 2699 general public, that is suitable for revising the document 2700 straightforwardly with generic text editors or (for images 2701 composed of pixels) generic paint programs or (for drawings) some 2702 widely available drawing editor, and that is suitable for input to 2703 text formatters or for automatic translation to a variety of 2704 formats suitable for input to text formatters. A copy made in an 2705 otherwise Transparent file format whose markup, or absence of 2706 markup, has been arranged to thwart or discourage subsequent 2707 modification by readers is not Transparent. An image format is 2708 not Transparent if used for any substantial amount of text. A 2709 copy that is not "Transparent" is called "Opaque". 2710 2711 Examples of suitable formats for Transparent copies include plain 2712 ASCII without markup, Texinfo input format, LaTeX input format, 2713 SGML or XML using a publicly available DTD, and 2714 standard-conforming simple HTML, PostScript or PDF designed for 2715 human modification. Examples of transparent image formats include 2716 PNG, XCF and JPG. Opaque formats include proprietary formats that 2717 can be read and edited only by proprietary word processors, SGML or 2718 XML for which the DTD and/or processing tools are not generally 2719 available, and the machine-generated HTML, PostScript or PDF 2720 produced by some word processors for output purposes only. 2721 2722 The "Title Page" means, for a printed book, the title page itself, 2723 plus such following pages as are needed to hold, legibly, the 2724 material this License requires to appear in the title page. For 2725 works in formats which do not have any title page as such, "Title 2726 Page" means the text near the most prominent appearance of the 2727 work's title, preceding the beginning of the body of the text. 2728 2729 The "publisher" means any person or entity that distributes copies 2730 of the Document to the public. 2731 2732 A section "Entitled XYZ" means a named subunit of the Document 2733 whose title either is precisely XYZ or contains XYZ in parentheses 2734 following text that translates XYZ in another language. (Here XYZ 2735 stands for a specific section name mentioned below, such as 2736 "Acknowledgements", "Dedications", "Endorsements", or "History".) 2737 To "Preserve the Title" of such a section when you modify the 2738 Document means that it remains a section "Entitled XYZ" according 2739 to this definition. 2740 2741 The Document may include Warranty Disclaimers next to the notice 2742 which states that this License applies to the Document. These 2743 Warranty Disclaimers are considered to be included by reference in 2744 this License, but only as regards disclaiming warranties: any other 2745 implication that these Warranty Disclaimers may have is void and 2746 has no effect on the meaning of this License. 2747 2748 2. VERBATIM COPYING 2749 2750 You may copy and distribute the Document in any medium, either 2751 commercially or noncommercially, provided that this License, the 2752 copyright notices, and the license notice saying this License 2753 applies to the Document are reproduced in all copies, and that you 2754 add no other conditions whatsoever to those of this License. You 2755 may not use technical measures to obstruct or control the reading 2756 or further copying of the copies you make or distribute. However, 2757 you may accept compensation in exchange for copies. If you 2758 distribute a large enough number of copies you must also follow 2759 the conditions in section 3. 2760 2761 You may also lend copies, under the same conditions stated above, 2762 and you may publicly display copies. 2763 2764 3. COPYING IN QUANTITY 2765 2766 If you publish printed copies (or copies in media that commonly 2767 have printed covers) of the Document, numbering more than 100, and 2768 the Document's license notice requires Cover Texts, you must 2769 enclose the copies in covers that carry, clearly and legibly, all 2770 these Cover Texts: Front-Cover Texts on the front cover, and 2771 Back-Cover Texts on the back cover. Both covers must also clearly 2772 and legibly identify you as the publisher of these copies. The 2773 front cover must present the full title with all words of the 2774 title equally prominent and visible. You may add other material 2775 on the covers in addition. Copying with changes limited to the 2776 covers, as long as they preserve the title of the Document and 2777 satisfy these conditions, can be treated as verbatim copying in 2778 other respects. 2779 2780 If the required texts for either cover are too voluminous to fit 2781 legibly, you should put the first ones listed (as many as fit 2782 reasonably) on the actual cover, and continue the rest onto 2783 adjacent pages. 2784 2785 If you publish or distribute Opaque copies of the Document 2786 numbering more than 100, you must either include a 2787 machine-readable Transparent copy along with each Opaque copy, or 2788 state in or with each Opaque copy a computer-network location from 2789 which the general network-using public has access to download 2790 using public-standard network protocols a complete Transparent 2791 copy of the Document, free of added material. If you use the 2792 latter option, you must take reasonably prudent steps, when you 2793 begin distribution of Opaque copies in quantity, to ensure that 2794 this Transparent copy will remain thus accessible at the stated 2795 location until at least one year after the last time you 2796 distribute an Opaque copy (directly or through your agents or 2797 retailers) of that edition to the public. 2798 2799 It is requested, but not required, that you contact the authors of 2800 the Document well before redistributing any large number of 2801 copies, to give them a chance to provide you with an updated 2802 version of the Document. 2803 2804 4. MODIFICATIONS 2805 2806 You may copy and distribute a Modified Version of the Document 2807 under the conditions of sections 2 and 3 above, provided that you 2808 release the Modified Version under precisely this License, with 2809 the Modified Version filling the role of the Document, thus 2810 licensing distribution and modification of the Modified Version to 2811 whoever possesses a copy of it. In addition, you must do these 2812 things in the Modified Version: 2813 2814 A. Use in the Title Page (and on the covers, if any) a title 2815 distinct from that of the Document, and from those of 2816 previous versions (which should, if there were any, be listed 2817 in the History section of the Document). You may use the 2818 same title as a previous version if the original publisher of 2819 that version gives permission. 2820 2821 B. List on the Title Page, as authors, one or more persons or 2822 entities responsible for authorship of the modifications in 2823 the Modified Version, together with at least five of the 2824 principal authors of the Document (all of its principal 2825 authors, if it has fewer than five), unless they release you 2826 from this requirement. 2827 2828 C. State on the Title page the name of the publisher of the 2829 Modified Version, as the publisher. 2830 2831 D. Preserve all the copyright notices of the Document. 2832 2833 E. Add an appropriate copyright notice for your modifications 2834 adjacent to the other copyright notices. 2835 2836 F. Include, immediately after the copyright notices, a license 2837 notice giving the public permission to use the Modified 2838 Version under the terms of this License, in the form shown in 2839 the Addendum below. 2840 2841 G. Preserve in that license notice the full lists of Invariant 2842 Sections and required Cover Texts given in the Document's 2843 license notice. 2844 2845 H. Include an unaltered copy of this License. 2846 2847 I. Preserve the section Entitled "History", Preserve its Title, 2848 and add to it an item stating at least the title, year, new 2849 authors, and publisher of the Modified Version as given on 2850 the Title Page. If there is no section Entitled "History" in 2851 the Document, create one stating the title, year, authors, 2852 and publisher of the Document as given on its Title Page, 2853 then add an item describing the Modified Version as stated in 2854 the previous sentence. 2855 2856 J. Preserve the network location, if any, given in the Document 2857 for public access to a Transparent copy of the Document, and 2858 likewise the network locations given in the Document for 2859 previous versions it was based on. These may be placed in 2860 the "History" section. You may omit a network location for a 2861 work that was published at least four years before the 2862 Document itself, or if the original publisher of the version 2863 it refers to gives permission. 2864 2865 K. For any section Entitled "Acknowledgements" or "Dedications", 2866 Preserve the Title of the section, and preserve in the 2867 section all the substance and tone of each of the contributor 2868 acknowledgements and/or dedications given therein. 2869 2870 L. Preserve all the Invariant Sections of the Document, 2871 unaltered in their text and in their titles. Section numbers 2872 or the equivalent are not considered part of the section 2873 titles. 2874 2875 M. Delete any section Entitled "Endorsements". Such a section 2876 may not be included in the Modified Version. 2877 2878 N. Do not retitle any existing section to be Entitled 2879 "Endorsements" or to conflict in title with any Invariant 2880 Section. 2881 2882 O. Preserve any Warranty Disclaimers. 2883 2884 If the Modified Version includes new front-matter sections or 2885 appendices that qualify as Secondary Sections and contain no 2886 material copied from the Document, you may at your option 2887 designate some or all of these sections as invariant. To do this, 2888 add their titles to the list of Invariant Sections in the Modified 2889 Version's license notice. These titles must be distinct from any 2890 other section titles. 2891 2892 You may add a section Entitled "Endorsements", provided it contains 2893 nothing but endorsements of your Modified Version by various 2894 parties--for example, statements of peer review or that the text 2895 has been approved by an organization as the authoritative 2896 definition of a standard. 2897 2898 You may add a passage of up to five words as a Front-Cover Text, 2899 and a passage of up to 25 words as a Back-Cover Text, to the end 2900 of the list of Cover Texts in the Modified Version. Only one 2901 passage of Front-Cover Text and one of Back-Cover Text may be 2902 added by (or through arrangements made by) any one entity. If the 2903 Document already includes a cover text for the same cover, 2904 previously added by you or by arrangement made by the same entity 2905 you are acting on behalf of, you may not add another; but you may 2906 replace the old one, on explicit permission from the previous 2907 publisher that added the old one. 2908 2909 The author(s) and publisher(s) of the Document do not by this 2910 License give permission to use their names for publicity for or to 2911 assert or imply endorsement of any Modified Version. 2912 2913 5. COMBINING DOCUMENTS 2914 2915 You may combine the Document with other documents released under 2916 this License, under the terms defined in section 4 above for 2917 modified versions, provided that you include in the combination 2918 all of the Invariant Sections of all of the original documents, 2919 unmodified, and list them all as Invariant Sections of your 2920 combined work in its license notice, and that you preserve all 2921 their Warranty Disclaimers. 2922 2923 The combined work need only contain one copy of this License, and 2924 multiple identical Invariant Sections may be replaced with a single 2925 copy. If there are multiple Invariant Sections with the same name 2926 but different contents, make the title of each such section unique 2927 by adding at the end of it, in parentheses, the name of the 2928 original author or publisher of that section if known, or else a 2929 unique number. Make the same adjustment to the section titles in 2930 the list of Invariant Sections in the license notice of the 2931 combined work. 2932 2933 In the combination, you must combine any sections Entitled 2934 "History" in the various original documents, forming one section 2935 Entitled "History"; likewise combine any sections Entitled 2936 "Acknowledgements", and any sections Entitled "Dedications". You 2937 must delete all sections Entitled "Endorsements." 2938 2939 6. COLLECTIONS OF DOCUMENTS 2940 2941 You may make a collection consisting of the Document and other 2942 documents released under this License, and replace the individual 2943 copies of this License in the various documents with a single copy 2944 that is included in the collection, provided that you follow the 2945 rules of this License for verbatim copying of each of the 2946 documents in all other respects. 2947 2948 You may extract a single document from such a collection, and 2949 distribute it individually under this License, provided you insert 2950 a copy of this License into the extracted document, and follow 2951 this License in all other respects regarding verbatim copying of 2952 that document. 2953 2954 7. AGGREGATION WITH INDEPENDENT WORKS 2955 2956 A compilation of the Document or its derivatives with other 2957 separate and independent documents or works, in or on a volume of 2958 a storage or distribution medium, is called an "aggregate" if the 2959 copyright resulting from the compilation is not used to limit the 2960 legal rights of the compilation's users beyond what the individual 2961 works permit. When the Document is included in an aggregate, this 2962 License does not apply to the other works in the aggregate which 2963 are not themselves derivative works of the Document. 2964 2965 If the Cover Text requirement of section 3 is applicable to these 2966 copies of the Document, then if the Document is less than one half 2967 of the entire aggregate, the Document's Cover Texts may be placed 2968 on covers that bracket the Document within the aggregate, or the 2969 electronic equivalent of covers if the Document is in electronic 2970 form. Otherwise they must appear on printed covers that bracket 2971 the whole aggregate. 2972 2973 8. TRANSLATION 2974 2975 Translation is considered a kind of modification, so you may 2976 distribute translations of the Document under the terms of section 2977 4. Replacing Invariant Sections with translations requires special 2978 permission from their copyright holders, but you may include 2979 translations of some or all Invariant Sections in addition to the 2980 original versions of these Invariant Sections. You may include a 2981 translation of this License, and all the license notices in the 2982 Document, and any Warranty Disclaimers, provided that you also 2983 include the original English version of this License and the 2984 original versions of those notices and disclaimers. In case of a 2985 disagreement between the translation and the original version of 2986 this License or a notice or disclaimer, the original version will 2987 prevail. 2988 2989 If a section in the Document is Entitled "Acknowledgements", 2990 "Dedications", or "History", the requirement (section 4) to 2991 Preserve its Title (section 1) will typically require changing the 2992 actual title. 2993 2994 9. TERMINATION 2995 2996 You may not copy, modify, sublicense, or distribute the Document 2997 except as expressly provided under this License. Any attempt 2998 otherwise to copy, modify, sublicense, or distribute it is void, 2999 and will automatically terminate your rights under this License. 3000 3001 However, if you cease all violation of this License, then your 3002 license from a particular copyright holder is reinstated (a) 3003 provisionally, unless and until the copyright holder explicitly 3004 and finally terminates your license, and (b) permanently, if the 3005 copyright holder fails to notify you of the violation by some 3006 reasonable means prior to 60 days after the cessation. 3007 3008 Moreover, your license from a particular copyright holder is 3009 reinstated permanently if the copyright holder notifies you of the 3010 violation by some reasonable means, this is the first time you have 3011 received notice of violation of this License (for any work) from 3012 that copyright holder, and you cure the violation prior to 30 days 3013 after your receipt of the notice. 3014 3015 Termination of your rights under this section does not terminate 3016 the licenses of parties who have received copies or rights from 3017 you under this License. If your rights have been terminated and 3018 not permanently reinstated, receipt of a copy of some or all of 3019 the same material does not give you any rights to use it. 3020 3021 10. FUTURE REVISIONS OF THIS LICENSE 3022 3023 The Free Software Foundation may publish new, revised versions of 3024 the GNU Free Documentation License from time to time. Such new 3025 versions will be similar in spirit to the present version, but may 3026 differ in detail to address new problems or concerns. See 3027 `http://www.gnu.org/copyleft/'. 3028 3029 Each version of the License is given a distinguishing version 3030 number. If the Document specifies that a particular numbered 3031 version of this License "or any later version" applies to it, you 3032 have the option of following the terms and conditions either of 3033 that specified version or of any later version that has been 3034 published (not as a draft) by the Free Software Foundation. If 3035 the Document does not specify a version number of this License, 3036 you may choose any version ever published (not as a draft) by the 3037 Free Software Foundation. If the Document specifies that a proxy 3038 can decide which future versions of this License can be used, that 3039 proxy's public statement of acceptance of a version permanently 3040 authorizes you to choose that version for the Document. 3041 3042 11. RELICENSING 3043 3044 "Massive Multiauthor Collaboration Site" (or "MMC Site") means any 3045 World Wide Web server that publishes copyrightable works and also 3046 provides prominent facilities for anybody to edit those works. A 3047 public wiki that anybody can edit is an example of such a server. 3048 A "Massive Multiauthor Collaboration" (or "MMC") contained in the 3049 site means any set of copyrightable works thus published on the MMC 3050 site. 3051 3052 "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 3053 license published by Creative Commons Corporation, a not-for-profit 3054 corporation with a principal place of business in San Francisco, 3055 California, as well as future copyleft versions of that license 3056 published by that same organization. 3057 3058 "Incorporate" means to publish or republish a Document, in whole or 3059 in part, as part of another Document. 3060 3061 An MMC is "eligible for relicensing" if it is licensed under this 3062 License, and if all works that were first published under this 3063 License somewhere other than this MMC, and subsequently 3064 incorporated in whole or in part into the MMC, (1) had no cover 3065 texts or invariant sections, and (2) were thus incorporated prior 3066 to November 1, 2008. 3067 3068 The operator of an MMC Site may republish an MMC contained in the 3069 site under CC-BY-SA on the same site at any time before August 1, 3070 2009, provided the MMC is eligible for relicensing. 3071 3072 3073ADDENDUM: How to use this License for your documents 3074==================================================== 3075 3076To use this License in a document you have written, include a copy of 3077the License in the document and put the following copyright and license 3078notices just after the title page: 3079 3080 Copyright (C) YEAR YOUR NAME. 3081 Permission is granted to copy, distribute and/or modify this document 3082 under the terms of the GNU Free Documentation License, Version 1.3 3083 or any later version published by the Free Software Foundation; 3084 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover 3085 Texts. A copy of the license is included in the section entitled ``GNU 3086 Free Documentation License''. 3087 3088 If you have Invariant Sections, Front-Cover Texts and Back-Cover 3089Texts, replace the "with...Texts." line with this: 3090 3091 with the Invariant Sections being LIST THEIR TITLES, with 3092 the Front-Cover Texts being LIST, and with the Back-Cover Texts 3093 being LIST. 3094 3095 If you have Invariant Sections without Cover Texts, or some other 3096combination of the three, merge those two alternatives to suit the 3097situation. 3098 3099 If your document contains nontrivial examples of program code, we 3100recommend releasing these examples in parallel under your choice of 3101free software license, such as the GNU General Public License, to 3102permit their use in free software. 3103 3104 3105File: libgomp.info, Node: Funding, Next: Library Index, Prev: GNU Free Documentation License, Up: Top 3106 3107Funding Free Software 3108********************* 3109 3110If you want to have more free software a few years from now, it makes 3111sense for you to help encourage people to contribute funds for its 3112development. The most effective approach known is to encourage 3113commercial redistributors to donate. 3114 3115 Users of free software systems can boost the pace of development by 3116encouraging for-a-fee distributors to donate part of their selling price 3117to free software developers--the Free Software Foundation, and others. 3118 3119 The way to convince distributors to do this is to demand it and 3120expect it from them. So when you compare distributors, judge them 3121partly by how much they give to free software development. Show 3122distributors they must compete to be the one who gives the most. 3123 3124 To make this approach work, you must insist on numbers that you can 3125compare, such as, "We will donate ten dollars to the Frobnitz project 3126for each disk sold." Don't be satisfied with a vague promise, such as 3127"A portion of the profits are donated," since it doesn't give a basis 3128for comparison. 3129 3130 Even a precise fraction "of the profits from this disk" is not very 3131meaningful, since creative accounting and unrelated business decisions 3132can greatly alter what fraction of the sales price counts as profit. 3133If the price you pay is $50, ten percent of the profit is probably less 3134than a dollar; it might be a few cents, or nothing at all. 3135 3136 Some redistributors do development work themselves. This is useful 3137too; but to keep everyone honest, you need to inquire how much they do, 3138and what kind. Some kinds of development make much more long-term 3139difference than others. For example, maintaining a separate version of 3140a program contributes very little; maintaining the standard version of a 3141program for the whole community contributes much. Easy new ports 3142contribute little, since someone else would surely do them; difficult 3143ports such as adding a new CPU to the GNU Compiler Collection 3144contribute more; major new features or packages contribute the most. 3145 3146 By establishing the idea that supporting further development is "the 3147proper thing to do" when distributing free software for a fee, we can 3148assure a steady flow of resources into making more free software. 3149 3150 Copyright (C) 1994 Free Software Foundation, Inc. 3151 Verbatim copying and redistribution of this section is permitted 3152 without royalty; alteration is not permitted. 3153 3154 3155File: libgomp.info, Node: Library Index, Prev: Funding, Up: Top 3156 3157Library Index 3158************* 3159 3160[index] 3161* Menu: 3162 3163* Environment Variable <1>: GOMP_SPINCOUNT. (line 6) 3164* Environment Variable <2>: GOMP_STACKSIZE. (line 6) 3165* Environment Variable <3>: GOMP_DEBUG. (line 6) 3166* Environment Variable <4>: GOMP_CPU_AFFINITY. (line 6) 3167* Environment Variable <5>: OMP_WAIT_POLICY. (line 6) 3168* Environment Variable <6>: OMP_THREAD_LIMIT. (line 6) 3169* Environment Variable <7>: OMP_SCHEDULE. (line 6) 3170* Environment Variable <8>: OMP_STACKSIZE. (line 6) 3171* Environment Variable <9>: OMP_PLACES. (line 6) 3172* Environment Variable <10>: OMP_PROC_BIND. (line 6) 3173* Environment Variable <11>: OMP_NUM_THREADS. (line 6) 3174* Environment Variable <12>: OMP_NESTED. (line 6) 3175* Environment Variable <13>: OMP_MAX_ACTIVE_LEVELS. (line 6) 3176* Environment Variable <14>: OMP_DYNAMIC. (line 6) 3177* Environment Variable <15>: OMP_DEFAULT_DEVICE. (line 6) 3178* Environment Variable <16>: OMP_DISPLAY_ENV. (line 6) 3179* Environment Variable: OMP_CANCELLATION. (line 6) 3180* FDL, GNU Free Documentation License: GNU Free Documentation License. 3181 (line 6) 3182* Implementation specific setting <1>: GOMP_SPINCOUNT. (line 6) 3183* Implementation specific setting <2>: GOMP_STACKSIZE. (line 6) 3184* Implementation specific setting <3>: OMP_SCHEDULE. (line 6) 3185* Implementation specific setting <4>: OMP_NUM_THREADS. (line 6) 3186* Implementation specific setting: OMP_NESTED. (line 6) 3187* Introduction: Top. (line 6) 3188 3189 3190 3191Tag Table: 3192Node: Top2130 3193Node: Enabling OpenMP3925 3194Node: Runtime Library Routines4712 3195Node: omp_get_active_level7699 3196Node: omp_get_ancestor_thread_num8397 3197Node: omp_get_cancellation9324 3198Node: omp_get_default_device10136 3199Node: omp_get_dynamic10810 3200Node: omp_get_level11683 3201Node: omp_get_max_active_levels12301 3202Node: omp_get_max_threads12998 3203Node: omp_get_nested13753 3204Node: omp_get_num_devices14663 3205Node: omp_get_num_procs15182 3206Node: omp_get_num_teams15719 3207Node: omp_get_num_threads16233 3208Node: omp_get_proc_bind17320 3209Node: omp_get_schedule18238 3210Node: omp_get_team_num19179 3211Node: omp_get_team_size19676 3212Node: omp_get_thread_limit20633 3213Node: omp_get_thread_num21250 3214Node: omp_in_parallel22119 3215Node: omp_in_final22766 3216Node: omp_is_initial_device23438 3217Node: omp_set_default_device24129 3218Node: omp_set_dynamic24917 3219Node: omp_set_max_active_levels25800 3220Node: omp_set_nested26574 3221Node: omp_set_num_threads27463 3222Node: omp_set_schedule28328 3223Node: omp_init_lock29394 3224Node: omp_set_lock30044 3225Node: omp_test_lock30896 3226Node: omp_unset_lock31869 3227Node: omp_destroy_lock32797 3228Node: omp_init_nest_lock33471 3229Node: omp_set_nest_lock34203 3230Node: omp_test_nest_lock35120 3231Node: omp_unset_nest_lock36150 3232Node: omp_destroy_nest_lock37162 3233Node: omp_get_wtick37910 3234Node: omp_get_wtime38500 3235Node: Environment Variables39274 3236Node: OMP_CANCELLATION40666 3237Node: OMP_DISPLAY_ENV41199 3238Node: OMP_DEFAULT_DEVICE41902 3239Node: OMP_DYNAMIC42682 3240Node: OMP_MAX_ACTIVE_LEVELS43278 3241Node: OMP_NESTED43917 3242Node: OMP_NUM_THREADS44522 3243Node: OMP_PROC_BIND45211 3244Node: OMP_PLACES46403 3245Node: OMP_STACKSIZE48578 3246Node: OMP_SCHEDULE49402 3247Node: OMP_THREAD_LIMIT50098 3248Node: OMP_WAIT_POLICY50698 3249Node: GOMP_CPU_AFFINITY51390 3250Node: GOMP_DEBUG53121 3251Node: GOMP_STACKSIZE53628 3252Node: GOMP_SPINCOUNT54457 3253Node: The libgomp ABI55634 3254Node: Implementing MASTER construct56433 3255Node: Implementing CRITICAL construct56847 3256Node: Implementing ATOMIC construct57586 3257Node: Implementing FLUSH construct58067 3258Node: Implementing BARRIER construct58338 3259Node: Implementing THREADPRIVATE construct58607 3260Node: Implementing PRIVATE clause59259 3261Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses59840 3262Node: Implementing REDUCTION clause61164 3263Node: Implementing PARALLEL construct61721 3264Node: Implementing FOR construct62978 3265Node: Implementing ORDERED construct64976 3266Node: Implementing SECTIONS construct65282 3267Node: Implementing SINGLE construct66048 3268Node: Reporting Bugs66710 3269Node: Copying67070 3270Node: GNU Free Documentation License104635 3271Node: Funding129777 3272Node: Library Index132302 3273 3274End Tag Table 3275