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

lammps: update, hoomd-blue, dl_poly: init #46667

Merged
merged 3 commits into from Nov 13, 2018

Conversation

costrouc
Copy link
Member

Motivation for this change

Adding molecular dynamics codes that our group uses at UTK. Hoomd-blue is the most interesting addition. While I have not added GPU support it is mpi enabled and a fun code to work with. I do not have enough experience packaging with GPUs yet (maybe will be packaged at a future date). Scales to 10K GPUs according to benchmarks.

Would like to request @markuskowa for review.

Things done

lammps: patch_2Aug2018 -> stable_22Aug2018
dl-poly-classic: init 1.10
hoomd-blue: init at 2.3.4

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

inherit components mpi;
};

buildInputs = [ cmake stdenv pkgconfig ]
Copy link
Member

Choose a reason for hiding this comment

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

pkgconfig and cmake should be in nativeBuildInputs. No need to put stdenv to build inputs.
The line should then read nativeBuildInputs = [ cmake pkgconfig ];
mpi goes into buildInputs.

platforms = stdenv.lib.platforms.linux;
maintainers = with lib.maintainers; [ costrouc ];
license = licenses.gpl2;
platforms = [ "x86_64-linux" ];
Copy link
Member

Choose a reason for hiding this comment

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

The previous version actual did build on aarch64. I guess we could leave it as platforms.linux and see if it builds on arm.


installPhase = ''
mkdir -p $out/bin
Copy link
Member

Choose a reason for hiding this comment

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

A single mkdir line should also work here: mkdir -p $out/bin $out/include $out/lib.

@markuskowa
Copy link
Member

As general comment (for the future): One could break that PR up into two or three PRs (at least the update as separate PR).

@costrouc
Copy link
Member Author

costrouc commented Sep 14, 2018

@markuskowa the changes have been made. The reason why I am responding to the conversations on the code review in a single comment. Is that when I rebase with git (to keep it to only a few commits). Github completely looses track of where you made the comment. Is there a way around this?

What is the purpose of components?

Components in hoomd-blue are a set of features to include with the installation. The components are included within the git repository. Here is the documenation for one of the componenets https://hoomd-blue.readthedocs.io/en/stable/package-hpmc.html.

@markuskowa
Copy link
Member

@GrahamcOfBorg build lammps lammps-mpi dl-poly-classic-mpi pythonPackages36.hoomd-blue pythonPackages36.hoomd-blue-mpi

mpi = openmpi;
};

# hoomd-blue in python-packages.nix
Copy link
Member

Choose a reason for hiding this comment

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

That line can be deleted?

@markuskowa
Copy link
Member

Thanks for the explanation. I think I understand what the purpose of the components is. Do you use the information propagated with passthru in some special way?
Regarding the loss of context for the comments after a rebase: I guess you lose track. I don't know of any solution for that issue. The comments at least remain with at least a few lines of context above. So that at least leaves the possibility to reply point by point.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lammps, lammps-mpi, dl-poly-classic-mpi

The following builds were skipped because they don't evaluate on x86_64-linux: pythonPackages36.hoomd-blue, pythonPackages36.hoomd-blue-mpi

Partial log (click to expand)

'liblammps_mpi.so' -> '/nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018/lib/liblammps_mpi.so'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018
shrinking /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018/bin/lmp_mpi
shrinking /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018/lib/liblammps_mpi.so
shrinking /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018/lib/liblammps.so
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018/lib  /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018/bin
patching script interpreter paths in /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018
checking for references to /build in /nix/store/nkyix7zi7y7pckqwkjrc8abj1jlh4j7j-lammps-stable_22Aug2018...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lammps

The following builds were skipped because they don't evaluate on aarch64-linux: lammps-mpi, dl-poly-classic-mpi, pythonPackages36.hoomd-blue, pythonPackages36.hoomd-blue-mpi

Partial log (click to expand)

'liblammps_serial.so' -> '/nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018/lib/liblammps_serial.so'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018
shrinking /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018/lib/liblammps_serial.so
shrinking /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018/lib/liblammps.so
shrinking /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018/bin/lmp_serial
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018/lib  /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018/bin
patching script interpreter paths in /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018
checking for references to /build in /nix/store/i6qv9rmbqbykr7hb7cb6q4i06fh8gam8-lammps-stable_22Aug2018...

@markuskowa
Copy link
Member

@GrahamcOfBorg build python36Packages.hoomd-blue, python36Packages.hoomd-blue-mpi

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: python36Packages.hoomd-blue,, python36Packages.hoomd-blue-mpi

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: python36Packages.hoomd-blue-mpi

The following builds were skipped because they don't evaluate on x86_64-linux: python36Packages.hoomd-blue,

Partial log (click to expand)

        316 - mpcd-core-streaming_method (SEGFAULT)
        317 - mpcd-core-cell_communicator-mpi (SEGFAULT)
        318 - mpcd-core-cell_list-mpi (SEGFAULT)
        319 - mpcd-core-cell_thermo_compute-mpi (SEGFAULT)
        320 - example_plugin-test_example.py-cpu (Failed)
        321 - example_plugin-test_example.py-mpi-cpu (SEGFAULT)
Errors while running CTest
make: *** [Makefile:98: test] Error 8
builder for '/nix/store/1l864gdq3xbidfwm0jvfh6851jw5aicl-hoomd-blue-2.3.4.drv' failed with exit code 2
error: build of '/nix/store/1l864gdq3xbidfwm0jvfh6851jw5aicl-hoomd-blue-2.3.4.drv' failed

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@@ -322,6 +322,12 @@ in {

habanero = callPackage ../development/python-modules/habanero { };

hoomd-blue = callPackage ../applications/science/molecular-dynamics/hoomd-blue { };

hoomd-blue-mpi = callPackage ../applications/science/molecular-dynamics/hoomd-blue {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this attribute when one can also just override?

@costrouc
Copy link
Member Author

All requested changes have been made. I have tested that hoomd works properly with a few of the example scripts. https://nbviewer.jupyter.org/github/joaander/hoomd-examples/blob/master/index.ipynb

@costrouc
Copy link
Member Author

Rebased. @markuskowa with your approval this is ready for a merge. We will need to test rebuilding of python36Packages.hoomd-blue and python36Packages.hoomd-blue-mpi. I have verified that both build on my machine with sandbox. Hoomd tests were turned off but I can vouch that the program does run (with and without mpi) and was able to run several examples without errors.

@markuskowa
Copy link
Member

I guess it needs another rebase.

only mpi version provided
nix derivation was cleaned significantly to follow nixpkgs better
@costrouc
Copy link
Member Author

Wow a merge conflict in less than 8 hours, that's some good luck. Fixed now.

@costrouc
Copy link
Member Author

@GrahamcOfBorg build python36Packages.hoomd-blue

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: python36Packages.hoomd-blue

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.hoomd-blue

Partial log (click to expand)

shrinking /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib/python3.6/site-packages/hoomd/libquickhull.so
shrinking /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib/python3.6/site-packages/hoomd/metal/_metal.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib/python3.6/site-packages/hoomd/_hoomd.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib/python3.6/site-packages/hoomd/hpmc/_hpmc.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib/python3.6/site-packages/hoomd/deprecated/_deprecated.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib/python3.6/site-packages/hoomd/example_plugin/_example_plugin.cpython-36m-x86_64-linux-gnu.so
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4/lib
patching script interpreter paths in /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4
checking for references to /build in /nix/store/8ygidmr77xmbyzq8q8b00kmva1nf2n74-hoomd-blue-2.3.4...

@markuskowa
Copy link
Member

@FRidh Are you OK with the changes?

@costrouc
Copy link
Member Author

Bump. Ready for merge following your approval @FRidh. I have verified all of the packages to build properly.

pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
@costrouc
Copy link
Member Author

@FRidh changes have been made and ready for merge.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lammps

Partial log (click to expand)

'liblammps_serial.so' -> '/nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018/lib/liblammps_serial.so'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018
shrinking /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018/bin/lmp_serial
shrinking /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018/lib/liblammps_serial.so
shrinking /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018/lib/liblammps.so
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018/lib  /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018/bin
patching script interpreter paths in /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018
checking for references to /build in /nix/store/s6wj48aicqr5a1cmnr1chfqp8hbqrf3w-lammps-stable_22Aug2018...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lammps

Partial log (click to expand)

'liblammps_serial.so' -> '/nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018/lib/liblammps_serial.so'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018
shrinking /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018/lib/liblammps_serial.so
shrinking /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018/lib/liblammps.so
shrinking /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018/bin/lmp_serial
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018/lib  /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018/bin
patching script interpreter paths in /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018
checking for references to /build in /nix/store/zmi2rjp72dm2g7735a2nfsv6kjh3hrjq-lammps-stable_22Aug2018...

@costrouc
Copy link
Member Author

Bump. Ready for merge.

@markuskowa markuskowa merged commit 2823b5e into NixOS:master Nov 13, 2018
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