NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ Reduce_timestep() [4/7]

template<typename T >
void cntr::Reduce_timestep ( int  tstp,
int  root,
herm_matrix< T > &  Gred,
herm_matrix_timestep_view< T > &  G 
)

MPI reduce for the herm_matrix_timestep_view to a herm_matrix

Purpose

MPI reduce for the herm_matrix_timestep_view to a herm_matrix on rank root. Works for scalar or square-matrix contour objects.

Parameters
tstp

time step

root

Index of root

Gred

The reduced herm_matrix on rank root.

G

The herm_matrix_timestep_view on the individual ranks.

Definition at line 188 of file cntr_mpitools_impl.hpp.

References cntr::herm_matrix< T >::nt(), cntr::herm_matrix_timestep_view< T >::ntau(), cntr::herm_matrix< T >::ntau(), Reduce_timestep(), cntr::herm_matrix_timestep_view< T >::size1(), cntr::herm_matrix< T >::size1(), cntr::herm_matrix_timestep_view< T >::size2(), cntr::herm_matrix< T >::size2(), and cntr::herm_matrix_timestep_view< T >::tstp().

189  {
190  assert(tstp == G.tstp());
191  int taskid;
192  MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
193  if (taskid == root) {
194  assert(tstp <= Gred.nt());
195  assert(G.ntau() == Gred.ntau());
196  assert(G.size1() == Gred.size1());
197  assert(G.size2() == Gred.size2());
198  }
199 
200  bool check_tstp = (taskid == root);
201  herm_matrix_timestep_view<T> Gred_tmp(tstp, Gred, check_tstp);
202  Reduce_timestep(tstp, root, Gred_tmp, G);
203 
204 }
void Reduce_timestep(int tstp, int root, herm_matrix_timestep< T > &Gred, herm_matrix_timestep< T > &G)
MPI reduce for the herm_matrix_timestep to a herm_matrix_timestep
+ Here is the call graph for this function: