1 Star 0 Fork 0

lindorx / stream2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run 697 Bytes
一键复制 编辑 原始数据 按行查看 历史
代凡 提交于 2021-03-04 19:08 . 不显示run执行过程
#!/bin/bash
mkdir -p results
CMD=./stream2
MUCMD=./stream2_mu
#unset OMP_NUM_THREADS
CPUNO=`cat /proc/cpuinfo|grep processor|wc -l`
times=`date +%H%M%S`
usage()
{
echo "usage: run [-n #]
"
}
while getopts "n:" arg
do
if ( [ $arg == n ] )
then
if [ $OPTARG -eq 1 ]
then
$CMD >./results/$OPTARG-$times.result
continue
else
export OMP_NUM_THREADS=$OPTARG
if [ -f $MUCMD ]
then
$MUCMD >./results/$OPTARG-$times.result
fi
fi
elif [ $arg==-h ]
then
usage
else
usage
fi
done
if [ $# -lt 1 ]
then
if [ -f $CMD ]
then
$CMD >./results/Single-$times.result
fi
if [ -f $MUCMD ]
then
$MUCMD >./results/$CPUNO-$times.result
fi
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/lindorx/stream2.git
git@gitee.com:lindorx/stream2.git
lindorx
stream2
stream2
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891