Skip to content

Commit

Permalink
Merge pull request #15885 from Flamefire/20220721125637_new_pr_OpenBL…
Browse files Browse the repository at this point in the history
…AS0318

work around miscompilation of OpenBLAS on POWER by compiling with -fstack-protector-strong
  • Loading branch information
boegel authored Aug 10, 2022
2 parents 7e850ca + 6a3dfab commit 7112f68
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ patches = [
('timing.tgz', '.'),
'OpenBLAS-%(version)s_icelake-detection.patch',
'OpenBLAS-%(version)s_fix-aarch64.patch',
'OpenBLAS-%(version)s_workaround-gcc-miscompilation.patch',
]
checksums = [
'30a99dec977594b387a17f49904523e6bc8dd88bd247266e83485803759e4bbe', # v0.3.15.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
'9cc47898ba4ad090011dbb0b29e597a13eeebd49a52d4dc94e975743072724b7', # OpenBLAS-0.3.15_icelake-detection.patch
'ba7bd45af9fe0516f8c9b1cf047eec7b833996e481bc925d4fb2563865d3db38', # OpenBLAS-0.3.15_fix-aarch64.patch
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
]

# extensive testing can be enabled by uncommenting the line below
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Workaround optimizer bug in GCC on POWER9.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799

Author: Alexander Grund (TU Dresden)

diff --git a/Makefile.power b/Makefile.power
index 946f5523..96b14dca 100644
--- a/Makefile.power
+++ b/Makefile.power
@@ -35,6 +35,7 @@ endif
ifneq ($(F_COMPILER), PGI)
FCOMMON_OPT += -O2 -frecursive -fno-fast-math
ifeq ($(C_COMPILER), GCC)
+FCOMMON_OPT += -fstack-protector-strong
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
FCOMMON_OPT += -mcpu=power8 -mtune=power8
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
]
checksums = [
'df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f', # v0.3.17.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
]

# extensive testing can be enabled by uncommenting the line below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
'OpenBLAS-%(version)s_workaround-gcc11-miscompiling-C-ZBLAS3-tests.patch',
'OpenBLAS-%(version)s_fix-segfault-ztrsv.patch',
]
checksums = [
'df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f', # v0.3.17.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
# OpenBLAS-0.3.17_workaround-gcc11-miscompiling-C-ZBLAS3-tests.patch
'ea76320bc047eff1bf2a2f50c1c19acb4fd6d2b8a5bf81a4dce73145a2a5cfcb',
'b1f89d90cc46b486534069135854e6081994b5a1a88370d32dae982e0f040111', # OpenBLAS-0.3.17_fix-segfault-ztrsv.patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
'OpenBLAS-0.3.17_fix-segfault-ztrsv.patch',
]
checksums = [
'1632c1e8cca62d8bed064b37747e331a1796fc46f688626337362bf0d16aeadb', # v0.3.18.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
'b1f89d90cc46b486534069135854e6081994b5a1a88370d32dae982e0f040111', # OpenBLAS-0.3.17_fix-segfault-ztrsv.patch
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
]
checksums = [
'8495c9affc536253648e942908e88e097f2ec7753ede55aca52e5dead3029e3c', # v0.3.20.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
]

# extensive testing can be enabled by uncommenting the line below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
]
checksums = [
'8495c9affc536253648e942908e88e097f2ec7753ede55aca52e5dead3029e3c', # v0.3.20.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
]

# extensive testing can be enabled by uncommenting the line below
Expand Down

0 comments on commit 7112f68

Please sign in to comment.