|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
MPI broadcast and reduction of Green's functions.
MPI-aware operations for the Green's function containers: triqs::gfs::mpi_broadcast and triqs::gfs::mpi_reduce (with the in-place variant triqs::gfs::mpi_reduce_into), for both single and block Green's functions.
Functions | |
| template<BlockGf BG> | |
| void | triqs::gfs::mpi_broadcast (BG &&bg, mpi::communicator c, int root) |
| Implementation of an MPI broadcast for triqs::gfs::block_gf and triqs::gfs::block_gf_view types. | |
| template<MemoryGf G> | |
| void | triqs::gfs::mpi_broadcast (G &&g, mpi::communicator c, int root) |
| Implementation of an MPI broadcast for triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view types. | |
| template<BlockGf BG> | |
| auto | triqs::gfs::mpi_reduce (BG const &bg, mpi::communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM) |
| Implementation of an MPI reduce for triqs::gfs::block_gf and triqs::gfs::block_gf_view types. | |
| template<MemoryGf G> | |
| auto | triqs::gfs::mpi_reduce (G const &g, mpi::communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM) |
| Implementation of an MPI reduce for triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view types. | |
| template<BlockGf BG1, BlockGf BG2> | |
| void | triqs::gfs::mpi_reduce_into (BG1 const &bg_in, BG2 &&bg_out, mpi::communicator c, int root, bool all, MPI_Op op) |
| Implementation of an MPI reduce for triqs::gfs::block_gf and triqs::gfs::block_gf_view types that reduces directly into an existing block GF object. | |
| template<MemoryGf G1, MemoryGf G2> | |
| void | triqs::gfs::mpi_reduce_into (G1 const &g_in, G2 &&g_out, mpi::communicator c, int root, bool all, MPI_Op op) |
| Implementation of an MPI reduce for triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view types that reduces directly into an existing GF object. | |
| void triqs::gfs::mpi_broadcast | ( | BG && | bg, |
| mpi::communicator | c, | ||
| int | root ) |
#include <triqs/gfs/block/block_gf.hpp>
Implementation of an MPI broadcast for triqs::gfs::block_gf and triqs::gfs::block_gf_view types.
It simply broadcasts the vector (of vectors) of GF objects. Furthermore,
| G | Block GF type. |
| bg | Block GF (view) to be broadcasted from/into. |
| c | mpi::communicator object. |
| root | Rank of the root process. |
| void triqs::gfs::mpi_broadcast | ( | G && | g, |
| mpi::communicator | c, | ||
| int | root ) |
#include <triqs/gfs/gf/gf.hpp>
Implementation of an MPI broadcast for triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view types.
It simply broadcasts the data of the GF, i.e. the nda array/view object. Furthermore,
| G | triqs::gfs::MemoryGf type. |
| g | GF (view) to be broadcasted from/into. |
| c | mpi::communicator object. |
| root | Rank of the root process. |
| auto triqs::gfs::mpi_reduce | ( | BG const & | bg, |
| mpi::communicator | c = {}, | ||
| int | root = 0, | ||
| bool | all = false, | ||
| MPI_Op | op = MPI_SUM ) |
#include <triqs/gfs/block/mpi.hpp>
Implementation of an MPI reduce for triqs::gfs::block_gf and triqs::gfs::block_gf_view types.
The function reduces input block GFs (views) from all processes in the given communicator and makes the result available on the root process (all == false) or on all processes (all == true).
It calls triqs::gfs::mpi_reduce_into with the input block GF and a default constructed block GF object.
The content of the returned block GF depends on the MPI rank and whether it receives the data or not:
| BG | Block GF type. |
| bg | Block GF (view) to be reduced (into). |
| c | mpi::communicator object. |
| root | Rank of the root process. |
| all | Should all processes receive the result of the reduction. |
| op | MPI reduction operation. |
| auto triqs::gfs::mpi_reduce | ( | G const & | g, |
| mpi::communicator | c = {}, | ||
| int | root = 0, | ||
| bool | all = false, | ||
| MPI_Op | op = MPI_SUM ) |
#include <triqs/gfs/gf/mpi.hpp>
Implementation of an MPI reduce for triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view types.
The function reduces input GF (views) from all processes in the given communicator and makes the result available on the root process (all == false) or on all processes (all == true).
It calls triqs::gfs::mpi_reduce_into with the input GF (view) and a default constructed GF object.
The content of the returned GF depends on the MPI rank and whether it receives the data or not:
| G | triqs::gfs::MemoryGf type. |
| g | GF (view) to be reduced. |
| c | mpi::communicator object. |
| root | Rank of the root process. |
| all | Should all processes receive the result of the reduction. |
| op | MPI reduction operation. |
| void triqs::gfs::mpi_reduce_into | ( | BG1 const & | bg_in, |
| BG2 && | bg_out, | ||
| mpi::communicator | c, | ||
| int | root, | ||
| bool | all, | ||
| MPI_Op | op ) |
#include <triqs/gfs/block/block_gf.hpp>
Implementation of an MPI reduce for triqs::gfs::block_gf and triqs::gfs::block_gf_view types that reduces directly into an existing block GF object.
The function reduces input block GFs (views) from all processes in the given communicator and makes the result available on the root process (all == false) or on all processes (all == true).
It throws an exception if the input block GFs on all processes and the output block GF views on receiving processes do not have the same shape. Furthermore, the block names of the input block GFs on all processes and of output block GF views on receiving processes are expected to be the same.
The content of the output block GF depends on the MPI rank and whether it receives the data or not:
| BG1 | Block GF type. |
| BG2 | Block GF type. |
| bg_in | Block GF (view) to be reduced. |
| bg_out | Block GF (view) to be reduced into. |
| c | mpi::communicator object. |
| root | Rank of the root process. |
| all | Should all processes receive the result of the reduction. |
| op | MPI reduction operation. |
| void triqs::gfs::mpi_reduce_into | ( | G1 const & | g_in, |
| G2 && | g_out, | ||
| mpi::communicator | c, | ||
| int | root, | ||
| bool | all, | ||
| MPI_Op | op ) |
#include <triqs/gfs/gf/gf.hpp>
Implementation of an MPI reduce for triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view types that reduces directly into an existing GF object.
The function reduces input GFs (views) from all processes in the given communicator and makes the result available on the root process (all == false) or on all processes (all == true).
Input GFs on all processes and output GF views on receiving processes are expected to have the same mesh.
The content of the output GF depends on the MPI rank and whether it receives the data or not:
The reduction of the data is performed in place if the input and output GFs point to the same memory location.
| G1 | triqs::gfs::MemoryGf type. |
| G2 | triqs::gfs::MemoryGf type. |
| g_in | GF (view) to be reduced. |
| g_out | GF (view) to be reduced into. |
| c | mpi::communicator object. |
| root | Rank of the root process. |
| all | Should all processes receive the result of the reduction. |
| op | MPI reduction operation. |