meteor2013
V2EX  ›  C

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

  •  
  •   meteor2013 · Feb 9, 2014 · 1995 views
    This topic created in 4500 days ago, the information mentioned may be changed or developed.
    Supplement 1  ·  Feb 9, 2014
    有没有办法,能让MPI::Init,MPI::SUM,也编译通过呢?
    3 replies    1970-01-01 08:00:00 +08:00
    meteor2013
        1
    meteor2013  
    OP
       Feb 9, 2014   ❤️ 1
    感觉是C和C++的区别?
    zhuliting
        2
    zhuliting  
       Feb 9, 2014
    只写过C和Fortran的MPI程序。
    "MPI_Init可以编译通过,MPI::Init就undefined reference"会不会是namespace 的问题,还是mpi相关的C++头文件没包含?,个人猜测
    Ricepig
        3
    Ricepig  
       Feb 9, 2014
    你是因为没有link mpi_cxx吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2869 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:07 · PVG 21:07 · LAX 06:07 · JFK 09:07
    ♥ Do have faith in what you're doing.