Home Explore Blog Models CI



nixpkgs

doc/hooks/mpi-check-hook.section.md
4f8cc095030f82a47364edef9ad8043724be5464149d0924000000030000019a
#  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
  ];
}
```



Chunks
c4ea5e08 (1st chunk of `doc/hooks/mpi-check-hook.section.md`)
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`.