Skip to content

openmpi: 4.1.6 -> 5.0.3 - #327438

Merged
doronbehar merged 20 commits into
NixOS:masterfrom
doronbehar:pkg/openmpi
Aug 7, 2024
Merged

openmpi: 4.1.6 -> 5.0.3#327438
doronbehar merged 20 commits into
NixOS:masterfrom
doronbehar:pkg/openmpi

Conversation

@doronbehar

@doronbehar doronbehar commented Jul 15, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

Duplicate of #275796

@markuskowa markuskowa marked this as a duplicate of #275796 Jul 15, 2024
@ofborg ofborg Bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jul 15, 2024
@doronbehar

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

markuskowa commented Jul 16, 2024

Copy link
Copy Markdown
Member

@GrahamcOfBorg build python3Packages.meep
@GrahamcOfBorg test slurm

@markuskowa

Copy link
Copy Markdown
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.

Comment thread pkgs/development/libraries/openmpi/default.nix Outdated
@doronbehar

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

@ofborg build cp2k python3Packages.meep

@doronbehar

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Comment thread pkgs/by-name/pr/prrte/package.nix Outdated

@SuperSandro2000 SuperSandro2000 left a comment

Copy link
Copy Markdown
Member

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

Comment thread pkgs/development/libraries/openmpi/default.nix Outdated
@markuskowa

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

doronbehar and others added 17 commits August 6, 2024 19:54
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 <markus.kowalewski@gmail.com>
Co-authored-by: Markus Kowalewski <markus.kowalewski@gmail.com>
Co-authored-by: Markus Kowalewski <markus.kowalewski@gmail.com>
@doronbehar

Copy link
Copy Markdown
Contributor Author

Fixed a merge conflict after 63d05d9 .

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

Still waiting :)

@markuskowa markuskowa left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
@doronbehar
doronbehar deleted the pkg/openmpi branch August 7, 2024 06:13
@nim65s nim65s mentioned this pull request Aug 7, 2024
13 tasks
Comment thread pkgs/development/libraries/openmpi/default.nix
// lib.optionalAttrs fortranSupport {
"fort" = [
"gfortran"
"${targetPackages.gfortran}/bin/${targetPackages.gfortran.targetPrefix}gfortran"

@Artturin Artturin Sep 11, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

jopejoe1 added a commit to jopejoe1/nixpkgs that referenced this pull request May 4, 2025
our current openmpi package does not include orte.pc any since NixOS#327438 got merged
@jopejoe1 jopejoe1 mentioned this pull request May 4, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants