diff --git a/ompi/mca/op/avx/configure.m4 b/ompi/mca/op/avx/configure.m4 index 889aa85ba5..09d8b374c8 100644 --- a/ompi/mca/op/avx/configure.m4 +++ b/ompi/mca/op/avx/configure.m4 @@ -4,6 +4,8 @@ # of Tennessee Research Foundation. All rights # reserved. # Copyright (c) 2020 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2020 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # # $COPYRIGHT$ # @@ -83,6 +85,25 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[ CFLAGS="$op_avx_cflags_save" ]) # + # Some PGI compilers do not define _mm512_mullo_epi64. Screen them out. + # + AS_IF([test $op_avx512_support -eq 1], + [AC_MSG_CHECKING([if _mm512_mullo_epi64 generates code that can be compiled]) + op_avx_cflags_save="$CFLAGS" + CFLAGS="$CFLAGS_WITHOUT_OPTFLAGS -O0 $MCA_BUILD_OP_AVX512_FLAGS" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[ + __m512i vA, vB; + _mm512_mullo_epi64(vA, vB) + ]])], + [AC_MSG_RESULT([yes])], + [op_avx512_support=0 + MCA_BUILD_OP_AVX512_FLAGS="" + AC_MSG_RESULT([no])]) + CFLAGS="$op_avx_cflags_save" + ]) + # # Check support for AVX2 # AC_MSG_CHECKING([for AVX2 support (no additional flags)])