タグ

2009年6月12日のブックマーク (1件)

  • letsboost::mpi

    sample #include <iostream> #include <boost/mpi.hpp> #include <boost/serialization/string.hpp> using namespace std; int main( int argc, char* argv[] ) { boost::mpi::environment env(argc, argv); // MPI_Init 的なもの boost::mpi::communicator world; // MPI_COMM_WORLD 的なもの if( (world.rank()&1) == 0 ) { // MPI_Send 的なもの // 偶数番プロセスから奇数番プロセスにメッセージ送信 // stringのようなオブジェクトでも、Boost.Serialization でシリアライズされて通信されます w