|
@@ -5,7 +5,8 @@ tmp_fifofile="/tmp/$$.fifo" # 脚本运行的当前进程ID号作为文件名
|
|
|
mkfifo "$tmp_fifofile" # 新建一个随机fifo管道文件
|
|
mkfifo "$tmp_fifofile" # 新建一个随机fifo管道文件
|
|
|
exec 6<>"$tmp_fifofile" # 定义文件描述符6指向这个fifo管道文件
|
|
exec 6<>"$tmp_fifofile" # 定义文件描述符6指向这个fifo管道文件
|
|
|
rm $tmp_fifofile
|
|
rm $tmp_fifofile
|
|
|
-for ((i=0; i<SEND_THREAD_NUM; i++));do
|
|
|
|
|
|
|
+for i in $(seq 1 $SEND_THREAD_NUM)
|
|
|
|
|
+do
|
|
|
echo # for循环 往 fifo管道文件中写入 $SEND_THREAD_NUM 个空行
|
|
echo # for循环 往 fifo管道文件中写入 $SEND_THREAD_NUM 个空行
|
|
|
done >&6
|
|
done >&6
|
|
|
|
|
|
|
@@ -14,7 +15,7 @@ CUTOFF_TIME=1000
|
|
|
instance_dirs="bio col fb inf int rec ret sci soc tec web"
|
|
instance_dirs="bio col fb inf int rec ret sci soc tec web"
|
|
|
|
|
|
|
|
all_results_dir=$1
|
|
all_results_dir=$1
|
|
|
-graph_dir="/home/pkutcs/graphs"
|
|
|
|
|
|
|
+graph_dir="/home/jkunlin/all_graphs/graphs"
|
|
|
if [ -d "$all_results_dir" ]
|
|
if [ -d "$all_results_dir" ]
|
|
|
then
|
|
then
|
|
|
echo "warning: $all_results_dir exist"
|
|
echo "warning: $all_results_dir exist"
|
|
@@ -36,16 +37,16 @@ do
|
|
|
find "$graph_dir/$ins_dir" -maxdepth 1 -mindepth 1 |
|
|
find "$graph_dir/$ins_dir" -maxdepth 1 -mindepth 1 |
|
|
|
while read instance
|
|
while read instance
|
|
|
do
|
|
do
|
|
|
- read -u6
|
|
|
|
|
|
|
+ read -u 6
|
|
|
{
|
|
{
|
|
|
- instance=$(basename "$instance")$
|
|
|
|
|
|
|
+ instance=$(basename "$instance")
|
|
|
res_dir="$res_dir"/"$instance"
|
|
res_dir="$res_dir"/"$instance"
|
|
|
if [ ! -d "$res_dir" ]
|
|
if [ ! -d "$res_dir" ]
|
|
|
then
|
|
then
|
|
|
mkdir "$res_dir"
|
|
mkdir "$res_dir"
|
|
|
fi
|
|
fi
|
|
|
- res_file="$res_dir"/"$instance"_$seed
|
|
|
|
|
- echo "$graph_dir/$ins_dir/$instance" "$CANDIDATE" "$seed" "$CUTOFF_TIME" > "$res_file"
|
|
|
|
|
|
|
+ res_file="$res_dir"/"$instance"_"$seed"
|
|
|
|
|
+ echo "$graph_dir/$ins_dir/$instance" "$seed" "$CUTOFF_TIME" > "$res_file"
|
|
|
echo >&6
|
|
echo >&6
|
|
|
} &
|
|
} &
|
|
|
done
|
|
done
|