-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
(venv) howes% ./open_spiel/scripts/build_and_run_tests.sh
++ CXX=g++
++ [[ darwin18 == \d\a\r\w\i\n* ]]
++ alias 'nproc=sysctl -n hw.physicalcpu'
++ CXX=/usr/local/bin/g++-7
+++ nproc
./open_spiel/scripts/build_and_run_tests.sh: line 37: nproc: command not found
++ MAKE_NUM_PROCS=
Apparently nproc alias is not expanded in the build_and_run_tests.sh script in the $(nproc) expression. My fix:
diff --git a/open_spiel/scripts/build_and_run_tests.sh b/open_spiel/scripts/build_and_run_tests.sh
index ba0ec84..a4a64ab 100755
--- a/open_spiel/scripts/build_and_run_tests.sh
+++ b/open_spiel/scripts/build_and_run_tests.sh
@@ -29,13 +29,14 @@ set -e # exit when any command fails
set -x
CXX=g++
+NPROC=nproc
if [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX
- alias nproc="sysctl -n hw.physicalcpu"
+ NPROC="sysctl -n hw.physicalcpu"
CXX=/usr/local/bin/g++-7
fi
-MAKE_NUM_PROCS=$(nproc)
-let TEST_NUM_PROCS=4*$(nproc)
+MAKE_NUM_PROCS=$(${NPROC})
+let TEST_NUM_PROCS=4*${MAKE_NUM_PROCS}
PYVERSION=$(python3 -c 'import sys; print(sys.version.split(" ")[0])')
PY_VERSION_MAJOR=$(python3 -c 'import sys; print(sys.version_info.major)')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels