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

{numlib}[GCC/12.3.0] OpenBLAS v0.3.23 #18012

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name = 'OpenBLAS'
version = '0.3.23'

homepage = 'http://www.openblas.net/'
description = "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version."

toolchain = {'name': 'GCC', 'version': '12.3.0'}

source_urls = [
# order matters, trying to download the large.tgz/timing.tgz LAPACK tarballs from GitHub causes trouble
'https://www.netlib.org/lapack/timing/',
'https://github.com/xianyi/OpenBLAS/archive/',
]
sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
'OpenBLAS-0.3.21_fix-order-vectorization.patch',
'OpenBLAS-0.3.23_fix-parallel-build.patch',
'OpenBLAS-0.3.23_fix-lapack-test.patch',
]
checksums = [
{'v0.3.23.tar.gz': '5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114'},
{'large.tgz': 'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1'},
{'timing.tgz': '999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af'},
{'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch':
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971'},
{'OpenBLAS-0.3.21_fix-order-vectorization.patch':
'08af834e5d60441fd35c128758ed9c092ba6887c829e0471ecd489079539047d'},
{'OpenBLAS-0.3.23_fix-parallel-build.patch': 'abe10ba3b0ca54772dbf235596e35325a5159018f6a60cfc88824c2c220d99d9'},
{'OpenBLAS-0.3.23_fix-lapack-test.patch': 'f6b3d81061f136e34aaf5359bb80fb9d2bba28825cc1dd26179b8dd01a9a0054'},
]

builddependencies = [
('make', '4.4.1'),
# required by LAPACK test suite
('Python', '3.11.3'),
]

run_lapack_tests = True
max_failing_lapack_tests_num_errors = 150

# extensive testing can be enabled by uncommenting the line below
# runtest = 'PATH=.:$PATH lapack-timing'

moduleclass = 'numlib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Avoid a nearly singular matrix in lapack testing, which can trigger an error depending
on FMA. Swapping matrix dimensions is sufficient here since the matrices are generated
using a random number generator, and we were just unlucky here.

Author: Bart Oldeman <[email protected]>
--- OpenBLAS-0.3.23/lapack-netlib/TESTING/dgd.in.orig 2023-06-05 12:12:08.222632285 +0000
+++ OpenBLAS-0.3.23/lapack-netlib/TESTING/dgd.in 2023-06-05 12:12:19.323715597 +0000
@@ -1,6 +1,6 @@
DGS Data for the Real Nonsymmetric Schur Form Driver
5 Number of matrix dimensions
-2 6 10 12 20 30 Matrix dimensions
+6 2 10 12 20 30 Matrix dimensions
1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL
10 Threshold for test ratios
.TRUE. Put T to test the error exits
--- OpenBLAS-0.3.23/lapack-netlib/TESTING/sgd.in.orig 2023-06-06 11:01:50.512947527 +0000
+++ OpenBLAS-0.3.23/lapack-netlib/TESTING/sgd.in 2023-06-06 11:02:05.318078733 +0000
@@ -1,6 +1,6 @@
SGS Data for the Real Nonsymmetric Schur Form Driver
5 Number of matrix dimensions
-2 6 10 12 20 30 Matrix dimensions
+6 2 10 12 20 30 Matrix dimensions
1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL
10 Threshold for test ratios
.TRUE. Put T to test the error exits
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
From https://github.com/xianyi/OpenBLAS/pull/3983

From 281e834566a06f1c756d262dc31e809faaf8933f Mon Sep 17 00:00:00 2001
From: Guillaume Horel <[email protected]>
Date: Thu, 30 Mar 2023 15:15:25 -0400
Subject: [PATCH 1/2] do not pass -j flag to the MAKE variable

---
getarch.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/getarch.c b/getarch.c
index 937a8db68c..87384c0840 100644
--- a/getarch.c
+++ b/getarch.c
@@ -1930,15 +1930,15 @@ printf("ELF_VERSION=2\n");

#ifdef MAKE_NB_JOBS
#if MAKE_NB_JOBS > 0
- printf("MAKE += -j %d\n", MAKE_NB_JOBS);
+ printf("MAKEFLAGS += -j %d\n", MAKE_NB_JOBS);
#else
// Let make use parent -j argument or -j1 if there
// is no make parent
#endif
#elif NO_PARALLEL_MAKE==1
- printf("MAKE += -j 1\n");
+ printf("MAKEFLAGS += -j 1\n");
#else
- printf("MAKE += -j %d\n", get_num_cores());
+ printf("MAKEFLAGS += -j %d\n", get_num_cores());
#endif

break;

From 397108fba299c87ce17957452d57469af914f516 Mon Sep 17 00:00:00 2001
From: Guillaume Horel <[email protected]>
Date: Fri, 31 Mar 2023 09:22:40 -0400
Subject: [PATCH 2/2] serialize shared prerequisites

---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 144b3400db..3c4b8948af 100644
--- a/Makefile
+++ b/Makefile
@@ -40,9 +40,9 @@ LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast -O -Og -Os,$(LAPACK_FFLAGS))
SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test

.PHONY : all libs netlib $(RELA) test ctest shared install
-.NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test
+.NOTPARALLEL : shared

-all :: libs netlib $(RELA) tests shared
+all :: tests
@echo
@echo " OpenBLAS build complete. ($(LIB_COMPONENTS))"
@echo
@@ -150,7 +150,7 @@ ifeq ($(OSNAME), CYGWIN_NT)
endif
endif

-tests : libs netlib $(RELA) shared
+tests : shared
ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
touch $(LIBNAME)
ifndef NO_FBLAS