boost-mpi

Boost.MPI: What's received isn't what was sent!

二次信任 提交于 2020-01-04 02:44:48
问题 I am relatively new to using Boost MPI. I have got the libraries installed, the code compiles, but I am getting a very odd error - some integer data received by the slave nodes is not what was sent by the master. What is going on? I am using boost version 1.42.0, compiling the code using mpic++ (which wraps g++ on one cluster and icpc on the other). A reduced example follows, including the output. Code: #include <iostream> #include <boost/mpi.hpp> using namespace std; namespace mpi = boost:

Using MPICH with Boost.MPI on Ubuntu

≡放荡痞女 提交于 2019-12-30 11:34:06
问题 I was trying to use boost.mpi under Ubuntu 12.04. apt-get will install openmpi, but some other software (involving torque) I run expect mpich2/mpich, and complain that "mpdstartup: Command not found" I certainly don't want to mess with changing the software to use openmpi and worry about migration issues when the software is upgraded. My question is, is there a user-friendly way to install boost.mpi + mpich2 in Ubuntu (12.04 LTS)? (e.g. an unofficial repository). In the worst-case, if I have

boost::mpi and boost:serialization with std::variant

自古美人都是妖i 提交于 2019-12-24 16:48:05
问题 c++17 introduces the new type std::variant . Is it possible to define a serialization routine, so as to use std::variant in conjunction with boost::mpi ? Consider, e.g., a simple program #include <variant> #include <boost/mpi.hpp> #include <boost/serialization/string.hpp> namespace mpi = boost::mpi; class A { friend class boost::serialization::access; template <class Archive> void serialize(Archive& ar, const unsigned int version) { ar & x; ar & y; } public: int x, y; }; class B { friend

Is there a limit for the message size in mpi using boost::mpi?

折月煮酒 提交于 2019-12-23 09:38:19
问题 I'm currently writing a simulation using boost::mpi on top of openMPI and everything works great. However once I scale up the system and therefore have to send larger std::vectors I get errors. I've reduced the issue to the following problem: #include <boost/mpi.hpp> #include <boost/mpi/environment.hpp> #include <boost/mpi/communicator.hpp> #include <boost/serialization/vector.hpp> #include <iostream> #include <vector> namespace mpi = boost::mpi; int main() { mpi::environment env; mpi:

OSX “clang++ -lboost_mpi”` ->“ld: library not found for -lboost_mpi” after brew install boost --with-mpi

自闭症网瘾萝莉.ら 提交于 2019-12-12 02:57:36
问题 After installing boost with mpi support using brew I still get the error ld: "library not found for -lboost_mpi" when I run clang++ -lboost_mpi . What can I do to overcome this? I installed boost using brew: $ brew install boost --with-mpi --without-single ==> Downloading https://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2 Already downloaded: /Library/Caches/Homebrew/boost-1.58.0.tar.bz2 ==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.58.0 --libdir=/usr

c++: MPI communicator as global variable

坚强是说给别人听的谎言 提交于 2019-12-05 22:27:17
I need the MPI world communicator to be accessible in functions/class member functions. But by design/convention, MPI environments and communicators are always defined and initialized at the beginning of int main() . The only, simple solution I can think of using a global pointer to the communicator. Does anybody know of a better way? Is it dangerous to use the global pointer solution? This problem applies equally well to bare-bones MPI, and to Boost::MPI (which I use below) Example of my proposed solution (untested): //globals.h extern boost::mpi::communicator * my_MPI_world_ptr; and //main

How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010

若如初见. 提交于 2019-12-02 08:26:53
问题 I installed Open MPI 1.5.4 (64 bit) and I am trying to rebuild boost libraries (1.48) with bjam. I changed user-config.jam file, by adding using mpi line with explicit compiler path (although mpic++ is already in PATH environment variable): using mpi : "C:/Program Files (x86)/OpenMPI_v1.5.4-x64/bin/mpic++.exe" ; Then I tried to run from command prompt the following command: bjam toolset=msvc --build-type=complete --with-mpi --address-model=64 stage Unfortunately, the build process still needs

How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010

久未见 提交于 2019-12-02 05:22:34
I installed Open MPI 1.5.4 (64 bit) and I am trying to rebuild boost libraries (1.48) with bjam. I changed user-config.jam file, by adding using mpi line with explicit compiler path (although mpic++ is already in PATH environment variable): using mpi : "C:/Program Files (x86)/OpenMPI_v1.5.4-x64/bin/mpic++.exe" ; Then I tried to run from command prompt the following command: bjam toolset=msvc --build-type=complete --with-mpi --address-model=64 stage Unfortunately, the build process still needs more hints. Part of the error reporting looks like: MPI auto-detection failed: unknown wrapper

Using MPICH with Boost.MPI on Ubuntu

大城市里の小女人 提交于 2019-12-01 10:45:11
I was trying to use boost.mpi under Ubuntu 12.04. apt-get will install openmpi, but some other software (involving torque) I run expect mpich2/mpich, and complain that "mpdstartup: Command not found" I certainly don't want to mess with changing the software to use openmpi and worry about migration issues when the software is upgraded. My question is, is there a user-friendly way to install boost.mpi + mpich2 in Ubuntu (12.04 LTS)? (e.g. an unofficial repository). In the worst-case, if I have to build boost from source, is there a user-friendly way to uninstall a boost installation when I