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

Use fewer processes while building OpenBLAS #15720

Merged
merged 1 commit into from
Apr 2, 2016
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
7 changes: 4 additions & 3 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1184,10 +1184,11 @@ else ifeq ($(OPENBLAS_NO_AVX2), 1)
OPENBLAS_BUILD_OPTS += NO_AVX2=1
endif

# Do not overwrite the "-j" flag
OPENBLAS_BUILD_OPTS += MAKE_NB_JOBS=0

$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/Makefile
ifeq ($(OS),WINNT)
cd $(dir $@) && patch -p1 < $(SRCDIR)/openblas-win64.patch
endif
cd $(dir $@) && patch -p1 < $(SRCDIR)/openblas-make.patch
perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $<.system
touch $@
$(OPENBLAS_OBJ_SOURCE): $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a3850786d63f4af657d2aeb1baab5b20
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0a3e7bb0660148207732a58d411bb492f674d57e6733eee1c293b749f00516efd9d47e62193a9ac480bbbddb0b25c5bd4a66eb9caa717a0d2906c9dcbb3c39fe
34 changes: 34 additions & 0 deletions deps/openblas-make.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
commit 7aac0aff8ec22598734f5effa2fcc107c95c0655
diff --git a/Makefile.rule b/Makefile.rule
index 847ee1c..6d0d8f4 100644
--- a/Makefile.rule
+++ b/Makefile.rule
@@ -112,7 +112,10 @@ NO_AFFINITY = 1
# NO_PARALLEL_MAKE = 1

# Force number of make jobs. The default is the number of logical CPU of the host.
-# This is particularly useful when using distcc
+# This is particularly useful when using distcc.
+# A negative value will disable adding a -j flag to make, allowing to use a parent
+# make -j value. This is usefull to call OpenBLAS make from an other project
+# makefile
# MAKE_NB_JOBS = 2

# If you would like to know minute performance report of GotoBLAS.
diff --git a/getarch.c b/getarch.c
index f9c49e6..1e0b086 100644
--- a/getarch.c
+++ b/getarch.c
@@ -1013,7 +1013,12 @@ int main(int argc, char *argv[]){
#endif

#ifdef MAKE_NB_JOBS
+ #if MAKE_NB_JOBS > 0
printf("MAKE += -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");
#else
75 changes: 0 additions & 75 deletions deps/openblas-win64.patch

This file was deleted.

4 changes: 2 additions & 2 deletions deps/openblas.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
OPENBLAS_BRANCH=v0.2.15
OPENBLAS_SHA1=53e849f4fcae4363a64576de00e982722c7304f9
OPENBLAS_BRANCH=v0.2.17
OPENBLAS_SHA1=a71e8c82f6a9f73093b631e5deab1e8da716b61f