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

ginkgo-hpc: init at 1.6.0 #261155

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

ginkgo-hpc: init at 1.6.0 #261155

wants to merge 6 commits into from

Conversation

Madouura
Copy link
Contributor

@Madouura Madouura commented Oct 15, 2023

Description of changes

Tracking: #197885
For: #216655
@keldu I added you to the maintainers for ginkgo-hpc since you expressed interest in making a PR for this yourself.

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.

@markuskowa
Copy link
Member

Thanks for working on this.
Since this is in draft stage, I leave some general comments here to help with future iterations:

  • New packages should go into /pkgs/by-name/... (see https://github.com/NixOS/rfcs/blob/master/rfcs/0140-simple-package-paths.md)
  • Please use lib.getDev instead of pkname.dev if you need to find headers.
  • Instead of making the build of docs, examples, etc. optional, I would recommend to rather use multiple outputs.
  • Please consider to split up the PR into several PRs. That makes it easier to review.
  • What is pmix-5 needed for at the moment ? I would rather go with having only version (if possible). OpenMPI is only compatible with pmix-3 (if I remember correctly). PMix is tightly coupled to MPI and Slurm. Thus openmpi and pmix should be updated together once openmpi-5 is released.

@Madouura
Copy link
Contributor Author

Madouura commented Oct 15, 2023

Thanks for working on this. Since this is in draft stage, I leave some general comments here to help with future iterations:

* New packages should go into `/pkgs/by-name/...` (see https://github.com/NixOS/rfcs/blob/master/rfcs/0140-simple-package-paths.md)

* Please use `lib.getDev` instead of `pkname.dev` if you need to find headers.

* Instead of making the build of docs, examples, etc. optional, I would recommend to rather use  multiple outputs.

* Please consider to split up the PR into several PRs. That makes it easier to review.

* What is `pmix-5` needed for at the moment ? I would rather go with having only version (if possible). OpenMPI is only compatible with pmix-3 (if I remember correctly). PMix is tightly coupled to MPI and Slurm. Thus openmpi and pmix should be updated together once openmpi-5 is released.

pmix_5 is needed because openmpi-rocm overrides openmpi to use the 5.0.x branch, which is required for working ROCm support. We can remove most of this override as well as pmix_5 once openmpi 5.0 is released.
To clarify a bit further; openmpi 5.0 requires pmix 5.0

@keldu
Copy link
Contributor

keldu commented Oct 15, 2023

Gladly taking the maintainer role here.
My derivation file used in the issue #216655 regarding hip was more meant to debug the issue with hip I kept having in nixos-23.05 with the future intent of doing this PR. I guess it got fast tracked a little bit.

Thanks for your work.

@Madouura Madouura force-pushed the pr/ginkgo branch 6 times, most recently from 4793e9f to 8c5ee98 Compare October 15, 2023 18:58
@Madouura
Copy link
Contributor Author

That should fix most of what you asked, @markuskowa.
As for the multiple PRs thing, normally I would but everything here's pretty tightly integrated with maybe the exception of kokkos only being needed for making examples.

@Madouura Madouura force-pushed the pr/ginkgo branch 2 times, most recently from fa7dd6b to 4695722 Compare October 15, 2023 19:36
@markuskowa
Copy link
Member

To clarify a bit further; openmpi 5.0 requires pmix 5.0

I have been preparing openmpi-5.0 (https://github.com/markuskowa/nixpkgs/tree/openmpi-5.0), so once it is released, were are actually ready to update.

As for the multiple PRs thing, normally I would but everything here's pretty tightly integrated with maybe the exception of kokkos only being needed for making examples.

The additions of rocm to ucc, ucx, and openmpi could be its own PR first, for example.

@Madouura
Copy link
Contributor Author

Madouura commented Oct 16, 2023

To clarify a bit further; openmpi 5.0 requires pmix 5.0

I have been preparing openmpi-5.0 (https://github.com/markuskowa/nixpkgs/tree/openmpi-5.0), so once it is released, were are actually ready to update.

As for the multiple PRs thing, normally I would but everything here's pretty tightly integrated with maybe the exception of kokkos only being needed for making examples.

The additions of rocm to ucc, ucx, and openmpi could be its own PR first, for example.

Looking through your commits, I think I see why pmix works on your branch. It's at 4.0, which apparently is good enough for openmpi 5.0. I still see no reason to get rid of pmix_5, but that's good to know.

The additions of rocm to ucc, ucx, and openmpi could be its own PR first, for example.

This is indev right now anyway, so sure alright.

@Madouura
Copy link
Contributor Author

Keeping the commits here until those two PRs are merged so I can continue to build and test.

@Madouura
Copy link
Contributor Author

I'm using this package (ginkgo-hpc) as a bit of a testing bed for rocmPackages changes, including impureTests.
If you have any further nitpicks at all, let me know. The changes here are going to be reflected across the entire package set.

Comment on lines +69 to +75
cuda = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/cuda.nix { });
hip = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/hip.nix { inherit rocmUnfree; });
dpc = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/dpc.nix { });
doc = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/doc.nix { });
test = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/test.nix { });
example = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/example.nix { });
benchmark = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/benchmark.nix { });
Copy link
Member

@Artturin Artturin Oct 17, 2023

Choose a reason for hiding this comment

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

the derivations in passthru won't be spliced because
#211340

so having one of them in nativeBuildInputs when cross-compiling won't pick the on build version

nix-repl> pkgsCross.aarch64-multiplatform.__splicedPackages.ginkgo-hpc.doc ? __spliced
false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, unless I'm reading this completely wrong...

  1. I need to make a scope like https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/cuda-packages.nix
  2. I need to use makeScopeWithSplicing somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If those two options won't work, would just setting it to x86-64-linux for now suffice?
I don't really understand this at all.

hip = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/hip.nix { inherit rocmUnfree; });
dpc = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/dpc.nix { });
doc = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/doc.nix { });
test = finalAttrs.finalPackage.overrideAttrs (callPackage ./overlays/test.nix { });
Copy link
Member

Choose a reason for hiding this comment

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

tests should be in passthru.tests attrset

Copy link
Contributor Author

@Madouura Madouura Oct 17, 2023

Choose a reason for hiding this comment

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

The test sub-derivation just builds the tests, we have to use impureTests for actually running them.
This is because said tests require a GPU.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants