https://github.com/ct-clmsn/hpx_collectives
hpx collectives using hpx::distributed_object
https://github.com/ct-clmsn/hpx_collectives
Last synced: 9 months ago
JSON representation
hpx collectives using hpx::distributed_object
- Host: GitHub
- URL: https://github.com/ct-clmsn/hpx_collectives
- Owner: ct-clmsn
- License: bsl-1.0
- Created: 2020-08-19T04:17:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T04:55:26.000Z (over 5 years ago)
- Last Synced: 2025-01-11T15:46:02.570Z (11 months ago)
- Language: C++
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE_1_0.txt
Awesome Lists containing this project
README
# Collective Communication Primitives for STE||AR HPX
Project details [here](http://www.github.com/ct-clmsn/hpx_collectives/).
This project implements collective operations for STE||AR HPX using
single-sided communications. The project is 'header-only'. Serialization
routines are third-party provided and will require a user application to
link to a library and a compile-time-flag to tell the header files which
serializer to utilize.
### License
Boost Software License
### Collectives Implemented
* Broadcast
* Scatter
* Gather
* Reduce
### Communication Patterns
* binomial tree
* binary tree
### Dependencies
* STE||AR HPX
* Boost Serialization or STE||AR HPX Serialization
#### Notes
The implementations specifically targets log2 nodes and data set sizes.
Any C++ container type providing iterator support can be used with this
library.
The implementation depends on using the following datatype to control
communications:
~~~
hpx::distributed_object< std::tuple< std::int32_t , std::string > > args;
~~~
args is exposed to the asynchronous global address space. std::get<0>(args)
returns a std::int32_t that is used as a mutex for a spinlock. The spinlock
code looks like this:
~~~
while(!atomic_xchange( &std::get<0>(*args), 1, 0 )) {}
~~~
std::get<1>(args) returns the communication data buffer associated with
the mutex.
The communication data buffer is a std::string which is stored in the
globally addressable tuple. The data buffer contains serialized data
structures that are 'shipped' across the network with a remotely invoked
active message that fills the buffer and flips the mutex.
Data types should be compatible with Boost or STE||AR HPX Serialization
requirements.
Users can select which PE is the 'root' process for communication ('root'
process for the tree communication does not have to be `rank 0`).
To use the library, create a 'communicator pattern' on each PE, set the
root level rank for communication when you create the 'communicator pattern',
and you should be all set.
To install, recursively copy the `./include/hpx_collectives` into your
project or your system installation path, usually this is some place like
`../include/`.
To compile, read the examples directory for guidance. Switching between
serializers is as simple as uncommenting the HPX block and commenting the
BOOST block in the makefile.
### TODO
* All2All
* hypercube
### Author
Christopher Taylor
### Dependencies
* [STE||AR HPX](https://github.com/STEllAR-GROUP/hpx)
* [Boost](https://github.com/boostorg/boost)