#!/bin/bash
ulimit -s unlimited
ulimit -c unlimited
source shrc
relocate
md5sum ./exe/*

CPU_CORE=`lscpu|grep "CPU(s)"|head -n 1|awk -F " " '{print $2}'`

set -x
rm -rf benchspec/CPU2006/*/run
rm -rf benchspec/CPU2006/*/build

if [ $# -eq 1 ] ; then 
   #在Ofast选项下，进行多核测试，-r 指定cpu核数
   runspec -c  gcc-loongarch-2006-3a6000-15-v1.$1.cfg  -i ref -n 3 all  -I  -D -r $1
else
   #在Ofast选项下，进行单核测试
   runspec -c  gcc-loongarch-2006-3a6000-15-v1.0.cfg   -i ref -n 3 all  -I  -D 
fi

rm -rf benchspec/CPU2006/*/run
rm -rf benchspec/CPU2006/*/build
set +x
date
echo "end"

