1#!/bin/bash 2 3FFTW="ON" 4CMAKEOPT="" 5# CMAKEOPT="-DUSE_NEON=ON" 6 7if [ ! -z "$1" ]; then 8 FFTW="$1" 9fi 10 11if [ ! -d build ]; then 12 mkdir build 13 cd build 14else 15 cd build 16 make clean 17 rm *.csv *.txt *.png 18fi 19 20echo "" >ToolChain.cmake 21if [ -z "${GCC_WITH_CMAKE}" ]; then 22 GCC_WITH_CMAKE="gcc" 23else 24 GCCPATH=$(basename "${GCC_WITH_CMAKE}") 25 echo "SET(CMAKE_C_COMPILER ${GCCPATH})" >>ToolChain.cmake 26fi 27if [ -z "${GPP_WITH_CMAKE}" ]; then 28 GPP_WITH_CMAKE="g++" 29else 30 GPPPATH=$(basename "${GPP_WITH_CMAKE}") 31 echo "SET(CMAKE_CXX_COMPILER ${GPPPATH})" >>ToolChain.cmake 32fi 33 34 35#cmake -DCMAKE_TOOLCHAIN_FILE=ToolChain.cmake -DUSE_BENCH_FFTW=${FFTW} -DUSE_SIMD=OFF ${CMAKEOPT} ../ 36#make clean 37#make 38#echo -e "\n\nrunning without simd (==scalar) .." 39#time ctest -V 40 41cmake -DCMAKE_TOOLCHAIN_FILE=ToolChain.cmake -DUSE_BENCH_FFTW=${FFTW} -DUSE_SIMD=ON ${CMAKEOPT} ../ 42#make clean 43make 44echo -e "\n\nrunning with simd .." 45time ctest -V 46 47 48echo "$@" >infos.txt 49echo "FFTW=${FFTW}" >>infos.txt 50echo "CMAKEOPT=${CMAKEOPT}" >>infos.txt 51 52 53echo "" >>infos.txt 54echo "${GCC_WITH_CMAKE} --version:" >>infos.txt 55${GCC_WITH_CMAKE} --version &>>infos.txt 56 57echo "" >>infos.txt 58echo "${GPP_WITH_CMAKE} --version:" >>infos.txt 59${GPP_WITH_CMAKE} --version &>>infos.txt 60 61 62echo "" >>infos.txt 63echo "lscpu:" >>infos.txt 64lscpu >>infos.txt 65 66echo "" >>infos.txt 67echo "lsb_release -a" >>infos.txt 68lsb_release -a &>>infos.txt 69 70echo "" >>infos.txt 71echo "cat /etc/*-release" >>infos.txt 72cat /etc/*-release &>>infos.txt 73 74 75echo "" >>infos.txt 76echo "cat /proc/cpuinfo:" >>infos.txt 77cat /proc/cpuinfo >>infos.txt 78 79 80tar zcvf ../pffft_bench_${GCCPATH}_${HOSTNAME}.tar.gz --exclude=CMakeCache.txt *.csv *.txt *.png 81echo "all benchmark results in pffft_bench_${GCCPATH}_${HOSTNAME}.tar.gz" 82