NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ Bcast_timestep()

template<typename T >
void cntr::herm_matrix_timestep< T >::Bcast_timestep ( int  tstp,
int  root 
)

Broadcasts the herm_matrix_timestep at a given time step to all ranks.

Purpose

Broadcasts the herm_matrix_timestep at a given time step tstp to all ranks. Works for a square matrices.

Parameters
tstp

Time step which should be broadcasted.

root

The rank from which the herm_matrix_timestep should be broadcasted.

Note
The green's function is resized before broadcast with respect to number of points on the Matsubara branch ntau and the matrix size size1 at a given timestep tstp.

Definition at line 2567 of file cntr_herm_matrix_timestep_impl.hpp.

2567  {
2568  int numtasks,taskid;
2569  MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
2570  MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
2571  if (taskid != root)
2572  resize(tstp, ntau_, size1_);
2573  int len = (2 * (tstp_ + 1) + ntau_ + 1) * element_size_;
2574 // test effective on root:
2575  assert(tstp == tstp_);
2576  if (sizeof(T) == sizeof(double))
2577  MPI_Bcast(data_, len, MPI_DOUBLE_COMPLEX, root, MPI_COMM_WORLD);
2578  else
2579  MPI_Bcast(data_, len, MPI_COMPLEX, root, MPI_COMM_WORLD);
2580 }
void resize(int nt, int ntau, int size1)
Resizes herm_matrix_timestep object with respect to the number of points on the Matsubara branch and...