libgomp.info 183 KB

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