flexiblas(1)
β¨ flexiblas(1) β The FlexiBLAS Library β¨
hi bestie π you just opened the manual for flexiblas, aka the FlexiBLAS administration tool, from the FlexiBLAS Library. let's get into it π«Ά
πΈ NAME πΈ
flexiblas β the FlexiBLAS administration tool π
π SYNOPSIS π
flexiblas [options] command [command-options]
flexiblas64 [options] command [command-options]
π DESCRIPTION π
okay so. the flexiblas tool is a command line utility that ships with the FlexiBLAS library, and its whole job is configuring the global and the local flexiblasrc file β¨. its main purpose β the main character moment, if you will β is selecting the default BLAS backend used with FlexiBLAS, plus a bunch of other runtime specific options π.
FlexiBLAS looks in up to four locations to find its configuration: a system-wide configuration file, a per-user configuration file, a per-host configuration file, and one configuration file defined by an environment variable, FLEXIBLAS_CONFIG. these configuration files get evaluated in exactly that order, and a later loaded one overwrites the settings of a previously loaded one π. last one in wins, periodt.
the flexiblas64 tool is the same thing but for the 64-bit integer variant of FlexiBLAS π
.
and on top of all that, it can also be used to add or remove BLAS backends from the configuration files π.
π¦ Usage Examples π¦
if your applications are built against FlexiBLAS, there are several ways to pick which BLAS library is the active one. the installed (and known) BLAS backends can be listed via
flexiblas list
the default BLAS backend can be set using
flexiblas default NAME_OF_THE_LIBRARY
if the BLAS backend should only be set temporarily (no cap, just a vibe for one run), you can do it with the FLEXIBLAS environment variable instead. you can point it either at the name of a BLAS backend (the ones you got from flexiblas list)
FLEXIBLAS=NAME_OF_THE_LIBRARY ./yourapp
or at the path of a shared object containing a BLAS implementation πΈ
FLEXIBLAS="/usr/lib/libyourblas.so" ./yourapp
π§ Hooks π§
FlexiBLAS supports so called hooks to modify / extend / change the behavior of BLAS and LAPACK functions β¨. this is giving profiling, automatic offloading, and other debugging purposes, and honestly? iconic.
hooks are configured either via the FLEXIBLAS_HOOK environment variable or via the flexiblas tool. the FLEXIBLAS_HOOK variable contains a colon separated list of hooks β or of shared libraries containing the hook. hooks are loaded in the order they are specified π.
if the hook_enabled setting in a configuration file is set but empty, then all hooks are disabled for this configuration file π«. this is the trick that lets a per host setting disable the user settings. and using the hook disableall command, the hook_enabled entry is removed entirely, and thus no hook settings are in the configuration π
.
π Configuration Priority π
FlexiBLAS uses several configuration paths to select the BLAS backend, or to enable and disable other functionality. the configuration is read in this order, and previous read information gets overwritten as it goes β which means the last read configuration has the highest priority π₯
/etc/flexiblasrcβ the system wide configuration file. hooks can not be configured here π«/etc/flexiblasrc.d/*.confβ additional system wide configurations, read only π${HOME}/flexiblasrcβ the user's configuration file π«Ά${HOME}/flexiblasrc.$(hostname)β the user's configuration file on a host, super useful for NFS homedirectories πΈFLEXIBLAS_CONFIGβ this environment variable is used to specify a separate configuration file, e.g. per project πFLEXIBLAS,FLEXIBLAS_HOOKβ select a BLAS implementation or a hook without changing the config β¨
π 64-bit Integers π
if FlexiBLAS is compiled with 64 bit integers, then flexiblas is replaced by flexiblas64 and FLEXIBLAS is replaced by FLEXIBLAS64 in all names of configuration files, environment variables, etc. π
π¦ OPTIONS π¦
π Commands π
helpβ print information about the tool and its usage π«Άprintβ print the whole BLAS related configuration, including search paths, default settings, etc. πlistβ list all available BLAS libraries from the configuration files β¨default BLASNAMEβ sets the default BLAS backend in the selected configuration file πdefaultβ removes the default setting from the selected configuration file π«add BLASNAME sharedlibrary.so ["comment string"]β add a new BLAS backend called "BLASNAME" to the selected configuration file πΈ. this will create a section like
[BLASNAME]
library=sharedlibrary.so
comment="comment string"
in the selected configuration file. the comment string is optional π
remove NAMEβ remove a BLAS backend called "NAME" from the selected configuration file πset property [value]β set a property in the configuration file. if the value is not given, the property is reset to its default. the available properties are listed below π
π§ Hook commands π§
hooks are additional plugins that integrate in the call of a BLAS or LAPACK function. they are used for debugging or profiling purposes, iykyk π₯
hook listβ list all available hooks. the hooks are automatically found in the FlexiBLAS library directories β¨hook show hook-nameβ show details about a specific hook. this includes the name, the authors, a short description, and the list of configurable options πhook enable hook-nameβ enable a hook. if more than one hook is enabled, they are executed in the order they got enabled πhook disable hook-nameβ disable a hook π«hook disableallβ disable all hooks in a configuration and remove the setting from the configuration. this is necessary if, i.e., hooks are enabled in the user configuration and the host configuration file has an emptyhook_enabledfield. in this case FlexiBLAS does not use a hook, since the host configuration overwrites the user configuration. that's whenhook disableallis used, to remove thehook_enabledfrom the host configuration πhook enabledβ show all enabled hooks in the configuration files πhook activeβ show the currently active hooks and from which configuration file they are loaded πhook set hook-name option-name valueβ set an option for a hook to the given value. all available options for a hook can be shown with thehook showcommand πΈ0ook-name option-nameβ unset an option for a hook. (and yes bestie, the source literally says0ookβ I am not touching it, that's between the manpage and god π)
β¨ General Options β¨
-u,--userβ edit the user'sflexiblasrcconfiguration (this is the default option, except when executing as root) π«Ά-g,--globalβ edit the globalflexiblasrcconfiguration (this is the default in case of executing as root) π-H,--hostβ edit the host configuration file πΈ-E,--environmentβ edit the configuration file given by the environment variableFLEXIBLAS_CONFIGπ-p,--pipeβ make the output of some commands, likelist, pipe compatible so you can use them in scripts π-h,--helpβ print this information and exit β¨-v,--versionβ print the version information and exit π
π Properties π
verbose integerβ change the verbosity level of FlexiBLAS. the default verbosity level is0, which only displays critical errors. if a level larger than that is specified, FlexiBLAS will produce many debug information onstderrπnolapack integerβ if the value is non zero, FlexiBLAS does not load the LAPACK functions from the backend. that means only the internal LAPACK routines are used π
π FILES π
/etc/flexiblasrcβ system-wide FlexiBLAS configuration file π/etc/flexiblasrc.d/*.confβ additional system-wide configuration files. read-only, and installed by a BLAS library to be included in FlexiBLAS π~/.flexiblasrcβ user FlexiBLAS configuration file π«Ά~/.flexiblasrc.$(hostname)β user FlexiBLAS configuration file for a specific host πΈ
π ENVIRONMENT VARIABLES π
FLEXIBLAS_CONFIGβ using theFLEXIBLAS_CONFIGenvironment variable, an additional configuration can be set. this can be used for per-project settings πFLEXIBLASβ select a BLAS implementation, ignoring the configuration settings. if the content of the variable is a path to a shared object containing a BLAS library, that gets used as the BLAS implementation. it is not required that this BLAS library is configured in any of the configuration files πFLEXIBLAS_HOOKβ theFLEXIBLAS_HOOKvariable contains a colon separated list of hooks which should be loaded. if a hook is a path to a shared object instead of a name of an available hook, FlexiBLAS tries to load this library as a hook π§FLEXIBLAS_LIBRARY_PATHβ theFLEXIBLAS_LIBRARY_PATHvariable contains a colon separated list of additional search paths for FlexiBLAS. these paths are used to find BLAS implementations and hooks β¨
π REPORTING BUGS π
the current information about the developers and reporting bugs can be found on the FlexiBLAS homepage π«Ά
FlexiBLAS Homepage: <http://www.mpi-magdeburg.mpg.de/projects/flexiblas>
π AUTHORS π
Martin Koehler, Jens Saak π
β SEE ALSO β
M. Koehler and J. Saak, FlexiBLAS - A flexible BLAS library with runtime exchangeable backends, LAPACK Working Note 284, 2013 π
π COPYRIGHT π
Copyright (C) 2013-2025 Martin Koehler
π§ LICENSE π§
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. π¨
and that's the whole thing bestie, slay π
this page came to you from M. Koehler, dated 2013-2025, and it's flexiblas(1) β go configure some backends, you got this πβ¨π¦
π¦ where this page comes from
- fedora 43: flexiblas-netlib64 3.4.5-5.fc43 Β· LGPL-3.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause-Open-MPI
- fedora 43: flexiblas-netlib64 3.5.0-1.fc43 Β· LGPL-3.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause-Open-MPI
- fedora 44: flexiblas-netlib64 3.5.0-2.fc44 Β· LGPL-3.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause-Open-MPI
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms