|
-
- <!DOCTYPE html>
-
- <html class="no-js" lang="en">
- <head>
- <meta charset="utf-8"/>
- <meta content="width=device-width,initial-scale=1" name="viewport"/>
- <link href="https://openblas.net/docs/build_system/" rel="canonical"/>
- <link href="../developers/" rel="prev"/>
- <link href="../runtime_variables/" rel="next"/>
- <link href="../logo.svg" rel="icon"/>
- <meta content="mkdocs-1.6.1, mkdocs-material-9.5.50" name="generator"/>
- <title>Build system - OpenBLAS</title>
- <link href="../assets/stylesheets/main.a40c8224.min.css" rel="stylesheet"/>
- <link href="../assets/stylesheets/palette.06af60db.min.css" rel="stylesheet"/>
- <link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback" rel="stylesheet"/>
- <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
- <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>
- </head>
- <body data-md-color-accent="indigo" data-md-color-primary="blue-grey" data-md-color-scheme="slate" dir="ltr">
- <input autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
- <input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
- <label class="md-overlay" for="__drawer"></label>
- <div data-md-component="skip">
- <a class="md-skip" href="#makefile-dependency-graph">
- Skip to content
- </a>
- </div>
- <div data-md-component="announce">
- </div>
- <header class="md-header md-header--shadow" data-md-component="header">
- <nav aria-label="Header" class="md-header__inner md-grid">
- <a aria-label="OpenBLAS" class="md-header__button md-logo" data-md-component="logo" href=".." title="OpenBLAS">
- <img alt="logo" src="../logo.svg"/>
- </a>
- <label class="md-header__button md-icon" for="__drawer">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"></path></svg>
- </label>
- <div class="md-header__title" data-md-component="header-title">
- <div class="md-header__ellipsis">
- <div class="md-header__topic">
- <span class="md-ellipsis">
- OpenBLAS
- </span>
- </div>
- <div class="md-header__topic" data-md-component="header-topic">
- <span class="md-ellipsis">
-
- Build system
-
- </span>
- </div>
- </div>
- </div>
- <form class="md-header__option" data-md-component="palette">
- <input aria-label="Switch to light mode" class="md-option" data-md-color-accent="indigo" data-md-color-media="" data-md-color-primary="blue-grey" data-md-color-scheme="slate" id="__palette_0" name="__palette" type="radio"/>
- <label class="md-header__button md-icon" for="__palette_1" hidden="" title="Switch to light mode">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-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 12z"></path></svg>
- </label>
- <input aria-label="Switch to dark mode" class="md-option" data-md-color-accent="indigo" data-md-color-media="" data-md-color-primary="blue-grey" data-md-color-scheme="default" id="__palette_1" name="__palette" type="radio"/>
- <label class="md-header__button md-icon" for="__palette_0" hidden="" title="Switch to dark mode">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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 12z"></path></svg>
- </label>
- </form>
- <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var 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(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
- <label class="md-header__button md-icon" for="__search">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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.52 6.52 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 5"></path></svg>
- </label>
- <div class="md-search" data-md-component="search" role="dialog">
- <label class="md-search__overlay" for="__search"></label>
- <div class="md-search__inner" role="search">
- <form class="md-search__form" name="search">
- <input aria-label="Search" autocapitalize="off" autocomplete="off" autocorrect="off" class="md-search__input" data-md-component="search-query" name="query" placeholder="Search" required="" spellcheck="false" type="text"/>
- <label class="md-search__icon md-icon" for="__search">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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.52 6.52 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 5"></path></svg>
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"></path></svg>
- </label>
- <nav aria-label="Search" class="md-search__options">
- <button aria-label="Clear" class="md-search__icon md-icon" tabindex="-1" title="Clear" type="reset">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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 12z"></path></svg>
- </button>
- </nav>
- </form>
- <div class="md-search__output">
- <div class="md-search__scrollwrap" data-md-scrollfix="" tabindex="0">
- <div class="md-search-result" data-md-component="search-result">
- <div class="md-search-result__meta">
- Initializing search
- </div>
- <ol class="md-search-result__list" role="presentation"></ol>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="md-header__source">
- <a class="md-source" data-md-component="source" href="https://github.com/OpenMathLib/OpenBLAS" title="Go to repository">
- <div class="md-source__icon md-icon">
- <svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.7.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.81"></path></svg>
- </div>
- <div class="md-source__repository">
- GitHub
- </div>
- </a>
- </div>
- </nav>
- </header>
- <div class="md-container" data-md-component="container">
- <main class="md-main" data-md-component="main">
- <div class="md-main__inner md-grid">
- <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation">
- <div class="md-sidebar__scrollwrap">
- <div class="md-sidebar__inner">
- <nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
- <label class="md-nav__title" for="__drawer">
- <a aria-label="OpenBLAS" class="md-nav__button md-logo" data-md-component="logo" href=".." title="OpenBLAS">
- <img alt="logo" src="../logo.svg"/>
- </a>
- OpenBLAS
- </label>
- <div class="md-nav__source">
- <a class="md-source" data-md-component="source" href="https://github.com/OpenMathLib/OpenBLAS" title="Go to repository">
- <div class="md-source__icon md-icon">
- <svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.7.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.81"></path></svg>
- </div>
- <div class="md-source__repository">
- GitHub
- </div>
- </a>
- </div>
- <ul class="md-nav__list" data-md-scrollfix="">
- <li class="md-nav__item">
- <a class="md-nav__link" href="..">
- <span class="md-ellipsis">
- Home
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../install/">
- <span class="md-ellipsis">
- Install OpenBLAS
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../user_manual/">
- <span class="md-ellipsis">
- User manual
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../extensions/">
- <span class="md-ellipsis">
- Extensions
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../developers/">
- <span class="md-ellipsis">
- Developer manual
- </span>
- </a>
- </li>
- <li class="md-nav__item md-nav__item--active">
- <input class="md-nav__toggle md-toggle" id="__toc" type="checkbox"/>
- <label class="md-nav__link md-nav__link--active" for="__toc">
- <span class="md-ellipsis">
- Build system
- </span>
- <span class="md-nav__icon md-icon"></span>
- </label>
- <a class="md-nav__link md-nav__link--active" href="./">
- <span class="md-ellipsis">
- Build system
- </span>
- </a>
- <nav aria-label="Table of contents" class="md-nav md-nav--secondary">
- <label class="md-nav__title" for="__toc">
- <span class="md-nav__icon md-icon"></span>
- Table of contents
- </label>
- <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
- <li class="md-nav__item">
- <a class="md-nav__link" href="#makefile-dependency-graph">
- <span class="md-ellipsis">
- Makefile dependency graph
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#important-variables">
- <span class="md-ellipsis">
- Important Variables
- </span>
- </a>
- <nav aria-label="Important Variables" class="md-nav">
- <ul class="md-nav__list">
- <li class="md-nav__item">
- <a class="md-nav__link" href="#cpu-related">
- <span class="md-ellipsis">
- CPU related
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#toolchain-related">
- <span class="md-ellipsis">
- Toolchain related
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#library-related">
- <span class="md-ellipsis">
- Library related
- </span>
- </a>
- <nav aria-label="Library related" class="md-nav">
- <ul class="md-nav__list">
- <li class="md-nav__item">
- <a class="md-nav__link" href="#library-kind-and-bitness-options">
- <span class="md-ellipsis">
- Library kind and bitness options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#data-type-options">
- <span class="md-ellipsis">
- Data type options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#threading-options">
- <span class="md-ellipsis">
- Threading options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#library-and-symbol-name-options">
- <span class="md-ellipsis">
- Library and symbol name options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#blas-and-lapack-options">
- <span class="md-ellipsis">
- BLAS and LAPACK options
- </span>
- </a>
- </li>
- </ul>
- </nav>
- </li>
- </ul>
- </nav>
- </li>
- </ul>
- </nav>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../runtime_variables/">
- <span class="md-ellipsis">
- Runtime variables
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../distributing/">
- <span class="md-ellipsis">
- Redistributing OpenBLAS
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../ci/">
- <span class="md-ellipsis">
- CI jobs
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../about/">
- <span class="md-ellipsis">
- About
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="../faq/">
- <span class="md-ellipsis">
- FAQ
- </span>
- </a>
- </li>
- </ul>
- </nav>
- </div>
- </div>
- </div>
- <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc">
- <div class="md-sidebar__scrollwrap">
- <div class="md-sidebar__inner">
- <nav aria-label="Table of contents" class="md-nav md-nav--secondary">
- <label class="md-nav__title" for="__toc">
- <span class="md-nav__icon md-icon"></span>
- Table of contents
- </label>
- <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
- <li class="md-nav__item">
- <a class="md-nav__link" href="#makefile-dependency-graph">
- <span class="md-ellipsis">
- Makefile dependency graph
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#important-variables">
- <span class="md-ellipsis">
- Important Variables
- </span>
- </a>
- <nav aria-label="Important Variables" class="md-nav">
- <ul class="md-nav__list">
- <li class="md-nav__item">
- <a class="md-nav__link" href="#cpu-related">
- <span class="md-ellipsis">
- CPU related
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#toolchain-related">
- <span class="md-ellipsis">
- Toolchain related
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#library-related">
- <span class="md-ellipsis">
- Library related
- </span>
- </a>
- <nav aria-label="Library related" class="md-nav">
- <ul class="md-nav__list">
- <li class="md-nav__item">
- <a class="md-nav__link" href="#library-kind-and-bitness-options">
- <span class="md-ellipsis">
- Library kind and bitness options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#data-type-options">
- <span class="md-ellipsis">
- Data type options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#threading-options">
- <span class="md-ellipsis">
- Threading options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#library-and-symbol-name-options">
- <span class="md-ellipsis">
- Library and symbol name options
- </span>
- </a>
- </li>
- <li class="md-nav__item">
- <a class="md-nav__link" href="#blas-and-lapack-options">
- <span class="md-ellipsis">
- BLAS and LAPACK options
- </span>
- </a>
- </li>
- </ul>
- </nav>
- </li>
- </ul>
- </nav>
- </li>
- </ul>
- </nav>
- </div>
- </div>
- </div>
- <div class="md-content" data-md-component="content">
- <article class="md-content__inner md-typeset">
- <h1>Build system</h1>
- <div class="admonition info">
- <p class="admonition-title">Supported build systems</p>
- <p>This page describes the Make-based build, which is the
- default/authoritative build method. Note that the OpenBLAS repository also
- supports building with CMake (not described here) - that generally works
- and is tested, however there may be small differences between the Make and
- CMake builds.</p>
- </div>
- <h2 id="makefile-dependency-graph">Makefile dependency graph</h2>
- <!---
- An easy way to update this diagram is to copy it into https://mermaid.live
- and edit it interactively.
- -->
- <pre class="mermaid"><code>flowchart LR
- A[Makefile] -->|included by many of the Makefiles in the subdirectories!| B(Makefile.system)
- B -->|triggered, not included, once by Makefile.system, and runs before any of the actual library code is built. builds and runs the 'getarch' tool for cpu identification, runs the compiler detection scripts c_check/f_check| C{Makefile.prebuild}
- C -->|either this or Makefile_kernel.conf is generated| D[Makefile.conf]
- C -->|temporary Makefile.conf during DYNAMIC_ARCH builds| E[Makefile_kernel.conf]
- B -->|defaults for build options that can be given on the make command line| F[Makefile.rule]
- B -->|architecture-specific compiler options and OpenBLAS buffer size values| G[Makefile.$ARCH]
- A --> exports
- A -->|directories: test, ctest, utest, cpp_thread_test| H(test directories)
- A --> I($BLASDIRS)
- I --> interface
- I --> driver/level2
- I --> driver/level3
- I --> driver/others
- A -->|for each target in DYNAMIC_CORE if DYNAMIC_ARCH=1| kernel
- A -->|subdirs: timing, testing, testing/EIG, testing/LIN| J($NETLIB_LAPACK_DIR)
- A --> relapack
- </code></pre>
- <h2 id="important-variables">Important Variables</h2>
- <p>Most of the tunable variables are found in
- <a href="https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule">Makefile.rule</a>,
- along with their detailed descriptions.</p>
- <p>Most of the variables are detected automatically in
- <a href="https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild">Makefile.prebuild</a>,
- if they are not set in the environment.</p>
- <p>The most commonly used variables are documented below. There are more options
- though - please read the linked Makefiles if you want to see all variables.</p>
- <h3 id="cpu-related">CPU related</h3>
- <ul>
- <li><code>ARCH</code>: target architecture (e.g., <code>x86-64</code>).</li>
- <li><code>DYNAMIC_ARCH</code>: For building library for multiple <code>TARGET</code>s (does not lose any
- optimizations, but increases library size).</li>
- <li><code>DYNAMIC_LIST</code>: optional user-provided subset of the <code>DYNAMIC_CORE</code> list in
- <a href="https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.system">Makefile.system</a>.</li>
- <li><code>TARGET</code>: target CPU architecture. In case of <code>DYNAMIC_ARCH=1</code>, it means that
- the library will not be usable on less capable CPUs.</li>
- <li><code>TARGET_CORE</code>: override <code>TARGET</code> internally during each CPU-specific cycle of
- the build for <code>DYNAMIC_ARCH</code>.</li>
- </ul>
- <h3 id="toolchain-related">Toolchain related</h3>
- <ul>
- <li><code>CC</code>: <code>TARGET</code> C compiler used for compilation (can be cross-toolchains).</li>
- <li><code>FC</code>: <code>TARGET</code> Fortran compiler used for compilation (can be cross-toolchains,
- set <code>NOFORTRAN=1</code> if the used cross-toolchain has no Fortran compiler).</li>
- <li><code>COMMON_OPT</code>: flags to add to all invocations of the target C and Fortran compilers
- (overrides <code>CFLAGS</code>/<code>FFLAGS</code> - prefer using <code>COMMON_OPT</code>)</li>
- <li><code>CCOMMON_OPT</code>: flags to add to all invocations of the target C compiler
- (overrides <code>CFLAGS</code>)</li>
- <li><code>FCOMMON_OPT</code>: flags to add to all invocations of the target Fortran compiler
- (overrides <code>FFLAGS</code>)</li>
- <li><code>LDFLAGS</code>: flags to add to all target linker invocations</li>
- <li><code>AR</code>, <code>AS</code>, <code>LD</code>, <code>RANLIB</code>: <code>TARGET</code> toolchain helpers used for compilation
- (can be cross-toolchains).</li>
- <li><code>HOSTCC</code>: compiler of build machine, needed to create proper config files for
- the target architecture.</li>
- <li><code>HOST_CFLAGS</code>: flags for the build machine compiler.</li>
- </ul>
- <h3 id="library-related">Library related</h3>
- <h4 id="library-kind-and-bitness-options">Library kind and bitness options</h4>
- <ul>
- <li><code>BINARY</code>: whether to build a 32-bit or 64-bit library (default is <code>64</code>, set
- to <code>32</code> on a 32-bit platform).</li>
- <li><code>INTERFACE64</code>: build with 64-bit (ILP64) integer representations to support
- large array index values (incompatible with the standard 32-bit integer (LP64) API).</li>
- <li><code>NO_STATIC</code>: if set to <code>1</code>, don't build a static library (default is <code>0</code>)</li>
- <li><code>NO_SHARED</code>: if set to <code>1</code>, don't build a shared library (default is <code>0</code>)</li>
- </ul>
- <h4 id="data-type-options">Data type options</h4>
- <ul>
- <li><code>BUILD_SINGLE</code>: build the single-precision real functions of BLAS and (if
- it's built) LAPACK</li>
- <li><code>BUILD_DOUBLE</code>: build the double-precision real functions</li>
- <li><code>BUILD_COMPLEX</code>: build the single-precision complex functions</li>
- <li><code>BUILD_COMPLEX16</code>: build the double-precision complex functions</li>
- <li><code>BUILD_BFLOAT16</code>: build the "half precision brainfloat" real functions </li>
- <li><code>EXPRECISION</code>: (do not use, this is a work in progress) option to use <code>long
- double</code> functions</li>
- </ul>
- <p>By default, the single- and double-precision real and complex floating-point
- functions are included in the build, while the half- and extended-precision
- functions are not.</p>
- <h4 id="threading-options">Threading options</h4>
- <ul>
- <li><code>USE_THREAD</code>: Use a multithreading backend (defaults to <code>pthreads</code>).</li>
- <li><code>USE_LOCKING</code>: implement locking for thread safety even when <code>USE_THREAD</code> is
- not set (so that the single-threaded library can safely be called from
- multithreaded programs).</li>
- <li><code>USE_OPENMP</code>: Use OpenMP as multithreading backend</li>
- <li><code>NUM_THREADS</code>: define this to the maximum number of parallel threads you
- expect to need (defaults to the number of cores in the build CPU).</li>
- <li><code>NUM_PARALLEL</code>: define this to the number of OpenMP instances that your code
- may use for parallel calls into OpenBLAS (the default is <code>1</code>, see below).</li>
- </ul>
- <p>OpenBLAS uses a fixed set of memory buffers internally, used for communicating
- and compiling partial results from individual threads. For efficiency, the
- management array structure for these buffers is sized at build time - this
- makes it necessary to know in advance how many threads need to be supported on
- the target system(s).</p>
- <p>With OpenMP, there is an additional level of complexity as there may be calls
- originating from a parallel region in the calling program. If OpenBLAS gets
- called from a single parallel region, it runs single-threaded automatically to
- avoid overloading the system by fanning out its own set of threads. In the case
- that an OpenMP program makes multiple calls from independent regions or
- instances in parallel, this default serialization is not sufficient as the
- additional caller(s) would compete for the original set of buffers already in
- use by the first call. So if multiple OpenMP runtimes call into OpenBLAS at the
- same time, then only one of them will be able to make progress while all the
- rest of them spin-wait for the one available buffer. Setting <code>NUM_PARALLEL</code> to
- the upper bound on the number of OpenMP runtimes that you can have in a process
- ensures that there are a sufficient number of buffer sets available.</p>
- <h4 id="library-and-symbol-name-options">Library and symbol name options</h4>
- <ul>
- <li><code>FIXED_LIBNAME</code>: if set to <code>1</code>, uses a non-versioned name for the library and
- no symbolic linking to variant names (default is <code>0</code>)</li>
- <li><code>LIBNAMEPREFIX</code>: prefix that, if given, will be inserted in the library name
- before <code>openblas</code> (e.g., <code>xxx</code> will result in <code>libxxxopenblas.so</code>)</li>
- <li><code>LIBNAMESUFFIX</code>: suffix that, if given, will be inserted in the library name
- after <code>openblas</code>, separated by an underscore (e.g., <code>yyy</code> will result in
- <code>libopenblas_yyy.so</code>)</li>
- <li><code>SYMBOLPREFIX</code>: prefix that, if given, will be added to all symbol names
- <em>and</em> to the library name</li>
- <li><code>SYMBOLSUFFIX</code>: suffix that, if given, will be added to all symbol names
- <em>and</em> to the library name</li>
- </ul>
- <h4 id="blas-and-lapack-options">BLAS and LAPACK options</h4>
- <p>By default, the Fortran and C interfaces to BLAS and LAPACK are built,
- including deprecated functions, while
- <a href="https://github.com/HPAC/ReLAPACK">ReLAPACK</a> is not.</p>
- <ul>
- <li><code>NO_CBLAS</code>: if set to <code>1</code>, don't build the CBLAS interface (default is <code>0</code>)</li>
- <li><code>ONLY_CBLAS</code>: if set to <code>1</code>, only build the CBLAS interface (default is <code>0</code>)</li>
- <li><code>NO_LAPACK</code>: if set to <code>1</code>, don't build LAPACK (default is <code>0</code>)</li>
- <li><code>NO_LAPACKE</code>: if set to <code>1</code>, don't build the LAPACKE interface (default is <code>0</code>)</li>
- <li><code>BUILD_LAPACK_DEPRECATED</code>: if set to <code>0</code>, don't build deprecated LAPACK
- functions (default is <code>1</code>)</li>
- <li><code>BUILD_RELAPACK</code>: if set to <code>1</code>, build Recursive LAPACK on top of LAPACK
- (default is <code>0</code>)</li>
- </ul>
- <aside class="md-source-file">
- <span class="md-source-file__fact">
- <span class="md-icon" title="Last update">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 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.2z"></path></svg>
- </span>
- <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">January 4, 2025</span>
- </span>
- <span class="md-source-file__fact">
- <span class="md-icon" title="Created">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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-3z"></path></svg>
- </span>
- <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 4, 2023</span>
- </span>
- </aside>
- </article>
- </div>
- <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
- </div>
- </main>
- <footer class="md-footer">
- <div class="md-footer-meta md-typeset">
- <div class="md-footer-meta__inner md-grid">
- <div class="md-copyright">
- <div class="md-copyright__highlight">
- Copyright © 2012- OpenBLAS contributors
- </div>
-
-
- Made with
- <a href="https://squidfunk.github.io/mkdocs-material/" rel="noopener" target="_blank">
- Material for MkDocs
- </a>
- </div>
- <div class="md-social">
- <a class="md-social__link" href="https://github.com/OpenMathLib/OpenBLAS" rel="noopener" target="_blank" title="github.com">
- <svg viewbox="0 0 496 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.7.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.6m-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.3m44.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.9M244.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 8M97.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-1m-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.7m32.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-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"></path></svg>
- </a>
- <a class="md-social__link" href="https://github.com/OpenMathLib/OpenBLAS/LICENSE" rel="noopener" target="_blank" title="github.com">
- <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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 8 0 0 1-.57 2.8A7.8 7.8 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 10"></path></svg>
- </a>
- </div>
- </div>
- </div>
- </footer>
- </div>
- <div class="md-dialog" data-md-component="dialog">
- <div class="md-dialog__inner md-typeset"></div>
- </div>
- <script id="__config" type="application/json">{"base": "..", "features": ["header.autohide"], "search": "../assets/javascripts/workers/search.f8cc74c7.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>
- <script src="../assets/javascripts/bundle.60a45f97.min.js"></script>
- <script type="module">import mermaid from "https://unpkg.com/mermaid@10.4.0/dist/mermaid.esm.min.mjs";
- window.mermaidConfig = {default: {
- startOnLoad: false
- }};</script></body>
- </html>
|