4 Star 6 Fork 7

mathlib/exprAuto

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sampleErrorTwo.sh 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
hjwLab 提交于 2023-03-22 15:27 . Improve exprAuto
#!/bin/bash
# Usage: ./sampleTwoFPEDParallel.sh ${uniqueLabel} ${x0Start} ${x0End} ${x1Start} ${x1End} ${x0Size} ${x1Size} ${prefix} ${middle} ${suffix}
# set -x
path=`pwd`
cd ${path}
CC=mpicc
uniqueLabel=${1} # unique number
x0Start=${2}
x0End=${3}
x1Start=${4}
x1End=${5}
if [ $# -eq 10 ]; then
drawNum=${6}
findMaxNum=${7}
prefix=${8} # expr_${uniqueLabel}. Eg: expr_20221030155958
middle=${9} # intervalsInfo_sizes. Eg: 3.8_7.8_-4.5_-0.3_0.4_0.9_256_256_256
suffix=${10} # different version. Eg: herbie daisy origin temp_0_3 final
elif [ $# -eq 8 ]; then
drawNum=8192
findMaxNum=2048
prefix=${6}
middle=${7}
suffix=${8}
else
echo "sampleTwoFPEDParallel: Invalid input parameters"
exit
fi
testFileName=sample2paramFPEDParallel
numProcs=32
# echo "sampling: ${uniqueLabel} ${x0Start} ${x0End} ${x1Start} ${x1End} ${drawNum} ${findMaxNum} ${prefix} ${middle} ${suffix} ${errfile}"
directory="./srcTest"/${uniqueLabel}
sourceFile=${prefix}_${suffix}
fileNameKernel=${prefix}__${middle}_${suffix}
${CC} ./srcTest/${testFileName}.c ${directory}/${sourceFile}.c ${directory}/${prefix}_mpfr.c ./srcTest/computeULP.c -IincludeTEST -IincludeDD -DEXPRESSION=${prefix}_ -DSUFFIX=${suffix} -Llibs -lTGen -lmpfr -lm -lqd -o ${testFileName}.exe
mpirun -n ${numProcs} ./${testFileName}.exe ${x0Start} ${x0End} ${x1Start} ${x1End} ${drawNum} ${findMaxNum} ${fileNameKernel} ${uniqueLabel}
rm ${testFileName}.exe
# combine files
cd ./outputs/${uniqueLabel}
## for sample_X
findWord="${fileNameKernel}_sample_X_*.txt"
# echo "For suffix = ${suffix}, Find and combine by shell command cat: ${findWord}"
find . -name "${findWord}" | sort -h | xargs cat > sample_${uniqueLabel}_${suffix}_X.txt
rm ${findWord}
## for sample_Y
findWord="${fileNameKernel}_sample_Y_*.txt"
# echo "For suffix = ${suffix}, Find and combine by shell command cat: ${findWord}"
find . -name "${findWord}" | sort -h | xargs cat > sample_${uniqueLabel}_${suffix}_Y.txt
rm ${findWord}
cd - > /dev/null
# echo "end sampling ${uniqueLabel}"
echo
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mathlib/expr-auto.git
git@gitee.com:mathlib/expr-auto.git
mathlib
expr-auto
exprAuto
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385