LatticeYangMills
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
Parallel Class Reference

Class to manage the parallelization scheme. More...

#include <parallel.h>

Collaboration diagram for Parallel:
Collaboration graph
[legend]

Static Public Member Functions

static void initialize ()
 initializes MPI, gets the rank number and the total numer of processors
 
static void createGeometry (std::array< int, 4 > latticeSize, std::array< int, 4 > subLatticeSize)
 creates the parallel gemometry of the lattice More...
 
static void finalize ()
 finalizes MPI
 
static int rank ()
 
static int numProcs ()
 
static int activeProcs ()
 
static bool isActive ()
 
static MPI_Comm cartCoordComm ()
 
static std::array< int, 4 > & subBlocks ()
 
static std::array< int, 4 > & rankCoord ()
 
static std::array< int, 4 > & latticeSubSize ()
 
static std::array< int, 4 > & latticeFullSize ()
 
static std::array< int, 4 > & parity ()
 
static int getNeighbor (int direction, int sign)
 return the rank of the neighbor along the given direction and sign
 
static int getSecondNeighbor (int direction1, int sign1, int direction2, int sign2)
 return the rank of the neighbor along the two given directions and signs
 
static void openFile (MPI_File &file, const char *fileName)
 opens a file with MPI
 
static void closeFile (MPI_File &file)
 closes a file with MPI
 

Static Private Member Functions

static void createNeighborLists ()
 Create castesian coordinates and creates neighbor lists for every processor in every direction.
 
static void assignNeighbor (int direction)
 use MPI utilities to find the neighbors in one direction
 
static void assignSecondNeighbor (int dir1, int dir2)
 use MPI utilities to find the neighbors in two direction
 
static void MyMPI_Cart_shift2 (MPI_Comm comm, int dir1, int shift1, int dir2, int shift2, int &source, int &dest)
 use MPI utilities to find the neighbors in two direction
 

Static Private Attributes

static int m_rank
 
static int m_numProcs
 
static int m_activeProcs
 
static bool m_isActive
 
static MPI_Comm m_cartCoordComm
 
static std::array< int, 4 > m_subBlocks
 
static std::array< int, 4 > m_rankCoord
 
static std::array< int, 4 > m_latticeSubSize
 
static std::array< int, 4 > m_latticeFullSize
 
static std::array< int, 4 > m_parity
 
static MPI_Comm m_cartCoords
 
static std::array< std::array< int, 2 >, 4 > m_neighbor
 
static std::array< std::array< std::array< std::array< int, 2 >, 4 >, 2 >, 4 > m_secondNeighbor
 

Detailed Description

Class to manage the parallelization scheme.

Author
Giovanni Pederiva
Version
1.0
Date
2017-2018

Utility class to manage the parallel architecture of the program and interface each process with the overall job. Handles local coordinates, nearest neighbors and communicators

Definition at line 56 of file parallel.h.

Member Function Documentation

void Parallel::createGeometry ( std::array< int, 4 >  latticeSize,
std::array< int, 4 >  subLatticeSize 
)
static

creates the parallel gemometry of the lattice

Parameters
latticeSizearray containing the total size of the lattice
latticeSizearray containing the size of each sublattice

Definition at line 77 of file parallel.cpp.


The documentation for this class was generated from the following files: