#!/bin/bash SEND_THREAD_NUM=4 tmp_fifofile="/tmp/$$.fifo" # 脚本运行的当前进程ID号作为文件名 mkfifo "$tmp_fifofile" # 新建一个随机fifo管道文件 exec 6<>"$tmp_fifofile" # 定义文件描述符6指向这个fifo管道文件 rm $tmp_fifofile for i in $(seq 1 $SEND_THREAD_NUM) do echo # for循环 往 fifo管道文件中写入 $SEND_THREAD_NUM 个空行 done >&6 # CUTOFF_TIME=3600 instance_20="/pub/data/chenzh/data/sat2020" instance_21="/pub/data/chenzh/data/sat2021" instance_22="/pub/data/chenzh/data/sat2022" res1="/pub/data/chenzh/res/light/v1-origin" res2="/pub/data/chenzh/res/light/v4-1-preprocess" res3="/pub/data/chenzh/res/light/v1-1-origin" res4="/pub/data/chenzh/res/light/v2-preprocess" res5="/pub/data/chenzh/res/light/v3--1-preprocess" res6="/pub/data/chenzh/res/light/v4-3-nosharing-r" res_no="/pub/data/chenzh/res/unused" ##################################################### all_datas=($instance_22) for((i=0;i<${#all_datas[*]};i++)) do instance=${all_datas[$i]} res_solver_ins=$res6 if [ ! -d "$res_solver_ins" ]; then mkdir -p $res_solver_ins fi for dir_file in `cat $instance/vbs.txt` do file=$dir_file echo $file touch $res_solver_ins/$file read -u 6 { cd /home/chenzh/solvers/Light time ./light-v4-3 $instance/$file --share==0 echo >&6 } >$res_solver_ins/$file 2>>$res_solver_ins/$file & done # res_solver_ins=$res5 # if [ ! -d "$res_solver_ins" ]; then # mkdir -p $res_solver_ins # fi # for dir_file in `cat $instance/vbs.txt` # do # file=$dir_file # echo $file # touch $res_solver_ins/$file # read -u 6 # { # cd /home/chenzh/solvers/Light # time ./light-v3--1 $instance/$file --share=1 --threads=31 # echo >&6 # } >$res_solver_ins/$file 2>>$res_solver_ins/$file & # done # res_solver_ins=$res4 # if [ ! -d "$res_solver_ins" ]; then # mkdir -p $res_solver_ins # fi # for dir_file in `cat $instance/vbs.txt` # do # file=$dir_file # echo $file # touch $res_solver_ins/$file # read -u 6 # { # cd /home/chenzh/solvers/Light # time ./light-v2 $instance/$file --share=1 --threads=31 # echo >&6 # } >$res_solver_ins/$file 2>>$res_solver_ins/$file & # done # res_solver_ins=$res3 # if [ ! -d "$res_solver_ins" ]; then # mkdir -p $res_solver_ins # fi # for dir_file in `cat $instance/vbs.txt` # do # file=$dir_file # echo $file # touch $res_solver_ins/$file # read -u 6 # { # cd /home/chenzh/solvers/Light # time ./light-v1-1 $instance/$file --simplify=0 --reset=1 # echo >&6 # } >$res_solver_ins/$file 2>>$res_solver_ins/$file & # done # res_solver_ins=$res2 # if [ ! -d "$res_solver_ins" ]; then # mkdir -p $res_solver_ins # fi # for dir_file in `cat $instance/vbs.txt` # do # file=$dir_file # echo $file # touch $res_solver_ins/$file # read -u 6 # { # cd /home/chenzh/solvers/Light # time ./light-v4-1 $instance/$file --simplify=1 # echo >&6 # } >$res_solver_ins/$file 2>>$res_solver_ins/$file & # done # res_solver_ins=$res1 # if [ ! -d "$res_solver_ins" ]; then # mkdir -p $res_solver_ins # fi # for dir_file in `cat $instance/vbs.txt` # do # file=$dir_file # echo $file # touch $res_solver_ins/$file # read -u 6 # { # cd /home/chenzh/solvers/Light # time ./light-v1 $instance/$file --simplify=0 # echo >&6 # } >$res_solver_ins/$file 2>>$res_solver_ins/$file & # done done res_solver_ins=$res_no if [ ! -d "$res_solver_ins" ]; then mkdir -p $res_solver_ins fi for((i=0;i<4;i++)) do read -u 6 { cd /home/chenzh/solvers/Light time ./light-v1 /home/chenzh/data/hard_cnfs/49.cnf echo >&6 } >$res_solver_ins/$i 2>>$res_solver_ins/$i & done exit 0