From 48bdc1ad3bb0ddf46a14abe8d395559c52de691e Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Mon, 15 Apr 2013 21:37:30 +0800 Subject: [PATCH] Added NO_PARALLEL_MAKE flag to disable parallel make. --- Makefile.rule | 3 +++ Makefile.system | 4 ++++ getarch.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/Makefile.rule b/Makefile.rule index 4e23857..e62508f 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -81,6 +81,9 @@ VERSION = 0.2.6 # and OS. However, the performance is low. # NO_AVX = 1 +# Don't use parallel make. +# NO_PARALLEL_MAKE = 1 + # If you would like to know minute performance report of GotoBLAS. # FUNCTION_PROFILE = 1 diff --git a/Makefile.system b/Makefile.system index eac61e9..bd4fe58 100644 --- a/Makefile.system +++ b/Makefile.system @@ -65,6 +65,10 @@ ifeq ($(DEBUG), 1) GETARCH_FLAGS += -g endif +ifndef NO_PARALLEL_MAKE +NO_PARALLEL_MAKE=0 +endif +GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE) # This operation is expensive, so execution should be once. ifndef GOTOBLAS_MAKEFILE export GOTOBLAS_MAKEFILE = 1 diff --git a/getarch.c b/getarch.c index ac10f1c..48d2827 100644 --- a/getarch.c +++ b/getarch.c @@ -804,9 +804,13 @@ int main(int argc, char *argv[]){ #endif #endif +#if NO_PARALLEL_MAKE==1 + printf("MAKE += -j 1\n"); +#else #ifndef OS_WINDOWS printf("MAKE += -j %d\n", get_num_cores()); #endif +#endif break; -- 2.7.4