From 1f4e7bbdce66cb5962d417eb74982bf5836ccd5a Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Sat, 16 May 2015 07:16:45 +0100 Subject: [PATCH] Better build automation --- gcc-bug-report/broken.cc | 1 + scripts/build-all | 39 +++++++++++++++++++++++++++++++-- scripts/configure-all | 3 +-- scripts/configure-commands | 45 +++++++++++++++++++++++++------------- 4 files changed, 69 insertions(+), 19 deletions(-) diff --git a/gcc-bug-report/broken.cc b/gcc-bug-report/broken.cc index bd403e85..d23572d3 100644 --- a/gcc-bug-report/broken.cc +++ b/gcc-bug-report/broken.cc @@ -56,4 +56,5 @@ int main(int argc,char **argv) Container > > ret(10); ret = function<1>(array); + ret = function<2>(array); } diff --git a/scripts/build-all b/scripts/build-all index d9aa8635..d3a978b7 100755 --- a/scripts/build-all +++ b/scripts/build-all @@ -1,11 +1,46 @@ #!/bin/bash -DIRS="build-clang-avx build-clang-avx-openmp build-clang-avx-openmp-mpi build-clang-avx-mpi build-icpc-avx512 build-icpc-avx " +DIRS="clang-avx clang-avx-openmp clang-avx-openmp-mpi clang-avx-mpi clang-avx2 clang-avx2-openmp clang-avx2-openmp-mpi clang-avx2-mpi" +EXTRADIRS="g++-avx g++-sse4 icpc-avx icpc-avx2 icpc-avx512" +BLACK="\033[30m" +RED="\033[31m" +GREEN="\033[32m" +YELLOW="\033[33m" +BLUE="\033[34m" +PINK="\033[35m" +CYAN="\033[36m" +WHITE="\033[37m" +NORMAL="\033[0;39m" for D in $DIRS do - echo $D + +echo +echo -e $RED ============================== +echo -e $GREEN $D +echo -e $RED ============================== +echo -e $BLUE + cd builds/$D make clean all -j 8 cd ../../ +echo -e $NORMAL done + +if [ "X$1" == "Xextra" ] +then +for D in $EXTRADIRS +do + +echo +echo -e $RED ============================== +echo -e $RED $D +echo -e $RED ============================== +echo -e $BLUE + + cd builds/$D + make clean all -j 8 + cd ../../ +echo -e $NORMAL +done +fi \ No newline at end of file diff --git a/scripts/configure-all b/scripts/configure-all index 1f9e758a..2f80b60a 100755 --- a/scripts/configure-all +++ b/scripts/configure-all @@ -4,9 +4,8 @@ DIRS="clang-avx clang-avx-openmp clang-avx-openmp-mpi clang-avx-mpi clang-avx2 c for D in $DIRS do - echo $D mkdir -p builds/$D cd builds/$D - ../../configure-commands $D + ../../scripts/configure-commands $D cd ../.. done diff --git a/scripts/configure-commands b/scripts/configure-commands index 183f9915..5e83fa89 100755 --- a/scripts/configure-commands +++ b/scripts/configure-commands @@ -1,47 +1,62 @@ #!/bin/bash WD=$1 -echo $WD +BLACK="\033[30m" +RED="\033[31m" +GREEN="\033[32m" +YELLOW="\033[33m" +BLUE="\033[34m" +PINK="\033[35m" +CYAN="\033[36m" +WHITE="\033[37m" +NORMAL="\033[0;39m" +echo +echo -e $RED ============================== +echo -e $GREEN $WD +echo -e $RED ============================== +echo -e $YELLOW + case $WD in g++-sse4) - CXX=g++-5 ../configure --enable-simd=SSE4 CXXFLAGS="-msse4 -O3 -std=c++11" --enable-comms=none + CXX=g++-5 ../../configure --enable-simd=SSE4 CXXFLAGS="-msse4 -O3 -std=c++11" --enable-comms=none ;; g++-avx) - CXX=g++-5 ../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -std=c++11" --enable-comms=none + CXX=g++-5 ../../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -std=c++11" --enable-comms=none ;; icpc-avx) - CXX=icpc ../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -std=c++11" --enable-comms=none + CXX=icpc ../../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -std=c++11" --enable-comms=none ;; icpc-avx2) - CXX=icpc ../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -std=c++11" --enable-comms=none + CXX=icpc ../../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -std=c++11" --enable-comms=none ;; icpc-avx512) - CXX=icpc ../configure --enable-simd=AVX512 CXXFLAGS="-xCOMMON-AVX512 -O3 -std=c++11" --host=none --enable-comms=none + CXX=icpc ../../configure --enable-simd=AVX512 CXXFLAGS="-xCOMMON-AVX512 -O3 -std=c++11" --host=none --enable-comms=none ;; icpc-mic) - CXX=icpc ../configure --host=none --enable-simd=AVX512 CXXFLAGS="-mmic -O3 -std=c++11" LDFLAGS=-mmic --enable-comms=none + CXX=icpc ../../configure --host=none --enable-simd=AVX512 CXXFLAGS="-mmic -O3 -std=c++11" LDFLAGS=-mmic --enable-comms=none ;; clang-avx) -CXX=clang++ ../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -std=c++11" --enable-comms=none +CXX=clang++ ../../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -std=c++11" --enable-comms=none ;; clang-avx2) -CXX=clang++ ../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -std=c++11" --enable-comms=none +CXX=clang++ ../../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -std=c++11" --enable-comms=none ;; clang-avx-openmp) -CXX=clang-omp++ ../configure --enable-simd=AVX CXXFLAGS="-mavx -fopenmp -O3 -std=c++11" LDFLAGS="-fopenmp" --enable-comms=none +CXX=clang-omp++ ../../configure --enable-simd=AVX CXXFLAGS="-mavx -fopenmp -O3 -std=c++11" LDFLAGS="-fopenmp" --enable-comms=none ;; clang-avx2-openmp) -CXX=clang-omp++ ../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -fopenmp -O3 -std=c++11" LDFLAGS="-fopenmp" --enable-comms=none +CXX=clang-omp++ ../../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -fopenmp -O3 -std=c++11" LDFLAGS="-fopenmp" --enable-comms=none ;; clang-avx-openmp-mpi) -CXX=clang-omp++ ../configure --enable-simd=AVX CXXFLAGS="-mavx -fopenmp -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx -fopenmp" --enable-comms=mpi +CXX=clang-omp++ ../../configure --enable-simd=AVX CXXFLAGS="-mavx -fopenmp -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx -fopenmp" --enable-comms=mpi ;; clang-avx2-openmp-mpi) -CXX=clang-omp++ ../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -fopenmp -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx -fopenmp" --enable-comms=mpi +CXX=clang-omp++ ../../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -fopenmp -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx -fopenmp" --enable-comms=mpi ;; clang-avx-mpi) -CXX=clang++ ../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx " --enable-comms=mpi +CXX=clang++ ../../configure --enable-simd=AVX CXXFLAGS="-mavx -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx " --enable-comms=mpi ;; clang-avx2-mpi) -CXX=clang++ ../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx " --enable-comms=mpi +CXX=clang++ ../../configure --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -I/opt/local/include/openmpi-mp/ -std=c++11" LDFLAGS=-L/opt/local/lib/openmpi-mp/ LIBS="-lmpi -lmpi_cxx " --enable-comms=mpi ;; esac +echo -e $NORMAL