diff options
Diffstat (limited to 'spec2xxx-config')
-rwxr-xr-x | spec2xxx-config | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/spec2xxx-config b/spec2xxx-config index c9c3259..6dc4f28 100755 --- a/spec2xxx-config +++ b/spec2xxx-config @@ -48,20 +48,22 @@ if [ $# -gt 0 ]; then fi if [ x"$build" != x"" ]; then - # [<type>://]<host>[:<port>][/<scale>] + # <host>[:<type>][:<parallelize>][:<port>] - build_type="$(echo $build | sed -e "s#://.*##g")" - build_host="$(echo $build | sed -e "s#.*://##g" -e "s#:.*##g" -e "s#/.*##g")" - build_port="$(echo $build | sed -e "s#.*:##g" -e "s#/.*##g")" - build_scale="$(echo $build | sed -e "s#.*/##g")" + build_host="$(echo $build | cut -d: -f 1)" + build_type="$(echo $build | cut -d: -f 2)" + parallelize="$(echo $build | cut -d: -f 3)" + build_port="$(echo $build | cut -d: -f 4)" - if [ x"$build_type" = x"" ]; then build_type="rsync"; fi if [ x"$build_host" = x"" ]; then echo "ERROR: wrong --build: $build" exit 1 fi - if [ x"$build_port" != x"" ]; then build_port="-p $build_port"; fi - if [ x"$build_scale" = x"" ]; then build_scale="1"; fi + if [ x"$build_type" = x"" ]; then build_type="rsync"; fi + if [ x"$parallelize" = x"" ]; then + parallelize="$(ssh $build_port $build_host getconf _NPROCESSORS_ONLN)" + fi + if [ x"$build_port" != x"" ]; then build_port="-p$build_port"; fi if [ x"$build_type" = x"rsync" ]; then lock=$spec/bin/ssh-$config.lock @@ -89,7 +91,7 @@ if echo \$dir | grep -q $spec/benchspec; then if [ x"\$n" = x"" ]; then n="0"; fi if [ x"\$n" = x"0" ]; then - rsync -e "ssh $build_port $build_host" --rsync-path "mkdir -p \$dir; rsync" -az --delete \$dir/ $build:\$dir/ + rsync -e "ssh $build_port" --rsync-path "mkdir -p \$dir; rsync" -az --delete \$dir/ $build:\$dir/ fi n=\$((\$n+1)) @@ -109,7 +111,7 @@ if echo \$dir | grep -q $spec/benchspec; then echo \$n > \$count if [ x"\$n" = x"0" ]; then - rsync -e "ssh $build_port $build_host" -az --delete $build:\$dir/ \$dir/ + rsync -e "ssh $build_port" -az --delete $build_host:\$dir/ \$dir/ fi ) 123>\$lock else @@ -128,7 +130,7 @@ EOF set -e dir=\$(pwd) -rsync -e "ssh $build_port $build_host" --rsync-path "mkdir -p \$dir; rsync" -az --delete \$dir/ $build:\$dir/ +rsync -e "ssh $build_port" --rsync-path "mkdir -p \$dir; rsync" -az --delete \$dir/ $build_host:\$dir/ exec ssh $build_port $build_host "cd \$dir; exec tar \$@" EOF chmod +x $spec/bin/ssh-$config-tar @@ -157,13 +159,6 @@ EOF tar_prog=$spec/bin/ssh-$config-tar ssh -fN -o ControlPersist=yes $build_port $build_host - parallelize="$(ssh $build_port $build_host getconf _NPROCESSORS_ONLN)" - parallelize="$(echo "scale=0; ($parallelize * $build_scale) / 1" | bc)" - if [ "$parallelize" -gt "20" ]; then - # Default configuration of ssh servers limit number of incoming - # connections to about 20, and drop the rest. - parallelize="20" - fi remotefs_parallelize="$parallelize" if [ x"$build_type" = x"rsync" ]; then # Several fortran tests use non-compiler preprocessor, which |