GLAC
1.0
|
#include <communicator.h>
Public Member Functions | |
Communicator () | |
~Communicator () | |
Static Public Member Functions | |
static void | init (int *numberOfArguments, char ***cmdLineArguments) |
Parallel::Communicator::init initializes the communicater and sets up the lattice geometry. More... | |
static void | initializeSubLattice () |
Parallel::Communicator::initializeSubLattice. More... | |
static SU3 | getPositiveLink (Lattice< SU3 > *lattice, std::vector< int > n, int mu, int *muIndex, int SU3Dir) |
Parallel::Communicator::getPositiveLink fetches a link in the positive direction. More... | |
static SU3 | getNegativeLink (Lattice< SU3 > *lattice, std::vector< int > n, int mu, int *muIndex, int SU3Dir) |
Parallel::Communicator::getNegativeLink fetches a link in the negative direction. More... | |
static SU3 | getNeighboursNeighbourLink (Lattice< SU3 > *lattice, std::vector< int > n, int mu, int *muIndex, int nu, int *nuIndex, int SU3Dir) |
Parallel::Communicator::getNeighboursNeighbourLink fetches a neighbours neighbor link. More... | |
static SU3 | getNeighboursNeighbourNegativeLink (Lattice< SU3 > *lattice, std::vector< int > n, int mu, int *muIndex, int nu, int *nuIndex, int SU3Dir) |
Parallel::Communicator::getNeighboursNeighbourNegativeLink. More... | |
static int | getProcessRank () |
static int | getNumProc () |
static void | setN (std::vector< unsigned int > N) |
Parallel::Communicator::setN sets the lattice dimensions in the Parallel::Communicator class. More... | |
static void | MPIExit (std::string message) |
Parallel::Communicator::MPIExit exits the program. Frees MPI groups before it exits. More... | |
static void | MPIPrint (std::string message) |
Parallel::Communicator::MPIPrint prints a message from rank 0. Includes barriers. More... | |
static void | setBarrier () |
Parallel::Communicator::setBarrier. More... | |
static void | setBarrierActive () |
Parallel::Communicator::setBarrierActive. More... | |
static void | gatherDoubleResults (double *data, unsigned int N) |
Parallel::Communicator::gatherDoubleResults. More... | |
static void | freeMPIGroups () |
Parallel::Communicator::freeMPIGroups. More... | |
static void | reduceToTemporalDimension (std::vector< double > &obsResults, std::vector< double > obs) |
Parallel::Communicator::reduceToTemporalDimension reduces the results to the temporal dimensions, i.e. Euclidean time. More... | |
static void | checkProcessorValidity () |
Parallel::Communicator::checkProcessorValidity checks that we do not have an odd number of processors. More... | |
static void | checkSubLatticeDimensionsValidity () |
Parallel::Communicator::checkSubLatticeDimensionsValidity. More... | |
static void | checkSubLatticeValidity () |
Parallel::Communicator::checkSubLatticeValidity runs a series of tests to ensure that the sub lattices has been correctly set up. More... | |
static void | checkLattice (Lattice< SU3 > *lattice, std::string message) |
Parallel::Communicator::checkLattice checks if the lattice containts invalid numbers/nan. More... | |
Communicator::Communicator | ( | ) |
Communicator::~Communicator | ( | ) |
Parallel::Communicator::checkLattice checks if the lattice containts invalid numbers/nan.
lattice | lattice to check. |
message | to print if it contains nan numbers. |
|
static |
Parallel::Communicator::checkProcessorValidity checks that we do not have an odd number of processors.
|
static |
Parallel::Communicator::checkSubLatticeDimensionsValidity.
Ensures that the lattice size is valid. If it is of size 2 or less, we exit.
|
static |
Parallel::Communicator::checkSubLatticeValidity runs a series of tests to ensure that the sub lattices has been correctly set up.
|
static |
Parallel::Communicator::freeMPIGroups.
Frees MPI groups and communicators.
|
static |
Parallel::Communicator::gatherDoubleResults.
data | to reduce. |
N | number of points in data to reduce. |
|
static |
Parallel::Communicator::getNegativeLink fetches a link in the negative direction.
lattice | a lattice pointer for all four dimensions. |
n | position in lattice to fetch link from. |
mu | direction to shift in. Always negative in x, y, z and t directions. Index is the same as the step direction of muIndex. |
muIndex | is a unit vector containing a step in the direction of sharing. It is \(\hat{\mu}\) in \(U_\nu (n + \hat{mu}) \). |
SU3Dir | is the index of the tensor \(\mu\) in link \(U_{\mu}\). |
|
static |
Parallel::Communicator::getNeighboursNeighbourLink fetches a neighbours neighbor link.
Fetches the link when it is given as \(U_\mu(n + \hat{\mu} - \hat{\nu})\).
lattice | a lattice pointer for all four dimensions. |
n | position in lattice to fetch link from. |
mu | index of the muIndex vector we are sharing. |
muIndex | is a unit vector containing a step in the direction of sharing. |
nu | index of the nuIndex vector we are sharing. |
nuIndex | is a unit vector containing a step in the direction of sharing. |
SU3Dir | is the index of the tensor \(\mu\) in link \(U_{\mu}\). |
|
static |
Parallel::Communicator::getNeighboursNeighbourNegativeLink.
Fetches the link when it is given as \(U_\mu(n - \hat{\mu} - \hat{\nu})\).
lattice | a lattice pointer for all four dimensions. |
n | position in lattice to fetch link from. |
mu | index of the muIndex vector we are sharing. |
muIndex | is a unit vector containing a step in the direction of sharing. |
nu | index of the nuIndex vector we are sharing. |
nuIndex | is a unit vector containing a step in the direction of sharing. |
SU3Dir | is the index of the tensor \(\mu\) in link \(U_{\mu}\). |
|
inlinestatic |
|
static |
Parallel::Communicator::getPositiveLink fetches a link in the positive direction.
lattice | a lattice pointer for all four dimensions. |
n | position in lattice to fetch link from. |
mu | direction to shift in. Always negative in x, y, z and t directions. Index is the same as the step direction of muIndex. |
muIndex | is a unit vector containing a step in the direction of sharing. It is \(\hat{\mu}\) in \(U_\nu (n + \hat{mu}) \). |
SU3Dir | is the index of the tensor \(\mu\) in link \(U_{\mu}\). |
|
inlinestatic |
|
static |
Parallel::Communicator::init initializes the communicater and sets up the lattice geometry.
numberOfArguments | number of command line arguments. |
cmdLineArguments | command line arguments. |
|
static |
Parallel::Communicator::initializeSubLattice.
Sets up sublattices. Either by retrieving it from the Parameters class, or by setting it up manually.
|
static |
Parallel::Communicator::MPIExit exits the program. Frees MPI groups before it exits.
message | message to print before exiting. |
|
static |
Parallel::Communicator::MPIPrint prints a message from rank 0. Includes barriers.
message | to print. |
|
static |
Parallel::Communicator::reduceToTemporalDimension reduces the results to the temporal dimensions, i.e. Euclidean time.
obsResults | contigious vector that results will be placed in. |
obs | vector we are gathering results in. |
Should probably pass by the obs by reference.
Should probably set obs as const.
|
static |
Parallel::Communicator::setBarrier.
A MPI_Barrier for all processors.
|
static |
Parallel::Communicator::setBarrierActive.
A MPI_Barrier for only the active processors, i.e. those used in flow or cfg. generation.
|
static |
Parallel::Communicator::setN sets the lattice dimensions in the Parallel::Communicator class.
N | vector of global lattice dimensions |