Skip to content

Commit 7f177aa

Browse files
committed
Merge pull request #15720 from eschnett/eschnett/openblas-make
Use fewer processes while building OpenBLAS
2 parents 24b7196 + 42d13b4 commit 7f177aa

File tree

8 files changed

+42
-82
lines changed

8 files changed

+42
-82
lines changed

deps/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,10 +1184,11 @@ else ifeq ($(OPENBLAS_NO_AVX2), 1)
11841184
OPENBLAS_BUILD_OPTS += NO_AVX2=1
11851185
endif
11861186

1187+
# Do not overwrite the "-j" flag
1188+
OPENBLAS_BUILD_OPTS += MAKE_NB_JOBS=0
1189+
11871190
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/Makefile
1188-
ifeq ($(OS),WINNT)
1189-
cd $(dir $@) && patch -p1 < $(SRCDIR)/openblas-win64.patch
1190-
endif
1191+
cd $(dir $@) && patch -p1 < $(SRCDIR)/openblas-make.patch
11911192
perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $<.system
11921193
touch $@
11931194
$(OPENBLAS_OBJ_SOURCE): $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status

deps/checksums/openblas-53e849f4fcae4363a64576de00e982722c7304f9.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/openblas-53e849f4fcae4363a64576de00e982722c7304f9.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a3850786d63f4af657d2aeb1baab5b20
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0a3e7bb0660148207732a58d411bb492f674d57e6733eee1c293b749f00516efd9d47e62193a9ac480bbbddb0b25c5bd4a66eb9caa717a0d2906c9dcbb3c39fe

deps/openblas-make.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
commit 7aac0aff8ec22598734f5effa2fcc107c95c0655
2+
diff --git a/Makefile.rule b/Makefile.rule
3+
index 847ee1c..6d0d8f4 100644
4+
--- a/Makefile.rule
5+
+++ b/Makefile.rule
6+
@@ -112,7 +112,10 @@ NO_AFFINITY = 1
7+
# NO_PARALLEL_MAKE = 1
8+
9+
# Force number of make jobs. The default is the number of logical CPU of the host.
10+
-# This is particularly useful when using distcc
11+
+# This is particularly useful when using distcc.
12+
+# A negative value will disable adding a -j flag to make, allowing to use a parent
13+
+# make -j value. This is usefull to call OpenBLAS make from an other project
14+
+# makefile
15+
# MAKE_NB_JOBS = 2
16+
17+
# If you would like to know minute performance report of GotoBLAS.
18+
diff --git a/getarch.c b/getarch.c
19+
index f9c49e6..1e0b086 100644
20+
--- a/getarch.c
21+
+++ b/getarch.c
22+
@@ -1013,7 +1013,12 @@ int main(int argc, char *argv[]){
23+
#endif
24+
25+
#ifdef MAKE_NB_JOBS
26+
+ #if MAKE_NB_JOBS > 0
27+
printf("MAKE += -j %d\n", MAKE_NB_JOBS);
28+
+ #else
29+
+ // Let make use parent -j argument or -j1 if there
30+
+ // is no make parent
31+
+ #endif
32+
#elif NO_PARALLEL_MAKE==1
33+
printf("MAKE += -j 1\n");
34+
#else

deps/openblas-win64.patch

Lines changed: 0 additions & 75 deletions
This file was deleted.

deps/openblas.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
OPENBLAS_BRANCH=v0.2.15
2-
OPENBLAS_SHA1=53e849f4fcae4363a64576de00e982722c7304f9
1+
OPENBLAS_BRANCH=v0.2.17
2+
OPENBLAS_SHA1=a71e8c82f6a9f73093b631e5deab1e8da716b61f

0 commit comments

Comments
 (0)