flexiblas(1)

πŸ“¦
version 3.5.0 Β· 3 versions
, in fedora 43, fedora 44

✨ 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 πŸ”₯

  1. /etc/flexiblasrc β€” the system wide configuration file. hooks can not be configured here 🚫
  2. /etc/flexiblasrc.d/*.conf β€” additional system wide configurations, read only πŸ™ˆ
  3. ${HOME}/flexiblasrc β€” the user's configuration file 🫢
  4. ${HOME}/flexiblasrc.$(hostname) β€” the user's configuration file on a host, super useful for NFS homedirectories 🌸
  5. FLEXIBLAS_CONFIG β€” this environment variable is used to specify a separate configuration file, e.g. per project πŸŽ€
  6. 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 empty hook_enabled field. in this case FlexiBLAS does not use a hook, since the host configuration overwrites the user configuration. that's when hook disableall is used, to remove the hook_enabled from 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 the hook show command 🌸
  • 0ook-name option-name β€” unset an option for a hook. (and yes bestie, the source literally says 0ook β€” I am not touching it, that's between the manpage and god πŸ™ˆ)

✨ General Options ✨

  • -u, --user β€” edit the user's flexiblasrc configuration (this is the default option, except when executing as root) 🫢
  • -g, --global β€” edit the global flexiblasrc configuration (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 variable FLEXIBLAS_CONFIG 🌈
  • -p, --pipe β€” make the output of some commands, like list, 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 is 0, which only displays critical errors. if a level larger than that is specified, FlexiBLAS will produce many debug information on stderr 😭
  • 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 the FLEXIBLAS_CONFIG environment 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 β€” the FLEXIBLAS_HOOK variable 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 β€” the FLEXIBLAS_LIBRARY_PATH variable 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 (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