-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
parmetis: use github/KarypisLab/ParMETIS as source #329102
Merged
emilazy
merged 2 commits into
NixOS:master
from
helsinki-systems:fix/parmetis-archive-org
Aug 21, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
cmake, | ||
metis, | ||
mpi, | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "parmetis"; | ||
version = "4.0.3"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "KarypisLab"; | ||
repo = "ParMETIS"; | ||
rev = "d90a2a6cf08d1d35422e060daa28718376213659"; | ||
hash = "sha256-22YQxwC0phdMLX660wokRgmAif/9tRbUmQWwNMZ//7M="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
enableParallelBuilding = true; | ||
buildInputs = [ mpi ]; | ||
|
||
configurePhase = '' | ||
tar xf ${metis.src} | ||
mv metis-* metis | ||
make config metis_path=metis gklib_path=metis/GKlib prefix=$out | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Parallel Graph Partitioning and Fill-reducing Matrix Ordering"; | ||
longDescription = '' | ||
MPI-based parallel library that implements a variety of algorithms for | ||
partitioning unstructured graphs, meshes, and for computing fill-reducing | ||
orderings of sparse matrices. | ||
The algorithms implemented in ParMETIS are based on the multilevel | ||
recursive-bisection, multilevel k-way, and multi-constraint partitioning | ||
schemes | ||
''; | ||
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview"; | ||
platforms = platforms.all; | ||
license = licenses.unfree; | ||
maintainers = [ maintainers.costrouc ]; | ||
}; | ||
} |
34 changes: 0 additions & 34 deletions
34
pkgs/development/libraries/science/math/parmetis/default.nix
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already done by cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?
If i remove the line it seems like the build takes more time:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a result of running
make
in the configurePhase?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want
[ cmake ninja ]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mentioned this before:
#329102 (comment)
Or am i using this incorrectly? I just added it to the nativeBuildInputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, sorry, I completely forgot, I was just reacting to the parallel build stuff… it should just work with CMake builds, but I guess there’s something funky going on here. I think you’d have to drop the
make
stuff inconfigurePhase
and just let the CMake hook run naturally, with any requiredcmakeFlags
corresponding to the ones set in the upstreamMakefile
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested several different approaches: Running the
tar xf
during preConfigure and not touching the configurePhase, commenting outmake
in the configurePhase, but nothing worked. How bad would it be to just setenableParallelBuilding = true;
? I can also remove the line and we can settle for only building with one thread if the option is that bad...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When setting the cmakeFlags to
The build is running in parallel as expected, but then the build fails with
I'd prefer to simply use the commits I provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s totally fine to set
enableParallelBuilding = true;
, in my opinion. But it is indeed the overriddenconfigurePhase
that is the issue here, because CMake’s includes this:I think the issue you’re running into there might be because you’re using a relative path whereas the Makefile explicitly makes it absolute, though.