V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
meteor2013
V2EX  ›  C

学习C++编写MPI并行计算程序的时候:MPI_Init和MPI::Init,还有MPI::SUM和MPI_SUM,它们之间的区别是什么啊?为什么MPI_Init可以编译通过,MPI::Init就undefined reference呢?

  •  
  •   meteor2013 · 2014-02-09 06:36:22 +08:00 · 1219 次点击
    这是一个创建于 3728 天前的主题,其中的信息可能已经有所发展或是发生改变。
    第 1 条附言  ·  2014-02-09 07:30:28 +08:00
    有没有办法,能让MPI::Init,MPI::SUM,也编译通过呢?
    3 条回复    1970-01-01 08:00:00 +08:00
    meteor2013
        1
    meteor2013  
    OP
       2014-02-09 06:54:58 +08:00   ❤️ 1
    感觉是C和C++的区别?
    zhuliting
        2
    zhuliting  
       2014-02-09 21:48:09 +08:00
    只写过C和Fortran的MPI程序。
    "MPI_Init可以编译通过,MPI::Init就undefined reference"会不会是namespace 的问题,还是mpi相关的C++头文件没包含?,个人猜测
    Ricepig
        3
    Ricepig  
       2014-02-09 23:11:22 +08:00
    你是因为没有link mpi_cxx吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2045 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 16:17 · PVG 00:17 · LAX 09:17 · JFK 12:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.