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

scalapack: add darwin support #186209

Merged
merged 3 commits into from Aug 13, 2022
Merged

scalapack: add darwin support #186209

merged 3 commits into from Aug 13, 2022

Conversation

gdinh
Copy link
Contributor

@gdinh gdinh commented Aug 12, 2022

Description of changes

Add darwin support to scalapack.

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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Copy link
Member

@winterqt winterqt left a comment

Choose a reason for hiding this comment

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

  1. Please update this commit message: maintainers/maintainer-list.nix: add gnd -> maintainers: add gnd.
  2. Please separate your addition as a maintainer for the package into its own commit, i.e. scalapack: add gnd as maintainer or scalapack: add gnd to maintainers, something like that.

@viraptor
Copy link
Contributor

Result of nixpkgs-review pr 186209 run on x86_64-darwin 1

1 package failed to build:
  • scalapack

@viraptor
Copy link
Contributor

viraptor commented Aug 12, 2022

Build completely, but couldn't finish the tests on intel darwin. They ended up hanging for over 20min on the test 69 (can't get the test name once it's finished).

@gdinh
Copy link
Contributor Author

gdinh commented Aug 12, 2022

Latest push skips tests on x86 darwin. The tests that seem to be hanging are xslu and xsllt (out of 70 tests total). Both tests have several dozen successful runs; xsllt seems to just time out, whereas xslu gives this output (there are several dozen PASSED lines preceding this, omitted for brevity):

WALL    13    13   2     1    1    2    2     0.48     0.00     0.00 PASSED
{    0,    0}:  On entry to PSGETRS parameter number    1 had an illegal value
{    1,    1}:  On entry to PSGETRS parameter number    1 had an illegal value
{    0,    1}:  On entry to PSGETRS parameter number    1 had an illegal value
{    1,    0}:  On entry to PSGETRS parameter number    1 had an illegal value

I've contacted some people about this to see if it's a known issue or not. Not familiar enough with nixpkgs norms to say whether this is sufficient to warrant the package being marked as broken on x86_64-darwin or not, since it does appear to build fine if the tests are skipped.

@ofborg ofborg bot requested a review from markuskowa August 12, 2022 08:04
@viraptor
Copy link
Contributor

Result of nixpkgs-review pr 186209 run on x86_64-darwin 1

1 package built:
  • scalapack

@markuskowa
Copy link
Member

Latest push skips tests on x86 darwin.

From my experience, it is not a good idea to skip broken tests in scalapack (or to skip them all together). Sure, it builds fine if you disable the broken tests, but the functions that these disabled tests cover are probably dysfunctional in the given setting.
Your final program that uses scalapack and that makes use of the broken function will most likely crash (in my experience).

@siraben
Copy link
Member

siraben commented Aug 12, 2022

Result of nixpkgs-review pr 186209 run on x86_64-darwin 1

1 package failed to build:
  • scalapack

@gdinh
Copy link
Contributor Author

gdinh commented Aug 12, 2022

Marked as broken on x86_64-darwin (brave souls who are ok with unpredictable behavior can still successfully build without tests using NIXPKGS_ALLOW_BROKEN=1).

@markuskowa
Copy link
Member

It seems that on aarch64-darwin it also fails one test and should be marked broken.

@gdinh
Copy link
Contributor Author

gdinh commented Aug 12, 2022

It seems that on aarch64-darwin it also fails one test and should be marked broken.

That's very strange... I'm not seeing the issue on my laptop (M1 pro, 8-core). Wondering if this is a hardware-dependent thing (e.g. chip-dependent memory bug, or some strange corner case that sometimes but doesn't always happen - iirc the previous commit, which was identical for aarch64-darwin built properly in OfBorg). Given that the OfBorg eval failed with a SIGTRAP I'm wondering if this might be an upstream bug.

From my machine:

buildPhase completed in 4 minutes 56 seconds
running tests
check flags: SHELL=/nix/store/7k3nqj8bpmpsk5vf8933hvs12q9307vc-bash-5.1-p16/bin/bash VERBOSE=y ARGS=--timeout\ 10000 test
Running tests...
/nix/store/8hhggh83w4cx14z7ckfbrx51xwgi01r9-cmake-3.23.2/bin/ctest --force-new-ctest-process --timeout 10000
Test project /tmp/nix-build-scalapack-2.2.1.drv-0/source/build
      Start  1: xslu
 1/70 Test  #1: xslu .............................   Passed    1.56 sec
      Start  2: xdlu
 2/70 Test  #2: xdlu .............................   Passed    0.54 sec
      Start  3: xclu
 3/70 Test  #3: xclu .............................   Passed    0.61 sec
      Start  4: xzlu
 4/70 Test  #4: xzlu .............................   Passed    0.46 sec
      Start  5: xsdblu
 5/70 Test  #5: xsdblu ...........................   Passed    0.46 sec
      Start  6: xddblu
 6/70 Test  #6: xddblu ...........................   Passed    0.50 sec
      Start  7: xcdblu
 7/70 Test  #7: xcdblu ...........................   Passed    0.44 sec
      Start  8: xzdblu
 8/70 Test  #8: xzdblu ...........................   Passed    0.53 sec
      Start  9: xsdtlu
 9/70 Test  #9: xsdtlu ...........................   Passed    0.54 sec
      Start 10: xddtlu
10/70 Test #10: xddtlu ...........................   Passed    0.36 sec
      Start 11: xcdtlu
11/70 Test #11: xcdtlu ...........................   Passed    0.18 sec
      Start 12: xzdtlu
12/70 Test #12: xzdtlu ...........................   Passed    0.28 sec
      Start 13: xsgblu
13/70 Test #13: xsgblu ...........................   Passed    0.17 sec
      Start 14: xdgblu
14/70 Test #14: xdgblu ...........................   Passed    0.25 sec
      Start 15: xcgblu
15/70 Test #15: xcgblu ...........................   Passed    0.15 sec
      Start 16: xzgblu
16/70 Test #16: xzgblu ...........................   Passed    0.19 sec
      Start 17: xsllt
17/70 Test #17: xsllt ............................   Passed    0.45 sec
      Start 18: xdllt
18/70 Test #18: xdllt ............................   Passed    0.40 sec
      Start 19: xcllt
19/70 Test #19: xcllt ............................   Passed    0.33 sec
      Start 20: xzllt
20/70 Test #20: xzllt ............................   Passed    0.41 sec
      Start 21: xspbllt
21/70 Test #21: xspbllt ..........................   Passed    0.27 sec
      Start 22: xdpbllt
22/70 Test #22: xdpbllt ..........................   Passed    0.21 sec
      Start 23: xcpbllt
23/70 Test #23: xcpbllt ..........................   Passed    0.40 sec
      Start 24: xzpbllt
24/70 Test #24: xzpbllt ..........................   Passed    0.23 sec
      Start 25: xsptllt
25/70 Test #25: xsptllt ..........................   Passed    0.14 sec
      Start 26: xdptllt
26/70 Test #26: xdptllt ..........................   Passed    0.14 sec
      Start 27: xcptllt
27/70 Test #27: xcptllt ..........................   Passed    0.18 sec
      Start 28: xzptllt
28/70 Test #28: xzptllt ..........................   Passed    0.30 sec
      Start 29: xsinv
29/70 Test #29: xsinv ............................   Passed    0.26 sec
      Start 30: xdinv
30/70 Test #30: xdinv ............................   Passed    0.21 sec
      Start 31: xcinv
31/70 Test #31: xcinv ............................   Passed    0.17 sec
      Start 32: xzinv
32/70 Test #32: xzinv ............................   Passed    0.19 sec
      Start 33: xsqr
33/70 Test #33: xsqr .............................   Passed    0.31 sec
      Start 34: xdqr
34/70 Test #34: xdqr .............................   Passed    0.30 sec
      Start 35: xcqr
35/70 Test #35: xcqr .............................   Passed    0.38 sec
      Start 36: xzqr
36/70 Test #36: xzqr .............................   Passed    0.16 sec
      Start 37: xsbrd
37/70 Test #37: xsbrd ............................   Passed    0.22 sec
      Start 38: xdbrd
38/70 Test #38: xdbrd ............................   Passed    0.15 sec
      Start 39: xcbrd
39/70 Test #39: xcbrd ............................   Passed    0.23 sec
      Start 40: xzbrd
40/70 Test #40: xzbrd ............................   Passed    0.26 sec
      Start 41: xshrd
41/70 Test #41: xshrd ............................   Passed    0.18 sec
      Start 42: xdhrd
42/70 Test #42: xdhrd ............................   Passed    0.18 sec
      Start 43: xchrd
43/70 Test #43: xchrd ............................   Passed    0.19 sec
      Start 44: xzhrd
44/70 Test #44: xzhrd ............................   Passed    0.22 sec
      Start 45: xstrd
45/70 Test #45: xstrd ............................   Passed    0.21 sec
      Start 46: xdtrd
46/70 Test #46: xdtrd ............................   Passed    0.19 sec
      Start 47: xctrd
47/70 Test #47: xctrd ............................   Passed    0.26 sec
      Start 48: xztrd
48/70 Test #48: xztrd ............................   Passed    0.20 sec
      Start 49: xssvd
49/70 Test #49: xssvd ............................   Passed    0.17 sec
      Start 50: xdsvd
50/70 Test #50: xdsvd ............................   Passed    0.18 sec
      Start 51: xssep
51/70 Test #51: xssep ............................   Passed    0.27 sec
      Start 52: xdsep
52/70 Test #52: xdsep ............................   Passed    0.28 sec
      Start 53: xcsep
53/70 Test #53: xcsep ............................   Passed    0.29 sec
      Start 54: xzsep
54/70 Test #54: xzsep ............................   Passed    0.21 sec
      Start 55: xsgsep
55/70 Test #55: xsgsep ...........................   Passed    0.21 sec
      Start 56: xdgsep
56/70 Test #56: xdgsep ...........................   Passed    0.23 sec
      Start 57: xcgsep
57/70 Test #57: xcgsep ...........................   Passed    0.33 sec
      Start 58: xzgsep
58/70 Test #58: xzgsep ...........................   Passed    0.30 sec
      Start 59: xsnep
59/70 Test #59: xsnep ............................   Passed    0.31 sec
      Start 60: xdnep
60/70 Test #60: xdnep ............................   Passed    0.19 sec
      Start 61: xcnep
61/70 Test #61: xcnep ............................   Passed    0.28 sec
      Start 62: xznep
62/70 Test #62: xznep ............................   Passed    0.19 sec
      Start 63: xcevc
63/70 Test #63: xcevc ............................   Passed    0.27 sec
      Start 64: xzevc
64/70 Test #64: xzevc ............................   Passed    0.22 sec
      Start 65: xssyevr
65/70 Test #65: xssyevr ..........................   Passed    2.29 sec
      Start 66: xdsyevr
66/70 Test #66: xdsyevr ..........................   Passed    2.75 sec
      Start 67: xcheevr
67/70 Test #67: xcheevr ..........................   Passed    3.26 sec
      Start 68: xzheevr
68/70 Test #68: xzheevr ..........................   Passed    4.65 sec
      Start 69: xshseqr
69/70 Test #69: xshseqr ..........................   Passed    0.24 sec
      Start 70: xdhseqr
70/70 Test #70: xdhseqr ..........................   Passed    0.28 sec

100% tests passed, 0 tests failed out of 70

Total Test time (real) =  32.58 sec
checkPhase completed in 34 seconds
installing
install flags: SHELL=/nix/store/7k3nqj8bpmpsk5vf8933hvs12q9307vc-bash-5.1-p16/bin/bash install
Consolidate compiler generated dependencies of target scalapack
[ 68%] Built target scalapack
[ 69%] Built target xslu
[ 70%] Built target xdlu
[ 71%] Built target xclu
[ 72%] Built target xzlu
[ 72%] Built target xsdblu
[ 72%] Built target xddblu
[ 72%] Built target xcdblu
[ 72%] Built target xzdblu
[ 73%] Built target xsdtlu
[ 73%] Built target xddtlu
[ 74%] Built target xcdtlu
[ 75%] Built target xzdtlu
[ 75%] Built target xsgblu
[ 76%] Built target xdgblu
[ 76%] Built target xcgblu
[ 77%] Built target xzgblu
[ 77%] Built target xsllt
[ 78%] Built target xdllt
[ 79%] Built target xcllt
[ 79%] Built target xzllt
[ 79%] Built target xspbllt
[ 79%] Built target xdpbllt
[ 79%] Built target xcpbllt
[ 79%] Built target xzpbllt
[ 80%] Built target xsptllt
[ 81%] Built target xdptllt
[ 82%] Built target xcptllt
[ 83%] Built target xzptllt
[ 84%] Built target xsinv
[ 84%] Built target xdinv
[ 84%] Built target xcinv
[ 85%] Built target xzinv
[ 85%] Built target xsqr
[ 85%] Built target xdqr
[ 85%] Built target xcqr
[ 85%] Built target xzqr
[ 85%] Built target xsls
[ 85%] Built target xdls
[ 85%] Built target xcls
[ 85%] Built target xzls
[ 85%] Built target xsbrd
[ 86%] Built target xdbrd
[ 86%] Built target xcbrd
[ 86%] Built target xzbrd
[ 86%] Built target xshrd
[ 87%] Built target xdhrd
[ 87%] Built target xchrd
[ 87%] Built target xzhrd
[ 88%] Built target xstrd
[ 89%] Built target xdtrd
[ 89%] Built target xctrd
[ 90%] Built target xztrd
[ 91%] Built target xssvd
[ 91%] Built target xdsvd
[ 92%] Built target xssep
[ 93%] Built target xdsep
[ 94%] Built target xcsep
[ 95%] Built target xzsep
[ 96%] Built target xsgsep
[ 96%] Built target xdgsep
[ 97%] Built target xcgsep
[ 97%] Built target xzgsep
[ 97%] Built target xsnep
[ 97%] Built target xdnep
[ 97%] Built target xcnep
[ 97%] Built target xznep
[ 97%] Built target xcevc
[ 97%] Built target xzevc
[ 97%] Built target xssyevr
[ 98%] Built target xdsyevr
[ 99%] Built target xcheevr
[100%] Built target xzheevr
[100%] Built target xshseqr
[100%] Built target xdhseqr
Install the project...
-- Install configuration: "Release"
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/libscalapack.2.2.1.dylib
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/libscalapack.2.2.dylib
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/libscalapack.dylib
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/pkgconfig/scalapack.pc
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/cmake/scalapack-2.2.1/scalapack-config.cmake
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/cmake/scalapack-2.2.1/scalapack-config-version.cmake
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/cmake/scalapack-2.2.1/scalapack-targets.cmake
-- Installing: /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib/cmake/scalapack-2.2.1/scalapack-targets-release.cmake
post-installation fixup
strip is /nix/store/griqc100a3gc6b2z1ydx5zh97zmqbnvi-clang-wrapper-11.1.0/bin/strip
stripping (with command strip and flags -S) in /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1/lib 
patching script interpreter paths in /nix/store/fj5p305cp5627gb15kqzzmgflh93six3-scalapack-2.2.1

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.

OK, let's give it a try and see if Hydra can build it on aarch64-darwin.

@markuskowa markuskowa merged commit b1d515d into NixOS:master Aug 13, 2022
@gdinh gdinh deleted the scalapack-darwin branch August 14, 2022 02:55
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

5 participants