代码之家  ›  专栏  ›  技术社区  ›  Raul Laasner

使用icc打开MPI:“打开MPI需要C99编译器”

  •  0
  • Raul Laasner  · 技术社区  · 7 年前

    如果我跑步

    ../configure CC=icc CXX=icpc F77=ifort FC=ifort
    

    配置停止

    ============================================================================
    == Compiler and preprocessor tests
    ============================================================================
    
    *** C compiler and preprocessor
    checking for gcc... (cached) icc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether icc accepts -g... (cached) yes
    checking for icc option to accept ISO C89... (cached) none needed
    checking whether icc understands -c and -o together... (cached) yes
    checking for icc option to accept ISO C99... unsupported
    configure: WARNING: Open MPI requires a C99 compiler
    configure: error: Aborting.
    

    我正在尝试从源代码构建Open MPI 3.0.0。我使用的是英特尔编译器18.0.0版20170811。环境是Arch Linux。

    为什么Open MPI与icc不兼容C99有问题?

    2 回复  |  直到 6 年前
        1
  •  1
  •   Raul Laasner    7 年前

    如果与glibc 2.26结合使用,最新的ICC似乎有问题。18.0.0版仍然存在这个问题。目前,解决方案是包括该标志 -D_Float128=__float128 :

    ../configure CC=icc CXX=icpc FC=ifort CFLAGS="-D_Float128=__float128"
    
        2
  •  0
  •   Stephen Rauch Afsar Ali    6 年前

    如果你不需要使用经典的C++,你可以选择用C99编译

    ../configure C99=icc CXX=icpc FC=ifort