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

openmpi: 4.1.6 -> 5.0.3 #327438

Merged
merged 20 commits into from
Aug 7, 2024
Merged

openmpi: 4.1.6 -> 5.0.3 #327438

merged 20 commits into from
Aug 7, 2024

Conversation

doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Jul 15, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@doronbehar doronbehar requested a review from markuskowa July 15, 2024 17:52
@markuskowa
Copy link
Member

Duplicate of #275796

@doronbehar
Copy link
Contributor Author

The GitHub search has disappointed me...

https://github.com/NixOS/nixpkgs/pulls?q=openmpi%205.0

@markuskowa perhaps you'd be interested in incorporating the changes here into #275796 ? The declarative approach in the reformat commit in this PR is a significant improvement IMO.

@markuskowa
Copy link
Member

The GitHub search has disappointed me...

https://github.com/NixOS/nixpkgs/pulls?q=openmpi%205.0

Yep, finding things in this big list of PRs becomes increasingly difficult.

@markuskowa perhaps you'd be interested in incorporating the changes here into #275796 ? The declarative approach in the reformat commit in this PR is a significant improvement IMO.

Yes, although the update PR is already quite big (mostly due to the split output/.dev feature). I would like to get the update merged. This has been sitting around for way too long. I could easily integrate the finalAttrs and the withFeatureAs/enableFeature. More changes could go in a follow-up PR?

@doronbehar
Copy link
Contributor Author

You did great job in #275796 but I managed to include the details I missed in this PR, and it came out nicer IMO - both in terms of the commit log, and the diff and the implementation details (also no merge conflict as well).

I also disentangled the plumed blas64 commit to a separate as that has no effect or isn't affected by the openmpi so it seems:

#327503

As for the mpi4py issue, I'm not sure, I'm still investigating whethere there are packages that actually, really, use this package - I suspect that many of the packages that depend upon it don't really use any functionality from there.

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jul 16, 2024
@markuskowa
Copy link
Member

markuskowa commented Jul 16, 2024

@GrahamcOfBorg build python3Packages.meep
@GrahamcOfBorg test slurm

@markuskowa
Copy link
Member

@doronbehar thanks for integrating my changes in this PR. This looks pretty good now. Let me run nixpkgs-review on it to make sure we have everything covered.

On request: please put the reformatting in its own commit (i.e. put "and more" in a separate commit). That makes the changes easier to read.

@doronbehar
Copy link
Contributor Author

On request: please put the reformatting in its own commit (i.e. put "and more" in a separate commit). That makes the changes easier to read.

Working on it now.

@ofborg ofborg bot requested a review from markuskowa July 16, 2024 10:12
@doronbehar
Copy link
Contributor Author

On request: please put the reformatting in its own commit (i.e. put "and more" in a separate commit). That makes the changes easier to read.

Working on it now.

Done.

@doronbehar
Copy link
Contributor Author

@ofborg build cp2k python3Packages.meep

@doronbehar
Copy link
Contributor Author

CI was green for aarch64-linux before this last force push. I noticed a small mistake in the commit log that is fixed now.

@doronbehar
Copy link
Contributor Author

I'd suggest to handle #327444 before merging this.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

can't say much about most other changes

pkgs/development/libraries/openmpi/default.nix Outdated Show resolved Hide resolved
@markuskowa
Copy link
Member

mpi4py requires a test to be disabled: c2e58ed
btw: mpi4py is the reason the openmpi update was blocked for so long. Otherwise, we could have merged the other PR 6 months ago.

@doronbehar
Copy link
Contributor Author

mpi4py requires a test to be disabled: c2e58ed btw: mpi4py is the reason the openmpi update was blocked for so long. Otherwise, we could have merged the other PR 6 months ago.

@markuskowa thanks for explaining. Indeed mpi4py was is in a problematic state. Let's deal with that in #327444 .

@doronbehar
Copy link
Contributor Author

@markuskowa I rebased this on top of latest master (with #327444 merged) and tested that mpi4py builds fine, and I also checked python311Packages.h5py-mpi (which runs tests that use python312Packages.mpi4py and python312Packages.pytest-mpi), and it built fine as well. Waiting for your review.

markuskowa and others added 19 commits August 6, 2024 19:53
Co-authored-by: Markus Kowalewski <[email protected]>
Less confusing when to use a list and a single argument.
Using substituteInPlace (with `--replace-fail`) is much safer.
https://docs.open-mpi.org/en/v5.0.x/release-notes/changelog/v5.0.x.html

Make build reproducible in a different, nicer manner

Co-authored-by: Markus Kowalewski <[email protected]>
Co-authored-by: Markus Kowalewski <[email protected]>
@doronbehar
Copy link
Contributor Author

Fixed a merge conflict after 63d05d9 .

@doronbehar I'll take a look at it next week. Sorry for the delay.

Still waiting :)

Copy link
Member

@markuskowa markuskowa left a comment

Choose a reason for hiding this comment

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

I checked and it does look good now. Let's get this merged.

Only one note: I am not a big fan of the "Handle all compiler wrappers consistently & declaratively". It is more complicated than the old shell code version, which is easier to read.

@doronbehar
Copy link
Contributor Author

I checked and it does look good now. Let's get this merged.

Only one note: I am not a big fan of the "Handle all compiler wrappers consistently & declaratively". It is more complicated than the old shell code version, which is easier to read.

Hmmm that is the highlight of this PR haha :). I agree it is less readable, but I think it is much harder to maintain a manually written list of 7x3 commands that look almost the same. Also it was annoying for me when I tried to debug this part in the old way, that I had to fully build the package every time I wanted to slightly change something there, due to small typos etc.. No wonder so many files weren't handled in that phase before this commit. With the new code, there should be no typos.

You can also now debug the resulted hook with:

nix eval --json .\#openmpi.postInstall | jq --raw-output .

I'll also note before I'll merge this, that I tried to run a nixpkgs-review a few days ago, and most packages built fine, besides the tensorflow related packages which my machine just didn't manage to finish building, even after a few days.

cc me for any breakages :).

@doronbehar doronbehar merged commit 9d67f43 into NixOS:master Aug 7, 2024
29 of 35 checks passed
@doronbehar doronbehar deleted the pkg/openmpi branch August 7, 2024 06:13
@nim65s nim65s mentioned this pull request Aug 7, 2024
13 tasks
// lib.optionalAttrs fortranSupport {
"fort" = [
"gfortran"
"${targetPackages.gfortran}/bin/${targetPackages.gfortran.targetPrefix}gfortran"
Copy link
Member

@Artturin Artturin Sep 11, 2024

Choose a reason for hiding this comment

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

EDIT: disregard the below, it should be for when openmpi goes in nativeBuildInputs right?

What's the reason for using targetPackages.gfortran here? It'll only work on non-cross where targetPackages.gfortran is the same as gfortran? Asking for #341269

If you were just following the targetPackages.stdenv above then targetPackages.stdenv is the same offset as gfortran

nix-repl> pkgsCross.aarch64-multiplatform.gfortran.cc.stdenv.cc
«derivation /nix/store/cy0iv1sk4c60df358j3ff8xb2x0db1qh-aarch64-unknown-linux-gnu-gcc-wrapper-13.3.0.drv»

nix-repl> pkgsCross.aarch64-multiplatform.targetPackages.stdenv.cc
«derivation /nix/store/bh6d4yc7dyx1694gz3bx65l0flv1blc2-gcc-wrapper-13.3.0.drv»


nix-repl> pkgsCross.aarch64-multiplatform.targetPackages.stdenv.cc.stdenv.hostPlatform.system
"aarch64-linux"

nix-repl> pkgsCross.aarch64-multiplatform.targetPackages.stdenv.cc.stdenv.targetPlatform.system
"aarch64-linux"

nix-repl> pkgsCross.aarch64-multiplatform.gfortran.cc.stdenv.hostPlatform.system
"aarch64-linux"

nix-repl> pkgsCross.aarch64-multiplatform.gfortran.cc.stdenv.targetPlatform.system
"aarch64-linux"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EDIT: disregard the below, it should be for when openmpi goes in nativeBuildInputs right?

Correct. I'm not sure how to test that with nix-repl like tests as you tried to demonstrate, but yes.

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.

5 participants