You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 81 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <link rel="canonical" href="https://openblas.net/docs/install/">
  7. <link rel="prev" href="..">
  8. <link rel="next" href="../user_manual/">
  9. <link rel="icon" href="../logo.svg">
  10. <meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.28">
  11. <title>Install OpenBLAS - OpenBLAS</title>
  12. <link rel="stylesheet" href="../assets/stylesheets/main.6543a935.min.css">
  13. <link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
  14. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  15. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
  16. <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
  17. <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  18. </head>
  19. <body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="blue-grey" data-md-color-accent="indigo">
  20. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  21. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  22. <label class="md-overlay" for="__drawer"></label>
  23. <div data-md-component="skip">
  24. <a href="#install-openblas" class="md-skip">
  25. Skip to content
  26. </a>
  27. </div>
  28. <div data-md-component="announce">
  29. </div>
  30. <header class="md-header md-header--shadow" data-md-component="header">
  31. <nav class="md-header__inner md-grid" aria-label="Header">
  32. <a href=".." title="OpenBLAS" class="md-header__button md-logo" aria-label="OpenBLAS" data-md-component="logo">
  33. <img src="../logo.svg" alt="logo">
  34. </a>
  35. <label class="md-header__button md-icon" for="__drawer">
  36. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
  37. </label>
  38. <div class="md-header__title" data-md-component="header-title">
  39. <div class="md-header__ellipsis">
  40. <div class="md-header__topic">
  41. <span class="md-ellipsis">
  42. OpenBLAS
  43. </span>
  44. </div>
  45. <div class="md-header__topic" data-md-component="header-topic">
  46. <span class="md-ellipsis">
  47. Install OpenBLAS
  48. </span>
  49. </div>
  50. </div>
  51. </div>
  52. <form class="md-header__option" data-md-component="palette">
  53. <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="blue-grey" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
  54. <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
  55. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg>
  56. </label>
  57. <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="blue-grey" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
  58. <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
  59. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg>
  60. </label>
  61. </form>
  62. <script>var media,input,key,value,palette=__md_get("__palette");if(palette&&palette.color){"(prefers-color-scheme)"===palette.color.media&&(media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']"),palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent"));for([key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
  63. <label class="md-header__button md-icon" for="__search">
  64. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
  65. </label>
  66. <div class="md-search" data-md-component="search" role="dialog">
  67. <label class="md-search__overlay" for="__search"></label>
  68. <div class="md-search__inner" role="search">
  69. <form class="md-search__form" name="search">
  70. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
  71. <label class="md-search__icon md-icon" for="__search">
  72. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
  73. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
  74. </label>
  75. <nav class="md-search__options" aria-label="Search">
  76. <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
  77. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
  78. </button>
  79. </nav>
  80. </form>
  81. <div class="md-search__output">
  82. <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
  83. <div class="md-search-result" data-md-component="search-result">
  84. <div class="md-search-result__meta">
  85. Initializing search
  86. </div>
  87. <ol class="md-search-result__list" role="presentation"></ol>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="md-header__source">
  94. <a href="https://github.com/OpenMathLib/OpenBLAS" title="Go to repository" class="md-source" data-md-component="source">
  95. <div class="md-source__icon md-icon">
  96. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
  97. </div>
  98. <div class="md-source__repository">
  99. GitHub
  100. </div>
  101. </a>
  102. </div>
  103. </nav>
  104. </header>
  105. <div class="md-container" data-md-component="container">
  106. <main class="md-main" data-md-component="main">
  107. <div class="md-main__inner md-grid">
  108. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  109. <div class="md-sidebar__scrollwrap">
  110. <div class="md-sidebar__inner">
  111. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  112. <label class="md-nav__title" for="__drawer">
  113. <a href=".." title="OpenBLAS" class="md-nav__button md-logo" aria-label="OpenBLAS" data-md-component="logo">
  114. <img src="../logo.svg" alt="logo">
  115. </a>
  116. OpenBLAS
  117. </label>
  118. <div class="md-nav__source">
  119. <a href="https://github.com/OpenMathLib/OpenBLAS" title="Go to repository" class="md-source" data-md-component="source">
  120. <div class="md-source__icon md-icon">
  121. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
  122. </div>
  123. <div class="md-source__repository">
  124. GitHub
  125. </div>
  126. </a>
  127. </div>
  128. <ul class="md-nav__list" data-md-scrollfix>
  129. <li class="md-nav__item">
  130. <a href=".." class="md-nav__link">
  131. <span class="md-ellipsis">
  132. Home
  133. </span>
  134. </a>
  135. </li>
  136. <li class="md-nav__item md-nav__item--active">
  137. <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
  138. <label class="md-nav__link md-nav__link--active" for="__toc">
  139. <span class="md-ellipsis">
  140. Install OpenBLAS
  141. </span>
  142. <span class="md-nav__icon md-icon"></span>
  143. </label>
  144. <a href="./" class="md-nav__link md-nav__link--active">
  145. <span class="md-ellipsis">
  146. Install OpenBLAS
  147. </span>
  148. </a>
  149. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  150. <label class="md-nav__title" for="__toc">
  151. <span class="md-nav__icon md-icon"></span>
  152. Table of contents
  153. </label>
  154. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  155. <li class="md-nav__item">
  156. <a href="#quick-install" class="md-nav__link">
  157. <span class="md-ellipsis">
  158. Quick install
  159. </span>
  160. </a>
  161. </li>
  162. <li class="md-nav__item">
  163. <a href="#source" class="md-nav__link">
  164. <span class="md-ellipsis">
  165. Source
  166. </span>
  167. </a>
  168. </li>
  169. <li class="md-nav__item">
  170. <a href="#platforms" class="md-nav__link">
  171. <span class="md-ellipsis">
  172. Platforms
  173. </span>
  174. </a>
  175. <nav class="md-nav" aria-label="Platforms">
  176. <ul class="md-nav__list">
  177. <li class="md-nav__item">
  178. <a href="#linux" class="md-nav__link">
  179. <span class="md-ellipsis">
  180. Linux
  181. </span>
  182. </a>
  183. <nav class="md-nav" aria-label="Linux">
  184. <ul class="md-nav__list">
  185. <li class="md-nav__item">
  186. <a href="#precompiled-packages" class="md-nav__link">
  187. <span class="md-ellipsis">
  188. Precompiled packages
  189. </span>
  190. </a>
  191. </li>
  192. </ul>
  193. </nav>
  194. </li>
  195. <li class="md-nav__item">
  196. <a href="#windows" class="md-nav__link">
  197. <span class="md-ellipsis">
  198. Windows
  199. </span>
  200. </a>
  201. <nav class="md-nav" aria-label="Windows">
  202. <ul class="md-nav__list">
  203. <li class="md-nav__item">
  204. <a href="#precompiled-packages_1" class="md-nav__link">
  205. <span class="md-ellipsis">
  206. Precompiled packages
  207. </span>
  208. </a>
  209. </li>
  210. <li class="md-nav__item">
  211. <a href="#visual-studio" class="md-nav__link">
  212. <span class="md-ellipsis">
  213. Visual Studio
  214. </span>
  215. </a>
  216. </li>
  217. <li class="md-nav__item">
  218. <a href="#windows-on-arm" class="md-nav__link">
  219. <span class="md-ellipsis">
  220. Windows on Arm
  221. </span>
  222. </a>
  223. </li>
  224. <li class="md-nav__item">
  225. <a href="#mingw-import-library" class="md-nav__link">
  226. <span class="md-ellipsis">
  227. MinGW import library
  228. </span>
  229. </a>
  230. </li>
  231. </ul>
  232. </nav>
  233. </li>
  234. <li class="md-nav__item">
  235. <a href="#mac-osx" class="md-nav__link">
  236. <span class="md-ellipsis">
  237. Mac OSX
  238. </span>
  239. </a>
  240. <nav class="md-nav" aria-label="Mac OSX">
  241. <ul class="md-nav__list">
  242. <li class="md-nav__item">
  243. <a href="#precompiled-packages_2" class="md-nav__link">
  244. <span class="md-ellipsis">
  245. Precompiled packages
  246. </span>
  247. </a>
  248. </li>
  249. <li class="md-nav__item">
  250. <a href="#build-on-apple-m1" class="md-nav__link">
  251. <span class="md-ellipsis">
  252. Build on Apple M1
  253. </span>
  254. </a>
  255. </li>
  256. </ul>
  257. </nav>
  258. </li>
  259. <li class="md-nav__item">
  260. <a href="#android" class="md-nav__link">
  261. <span class="md-ellipsis">
  262. Android
  263. </span>
  264. </a>
  265. <nav class="md-nav" aria-label="Android">
  266. <ul class="md-nav__list">
  267. <li class="md-nav__item">
  268. <a href="#prerequisites_1" class="md-nav__link">
  269. <span class="md-ellipsis">
  270. Prerequisites
  271. </span>
  272. </a>
  273. </li>
  274. <li class="md-nav__item">
  275. <a href="#building-with-android-ndk-using-clang-compiler" class="md-nav__link">
  276. <span class="md-ellipsis">
  277. Building with android NDK using clang compiler
  278. </span>
  279. </a>
  280. </li>
  281. <li class="md-nav__item">
  282. <a href="#build-armv7-with-clang" class="md-nav__link">
  283. <span class="md-ellipsis">
  284. Build ARMV7 with clang
  285. </span>
  286. </a>
  287. </li>
  288. <li class="md-nav__item">
  289. <a href="#build-armv8-with-clang" class="md-nav__link">
  290. <span class="md-ellipsis">
  291. Build ARMV8 with clang
  292. </span>
  293. </a>
  294. </li>
  295. <li class="md-nav__item">
  296. <a href="#alternative-script-which-was-tested-on-osx-with-ndk2136528147" class="md-nav__link">
  297. <span class="md-ellipsis">
  298. Alternative script which was tested on OSX with NDK(21.3.6528147)
  299. </span>
  300. </a>
  301. </li>
  302. <li class="md-nav__item">
  303. <a href="#building-openblas-with-very-old-gcc-based-versions-of-the-ndk-without-fortran" class="md-nav__link">
  304. <span class="md-ellipsis">
  305. Building OpenBLAS with very old gcc-based versions of the NDK, without Fortran
  306. </span>
  307. </a>
  308. </li>
  309. <li class="md-nav__item">
  310. <a href="#building-openblas-with-fortran" class="md-nav__link">
  311. <span class="md-ellipsis">
  312. Building OpenBLAS with Fortran
  313. </span>
  314. </a>
  315. </li>
  316. <li class="md-nav__item">
  317. <a href="#linking-openblas-0219-and-earlier-for-armv7" class="md-nav__link">
  318. <span class="md-ellipsis">
  319. Linking OpenBLAS (0.2.19 and earlier) for ARMV7
  320. </span>
  321. </a>
  322. </li>
  323. </ul>
  324. </nav>
  325. </li>
  326. <li class="md-nav__item">
  327. <a href="#iphoneios" class="md-nav__link">
  328. <span class="md-ellipsis">
  329. iPhone/iOS
  330. </span>
  331. </a>
  332. </li>
  333. <li class="md-nav__item">
  334. <a href="#mips" class="md-nav__link">
  335. <span class="md-ellipsis">
  336. MIPS
  337. </span>
  338. </a>
  339. </li>
  340. <li class="md-nav__item">
  341. <a href="#freebsd" class="md-nav__link">
  342. <span class="md-ellipsis">
  343. FreeBSD
  344. </span>
  345. </a>
  346. </li>
  347. <li class="md-nav__item">
  348. <a href="#cortex-m" class="md-nav__link">
  349. <span class="md-ellipsis">
  350. Cortex-M
  351. </span>
  352. </a>
  353. </li>
  354. </ul>
  355. </nav>
  356. </li>
  357. </ul>
  358. </nav>
  359. </li>
  360. <li class="md-nav__item">
  361. <a href="../user_manual/" class="md-nav__link">
  362. <span class="md-ellipsis">
  363. User manual
  364. </span>
  365. </a>
  366. </li>
  367. <li class="md-nav__item">
  368. <a href="../extensions/" class="md-nav__link">
  369. <span class="md-ellipsis">
  370. Extensions
  371. </span>
  372. </a>
  373. </li>
  374. <li class="md-nav__item">
  375. <a href="../developers/" class="md-nav__link">
  376. <span class="md-ellipsis">
  377. Developer manual
  378. </span>
  379. </a>
  380. </li>
  381. <li class="md-nav__item">
  382. <a href="../build_system/" class="md-nav__link">
  383. <span class="md-ellipsis">
  384. Build system
  385. </span>
  386. </a>
  387. </li>
  388. <li class="md-nav__item">
  389. <a href="../distributing/" class="md-nav__link">
  390. <span class="md-ellipsis">
  391. Redistributing OpenBLAS
  392. </span>
  393. </a>
  394. </li>
  395. <li class="md-nav__item">
  396. <a href="../ci/" class="md-nav__link">
  397. <span class="md-ellipsis">
  398. CI jobs
  399. </span>
  400. </a>
  401. </li>
  402. <li class="md-nav__item">
  403. <a href="../about/" class="md-nav__link">
  404. <span class="md-ellipsis">
  405. About
  406. </span>
  407. </a>
  408. </li>
  409. <li class="md-nav__item">
  410. <a href="../faq/" class="md-nav__link">
  411. <span class="md-ellipsis">
  412. FAQ
  413. </span>
  414. </a>
  415. </li>
  416. </ul>
  417. </nav>
  418. </div>
  419. </div>
  420. </div>
  421. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  422. <div class="md-sidebar__scrollwrap">
  423. <div class="md-sidebar__inner">
  424. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  425. <label class="md-nav__title" for="__toc">
  426. <span class="md-nav__icon md-icon"></span>
  427. Table of contents
  428. </label>
  429. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  430. <li class="md-nav__item">
  431. <a href="#quick-install" class="md-nav__link">
  432. <span class="md-ellipsis">
  433. Quick install
  434. </span>
  435. </a>
  436. </li>
  437. <li class="md-nav__item">
  438. <a href="#source" class="md-nav__link">
  439. <span class="md-ellipsis">
  440. Source
  441. </span>
  442. </a>
  443. </li>
  444. <li class="md-nav__item">
  445. <a href="#platforms" class="md-nav__link">
  446. <span class="md-ellipsis">
  447. Platforms
  448. </span>
  449. </a>
  450. <nav class="md-nav" aria-label="Platforms">
  451. <ul class="md-nav__list">
  452. <li class="md-nav__item">
  453. <a href="#linux" class="md-nav__link">
  454. <span class="md-ellipsis">
  455. Linux
  456. </span>
  457. </a>
  458. <nav class="md-nav" aria-label="Linux">
  459. <ul class="md-nav__list">
  460. <li class="md-nav__item">
  461. <a href="#precompiled-packages" class="md-nav__link">
  462. <span class="md-ellipsis">
  463. Precompiled packages
  464. </span>
  465. </a>
  466. </li>
  467. </ul>
  468. </nav>
  469. </li>
  470. <li class="md-nav__item">
  471. <a href="#windows" class="md-nav__link">
  472. <span class="md-ellipsis">
  473. Windows
  474. </span>
  475. </a>
  476. <nav class="md-nav" aria-label="Windows">
  477. <ul class="md-nav__list">
  478. <li class="md-nav__item">
  479. <a href="#precompiled-packages_1" class="md-nav__link">
  480. <span class="md-ellipsis">
  481. Precompiled packages
  482. </span>
  483. </a>
  484. </li>
  485. <li class="md-nav__item">
  486. <a href="#visual-studio" class="md-nav__link">
  487. <span class="md-ellipsis">
  488. Visual Studio
  489. </span>
  490. </a>
  491. </li>
  492. <li class="md-nav__item">
  493. <a href="#windows-on-arm" class="md-nav__link">
  494. <span class="md-ellipsis">
  495. Windows on Arm
  496. </span>
  497. </a>
  498. </li>
  499. <li class="md-nav__item">
  500. <a href="#mingw-import-library" class="md-nav__link">
  501. <span class="md-ellipsis">
  502. MinGW import library
  503. </span>
  504. </a>
  505. </li>
  506. </ul>
  507. </nav>
  508. </li>
  509. <li class="md-nav__item">
  510. <a href="#mac-osx" class="md-nav__link">
  511. <span class="md-ellipsis">
  512. Mac OSX
  513. </span>
  514. </a>
  515. <nav class="md-nav" aria-label="Mac OSX">
  516. <ul class="md-nav__list">
  517. <li class="md-nav__item">
  518. <a href="#precompiled-packages_2" class="md-nav__link">
  519. <span class="md-ellipsis">
  520. Precompiled packages
  521. </span>
  522. </a>
  523. </li>
  524. <li class="md-nav__item">
  525. <a href="#build-on-apple-m1" class="md-nav__link">
  526. <span class="md-ellipsis">
  527. Build on Apple M1
  528. </span>
  529. </a>
  530. </li>
  531. </ul>
  532. </nav>
  533. </li>
  534. <li class="md-nav__item">
  535. <a href="#android" class="md-nav__link">
  536. <span class="md-ellipsis">
  537. Android
  538. </span>
  539. </a>
  540. <nav class="md-nav" aria-label="Android">
  541. <ul class="md-nav__list">
  542. <li class="md-nav__item">
  543. <a href="#prerequisites_1" class="md-nav__link">
  544. <span class="md-ellipsis">
  545. Prerequisites
  546. </span>
  547. </a>
  548. </li>
  549. <li class="md-nav__item">
  550. <a href="#building-with-android-ndk-using-clang-compiler" class="md-nav__link">
  551. <span class="md-ellipsis">
  552. Building with android NDK using clang compiler
  553. </span>
  554. </a>
  555. </li>
  556. <li class="md-nav__item">
  557. <a href="#build-armv7-with-clang" class="md-nav__link">
  558. <span class="md-ellipsis">
  559. Build ARMV7 with clang
  560. </span>
  561. </a>
  562. </li>
  563. <li class="md-nav__item">
  564. <a href="#build-armv8-with-clang" class="md-nav__link">
  565. <span class="md-ellipsis">
  566. Build ARMV8 with clang
  567. </span>
  568. </a>
  569. </li>
  570. <li class="md-nav__item">
  571. <a href="#alternative-script-which-was-tested-on-osx-with-ndk2136528147" class="md-nav__link">
  572. <span class="md-ellipsis">
  573. Alternative script which was tested on OSX with NDK(21.3.6528147)
  574. </span>
  575. </a>
  576. </li>
  577. <li class="md-nav__item">
  578. <a href="#building-openblas-with-very-old-gcc-based-versions-of-the-ndk-without-fortran" class="md-nav__link">
  579. <span class="md-ellipsis">
  580. Building OpenBLAS with very old gcc-based versions of the NDK, without Fortran
  581. </span>
  582. </a>
  583. </li>
  584. <li class="md-nav__item">
  585. <a href="#building-openblas-with-fortran" class="md-nav__link">
  586. <span class="md-ellipsis">
  587. Building OpenBLAS with Fortran
  588. </span>
  589. </a>
  590. </li>
  591. <li class="md-nav__item">
  592. <a href="#linking-openblas-0219-and-earlier-for-armv7" class="md-nav__link">
  593. <span class="md-ellipsis">
  594. Linking OpenBLAS (0.2.19 and earlier) for ARMV7
  595. </span>
  596. </a>
  597. </li>
  598. </ul>
  599. </nav>
  600. </li>
  601. <li class="md-nav__item">
  602. <a href="#iphoneios" class="md-nav__link">
  603. <span class="md-ellipsis">
  604. iPhone/iOS
  605. </span>
  606. </a>
  607. </li>
  608. <li class="md-nav__item">
  609. <a href="#mips" class="md-nav__link">
  610. <span class="md-ellipsis">
  611. MIPS
  612. </span>
  613. </a>
  614. </li>
  615. <li class="md-nav__item">
  616. <a href="#freebsd" class="md-nav__link">
  617. <span class="md-ellipsis">
  618. FreeBSD
  619. </span>
  620. </a>
  621. </li>
  622. <li class="md-nav__item">
  623. <a href="#cortex-m" class="md-nav__link">
  624. <span class="md-ellipsis">
  625. Cortex-M
  626. </span>
  627. </a>
  628. </li>
  629. </ul>
  630. </nav>
  631. </li>
  632. </ul>
  633. </nav>
  634. </div>
  635. </div>
  636. </div>
  637. <div class="md-content" data-md-component="content">
  638. <article class="md-content__inner md-typeset">
  639. <h1 id="install-openblas">Install OpenBLAS</h1>
  640. <div class="admonition note">
  641. <p class="admonition-title">Note</p>
  642. <p>Lists of precompiled packages are not comprehensive, is not meant to validate nor endorse a particular third-party build over others, and may not always lead to the newest version</p>
  643. </div>
  644. <h2 id="quick-install">Quick install</h2>
  645. <p>Precompiled packages have recently become available for a number of platforms through their normal installation procedures, so for users of desktop devices at least, the instructions below are mostly relevant when you want to try the most recent development snapshot from git. See your platform's relevant "Precompiled packages" section.</p>
  646. <p>The <a href="https://github.com/conda-forge">Conda-Forge</a> project maintains packages for the conda package manager at <a href="https://github.com/conda-forge/openblas-feedstock">https://github.com/conda-forge/openblas-feedstock</a>.</p>
  647. <h2 id="source">Source</h2>
  648. <p>Download the latest <a href="https://github.com/xianyi/OpenBLAS/releases">stable version</a> from release page.</p>
  649. <h2 id="platforms">Platforms</h2>
  650. <h3 id="linux">Linux</h3>
  651. <p>Just type <code>make</code> to compile the library.</p>
  652. <p>Notes:</p>
  653. <ul>
  654. <li>OpenBLAS doesn't support g77. Please use gfortran or other Fortran compilers. e.g. <code>make FC=gfortran</code>.</li>
  655. <li>When building in an emulator (KVM,QEMU etc.) make sure that the combination of CPU features exposed to
  656. the virtual environment matches that of an existing CPU to allow detection of the cpu model to succeed.
  657. (With qemu, this can be done by passing <code>-cpu host</code> or a supported model name at invocation)</li>
  658. </ul>
  659. <h4 id="precompiled-packages">Precompiled packages</h4>
  660. <h5 id="debianubuntumintkali">Debian/Ubuntu/Mint/Kali</h5>
  661. <p>OpenBLAS package is available in default repositories and can act as default BLAS in system</p>
  662. <p>Example installation commands:
  663. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>update
  664. $<span class="w"> </span>apt<span class="w"> </span>search<span class="w"> </span>openblas
  665. $<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>libopenblas-dev
  666. $<span class="w"> </span>sudo<span class="w"> </span>update-alternatives<span class="w"> </span>--config<span class="w"> </span>libblas.so.3
  667. </code></pre></div>
  668. Alternatively, if distributor's package proves unsatisfactory, you may try latest version of OpenBLAS, <a href="../faq/#debianlts">Following guide in OpenBLAS FAQ</a></p>
  669. <h5 id="opensusesle">openSuSE/SLE</h5>
  670. <p>Recent OpenSUSE versions include OpenBLAS in default repositories and also permit OpenBLAS to act as replacement of system-wide BLAS.</p>
  671. <p>Example installation commands:
  672. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>zypper<span class="w"> </span>ref
  673. $<span class="w"> </span>zypper<span class="w"> </span>se<span class="w"> </span>openblas
  674. $<span class="w"> </span>sudo<span class="w"> </span>zypper<span class="w"> </span><span class="k">in</span><span class="w"> </span>openblas-devel
  675. $<span class="w"> </span>sudo<span class="w"> </span>update-alternatives<span class="w"> </span>--config<span class="w"> </span>libblas.so.3
  676. </code></pre></div>
  677. Should you be using older OpenSUSE or SLE that provides no OpenBLAS, you can attach optional or experimental openSUSE repository as a new package source to acquire recent build of OpenBLAS following <a href="https://software.opensuse.org/package/openblas">instructions on openSUSE software site</a></p>
  678. <h5 id="fedoracentosrhel">Fedora/CentOS/RHEL</h5>
  679. <p>Fedora provides OpenBLAS in default installation repositories.</p>
  680. <p>To install it try following:
  681. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>dnf<span class="w"> </span>search<span class="w"> </span>openblas
  682. $<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>openblas-devel
  683. </code></pre></div>
  684. For CentOS/RHEL/Scientific Linux packages are provided via <a href="https://fedoraproject.org/wiki/EPEL">Fedora EPEL repository</a></p>
  685. <p>After adding repository and repository keys installation is pretty straightforward:
  686. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>yum<span class="w"> </span>search<span class="w"> </span>openblas
  687. $<span class="w"> </span>yum<span class="w"> </span>install<span class="w"> </span>openblas-devel
  688. </code></pre></div>
  689. No alternatives mechanism is provided for BLAS, and packages in system repositories are linked against NetLib BLAS or ATLAS BLAS libraries. You may wish to re-package RPMs to use OpenBLAS instead <a href="https://fedoraproject.org/wiki/How_to_create_an_RPM_package">as described here</a></p>
  690. <h5 id="mageia">Mageia</h5>
  691. <p>Mageia offers ATLAS and NetLIB LAPACK in base repositories.
  692. You can build your own OpenBLAS replacement, and once installed in /opt
  693. TODO: populate /usr/lib64 /usr/include accurately to replicate netlib with update-alternatives</p>
  694. <h5 id="archmanjaroantergos">Arch/Manjaro/Antergos</h5>
  695. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>openblas
  696. </code></pre></div>
  697. <h3 id="windows">Windows</h3>
  698. <p>The precompiled binaries available with each release (in <a href="https://github.com/xianyi/OpenBLAS/releases">https://github.com/xianyi/OpenBLAS/releases</a>) are
  699. created with MinGW using an option list of
  700. "NUM_THREADS=64 TARGET=GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 CONSISTENT_FPCSR=1" - they should work on
  701. any x86 or x86_64 computer. The zip archive contains the include files, static and dll libraries as well
  702. as configuration files for getting them found via CMAKE or pkgconfig - just create a suitable folder for
  703. your OpenBLAS installation and unzip it there. (Note that you will need to edit the provided openblas.pc
  704. and OpenBLASConfig.cmake to reflect the installation path on your computer, as distributed they have "win"
  705. or "win64" reflecting the local paths on the system they were built on). Some programs will expect the DLL
  706. name to be lapack.dll, blas.dll, or (in the case of the statistics package "R") even Rblas.dll to act as a
  707. direct replacement for whatever other implementation of BLAS and LAPACK they use by default. Just copy the
  708. openblas.dll to the desired name(s).
  709. Note that the provided binaries are built with INTERFACE64=0, meaning they use standard 32bit integers for
  710. array indexing and the like (as is the default for most if not all BLAS and LAPACK implementations). If the
  711. documentation of whatever program you are using with OpenBLAS mentions 64bit integers (INTERFACE64=1) for
  712. addressing huge matrix sizes, you will need to build OpenBLAS from source (or open an issue ticket to make
  713. the demand for such a precompiled build known).</p>
  714. <h4 id="precompiled-packages_1">Precompiled packages</h4>
  715. <ul>
  716. <li><a href="http://sourceforge.net/projects/openblas/files">http://sourceforge.net/projects/openblas/files</a></li>
  717. <li><a href="https://www.nuget.org/packages?q=openblas">https://www.nuget.org/packages?q=openblas</a></li>
  718. </ul>
  719. <h4 id="visual-studio">Visual Studio</h4>
  720. <p>As of OpenBLAS v0.2.15, we support MinGW and Visual Studio (using CMake to generate visual studio solution files &ndash; note that you will need at least version 3.11 of CMake for linking to work correctly) to build OpenBLAS on Windows.</p>
  721. <p>Note that you need a Fortran compiler if you plan to build and use the LAPACK functions included with OpenBLAS. The sections below describe using either <code>flang</code> as an add-on to clang/LLVM or <code>gfortran</code> as part of MinGW for this purpose. If you want to use the Intel Fortran compiler <code>ifort</code> for this, be sure to also use the Intel C compiler <code>icc</code> for building the C parts, as the ABI imposed by <code>ifort</code> is incompatible with <code>msvc</code>.</p>
  722. <h5 id="1-native-msvc-abi">1. Native (MSVC) ABI</h5>
  723. <p>A fully-optimized OpenBLAS that can be statically or dynamically linked to your application can currently be built for the 64-bit architecture with the LLVM compiler infrastructure. We're going to use Miniconda3 to grab all of the tools we need, since some of them are in an experimental status. Before you begin, you'll need to have Microsoft Visual Studio 2015 or newer installed.</p>
  724. <ol>
  725. <li>Install Miniconda3 for 64 bits using <code>winget install --id Anaconda.Miniconda3</code> or easily download from <a href="https://docs.conda.io/en/latest/miniconda.html">conda.io</a>.</li>
  726. <li>Open the "Anaconda Command Prompt," now available in the Start Menu, or at <code>%USERPROFILE%\miniconda3\shell\condabin\conda-hook.ps1</code>.</li>
  727. <li>In that command prompt window, use <code>cd</code> to change to the directory where you want to build OpenBLAS</li>
  728. <li>Now install all of the tools we need:</li>
  729. </ol>
  730. <div class="highlight"><pre><span></span><code>conda update -n base conda
  731. conda config --add channels conda-forge
  732. conda install -y cmake flang clangdev perl libflang ninja
  733. </code></pre></div>
  734. <ol>
  735. <li>Still in the Anaconda Command Prompt window, activate the MSVC environment for 64 bits with <code>vcvarsall x64</code>. On Windows 11 with Visual Studio 2022, this would be done by invoking:</li>
  736. </ol>
  737. <div class="highlight"><pre><span></span><code><span class="s2">&quot;c:\Program Files\Microsoft Visual Studio\2022\Preview\vc\Auxiliary\Build\vcvars64.bat&quot;</span>
  738. </code></pre></div>
  739. <p>With VS2019, the command should be the same &ndash; except for the year number, obviously. For other/older versions of MSVC,
  740. the VS documentation or a quick search on the web should turn up the exact wording you need.</p>
  741. <p>Confirm that the environment is active by typing <code>link</code> &ndash; this should return a long list of possible options for the <code>link</code> command. If it just
  742. returns "command not found" or similar, review and retype the call to vcvars64.bat.
  743. <strong>NOTE:</strong> if you are working from a Visual Studio Command prompt window instead (so that you do not have to do the vcvars call), you need to invoke
  744. <code>conda activate</code> so that CONDA_PREFIX etc. get set up correctly before proceeding to step 6. Failing to do so will lead to link errors like
  745. libflangmain.lib not getting found later in the build.</p>
  746. <ol>
  747. <li>Now configure the project with CMake. Starting in the project directory, execute the following:</li>
  748. </ol>
  749. <div class="highlight"><pre><span></span><code>set &quot;LIB=%CONDA_PREFIX%\Library\lib;%LIB%&quot;
  750. set &quot;CPATH=%CONDA_PREFIX%\Library\include;%CPATH%&quot;
  751. mkdir build
  752. cd build
  753. cmake .. -G &quot;Ninja&quot; -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DCMAKE_MT=mt -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release
  754. </code></pre></div>
  755. <p>You may want to add further options in the <code>cmake</code> command here &ndash; for instance, the default only produces a static .lib version of the library. If you would rather have a DLL, add -DBUILD_SHARED_LIBS=ON above. Note that this step only creates some command files and directories, the actual build happens next.</p>
  756. <ol>
  757. <li>Build the project:</li>
  758. </ol>
  759. <p><div class="highlight"><pre><span></span><code>cmake --build . --config Release
  760. </code></pre></div>
  761. This step will create the OpenBLAS library in the "lib" directory, and various build-time tests in the <code>test</code>, <code>ctest</code> and <code>openblas_utest</code> directories. However it will not separate the header files you might need for building your own programs from those used internally. To put all relevant files in a more convenient arrangement, run the next step.</p>
  762. <ol>
  763. <li>Install all relevant files created by the build</li>
  764. </ol>
  765. <p><div class="highlight"><pre><span></span><code>cmake --install . --prefix c:\opt -v
  766. </code></pre></div>
  767. This will copy all files that are needed for building and running your own programs with OpenBLAS to the given location, creating appropriate subdirectories for the individual kinds of files. In the case of "C:\opt" as given above, this would be C:\opt\include\openblas for the header files,
  768. C:\opt\bin for the libopenblas.dll and C:\opt\lib for the static library. C:\opt\share holds various support files that enable other cmake-based build scripts to find OpenBLAS automatically.</p>
  769. <h6 id="visual-studio-2017-c2017-standard">Visual studio 2017+ (C++2017 standard)</h6>
  770. <p>In newer visual studio versions, Microsoft has changed <a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/complex-math-support?view=msvc-170#types-used-in-complex-math">how it handles complex types</a>. Even when using a precompiled version of OpenBLAS, you might need to define <code>LAPACK_COMPLEX_CUSTOM</code> in order to define complex types properly for MSVC. For example, some variant of the following might help:</p>
  771. <div class="highlight"><pre><span></span><code>#if defined(_MSC_VER)
  772. #include &lt;complex.h&gt;
  773. #define LAPACK_COMPLEX_CUSTOM
  774. #define lapack_complex_float _Fcomplex
  775. #define lapack_complex_double _Dcomplex
  776. #endif
  777. </code></pre></div>
  778. <p>For reference, see https://github.com/xianyi/OpenBLAS/issues/3661, https://github.com/Reference-LAPACK/lapack/issues/683, and https://stackoverflow.com/questions/47520244/using-openblas-lapacke-in-visual-studio.</p>
  779. <h6 id="cmake-and-visual-studio">CMake and Visual Studio</h6>
  780. <p>To build OpenBLAS for the 32-bit architecture, you'll need to use the builtin Visual Studio compilers.</p>
  781. <div class="admonition note">
  782. <p class="admonition-title">Note</p>
  783. <p>This method may produce binaries which demonstrate significantly lower performance than those built with the other methods. (The Visual Studio compiler does not support the dialect of assembly used in the cpu-specific optimized files, so only the "generic" TARGET which is
  784. written in pure C will get built. For the same reason it is not possible (and not necessary) to use -DDYNAMIC_ARCH=ON in a Visual Studio build) You may consider building for the 32-bit architecture using the GNU (MinGW) ABI.</p>
  785. </div>
  786. <h6 id="1-install-cmake-at-windows"># 1. Install CMake at Windows</h6>
  787. <h6 id="2-use-cmake-to-generate-visual-studio-solution-files"># 2. Use CMake to generate Visual Studio solution files</h6>
  788. <div class="highlight"><pre><span></span><code># Do this from Powershell so cmake can find visual studio
  789. cmake -G &quot;Visual Studio 14 Win64&quot; -DCMAKE_BUILD_TYPE=Release .
  790. </code></pre></div>
  791. <h6 id="build-the-solution-at-visual-studio">Build the solution at Visual Studio</h6>
  792. <p>Note that this step depends on perl, so you'll need to install perl for windows, and put perl on your path so VS can start perl (http://stackoverflow.com/questions/3051049/active-perl-installation-on-windows-operating-system).</p>
  793. <p>Step 2 will build the OpenBLAS solution, open it in VS, and build the projects. Note that the dependencies do not seem to be automatically configured: if you try to build libopenblas directly, it will fail with a message saying that some .obj files aren't found, but if you build the projects libopenblas depends on before building libopenblas, the build will succeed.</p>
  794. <h6 id="build-openblas-for-universal-windows-platform">Build OpenBLAS for Universal Windows Platform</h6>
  795. <p>OpenBLAS can be built for use on the <a href="https://en.wikipedia.org/wiki/Universal_Windows_Platform">Universal Windows Platform</a> using a two step process since commit <a href="https://github.com/xianyi/OpenBLAS/commit/c66b842d66c5516e52804bf5a0544d18b1da1b44">c66b842</a>.</p>
  796. <h6 id="1-follow-steps-1-and-2-above-to-build-the-visual-studio-solution-files-for-windows-this-builds-the-helper-executables-which-are-required-when-building-the-openblas-visual-studio-solution-files-for-uwp-in-step-2"># 1. Follow steps 1 and 2 above to build the Visual Studio solution files for Windows. This builds the helper executables which are required when building the OpenBLAS Visual Studio solution files for UWP in step 2.</h6>
  797. <h6 id="2-remove-the-generated-cmakecachetxt-and-cmakefiles-directory-from-the-openblas-source-directory-and-re-run-cmake-with-the-following-options"># 2. Remove the generated CMakeCache.txt and CMakeFiles directory from the OpenBLAS source directory and re-run CMake with the following options:</h6>
  798. <div class="highlight"><pre><span></span><code># do this to build UWP compatible solution files
  799. cmake -G &quot;Visual Studio 14 Win64&quot; -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=&quot;10.0&quot; -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE -DCMAKE_BUILD_TYPE=Release .
  800. </code></pre></div>
  801. <h6 id="build-the-solution-with-visual-studio"># Build the solution with Visual Studio</h6>
  802. <p>This will build the OpenBLAS binaries with the required settings for use with UWP.</p>
  803. <h5 id="2-gnu-mingw-abi">2. GNU (MinGW) ABI</h5>
  804. <p>The resulting library can be used in Visual Studio, but it can only be linked dynamically. This configuration has not been thoroughly tested and should be considered experimental.</p>
  805. <h6 id="incompatible-x86-calling-conventions">Incompatible x86 calling conventions</h6>
  806. <p>Due to incompatibilities between the calling conventions of MinGW and Visual Studio you will need to make the following modifications ( <strong>32-bit only</strong> ):</p>
  807. <ol>
  808. <li>Use the newer GCC 4.7.0. The older GCC (&lt;4.7.0) has an ABI incompatibility for returning aggregate structures larger than 8 bytes with MSVC. </li>
  809. </ol>
  810. <h6 id="build-openblas-on-windows-os">Build OpenBLAS on Windows OS</h6>
  811. <ol>
  812. <li>Install the MinGW (GCC) compiler suite, either 32-bit (http://www.mingw.org/) or 64-bit (http://mingw-w64.sourceforge.net/). Be sure to install its gfortran package as well (unless you really want to build the BLAS part of OpenBLAS only) and check that gcc and gfortran are the same version &ndash; mixing compilers from different sources or release versions can lead to strange error messages in the linking stage. In addition, please install MSYS with MinGW.</li>
  813. <li>Build OpenBLAS in the MSYS shell. Usually, you can just type "make". OpenBLAS will detect the compiler and CPU automatically. </li>
  814. <li>After the build is complete, OpenBLAS will generate the static library "libopenblas.a" and the shared dll library "libopenblas.dll" in the folder. You can type "make PREFIX=/your/installation/path install" to install the library to a certain location.</li>
  815. </ol>
  816. <div class="admonition note">
  817. <p class="admonition-title">Note</p>
  818. <p>We suggest using official MinGW or MinGW-w64 compilers. A user reported that s/he met <code>Unhandled exception</code> by other compiler suite. https://groups.google.com/forum/#!topic/openblas-users/me2S4LkE55w</p>
  819. </div>
  820. <p>Note also that older versions of the alternative builds of mingw-w64 available through http://www.msys2.org may contain a defect that leads to a compilation failure accompanied by the error message
  821. <div class="highlight"><pre><span></span><code>&lt;command-line&gt;:0:4: error: expected identifier or &#39;(&#39; before numeric constant
  822. </code></pre></div>
  823. If you encounter this, please upgrade your msys2 setup or see https://github.com/xianyi/OpenBLAS/issues/1503 for a workaround.</p>
  824. <h6 id="generate-import-library-before-0210-version">Generate import library (before 0.2.10 version)</h6>
  825. <ol>
  826. <li>First, you will need to have the <code>lib.exe</code> tool in the Visual Studio command prompt. </li>
  827. <li>Open the command prompt and type <code>cd OPENBLAS_TOP_DIR/exports</code>, where OPENBLAS_TOP_DIR is the main folder of your OpenBLAS installation.</li>
  828. <li>For a 32-bit library, type <code>lib /machine:i386 /def:libopenblas.def</code>. For 64-bit, type <code>lib /machine:X64 /def:libopenblas.def</code>.</li>
  829. <li>This will generate the import library "libopenblas.lib" and the export library "libopenblas.exp" in OPENBLAS_TOP_DIR/exports. Although these two files have the same name, they are totally different.</li>
  830. </ol>
  831. <h6 id="generate-import-library-0210-and-after-version">Generate import library (0.2.10 and after version)</h6>
  832. <ol>
  833. <li>OpenBLAS already generated the import library "libopenblas.dll.a" for "libopenblas.dll".</li>
  834. </ol>
  835. <h6 id="generate-windows-native-pdb-files-from-gccgfortran-build">generate windows native PDB files from gcc/gfortran build</h6>
  836. <p>Tool to do so is available at https://github.com/rainers/cv2pdb</p>
  837. <h6 id="use-openblas-dll-library-in-visual-studio">Use OpenBLAS .dll library in Visual Studio</h6>
  838. <ol>
  839. <li>Copy the import library (before 0.2.10: "OPENBLAS_TOP_DIR/exports/libopenblas.lib", 0.2.10 and after: "OPENBLAS_TOP_DIR/libopenblas.dll.a") and .dll library "libopenblas.dll" into the same folder(The folder of your project that is going to use the BLAS library. You may need to add the libopenblas.dll.a to the linker input list: properties-&gt;Linker-&gt;Input).</li>
  840. <li>Please follow the documentation about using third-party .dll libraries in MS Visual Studio 2008 or 2010. Make sure to link against a library for the correct architecture. For example, you may receive an error such as "The application was unable to start correctly (0xc000007b)" which typically indicates a mismatch between 32/64-bit libraries.</li>
  841. </ol>
  842. <div class="admonition note">
  843. <p class="admonition-title">Note</p>
  844. <p>If you need CBLAS, you should include cblas.h in /your/installation/path/include in Visual Studio. Please read <a href="http://github.com/xianyi/OpenBLAS/issues/95">this page</a>.</p>
  845. </div>
  846. <h6 id="limitations">Limitations</h6>
  847. <ul>
  848. <li>Both static and dynamic linking are supported with MinGW. With Visual Studio, however, only dynamic linking is supported and so you should use the import library.</li>
  849. <li>Debugging from Visual Studio does not work because MinGW and Visual Studio have incompatible formats for debug information (PDB vs. DWARF/STABS). You should either debug with GDB on the command-line or with a visual frontend, for instance <a href="http://www.eclipse.org/cdt/">Eclipse</a> or <a href="http://qt.nokia.com/products/developer-tools/">Qt Creator</a>.</li>
  850. </ul>
  851. <h4 id="windows-on-arm">Windows on Arm</h4>
  852. <h5 id="prerequisites">Prerequisites</h5>
  853. <p>Following tools needs to be installed</p>
  854. <h6 id="1-download-and-install-clang-for-windows-on-arm">1. Download and install clang for windows on arm</h6>
  855. <p>Find the latest LLVM build for WoA from <a href="https://releases.llvm.org/">LLVM release page</a></p>
  856. <p>E.g: LLVM 12 build for WoA64 can be found <a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/LLVM-12.0.0-woa64.exe">here</a></p>
  857. <p>Run the LLVM installer and ensure that LLVM is added to environment PATH.</p>
  858. <h6 id="2-download-and-install-classic-flang-for-windows-on-arm">2. Download and install classic flang for windows on arm</h6>
  859. <p>Classic flang is the only available FORTRAN compiler for windows on arm for now and a pre-release build can be found <a href="https://github.com/kaadam/flang/releases/tag/v0.1">here</a></p>
  860. <p>There is no installer for classic flang and the zip package can be extracted and the path needs to be added to environment PATH.</p>
  861. <p>E.g: on PowerShell</p>
  862. <div class="highlight"><pre><span></span><code>$env:Path += &quot;;C:\flang_woa\bin&quot;
  863. </code></pre></div>
  864. <h5 id="build">Build</h5>
  865. <p>The following steps describe how to build the static library for OpenBLAS with and without LAPACK</p>
  866. <h6 id="1-build-openblas-static-library-with-blas-and-lapack-routines-with-make">1. Build OpenBLAS static library with BLAS and LAPACK routines with Make</h6>
  867. <p>Following command can be used to build OpenBLAS static library with BLAS and LAPACK routines</p>
  868. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>make<span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;clang-cl&quot;</span><span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span><span class="s2">&quot;clang-cl&quot;</span><span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="s2">&quot;llvm-ar&quot;</span><span class="w"> </span><span class="nv">BUILD_WITHOUT_LAPACK</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">NOFORTRAN</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">DYNAMIC_ARCH</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV8<span class="w"> </span><span class="nv">ARCH</span><span class="o">=</span>arm64<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">64</span><span class="w"> </span><span class="nv">USE_OPENMP</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">PARALLEL</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="s2">&quot;llvm-ranlib&quot;</span><span class="w"> </span><span class="nv">MAKE</span><span class="o">=</span>make<span class="w"> </span><span class="nv">F_COMPILER</span><span class="o">=</span>FLANG<span class="w"> </span><span class="nv">FC</span><span class="o">=</span>FLANG<span class="w"> </span><span class="nv">FFLAGS_NOOPT</span><span class="o">=</span><span class="s2">&quot;-march=armv8-a -cpp&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="s2">&quot;-march=armv8-a -cpp&quot;</span><span class="w"> </span><span class="nv">NEED_PIC</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">HOSTARCH</span><span class="o">=</span>arm64<span class="w"> </span>libs<span class="w"> </span>netlib
  869. </code></pre></div>
  870. <h6 id="2-build-static-library-with-blas-routines-using-cmake">2. Build static library with BLAS routines using CMake</h6>
  871. <p>Classic flang has compatibility issues with cmake hence only BLAS routines can be compiled with CMake</p>
  872. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>mkdir<span class="w"> </span>build
  873. $<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>build
  874. $<span class="w"> </span>cmake<span class="w"> </span>..<span class="w"> </span>-G<span class="w"> </span>Ninja<span class="w"> </span>-DCMAKE_C_COMPILER<span class="o">=</span>clang<span class="w"> </span>-DBUILD_WITHOUT_LAPACK<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DNOFORTRAN<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DDYNAMIC_ARCH<span class="o">=</span><span class="m">0</span><span class="w"> </span>-DTARGET<span class="o">=</span>ARMV8<span class="w"> </span>-DARCH<span class="o">=</span>arm64<span class="w"> </span>-DBINARY<span class="o">=</span><span class="m">64</span><span class="w"> </span>-DUSE_OPENMP<span class="o">=</span><span class="m">0</span><span class="w"> </span>-DCMAKE_SYSTEM_PROCESSOR<span class="o">=</span>ARM64<span class="w"> </span>-DCMAKE_CROSSCOMPILING<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DCMAKE_SYSTEM_NAME<span class="o">=</span>Windows
  875. $<span class="w"> </span>cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Release
  876. </code></pre></div>
  877. <h6 id="getarchexe-execution-error"><code>getarch.exe</code> execution error</h6>
  878. <p>If you notice that platform-specific headers by <code>getarch.exe</code> are not generated correctly, It could be due to a known debug runtime DLL issue for arm64 platforms. Please check out <a href="https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28677636097/Debug+run-time+DLL+issue#Workaround">link</a> for the workaround.</p>
  879. <h4 id="mingw-import-library">MinGW import library</h4>
  880. <p>Microsoft Windows has this thing called "import libraries". You don't need it in MinGW because the <code>ld</code> linker from GNU Binutils is smart, but you may still want it for whatever reason.</p>
  881. <h5 id="make-the-def">Make the <code>.def</code></h5>
  882. <p>Import libraries are compiled from a list of what symbols to use, <code>.def</code>. This should be already in your <code>exports</code> directory: <code>cd OPENBLAS_TOP_DIR/exports</code>.</p>
  883. <h5 id="making-a-mingw-import-library">Making a MinGW import library</h5>
  884. <p>MinGW import libraries have the suffix <code>.a</code>, same as static libraries. (It's actually more common to do <code>.dll.a</code>...)</p>
  885. <p>You need to first prepend <code>libopenblas.def</code> with a line <code>LIBRARY libopenblas.dll</code>:</p>
  886. <pre><code>cat &lt;(echo "LIBRARY libopenblas.dll") libopenblas.def &gt; libopenblas.def.1
  887. mv libopenblas.def.1 libopenblas.def
  888. </code></pre>
  889. <p>Now it probably looks like:</p>
  890. <pre><code>LIBRARY libopenblas.dll
  891. EXPORTS
  892. caxpy=caxpy_ @1
  893. caxpy_=caxpy_ @2
  894. ...
  895. </code></pre>
  896. <p>Then, generate the import library: <code>dlltool -d libopenblas.def -l libopenblas.a</code></p>
  897. <p>Again, there is basically <strong>no point</strong> in making an import library for use in MinGW. It actually slows down linking.</p>
  898. <h5 id="making-a-msvc-import-library">Making a MSVC import library</h5>
  899. <p>Unlike MinGW, MSVC absolutely requires an import library. Now the C ABI of MSVC and MinGW are actually identical, so linking is actually okay. (Any incompatibility in the C ABI would be a bug.)</p>
  900. <p>The import libraries of MSVC have the suffix <code>.lib</code>. They are generated from a <code>.def</code> file using MSVC's <code>lib.exe</code>. See <a href="use_visual_studio.md#generate-import-library-before-0210-version">the MSVC instructions</a>.</p>
  901. <h5 id="notes">Notes</h5>
  902. <ul>
  903. <li>Always remember that MinGW is <strong>not the same</strong> as MSYS2 or Cygwin. MSYS2 and Cygwin are full POSIX environments with a lot of magic such as <code>fork()</code> and its own <code>malloc()</code>. MinGW, which builds on the normal Microsoft C Runtime, has none of that. Be clear about which one you are building for.</li>
  904. </ul>
  905. <h3 id="mac-osx">Mac OSX</h3>
  906. <p>If your CPU is Sandy Bridge, please use Clang version 3.1 and above. The Clang 3.0 will generate the wrong AVX binary code of OpenBLAS.</p>
  907. <h4 id="precompiled-packages_2">Precompiled packages</h4>
  908. <p><a href="https://www.macports.org/ports.php?by=name&amp;substr=openblas">https://www.macports.org/ports.php?by=name&amp;substr=openblas</a></p>
  909. <p><code>brew install openblas</code></p>
  910. <p>or using the conda package manager from
  911. <a href="https://github.com/conda-forge/miniforge#download">https://github.com/conda-forge/miniforge#download</a>
  912. (which also has packages for the new M1 cpu)</p>
  913. <p><code>conda install openblas</code></p>
  914. <h4 id="build-on-apple-m1">Build on Apple M1</h4>
  915. <p>On newer versions of Xcode and on arm64, you might need to compile with a newer macOS target (11.0) than the default (10.8) with <code>MACOSX_DEPLOYMENT_TARGET=11.0</code>, or switch your command-line tools to use an older SDK (e.g., <a href="https://developer.apple.com/download/all/?q=Xcode%2013">13.1</a>).</p>
  916. <ul>
  917. <li>without Fortran compiler (cannot build LAPACK)
  918. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>make<span class="w"> </span><span class="nv">CC</span><span class="o">=</span>cc<span class="w"> </span><span class="nv">NOFORTRAN</span><span class="o">=</span><span class="m">1</span>
  919. </code></pre></div></li>
  920. <li>with Fortran compiler (you could <code>brew install gfortran</code>) https://github.com/xianyi/OpenBLAS/issues/3032
  921. <div class="highlight"><pre><span></span><code>$<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">MACOSX_DEPLOYMENT_TARGET</span><span class="o">=</span><span class="m">11</span>.0
  922. $<span class="w"> </span>make<span class="w"> </span><span class="nv">CC</span><span class="o">=</span>cc<span class="w"> </span><span class="nv">FC</span><span class="o">=</span>gfortran
  923. </code></pre></div></li>
  924. </ul>
  925. <h3 id="android">Android</h3>
  926. <h4 id="prerequisites_1">Prerequisites</h4>
  927. <p>In addition to the Android NDK, you will need both Perl and a C compiler on the build host as these are currently
  928. required by the OpenBLAS build environment.</p>
  929. <h4 id="building-with-android-ndk-using-clang-compiler">Building with android NDK using clang compiler</h4>
  930. <p>Around version 11 Android NDKs stopped supporting gcc, so you would need to use clang to compile OpenBLAS. clang is supported from OpenBLAS 0.2.20 version onwards. See below sections on how to build with clang for ARMV7 and ARMV8 targets. The same basic principles as described below for ARMV8 should also apply to building an x86 or x86_64 version (substitute something like NEHALEM for the target instead of ARMV8 and replace all the aarch64 in the toolchain paths obviously)
  931. "Historic" notes:
  932. Since version 19 the default toolchain is provided as a standalone toolchain, so building one yourself following <a href="http://developer.android.com/ndk/guides/standalone_toolchain.html">building a standalone toolchain</a> should no longer be necessary.
  933. If you want to use static linking with an old NDK version older than about r17, you need to choose an API level below 23 currently due to NDK bug 272 (https://github.com/android-ndk/ndk/issues/272 , the libc.a lacks a definition of stderr) that will probably be fixed in r17 of the NDK.</p>
  934. <h4 id="build-armv7-with-clang">Build ARMV7 with clang</h4>
  935. <p><div class="highlight"><pre><span></span><code>## Set path to ndk-bundle
  936. export NDK_BUNDLE_DIR=/path/to/ndk-bundle
  937. ## Set the PATH to contain paths to clang and arm-linux-androideabi-* utilities
  938. export PATH=${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:${NDK_BUNDLE_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
  939. ## Set LDFLAGS so that the linker finds the appropriate libgcc
  940. export LDFLAGS=&quot;-L${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x&quot;
  941. ## Set the clang cross compile flags
  942. export CLANG_FLAGS=&quot;-target arm-linux-androideabi -marm -mfpu=vfp -mfloat-abi=softfp --sysroot ${NDK_BUNDLE_DIR}/platforms/android-23/arch-arm -gcc-toolchain ${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/&quot;
  943. #OpenBLAS Compile
  944. make TARGET=ARMV7 ONLY_CBLAS=1 AR=ar CC=&quot;clang ${CLANG_FLAGS}&quot; HOSTCC=gcc ARM_SOFTFP_ABI=1 -j4
  945. </code></pre></div>
  946. On a Mac, it may also be necessary to give the complete path to the <code>ar</code> utility in the make command above, like so:
  947. <div class="highlight"><pre><span></span><code>AR=${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc-ar
  948. </code></pre></div>
  949. otherwise you may get a linker error complaining about a "malformed archive header name at 8" when the native OSX ar command was invoked instead.</p>
  950. <h4 id="build-armv8-with-clang">Build ARMV8 with clang</h4>
  951. <p><div class="highlight"><pre><span></span><code>## Set path to ndk-bundle
  952. export NDK_BUNDLE_DIR=/path/to/ndk-bundle/
  953. ## Export PATH to contain directories of clang and aarch64-linux-android-* utilities
  954. export PATH=${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/:${NDK_BUNDLE_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
  955. ## Setup LDFLAGS so that loader can find libgcc and pass -lm for sqrt
  956. export LDFLAGS=&quot;-L${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x -lm&quot;
  957. ## Setup the clang cross compile options
  958. export CLANG_FLAGS=&quot;-target aarch64-linux-android --sysroot ${NDK_BUNDLE_DIR}/platforms/android-23/arch-arm64 -gcc-toolchain ${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/&quot;
  959. ## Compile
  960. make TARGET=ARMV8 ONLY_CBLAS=1 AR=ar CC=&quot;clang ${CLANG_FLAGS}&quot; HOSTCC=gcc -j4
  961. </code></pre></div>
  962. Note: Using TARGET=CORTEXA57 in place of ARMV8 will pick up better optimized routines. Implementations for CORTEXA57 target is compatible with all other armv8 targets.</p>
  963. <p>Note: For NDK 23b, something as simple as
  964. <div class="highlight"><pre><span></span><code>export PATH=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/:$PATH
  965. make HOSTCC=gcc CC=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang ONLY_CBLAS=1 TARGET=ARMV8
  966. </code></pre></div>
  967. appears to be sufficient on Linux.</p>
  968. <h4 id="alternative-script-which-was-tested-on-osx-with-ndk2136528147">Alternative script which was tested on OSX with NDK(21.3.6528147)</h4>
  969. <p>This script will build openblas for 3 architecture (ARMV7,ARMV8,X86) and put them with <code>sudo make install</code> to <code>/opt/OpenBLAS/lib</code>
  970. <div class="highlight"><pre><span></span><code>export NDK=YOUR_PATH_TO_SDK/Android/sdk/ndk/21.3.6528147
  971. export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64
  972. make clean
  973. make \
  974. TARGET=ARMV7 \
  975. ONLY_CBLAS=1 \
  976. CC=&quot;$TOOLCHAIN&quot;/bin/armv7a-linux-androideabi21-clang \
  977. AR=&quot;$TOOLCHAIN&quot;/bin/arm-linux-androideabi-ar \
  978. HOSTCC=gcc \
  979. ARM_SOFTFP_ABI=1 \
  980. -j4
  981. sudo make install
  982. make clean
  983. make \
  984. TARGET=CORTEXA57 \
  985. ONLY_CBLAS=1 \
  986. CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang \
  987. AR=$TOOLCHAIN/bin/aarch64-linux-android-ar \
  988. HOSTCC=gcc \
  989. -j4
  990. sudo make install
  991. make clean
  992. make \
  993. TARGET=ATOM \
  994. ONLY_CBLAS=1 \
  995. CC=&quot;$TOOLCHAIN&quot;/bin/i686-linux-android21-clang \
  996. AR=&quot;$TOOLCHAIN&quot;/bin/i686-linux-android-ar \
  997. HOSTCC=gcc \
  998. ARM_SOFTFP_ABI=1 \
  999. -j4
  1000. sudo make install
  1001. ## This will build for x86_64
  1002. make clean
  1003. make \
  1004. TARGET=ATOM BINARY=64\
  1005. ONLY_CBLAS=1 \
  1006. CC=&quot;$TOOLCHAIN&quot;/bin/x86_64-linux-android21-clang \
  1007. AR=&quot;$TOOLCHAIN&quot;/bin/x86_64-linux-android-ar \
  1008. HOSTCC=gcc \
  1009. ARM_SOFTFP_ABI=1 \
  1010. -j4
  1011. sudo make install
  1012. </code></pre></div>
  1013. Also you can find full list of target architectures in <a href="https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt">TargetsList.txt</a></p>
  1014. <hr />
  1015. <p>anything below this line should be irrelevant nowadays unless you need to perform software archeology</p>
  1016. <hr />
  1017. <h4 id="building-openblas-with-very-old-gcc-based-versions-of-the-ndk-without-fortran">Building OpenBLAS with very old gcc-based versions of the NDK, without Fortran</h4>
  1018. <p>The prebuilt Android NDK toolchains do not include Fortran, hence parts like LAPACK cannot be built. You can still build OpenBLAS without it. For instructions on how to build OpenBLAS with Fortran, see the <a href="#building-openblas-with-fortran">next section</a>.</p>
  1019. <p>To use easily the prebuilt toolchains, follow <a href="http://developer.android.com/ndk/guides/standalone_toolchain.html">building a standalone toolchain</a> for your desired architecture.
  1020. This would be <code>arm-linux-androideabi-gcc-4.9</code> for ARMV7 and <code>aarch64-linux-android-gcc-4.9</code> for ARMV8.</p>
  1021. <p>You can build OpenBLAS (0.2.19 and earlier) with:
  1022. <div class="highlight"><pre><span></span><code>## Add the toolchain to your path
  1023. export PATH=/path/to/standalone-toolchain/bin:$PATH
  1024. ## Build without Fortran for ARMV7
  1025. make TARGET=ARMV7 HOSTCC=gcc CC=arm-linux-androideabi-gcc NOFORTRAN=1 libs
  1026. ## Build without Fortran for ARMV8
  1027. make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc NOFORTRAN=1 libs
  1028. </code></pre></div></p>
  1029. <p>Since we are cross-compiling, we make the <code>libs</code> recipe, not <code>all</code>. Otherwise you will get errors when trying to link/run tests as versions up to and including 0.2.19 cannot build a shared library for Android. </p>
  1030. <p>From 0.2.20 on, you should leave off the "libs" to get a full build, and you may want to use the softfp ABI instead of the deprecated hardfp one on ARMV7 so you would use
  1031. <div class="highlight"><pre><span></span><code>## Add the toolchain to your path
  1032. export PATH=/path/to/standalone-toolchain/bin:$PATH
  1033. ## Build without Fortran for ARMV7
  1034. make TARGET=ARMV7 ARM_SOFTFP_ABI=1 HOSTCC=gcc CC=arm-linux-androideabi-gcc NOFORTRAN=1
  1035. ## Build without Fortran for ARMV8
  1036. make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc NOFORTRAN=1
  1037. </code></pre></div></p>
  1038. <p>If you get an error about stdio.h not being found, you need to specify your sysroot in the CFLAGS argument to <code>make</code> like
  1039. <code>CFLAGS=--sysroot=$NDK/platforms/android-16/arch-arm</code>
  1040. When you are done, install OpenBLAS into the desired directory. Be sure to also use all command line options
  1041. here that you specified for building, otherwise errors may occur as it tries to install things you did not build:
  1042. <div class="highlight"><pre><span></span><code>make PREFIX=/path/to/install-dir TARGET=... install
  1043. </code></pre></div></p>
  1044. <h4 id="building-openblas-with-fortran">Building OpenBLAS with Fortran</h4>
  1045. <p>Instructions on how to build the GNU toolchains with Fortran can be found <a href="https://github.com/buffer51/android-gfortran">here</a>. The <a href="https://github.com/buffer51/android-gfortran/releases">Releases section</a> provides prebuilt versions, use the standalone one.</p>
  1046. <p>You can build OpenBLAS with:
  1047. <div class="highlight"><pre><span></span><code>## Add the toolchain to your path
  1048. export PATH=/path/to/standalone-toolchain-with-fortran/bin:$PATH
  1049. ## Build with Fortran for ARMV7
  1050. make TARGET=ARMV7 HOSTCC=gcc CC=arm-linux-androideabi-gcc FC=arm-linux-androideabi-gfortran libs
  1051. ## Build with LAPACK for ARMV8
  1052. make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc FC=aarch64-linux-android-gfortran libs
  1053. </code></pre></div></p>
  1054. <p>As mentioned above you can leave off the <code>libs</code> argument here when building 0.2.20 and later, and you may want to add ARM_SOFTFP_ABI=1 when building for ARMV7.</p>
  1055. <h4 id="linking-openblas-0219-and-earlier-for-armv7">Linking OpenBLAS (0.2.19 and earlier) for ARMV7</h4>
  1056. <p>If you are using <code>ndk-build</code>, you need to set the ABI to hard floating points in your Application.mk:
  1057. <div class="highlight"><pre><span></span><code>APP_ABI := armeabi-v7a-hard
  1058. </code></pre></div></p>
  1059. <p>This will set the appropriate flags for you. If you are not using <code>ndk-build</code>, you will want to add the following flags:
  1060. <div class="highlight"><pre><span></span><code>TARGET_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
  1061. TARGET_LDFLAGS += -Wl,--no-warn-mismatch -lm_hard
  1062. </code></pre></div></p>
  1063. <p>From 0.2.20 on, it is also possible to build for the softfp ABI by specifying ARM_SOFTFP_ABI=1 during the build.
  1064. In that case, also make sure that all your dependencies are compiled with -mfloat-abi=softfp as well, as mixing
  1065. "hard" and "soft" floating point ABIs in a program will make it crash.</p>
  1066. <h3 id="iphoneios">iPhone/iOS</h3>
  1067. <p>As none of the current developers uses iOS, the following instructions are what was found to work in our Azure CI setup, but as far as we know this builds a fully working OpenBLAS for this platform.</p>
  1068. <p>Go to the directory where you unpacked OpenBLAS,and enter the following commands:
  1069. <div class="highlight"><pre><span></span><code> CC=/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  1070. CFLAGS= -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -arch arm64 -miphoneos-version-min=10.0
  1071. make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
  1072. </code></pre></div>
  1073. Adjust MIN_IOS_VERSION as necessary for your installation, e.g. change the version number
  1074. to the minimum iOS version you want to target and execute this file to build the library.</p>
  1075. <h3 id="mips">MIPS</h3>
  1076. <p>For mips targets you will need latest toolchains
  1077. P5600 - MTI GNU/Linux Toolchain
  1078. I6400, P6600 - IMG GNU/Linux Toolchain</p>
  1079. <p>The download link is below
  1080. (http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html)</p>
  1081. <p>You can use following commandlines for builds</p>
  1082. <pre><code>IMG_TOOLCHAIN_DIR={full IMG GNU/Linux Toolchain path including "bin" directory -- for example, /opt/linux_toolchain/bin}
  1083. IMG_GCC_PREFIX=mips-img-linux-gnu
  1084. IMG_TOOLCHAIN=${IMG_TOOLCHAIN_DIR}/${IMG_GCC_PREFIX}
  1085. I6400 Build (n32):
  1086. make BINARY=32 BINARY32=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL -mabi=n32" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=I6400
  1087. I6400 Build (n64):
  1088. make BINARY=64 BINARY64=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=I6400
  1089. P6600 Build (n32):
  1090. make BINARY=32 BINARY32=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL -mabi=n32" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=P6600
  1091. P6600 Build (n64):
  1092. make BINARY=64 BINARY64=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" TARGET=P6600
  1093. MTI_TOOLCHAIN_DIR={full MTI GNU/Linux Toolchain path including "bin" directory -- for example, /opt/linux_toolchain/bin}
  1094. MTI_GCC_PREFIX=mips-mti-linux-gnu
  1095. MTI_TOOLCHAIN=${IMG_TOOLCHAIN_DIR}/${IMG_GCC_PREFIX}
  1096. P5600 Build:
  1097. make BINARY=32 BINARY32=1 CC=$MTI_TOOLCHAIN-gcc AR=$MTI_TOOLCHAIN-ar FC="$MTI_TOOLCHAIN-gfortran -EL" RANLIB=$MTI_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=P5600
  1098. </code></pre>
  1099. <h3 id="freebsd">FreeBSD</h3>
  1100. <p>You will need to install the following tools from the FreeBSD ports tree:
  1101. * lang/gcc [1]
  1102. * lang/perl5.12
  1103. * ftp/curl
  1104. * devel/gmake
  1105. * devel/patch</p>
  1106. <p>To compile run the command:</p>
  1107. <pre><code>$ gmake CC=gcc46 FC=gfortran46
  1108. </code></pre>
  1109. <p>Note that you need to build with GNU make and manually specify the compiler, otherwhise gcc 4.2 from the base system would be used.</p>
  1110. <p>[1]: <a href="http://www.bsdunix.ch/serendipity/index.php?/archives/345-Removal-of-Fortran-from-the-FreeBSD-base-system.html">Removal of Fortran from the FreeBSD base system</a></p>
  1111. <div class="highlight"><pre><span></span><code>pkg install openblas
  1112. </code></pre></div>
  1113. <p>see <a href="https://www.freebsd.org/ports/index.html">https://www.freebsd.org/ports/index.html</a></p>
  1114. <h3 id="cortex-m">Cortex-M</h3>
  1115. <p>Cortex-M is a widely used microcontroller that is present in a variety of industrial and consumer electronics.
  1116. A common variant of the Cortex-M is the STM32F4xx series. Here, we will give instructions for building for
  1117. the STM32F4xx.</p>
  1118. <p>First, install the embedded arm gcc compiler from the arm website. Then, create the following toolchain file and build as follows.</p>
  1119. <div class="highlight"><pre><span></span><code><span class="c"># cmake .. -G Ninja -DCMAKE_C_COMPILER=arm-none-eabi-gcc -DCMAKE_TOOLCHAIN_FILE:PATH=&quot;toolchain.cmake&quot; -DNOFORTRAN=1 -DTARGET=ARMV5 -DEMBEDDED=1</span>
  1120. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_SYSTEM_NAME</span><span class="w"> </span><span class="s">Generic</span><span class="p">)</span>
  1121. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_SYSTEM_PROCESSOR</span><span class="w"> </span><span class="s">arm</span><span class="p">)</span>
  1122. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_C_COMPILER</span><span class="w"> </span><span class="s2">&quot;arm-none-eabi-gcc.exe&quot;</span><span class="p">)</span>
  1123. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_CXX_COMPILER</span><span class="w"> </span><span class="s2">&quot;arm-none-eabi-g++.exe&quot;</span><span class="p">)</span>
  1124. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_EXE_LINKER_FLAGS</span><span class="w"> </span><span class="s2">&quot;--specs=nosys.specs&quot;</span><span class="w"> </span><span class="s">CACHE</span><span class="w"> </span><span class="s">INTERNAL</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">)</span>
  1125. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_PROGRAM</span><span class="w"> </span><span class="s">NEVER</span><span class="p">)</span>
  1126. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_LIBRARY</span><span class="w"> </span><span class="s">ONLY</span><span class="p">)</span>
  1127. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_INCLUDE</span><span class="w"> </span><span class="s">ONLY</span><span class="p">)</span>
  1128. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_PACKAGE</span><span class="w"> </span><span class="s">ONLY</span><span class="p">)</span>
  1129. </code></pre></div>
  1130. <p>In your embedded application, the following functions need to be provided for OpenBLAS to work correctly:</p>
  1131. <div class="highlight"><pre><span></span><code><span class="kt">void</span><span class="w"> </span><span class="nf">free</span><span class="p">(</span><span class="kt">void</span><span class="o">*</span><span class="w"> </span><span class="n">ptr</span><span class="p">);</span>
  1132. <span class="kt">void</span><span class="o">*</span><span class="w"> </span><span class="nf">malloc</span><span class="p">(</span><span class="kt">size_t</span><span class="w"> </span><span class="n">size</span><span class="p">);</span>
  1133. </code></pre></div>
  1134. <div class="admonition note">
  1135. <p class="admonition-title">Note</p>
  1136. <p>If you are developing for an embedded platform, it is your responsibility to make sure that the device has sufficient memory for malloc calls. <a href="https://github.com/embeddedartistry/libmemory">Libmemory</a> provides one implementation of malloc for embedded platforms.</p>
  1137. </div>
  1138. <aside class="md-source-file">
  1139. <span class="md-source-file__fact">
  1140. <span class="md-icon" title="Last update">
  1141. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
  1142. </span>
  1143. <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 12, 2024</span>
  1144. </span>
  1145. <span class="md-source-file__fact">
  1146. <span class="md-icon" title="Created">
  1147. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.47 15.08 11 13V7h1.5v5.25l3.08 1.83c-.41.28-.79.62-1.11 1m-1.39 4.84c-.36.05-.71.08-1.08.08-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8c0 .37-.03.72-.08 1.08.69.1 1.33.32 1.92.64.1-.56.16-1.13.16-1.72 0-5.5-4.5-10-10-10S2 6.5 2 12s4.47 10 10 10c.59 0 1.16-.06 1.72-.16-.32-.59-.54-1.23-.64-1.92M18 15v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"/></svg>
  1148. </span>
  1149. <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 4, 2023</span>
  1150. </span>
  1151. </aside>
  1152. </article>
  1153. </div>
  1154. <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
  1155. </div>
  1156. </main>
  1157. <footer class="md-footer">
  1158. <div class="md-footer-meta md-typeset">
  1159. <div class="md-footer-meta__inner md-grid">
  1160. <div class="md-copyright">
  1161. <div class="md-copyright__highlight">
  1162. Copyright &copy; 2012- OpenBLAS contributors
  1163. </div>
  1164. Made with
  1165. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  1166. Material for MkDocs
  1167. </a>
  1168. </div>
  1169. <div class="md-social">
  1170. <a href="https://github.com/OpenMathLib/OpenBLAS" target="_blank" rel="noopener" title="github.com" class="md-social__link">
  1171. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
  1172. </a>
  1173. <a href="https://github.com/OpenMathLib/OpenBLAS/LICENSE" target="_blank" rel="noopener" title="github.com" class="md-social__link">
  1174. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 10a3.04 3.04 0 0 1 3-3 3.04 3.04 0 0 1 3 3 3.04 3.04 0 0 1-3 3 3.04 3.04 0 0 1-3-3m3 9 4 1v-3.08A7.54 7.54 0 0 1 12 18a7.54 7.54 0 0 1-4-1.08V20m4-16a5.78 5.78 0 0 0-4.24 1.74A5.78 5.78 0 0 0 6 10a5.78 5.78 0 0 0 1.76 4.23A5.78 5.78 0 0 0 12 16a5.78 5.78 0 0 0 4.24-1.77A5.78 5.78 0 0 0 18 10a5.78 5.78 0 0 0-1.76-4.26A5.78 5.78 0 0 0 12 4m8 6a8.04 8.04 0 0 1-.57 2.8A7.84 7.84 0 0 1 18 15.28V23l-6-2-6 2v-7.72A7.9 7.9 0 0 1 4 10a7.68 7.68 0 0 1 2.33-5.64A7.73 7.73 0 0 1 12 2a7.73 7.73 0 0 1 5.67 2.36A7.68 7.68 0 0 1 20 10Z"/></svg>
  1175. </a>
  1176. </div>
  1177. </div>
  1178. </div>
  1179. </footer>
  1180. </div>
  1181. <div class="md-dialog" data-md-component="dialog">
  1182. <div class="md-dialog__inner md-typeset"></div>
  1183. </div>
  1184. <script id="__config" type="application/json">{"base": "..", "features": ["header.autohide"], "search": "../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
  1185. <script src="../assets/javascripts/bundle.fe8b6f2b.min.js"></script>
  1186. </body>
  1187. </html>

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.