https://github.com/lorenzhs/unsafe_mpi
Unsafe but fast additions to Boost.MPI
https://github.com/lorenzhs/unsafe_mpi
Last synced: 2 months ago
JSON representation
Unsafe but fast additions to Boost.MPI
- Host: GitHub
- URL: https://github.com/lorenzhs/unsafe_mpi
- Owner: lorenzhs
- License: bsl-1.0
- Created: 2015-08-27T08:38:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-08T14:14:28.000Z (over 9 years ago)
- Last Synced: 2025-02-01T21:41:47.278Z (4 months ago)
- Language: C++
- Size: 144 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## unsafe_mpi: unsafe but fast additions to Boost.MPI
This is a small C++11 library that wraps several MPI operations in order to expose them more efficiently than the (otherwise excellent) [Boost.MPI](http://www.boost.org/libs/mpi) does.
Two aspects are covered at the moment:
- Boost.MPI always falls back to point-to-point communication operations for data types that it needs to serialize (using Boost.Serialize), which is quite wasteful. This library implements some of these operations, more may be added when I need them (contributions welcome!)
- Some data types are trivial enough not to require serialization, but Boost.MPI serializes them nonetheless. For instance, `std::pair` is trivial enough [TM] to copy bitwise if both `T1` and `T2` are. In the same vein, we do not need to serialize `std::vector` for data types that are trivial enough, but can just transmit its size and then its raw data. We thus `reinterpret_cast<>` them to an MPI Datatype (`uint64_t` by default, but you may require smaller a smaller type for, e.g., `std::pair`) and transmit them as such.There are a bunch of scenarios where these things might go wrong, but I think the name `unsafe_mpi` conveys this fairly well. It's also not properly tested, making it even less safe to use ;)
Published under the Boost Software License, Version 1.0 (see LICENSE)