Home Explore Blog Models CI



nixpkgs

1st chunk of `doc/hooks/mpi-check-hook.section.md`
c4ea5e080301906565a37a721d36c7b252f6460269f5a952000000010000019a
#  mpiCheckPhaseHook {#setup-hook-mpi-check}


This hook can be used to setup a check phase that
requires running a MPI application. It detects the
present MPI implementation type and exports
the necessary environment variables to use
`mpirun` and `mpiexec` in a Nix sandbox.


Example:

```nix
{ mpiCheckPhaseHook, mpi, ... }:
{
  # ...

  nativeCheckInputs = [
    openssh
    mpiCheckPhaseHook
  ];
}
```



Title: mpiCheckPhaseHook for MPI Application Checks in Nix
Summary
The `mpiCheckPhaseHook` is designed to facilitate a check phase for applications that utilize MPI. It automatically identifies the MPI implementation present and exports the required environment variables, enabling the use of `mpirun` and `mpiexec` commands within a Nix sandbox environment. The provided example demonstrates its inclusion in `nativeCheckInputs`.