mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Better build automation
This commit is contained in:
parent
4a0da933f0
commit
9b0aae665f
@ -56,4 +56,5 @@ int main(int argc,char **argv)
|
||||
Container<Recursive<Recursive<ComplexD> > > ret(10);
|
||||
|
||||
ret = function<1>(array);
|
||||
ret = function<2>(array);
|
||||
}
|
||||
|
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user