Commit 8ecdd090 authored by Sonja Happ's avatar Sonja Happ

simplify run_cluster script

parent cf45f2da
......@@ -40,17 +40,22 @@ PROCESS_N=4
#
##
SWARM0_ETH=137.226.133.156
SWARM1_ETH=137.226.133.157
SWARM2_ETH=137.226.133.158
SWARM3_ETH=137.226.133.159
#SWARM0_ETH=137.226.133.156
#SWARM1_ETH=137.226.133.157
#SWARM2_ETH=137.226.133.158
#SWARM3_ETH=137.226.133.159
SWARM0_INF=10.0.0.20
SWARM1_INF=10.0.0.21
SWARM2_INF=10.0.0.22
SWARM3_INF=10.0.0.23
#SWARM0_INF=10.0.0.20
#SWARM1_INF=10.0.0.21
#SWARM2_INF=10.0.0.22
#SWARM3_INF=10.0.0.23
USE_INF=false
SWARM0=swarm0
SWARM1=swarm1
SWARM2=swarm2
SWARM3=swarm3
#USE_INF=false
cd "${0%/*}"
......@@ -135,19 +140,19 @@ set_hosts() {
fi
}
set_eth(){
SWARM0=$SWARM0_ETH
SWARM1=$SWARM1_ETH
SWARM2=$SWARM2_ETH
SWARM3=$SWARM3_ETH
}
#set_eth(){
# SWARM0=$SWARM0_ETH
# SWARM1=$SWARM1_ETH
# SWARM2=$SWARM2_ETH
# SWARM3=$SWARM3_ETH
#}
set_inf(){
SWARM0=$SWARM0_INF
SWARM1=$SWARM1_INF
SWARM2=$SWARM2_INF
SWARM3=$SWARM3_INF
}
#set_inf(){
# SWARM0=$SWARM0_INF
# SWARM1=$SWARM1_INF
# SWARM2=$SWARM2_INF
# SWARM3=$SWARM3_INF
#}
echo "################### START #######################"
......@@ -165,19 +170,19 @@ do
HOSTS_ARG=$OPTARG
ARG_COUNTER=$((ARG_COUNTER+1))
;;
i)
USE_INF=true
ARG_COUNTER=$((ARG_COUNTER+1))
;;
#i)
# USE_INF=true
# ARG_COUNTER=$((ARG_COUNTER+1))
# ;;
esac
done
if [[ $USE_INF == true ]]
then
set_inf
else
set_eth
fi
#if [[ $USE_INF == true ]]
#then
# set_inf
#else
# set_eth
#fi
if [[ $HOSTS_ARG == "" ]]
......@@ -191,8 +196,8 @@ fi
set -x
start_time=`date +%s%N`
#export PSP_DEBUG=1
#mpiexec -n $PROCESS_N -hosts=$HOSTS ./distaix ../props/config.props ../props/model.props 2> error
mpiexec -n $PROCESS_N -hosts=$HOSTS ./distaix ../props/config.props ../props/model.props ${@:$((ARG_COUNTER+1))} 2> error
mpiexec -n $PROCESS_N -hosts=$HOSTS ./distaix ../props/config.props ../props/model.props 2> error
#mpiexec -n $PROCESS_N -hosts=$HOSTS ./distaix ../props/config.props ../props/model.props ${@:$((ARG_COUNTER+1))} 2> error
end_time=`date +%s%N`
echo execution time was `expr $end_time - $start_time` ns.
echo "######################## END ########################"
\ No newline at end of file
echo "######################## END ########################"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment