1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/wdfnst-GraphMapReduce

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
startgmr.sh 1.6 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
wdfnst Отправлено 02.03.2016 18:49 a838a53
#!/bin/bash
#
# 节点个数, 从machinefile中获取
command="mpirun"
hostsfile="hosts"
hosts_num=0
algorithm="pagerank"
graphfile="rdmdual.graph"
partition="random"
if [ $# -lt 1 ]; then
echo "执行默认测试算法和示例数据"
mpirun -np 3 ./gmr
exit 0
fi
# 判断集群运行, 还是单节点运行
if [ "$1" = "cluster" ]; then
echo "cluster"
if [ $# -lt 2 ]; then
echo "./startgmr.sh cluster hosts algorithm partition graphfile"
exit 0
fi
if [ $# -gt 1 ]; then
hostsfile=$2
command="$command"" -machinefile $hostsfile"
# 判断提供的hostsfile文件是否存在
if [ ! -f "$hostsfile" ]; then
echo "提供的machinefile不存在"
exit 0
fi
# 遍历hosts文件中的节点个数
for i in `grep -v "#" $2`; do
hosts_num=`expr $hosts_num + 1`
done
command="$command"" -np $hosts_num"
fi
command=$command" ./gmr "
if [ $# -gt 2 ]; then
algorithm=$3
command="$command"" $algorithm"
fi
if [ $# -gt 3 ]; then
partition=$4
command="$command"" $partition"
fi
if [ $# -gt 4 ]; then
graphfile=$5
command="$command"" $graphfile"
fi
else
# ... ./gmr algorithm partition graphfile
command=$command" -np 3 gmr "
if [ $# -gt 0 ]; then
algorithm=$1
command="$command"" $algorithm"
fi
if [ $# -gt 1 ]; then
partition=$2
command="$command"" $partition"
fi
if [ $# -gt 2 ]; then
graphfile=$3
command="$command"" $graphfile"
fi
fi
echo "执行命令:"$command
eval $command

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/wdfnst-GraphMapReduce.git
git@api.gitlife.ru:oschina-mirror/wdfnst-GraphMapReduce.git
oschina-mirror
wdfnst-GraphMapReduce
wdfnst-GraphMapReduce
master