meteor2013
V2EX  ›  C

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

  •  
  •   meteor2013 · Feb 9, 2014 · 2389 views
    This topic created in 4654 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
    meteor2013
    OP
    Feb 9, 2014❤️1
    1
    感觉是C和C++的区别?
    zhuliting
    zhuliting
    Feb 9, 2014
    2
    只写过C和Fortran的MPI程序。
    "MPI_Init可以编译通过,MPI::Init就undefined reference"会不会是namespace 的问题,还是mpi相关的C++头文件没包含?,个人猜测
    Ricepig
    Ricepig
    Feb 9, 2014
    3
    你是因为没有link mpi_cxx吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2157 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:59 · PVG 10:59 · LAX 18:59 · JFK 21:59
    ♥ Do have faith in what you're doing.