libgomp.info 205 KB

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