ELPA AVX kernels can not be built with PGI compiler suite
I have problems to build ELSI with the PGI compiler suite. Are you aware of any compiler flag combination, which allows a build with PGI? The error in my case seems to be triggered by PGI's C-compiler:
cd /home/aradi/volatile/elsibuild/external/ELPA && /home/aradi/local/opt/pgi/18.10/linux86-64/18.10/mpi/openmpi/bin/mpicc -I/home/aradi/volatile/elsibuild/include -fast -o CMakeFiles/elpa.dir/src/elpa2_kernels_real_avx_2hv.c.o -c /home/aradi/sync/laptop/dftb_devel/elsi-interface/external/ELPA/src/elpa2_kernels_real_avx_2hv.c
PGC-S-0094-Illegal type conversion required (/home/aradi/sync/laptop/dftb_devel/elsi-interface/external/ELPA/src/elpa2_kernels_real_avx_2hv.c: 143)
PGC-S-0094-Illegal type conversion required (/home/aradi/sync/laptop/dftb_devel/elsi-interface/external/ELPA/src/elpa2_kernels_real_avx_2hv.c: 457)
PGC-S-0094-Illegal type conversion required (/home/aradi/sync/laptop/dftb_devel/elsi-interface/external/ELPA/src/elpa2_kernels_real_avx_2hv.c: 691)
PGC-S-0094-Illegal type conversion required (/home/aradi/sync/laptop/dftb_devel/elsi-interface/external/ELPA/src/elpa2_kernels_real_avx_2hv.c: 845)
PGC/x86-64 Linux 18.10-1: compilation completed with severe errors
external/ELPA/CMakeFiles/elpa.dir/build.make:710: recipe for target 'external/ELPA/CMakeFiles/elpa.dir/src/elpa2_kernels_real_avx_2hv.c.o' failed
I used the most recent PGI compiler (18.10), the OpenMPI delivered with the compile and the following CMake settings:
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/local/opt/elsi/pgi-18"
CACHE STRING "Install prefix")
set(CMAKE_Fortran_COMPILER "mpif90" CACHE STRING "MPI Fortran compiler")
set(CMAKE_C_COMPILER "mpicc" CACHE STRING "MPI C compiler")
set(CMAKE_CXX_COMPILER "mpicxx" CACHE STRING "MPI C++ compiler")
set(CMAKE_Fortran_FLAGS "-fast" CACHE STRING "Fortran flags")
set(CMAKE_C_FLAGS "-fast" CACHE STRING "C flags")
set(CMAKE_CXX_FLAGS "-fast" CACHE STRING "C++ flags")
set(ENABLE_TESTS "ON" CACHE BOOL "Enable Fortran tests")
set(ENABLE_C_TESTS "ON" CACHE BOOL "Enable C tests")
set(ENABLE_PEXSI "ON" CACHE BOOL "Enable PEXSI")
set(ADD_UNDERSCORE "ON" CACHE BOOL "Add underscore")
set(ELPA2_KERNEL "AVX" CACHE STRING "Use ELPA AVX kernel")
set(LIB_PATHS "$ENV{HOME}/local/opt/pgi/18.10/linux86-64/18.10/lib;$ENV{HOME}/local/opt/pgi/18.10/linux86-64/18.10/lib/scalapack/scalapack-2.0.2/openmpi-2.1.2/lib"
CACHE STRING "List of directories containing libraries to be linked against")
set(LIBS "scalapack;lapack;blas"
CACHE STRING "External libraries")