Skip to content

Commit

Permalink
reintroducing new patch for OpenBLAS based on OpenBLAS/PR3983
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed May 13, 2023
1 parent ea134c2 commit dc11c9a
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 4 deletions.
2 changes: 1 addition & 1 deletion EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ if [[ $GENERIC -eq 1 ]]; then
ok_msg="Done with OpenBLAS (GENERIC architecture)!"
fail_msg="Installation of OpenBLAS (GENERIC architecture) failed!"
echo_yellow ">> Using https://github.com/easybuilders/easybuild-easyblocks/pull/1946 to build generic OpenBLAS."
$EB --parallel 1 --include-easyblocks easyblocks/o/openblas-pr1946-cc74e45.py OpenBLAS-0.3.15-GCC-10.3.0.eb --robot
$EB --include-easyblocks easyblocks/o/openblas-pr1946-cc74e45.py OpenBLAS-0.3.15-GCC-10.3.0.eb --robot
check_exit_code $? "${ok_msg}" "${fail_msg}"
#else
# # also install OpenBLAS for non-GENERIC targets because it seems 'parallel'
Expand Down
37 changes: 37 additions & 0 deletions OpenBLAS-0.3.15-GCC-10.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name = 'OpenBLAS'
version = '0.3.15'

homepage = 'https://xianyi.github.com/OpenBLAS/'
description = "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version."

toolchain = {'name': 'GCC', 'version': '10.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-%(version)s_icelake-detection.patch',
'OpenBLAS-%(version)s_fix-aarch64.patch',
'OpenBLAS-%(version)s_workaround-gcc-miscompilation.patch',
'patches/OpenBLAS-%(version)s_fix-race-build-targets-with-pr3983.patch',
]
checksums = [
'30a99dec977594b387a17f49904523e6bc8dd88bd247266e83485803759e4bbe', # v0.3.15.tar.gz
'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1', # large.tgz
'999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af', # timing.tgz
'aa96e1c3b1532dbafe4b6e8591688ef200e99304a902851f342cb9d467219762', # OpenBLAS-0.3.15_icelake-detection.patch
'ba7bd45af9fe0516f8c9b1cf047eec7b833996e481bc925d4fb2563865d3db38', # OpenBLAS-0.3.15_fix-aarch64.patch
# OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971',
'a227c534fce104f2633bbc2f66a31752e9c6947143f73bf85514ad22ff85da22', # OpenBLAS-0.3.15_fix-race-build-targets-with-pr3983.patch
]

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

moduleclass = 'numlib'
4 changes: 1 addition & 3 deletions eessi-2023.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ easyconfigs:
options:
include-easyblocks-from-pr: 2248
- Perl-5.32.1-GCCcore-10.3.0.eb
- OpenBLAS-0.3.15-GCC-10.3.0.eb:
options:
parallel: "1"
- OpenBLAS-0.3.15-GCC-10.3.0.eb
- OpenMPI-4.1.1-GCC-10.3.0.eb
57 changes: 57 additions & 0 deletions patches/OpenBLAS-0.3.15_fix-race-build-targets-with-pr3983.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
diff --git a/Makefile b/Makefile
index 555d1c46..2c3f9660 100644
--- a/Makefile
+++ b/Makefile
@@ -37,9 +37,9 @@ LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast,$(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
@@ -116,7 +116,7 @@ endif
@echo "To install the library, you can run \"make PREFIX=/path/to/your/installation install\"."
@echo

-shared :
+shared : libs netlib $(RELA)
ifneq ($(NO_SHARED), 1)
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku FreeBSD DragonFly))
@$(MAKE) -C exports so
@@ -140,7 +140,7 @@ ifeq ($(OSNAME), CYGWIN_NT)
endif
endif

-tests :
+tests : shared
ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
touch $(LIBNAME)
ifndef NO_FBLAS
diff --git a/getarch.c b/getarch.c
index f48944f3..4bd93e3a 100644
--- a/getarch.c
+++ b/getarch.c
@@ -1547,15 +1547,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;

0 comments on commit dc11c9a

Please sign in to comment.