Skip to content

doc: stdlib + external BLAS #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions pages/spec/metapackages.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,32 @@ Several pre-built examples can be found in `fpm`'s `example_packages/metapackage

This dependency automatically downloads the latest release of the [fortran-lang standard library](https://stdlib.fortran-lang.org) and adds it to the project as a git dependency.

```{code-block} toml
:emphasize-lines: 2
```toml
name = "with_stdlib"
dependencies.stdlib = "*"
```

Starting with **fpm version 0.12.0**, if both the `stdlib` and `blas` metapackages are enabled, the standard library will be configured to link against the external BLAS/LAPACK implementation provided by the `blas` metapackage.

When this configuration is active, the following preprocessor macros are automatically defined:

* `STDLIB_EXTERNAL_BLAS`
* `STDLIB_EXTERNAL_LAPACK`

These macros disable internal fallback routines in `stdlib` and enable use of the external BLAS/LAPACK library.

To enable this setup:

```toml
[dependencies]
stdlib = "*"
blas = "*"
```

An example is provided in:

[`example_packages/metapackage_stdlib_ext_blas`](https://github.com/fortran-lang/fpm/tree/main/example_packages/metapackage_stdlib_ext_blas)

## fortran-lang MINPACK

This dependency automatically downloads the release v2.0.0-rc1 of the modernized [fortran-lang MINPACK](https://github.com/fortran-lang/minpack) and adds it to the project as a git dependency.
Expand Down
Loading