1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +00:00

clang++ 3.4/5/7 compile happy for AVX and SSE

icpc compiles happy on MacOSX both with -xCOMMON-AV512 and native AVX

gcc-5 does not compile happy; can work around by renaming lattice peek/poke/transpose/trace templates
relative to tensor ones, but gcc goes into a recursive template instantiation due to
matching error. I think this is a gcc bug and have filed a report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66153
This commit is contained in:
Peter Boyle 2015-05-15 11:52:11 +01:00
parent ed8e3b676f
commit 0b4d3544b9
5 changed files with 26 additions and 4 deletions

12
configure vendored
View File

@ -4196,6 +4196,18 @@ fi
done done
for ac_header in mm_malloc.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "mm_malloc.h" "ac_cv_header_mm_malloc_h" "$ac_includes_default"
if test "x$ac_cv_header_mm_malloc_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MM_MALLOC_H 1
_ACEOF
fi
done
for ac_header in malloc/malloc.h for ac_header in malloc/malloc.h
do : do :
ac_fn_cxx_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" ac_fn_cxx_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"

View File

@ -1,5 +1,8 @@
CXX=icpc ./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 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++ ./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
CXX=clang++ ./configure --enable-simd=AVX CXXFLAGS="-mavx -g -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 -g -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 -g -std=c++11" LDFLAGS= LIBS=-lmpi --enable-comms=fake CXX=clang++ ./configure --enable-simd=AVX CXXFLAGS="-mavx -g -std=c++11" LDFLAGS= LIBS=-lmpi --enable-comms=fake
CXX=clang++ ./configure --enable-simd=AVX CXXFLAGS="-mavx -g -std=c++11" LDFLAGS= LIBS=-lmpi --enable-comms=none CXX=clang++ ./configure --enable-simd=AVX CXXFLAGS="-mavx -g -std=c++11" LDFLAGS= LIBS=-lmpi --enable-comms=none
CXX=/usr/local/clang-3.7/bin/clang++ ./configure --enable-simd=AVX512 CXXFLAGS="-mavx512f -O3 -std=c++11" LDFLAGS= LIBS= --enable-comms=none

View File

@ -16,6 +16,7 @@ AC_PROG_RANLIB
# Checks for header files. # Checks for header files.
AC_CHECK_HEADERS(stdint.h) AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(mm_malloc.h)
AC_CHECK_HEADERS(malloc/malloc.h) AC_CHECK_HEADERS(malloc/malloc.h)
AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(malloc.h)
AC_CHECK_HEADERS(endian.h) AC_CHECK_HEADERS(endian.h)

View File

@ -2,19 +2,19 @@
/* lib/Grid_config.h.in. Generated from configure.ac by autoheader. */ /* lib/Grid_config.h.in. Generated from configure.ac by autoheader. */
/* AVX */ /* AVX */
#define AVX1 1 /* #undef AVX1 */
/* AVX2 */ /* AVX2 */
/* #undef AVX2 */ /* #undef AVX2 */
/* AVX512 */ /* AVX512 */
/* #undef AVX512 */ #define AVX512 1
/* GRID_COMMS_MPI */ /* GRID_COMMS_MPI */
#define GRID_COMMS_MPI 1 /* #undef GRID_COMMS_MPI */
/* GRID_COMMS_NONE */ /* GRID_COMMS_NONE */
/* #undef GRID_COMMS_NONE */ #define GRID_COMMS_NONE 1
/* Define to 1 if you have the declaration of `be64toh', and to 0 if you /* Define to 1 if you have the declaration of `be64toh', and to 0 if you
don't. */ don't. */
@ -42,6 +42,9 @@
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1 #define HAVE_MEMORY_H 1
/* Define to 1 if you have the <mm_malloc.h> header file. */
#define HAVE_MM_MALLOC_H 1
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1 #define HAVE_STDINT_H 1

View File

@ -41,6 +41,9 @@
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
/* Define to 1 if you have the <mm_malloc.h> header file. */
#undef HAVE_MM_MALLOC_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H