ExaFMM 1
Fast-multipole Method for exascale systems
|
Handles all the partitioning of domains. More...
#include <partition.h>
Public Member Functions | |
Partition () | |
Constructor. | |
~Partition () | |
Destructor. | |
void | setGlobDomain (Bodies &bodies, vect x0=0, real r0=M_PI) |
Set bounds of domain to be partitioned. | |
void | binBodies (Bodies &bodies, int d) |
Turn positions into indices of bins. | |
int | splitBodies (Bodies &bodies, bigint iSplit) |
Split bodies according to iSplit. | |
void | shiftBodies (Bodies &bodies) |
Send bodies to next rank (round robin) | |
template<typename T , typename T2 > | |
T2 | nth_element (T &data, T2 n, MPI_Comm MPI_COMM0=0) |
Parallel global nth_element on distributed memory. | |
void | bisection (Bodies &bodies) |
Partitioning by recursive bisection. | |
void | octsection (Bodies &bodies) |
Partition by recursive octsection. | |
void | unpartition (Bodies &bodies) |
Send bodies back to where they came from. | |
Protected Member Functions | |
void | bisectionGetComm (int l) |
Split the MPI communicator into N-D hypercube. | |
void | bisectionAlltoall (Bodies &bodies, int nthLocal, int numLocal, int &newSize, int l) |
One-to-one MPI_Alltoallv. | |
void | bisectionScatter (Bodies &bodies, int nthLocal, int &newSize, int l) |
Scattering from leftover processes. | |
void | bisectionGather (Bodies &bodies, int nthLocal, int numLocal, int &newSize, int l) |
Gathering to leftover processes. | |
Protected Attributes | |
int | LEVEL |
Level of the MPI process binary tree. | |
std::vector< vect > | XMIN |
Minimum position vector of bodies. | |
std::vector< vect > | XMAX |
Maximum position vector of bodies. | |
int | nprocs [64][2] |
Number of processes in the two split groups. | |
int | offset [64][2] |
Offset of body in the two split groups. | |
int | color [64][3] |
Color of hypercube communicators. | |
int | key [64][3] |
Key of hypercube communicators. | |
MPI_Comm | MPI_COMM [64][3] |
Hypercube communicators. | |
Private Member Functions | |
void | splitDomain (bigint iSplit, int l, int d) |
< Max level for bottom up tree build | |
template<typename T > | |
int | getBucket (T &data, int numData, int lOffset, Bigints &send, Bigints &recv, MPI_Comm MPI_COMM0) |
Get global bucket data for parallel nth_element. | |
Private Attributes | |
int | numCells1D |
Number of cells in one dimension (leaf level) |
Handles all the partitioning of domains.
Definition at line 29 of file partition.h.
Destructor.
Definition at line 267 of file partition.h.
void Partition< equation >::binBodies | ( | Bodies & | bodies, |
int | d | ||
) | [inline] |
Turn positions into indices of bins.
Definition at line 309 of file partition.h.
Partitioning by recursive bisection.
Definition at line 411 of file partition.h.
void Partition< equation >::bisectionAlltoall | ( | Bodies & | bodies, |
int | nthLocal, | ||
int | numLocal, | ||
int & | newSize, | ||
int | l | ||
) | [inline, protected] |
One-to-one MPI_Alltoallv.
Definition at line 139 of file partition.h.
void Partition< equation >::bisectionGather | ( | Bodies & | bodies, |
int | nthLocal, | ||
int | numLocal, | ||
int & | newSize, | ||
int | l | ||
) | [inline, protected] |
Gathering to leftover processes.
Definition at line 209 of file partition.h.
void Partition< equation >::bisectionGetComm | ( | int | l | ) | [inline, protected] |
Split the MPI communicator into N-D hypercube.
Definition at line 108 of file partition.h.
void Partition< equation >::bisectionScatter | ( | Bodies & | bodies, |
int | nthLocal, | ||
int & | newSize, | ||
int | l | ||
) | [inline, protected] |
Scattering from leftover processes.
Definition at line 167 of file partition.h.
int Partition< equation >::getBucket | ( | T & | data, |
int | numData, | ||
int | lOffset, | ||
Bigints & | send, | ||
Bigints & | recv, | ||
MPI_Comm | MPI_COMM0 | ||
) | [inline, private] |
Get global bucket data for parallel nth_element.
Definition at line 69 of file partition.h.
T2 Partition< equation >::nth_element | ( | T & | data, |
T2 | n, | ||
MPI_Comm | MPI_COMM0 = 0 |
||
) | [inline] |
Parallel global nth_element on distributed memory.
Definition at line 349 of file partition.h.
Partition by recursive octsection.
Definition at line 461 of file partition.h.
void Partition< equation >::setGlobDomain | ( | Bodies & | bodies, |
vect | x0 = 0 , |
||
real | r0 = M_PI |
||
) | [inline] |
Set bounds of domain to be partitioned.
Definition at line 270 of file partition.h.
Send bodies to next rank (round robin)
Definition at line 324 of file partition.h.
int Partition< equation >::splitBodies | ( | Bodies & | bodies, |
bigint | iSplit | ||
) | [inline] |
Split bodies according to iSplit.
Definition at line 317 of file partition.h.
void Partition< equation >::splitDomain | ( | bigint | iSplit, |
int | l, | ||
int | d | ||
) | [inline, private] |
< Max level for bottom up tree build
Split domain according to iSplit
Definition at line 56 of file partition.h.
Send bodies back to where they came from.
Definition at line 516 of file partition.h.
Color of hypercube communicators.
Definition at line 39 of file partition.h.
Key of hypercube communicators.
Definition at line 40 of file partition.h.
Level of the MPI process binary tree.
Definition at line 34 of file partition.h.
Hypercube communicators.
Definition at line 41 of file partition.h.
Number of processes in the two split groups.
Definition at line 37 of file partition.h.
int Partition< equation >::numCells1D [private] |
Number of cells in one dimension (leaf level)
Definition at line 31 of file partition.h.
Offset of body in the two split groups.
Definition at line 38 of file partition.h.
Maximum position vector of bodies.
Definition at line 36 of file partition.h.
Minimum position vector of bodies.
Definition at line 35 of file partition.h.