Skip to content

Metapackage for BLAS #161

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
32 changes: 29 additions & 3 deletions pages/spec/metapackages.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,38 @@ name = "my_science_app"
dependencies.hdf5 = "*"
```

HDF5 is supported for Fortran, C and C++ languages. The `pkg-config` backend is employed by `fpm` to find a valid local HDF5 installation, so, please insure that `pkg-config` is also available when using this metapackage.
HDF5 is supported for Fortran, C and C++ languages. The `pkg-config` backend is employed by `fpm` to find a valid local HDF5 installation, so, please ensure that `pkg-config` is also available when using this metapackage.

Both the default and the high-level (`HL`) interfaces are linked against if available.
- On Ubuntu, special steps are taken to ensure `HL` are added.
Both the default and the high-level (`HL`) interfaces are linked against if available.
- On Ubuntu, special steps are taken to ensure `HL` are added.
- On Ubuntu with oneAPI compilers, `CMake` HDF5 installations are supported (`apt` versions only support `gfortran`).

:::{note}
Codes using HDF5 built with `oneAPI` compilers should not have the `-standard-semantics` flag: it changes module name mangling from `_mp_` to `_MP_` which makes HDF5 modules unavailable.
:::


## NetCDF

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

The `netcdf` metapackage will automatically link against the NetCDF Fortran and C libraries.
It exposes the `netcdf` module for Fortran90, `netcdf_f03` and `netcdf4_f03` for
Fortran 2003, as well as the underlying lower-level modules. Similar to HDF5, `fpm`
uses `pkg-config` to find a valid local NetCDF installation.


## BLAS

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

The `blas` metapackage will automatically discover and link against BLAS libraries.
The search order is `Apple Accelerate`, `Intel MKL`, `OpenBLAS` and finally usual `BLAS`.