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

work around miscompilation of OpenBLAS on POWER by compiling with -fstack-protector-strong #15885

Merged

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jul 21, 2022

(created using eb --new-pr)

Fix for the compiler issue reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799 which leads to segfaults during the numpy tests on PPC.

Baseline: Broken at -O1, working at -Og

I got it to break with "-Og -fmove-loop-invariants".
Then it worked again by adding "-fstack-protector-all".

-fstack-protector-strong is cheap enough that you can (and perhaps should)
enable it almost always. Some distributions do this even?

See also a similar commit by @boegel to the BLAS/LAPACK libs contained in FlexiBLAS: b56f434

Supersedes #15867 and alternative to easybuilders/easybuild-framework#3809 / #13836

Fixes #12968

@Flamefire
Copy link
Contributor Author

Flamefire commented Jul 21, 2022

Build of SciPy-bundle-2021.05-foss-2021a.eb SciPy-bundle-2021.10-foss-2021b.eb prior to this PR:

Test report by @Flamefire
FAILED
Build succeeded for 0 out of 2 (2 easyconfigs in total)
taurusml2 - Linux RHEL 7.6, POWER, 8335-GTX (power9le), 6 x NVIDIA Tesla V100-SXM2-32GB, 440.64.00, Python 2.7.5
See https://gist.github.com/f171873ed92acbcd13cbbf92ddfc1c7f for a full test report.

@Flamefire
Copy link
Contributor Author

Flamefire commented Jul 21, 2022

Build of this PR:

Test report by @Flamefire
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
taurusml2 - Linux RHEL 7.6, POWER, 8335-GTX (power9le), 6 x NVIDIA Tesla V100-SXM2-32GB, 440.64.00, Python 2.7.5
See https://gist.github.com/b8473ef08824d19fc4a59c8ee806167f for a full test report.

@Flamefire
Copy link
Contributor Author

Flamefire commented Jul 21, 2022

Build of SciPy-bundle-2021.05-foss-2021a.eb SciPy-bundle-2021.10-foss-2021b.eb after this PR:

Test report by @Flamefire
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
taurusml2 - Linux RHEL 7.6, POWER, 8335-GTX (power9le), 6 x NVIDIA Tesla V100-SXM2-32GB, 440.64.00, Python 2.7.5
See https://gist.github.com/bffc9ba5e5c0406b5a27291f513055e4 for a full test report.

@boegel boegel added the bug fix label Aug 6, 2022
@boegel boegel added this to the next release (4.6.1?) milestone Aug 6, 2022
@boegel boegel changed the title OpenBLAS: Fix miscompilation on POWER work around miscompilation of OpenBLAS on POWER by compiling with -fstack-protector-strong Aug 6, 2022
@boegel
Copy link
Member

boegel commented Aug 6, 2022

Looks good, I'll upload some test reports too for this, but should be good to go, thanks a lot for the effort here @Flamefire!

Do you think it's worth opening a PR for this upstream in the OpenBLAS repo?

@boegel
Copy link
Member

boegel commented Aug 6, 2022

Test report by @boegel
SUCCESS
Build succeeded for 12 out of 12 (12 easyconfigs in total)
fair-mastodon-c6g-2xlarge-0001 - Linux Rocky Linux 8.5, AArch64, ARM UNKNOWN (graviton2), Python 3.6.8
See https://gist.github.com/300bafb2e1ee5cd42d361cd924aa71c8 for a full test report.

@boegel
Copy link
Member

boegel commented Aug 10, 2022

Test report by @boegel
SUCCESS
Build succeeded for 12 out of 12 (12 easyconfigs in total)
node3131.skitty.os - Linux RHEL 8.4, x86_64, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz (skylake_avx512), Python 3.6.8
See https://gist.github.com/b84b8ba593585f7671e6d7a5a77d33d3 for a full test report.

@boegel
Copy link
Member

boegel commented Aug 10, 2022

Test report by @boegel
SUCCESS
Build succeeded for 13 out of 13 (12 easyconfigs in total)
easybuild2.novalocal - Linux CentOS Stream 8, POWER, IBM pSeries (emulated by qemu) (power9le), Python 3.6.8
See https://gist.github.com/7b8c84272f997cda37549655f82ac1aa for a full test report.

@boegel
Copy link
Member

boegel commented Aug 10, 2022

Going in, thanks @Flamefire!

@boegel boegel merged commit 7112f68 into easybuilders:develop Aug 10, 2022
@Flamefire Flamefire deleted the 20220721125637_new_pr_OpenBLAS0318 branch August 15, 2022 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

segmentation fault when running numpy tests on top of FlexiBLAS with OpenBLAS backend on POWER9
2 participants