|
|
@@ -1,15 +1,26 @@
|
|
|
#!/bin/sh
|
|
|
|
|
|
-ncpus=$(nproc)
|
|
|
+ncpus=""
|
|
|
+cpurange=""
|
|
|
|
|
|
-while -n "$1"; do
|
|
|
+while [ -n "$1" ]; do
|
|
|
if [ "$1" == "--fast" ]; then
|
|
|
fast=true
|
|
|
elif [ "$1" == "-n" ]; then
|
|
|
ncpus="$2"
|
|
|
shift
|
|
|
+ elif [ "$1" == "-N" ]; then
|
|
|
+ cpurange="$2"
|
|
|
+ shift
|
|
|
fi
|
|
|
shift
|
|
|
done
|
|
|
|
|
|
-./run.sh --fast -n "$ncpus"
|
|
|
+if [ -z "$ncpus" ]; then
|
|
|
+ ncpus=$(nproc)
|
|
|
+fi
|
|
|
+if [ -z "$cpurange" ]; then
|
|
|
+ cpurange="0-$((ncpus - 1))"
|
|
|
+fi
|
|
|
+
|
|
|
+./run.sh --fast -n "$ncpus" -N "$cpurange"
|