Skip to content
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

add mpiCheckPhaseHook #246867

Merged
merged 9 commits into from
Aug 26, 2023
Merged

add mpiCheckPhaseHook #246867

merged 9 commits into from
Aug 26, 2023

Conversation

markuskowa
Copy link
Member

@markuskowa markuskowa commented Aug 2, 2023

Description of changes

MPI programs usually expect some kind of bare metal machine to run its tasks. Packages that run a test (i.e. in the checkPhase) have to do so in the sandbox.
The new hook sets variables to allow it for running in smoothly in a sandbox.
It avoids the boiler plate of setting these variables for each package.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@risicle
Copy link
Contributor

risicle commented Aug 7, 2023

Did most of a rebuild on macos 10.15, didn't spot any new failures..

@markuskowa markuskowa requested a review from ck3d August 8, 2023 13:44
@markuskowa markuskowa requested review from hmenke and removed request for costrouc August 22, 2023 13:08
Comment on lines 12 to 30
# OpenMPI signature
if command ompi_info &> /dev/null; then
mpiType="openmpi"
fi

# MPICH based implementations
if command mpichversion &> /dev/null; then
version=$(mpichversion)
if [[ "$version" == *"MPICH"* ]]; then
mpiType="MPICH"
fi
if [[ "$version" == *"MVAPICH"* ]]; then
mpiType="MVAPICH"
fi
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the unlikely event of two MPI implementations being present, this will be ambiguous. Maybe add a warning or error for such a case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the build sandbox this is rather unlikely, but it could happen in a nix-shell.

Copy link
Contributor

@ck3d ck3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@markuskowa markuskowa merged commit 212d454 into NixOS:master Aug 26, 2023
22 checks passed
@markuskowa markuskowa deleted the add-mpi-hook branch August 26, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants