Skip to content

Instantly share code, notes, and snippets.

@amaslenn
Last active April 10, 2020 04:49
Show Gist options
  • Save amaslenn/184d3a06ac05cd03e1ad666e354e7c41 to your computer and use it in GitHub Desktop.
Save amaslenn/184d3a06ac05cd03e1ad666e354e7c41 to your computer and use it in GitHub Desktop.
Measure parallel runs tims
#!/bin/bash -eE
taskset -c 0-1 ./run-one.sh ucx &
taskset -c 2-3 ./run-one.sh ucx1 &
taskset -c 4-5 ./run-one.sh ucx2 &
taskset -c 6-7 ./run-one.sh ucx3 &
wait
#!/bin/bash -eE
work_dir=$1
nproc=$(nproc)
#nproc=4
#export AUTOMAKE_JOBS=$nproc
error() {
msg=$1
echo "ERROR: $msg"
exit 1
}
prepare() {
git clean -ffdx >/dev/null 2>&1
SECONDS=0
./autogen.sh >/dev/null 2>&1
}
run_test() {
./configure --prefix=$PWD/__inst >/dev/null 2>&1
make -j$nproc >/dev/null 2>&1
}
cd "$work_dir"
prepare
#SECONDS=0
run_test
echo "Took $SECONDS sec (nproc=$nproc)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment