【问题标题】:Open MPI with icc: "Open MPI requires a C99 compiler"使用 icc 打开 MPI:“打开 MPI 需要 C99 编译器”
【发布时间】:2017-11-15 17:07:19
【问题描述】:

如果我跑

../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。我使用的是 Intel 编译器版本 18.0.0 20170811。环境是 Arch Linux。

为什么 Open MPI 存在 icc 不符合 C99 的问题?

【问题讨论】:

  • @HighPerformanceMark 指定 CFLAGS="-std=c99" 并没有什么不同。
  • @VladimirF 我检查了那些网站,但我仍然相信我做的一切都是正确的。
  • 我很惊讶当我用谷歌搜索这个问题时什么都没有出现。我正在尝试做的显然是一个标准程序。也许最新版本的 OpenMPI 或英特尔编译器有所不同。
  • 这可能是新的 OpenMPI 3 问题。您能否查看config.log 文件以了解执行了哪些确切测试以及报告了哪种错误?

标签: openmpi icc


【解决方案1】:

如果与 glibc 2.26 结合使用,最新的 ICC 似乎有问题。版本 18.0.0 仍然存在此问题。目前,修复方法是包含标志-D_Float128=__float128:

../configure CC=icc CXX=icpc FC=ifort CFLAGS="-D_Float128=__float128"

【讨论】:

  • @pds Arch Linux.
【解决方案2】:

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

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

【讨论】:

    猜你喜欢
    • 2011-12-08
    • 2014-09-17
    • 2017-10-05
    • 2018-04-26
    • 1970-01-01
    • 1970-01-01
    • 2014-07-07
    • 2013-03-24
    • 2016-12-07
    相关资源
    最近更新 更多