Skip to content

Commit

Permalink
toolchain/OpenBLAS: fix double-parallel build issue
Browse files Browse the repository at this point in the history
OpenBLAS has an integrated parallelisation which automatically uses all
available CPUs, leading to a larger number of threads than expected when
specifying "-j N". Disable this by setting MAKE_NB_JOBS=0
  • Loading branch information
dev-zero authored and oschuett committed Nov 3, 2018
1 parent 9993a6d commit 868da16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/toolchain/scripts/install_openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ case "$with_openblas" in
# TARGET=NEHALEM
#
( make -j $NPROCS \
MAKE_NB_JOBS=0 \
USE_THREAD=0 \
CC="${CC}" \
FC="${FC}" \
Expand All @@ -57,6 +58,7 @@ case "$with_openblas" in
) || ( \
make -j $NPROCS clean; \
make -j $NPROCS \
MAKE_NB_JOBS=0 \
TARGET=NEHALEM \
USE_THREAD=0 \
CC="${CC}" \
Expand All @@ -65,6 +67,7 @@ case "$with_openblas" in
> make.serial.log 2>&1 \
)
make -j $NPROCS \
MAKE_NB_JOBS=0 \
USE_THREAD=0 \
CC="${CC}" \
FC="${FC}" \
Expand All @@ -73,6 +76,7 @@ case "$with_openblas" in
if [ $ENABLE_OMP = "__TRUE__" ] ; then
make clean > clean.log 2>&1
make -j $NPROCS \
MAKE_NB_JOBS=0 \
USE_THREAD=1 \
USE_OPENMP=1 \
LIBNAMESUFFIX=omp \
Expand All @@ -81,6 +85,7 @@ case "$with_openblas" in
PREFIX="${pkg_install_dir}" \
> make.omp.log 2>&1
make -j $NPROCS \
MAKE_NB_JOBS=0 \
USE_THREAD=1 \
USE_OPENMP=1 \
LIBNAMESUFFIX=omp \
Expand Down

0 comments on commit 868da16

Please sign in to comment.