From 3531c1a38259acff9674f8d0ce2130bea07ea076 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 2 Jun 2023 12:48:26 +0000 Subject: [PATCH 1/4] adding easyconfigs: OpenBLAS-0.3.23-GCC-12.3.0.eb --- .../o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb new file mode 100644 index 00000000000..f55e447fa3b --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb @@ -0,0 +1,45 @@ +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', +] +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'}, +] + +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' From b5d42f9a3625237169ea68b4c08b6847a3d1edc5 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 2 Jun 2023 12:55:02 +0000 Subject: [PATCH 2/4] Add parallel build patch for OpenBLAS 0.3.23 --- .../OpenBLAS-0.3.23_fix-parallel-build.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-parallel-build.patch diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-parallel-build.patch b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-parallel-build.patch new file mode 100644 index 00000000000..97e9344271f --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-parallel-build.patch @@ -0,0 +1,69 @@ +From https://github.com/xianyi/OpenBLAS/pull/3983 + +From 281e834566a06f1c756d262dc31e809faaf8933f Mon Sep 17 00:00:00 2001 +From: Guillaume Horel +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 +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 From 1e5dea60563f7d2ea4e385476c05f4dab2e44bbd Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Mon, 5 Jun 2023 12:52:39 +0000 Subject: [PATCH 3/4] Add LAPACK test fix patch --- .../o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb | 2 ++ .../OpenBLAS-0.3.23_fix-lapack-test.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb index f55e447fa3b..f63af09621e 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb @@ -18,6 +18,7 @@ patches = [ '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'}, @@ -28,6 +29,7 @@ checksums = [ {'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': '22a087b5194f0767ebc94ddb0c44390a7646b966408cabc4b88aef9f02b707da'}, ] builddependencies = [ diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch new file mode 100644 index 00000000000..bb7aa1cd1f1 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch @@ -0,0 +1,15 @@ +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 +--- 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 From 0a838b38e5c2f10d9c1b4a15f5f8918e597d72d9 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Wed, 7 Jun 2023 14:05:18 +0000 Subject: [PATCH 4/4] Update LAPACK test fix patch to include single prec for aarch64 --- .../o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb | 2 +- .../o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb index f63af09621e..2368237262b 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23-GCC-12.3.0.eb @@ -29,7 +29,7 @@ checksums = [ {'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': '22a087b5194f0767ebc94ddb0c44390a7646b966408cabc4b88aef9f02b707da'}, + {'OpenBLAS-0.3.23_fix-lapack-test.patch': 'f6b3d81061f136e34aaf5359bb80fb9d2bba28825cc1dd26179b8dd01a9a0054'}, ] builddependencies = [ diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch index bb7aa1cd1f1..dfb16cced30 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.23_fix-lapack-test.patch @@ -13,3 +13,13 @@ Author: Bart Oldeman 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