SyTen
syten::MPS::TDVP::PTDVP< enable > Class Template Reference

Parallel TDVP run, containing TDVP workers executing the actual calculations. More...

#include <tdvp_parallel.h>

+ Collaboration diagram for syten::MPS::TDVP::PTDVP< enable >:

Public Member Functions

void do_step ()
 Does an entire time step sweeping forward and backward. More...
 
Conf const & get_conf () const
 Get const lvalue ref to internal config, used by Python module. More...
 
Errors const & get_errs () const
 Returns the total errors. More...
 
State get_psi (bool const move=false, bool const verbose=false)
 Creates the full MPS from the partial MPSes in the workers. More...
 
State const & get_ref_psi () const
 Gives a const ref. More...
 
std::vector< Timerget_timers () const
 Return timers. More...
 
void init_timers ()
 Initialises the timer. More...
 
template<typename Archive >
void load (Archive &ar, const unsigned int in_version)
 Serialization. More...
 
template<typename... Args>
void logTrace (Index const rank, int const level, Args &&... whatever) const
 Log tracing information. More...
 
void logTrace (Index const, int const level, Args &&... whatever) const
 
Index mpi_rank () const
 
Index mpi_size () const
 
PTDVPoperator= (PTDVP &&other)
 Move assignment operator. More...
 
 PTDVP ()=default
 Default ctor. More...
 
 PTDVP (PTDVP &&other)
 Move ctor. More...
 
 PTDVP (State &&psi_, std::vector< Operator > &&ops_, Conf &&conf_, std::vector< Index > &&rbounds_)
 Standard ctor, constructs and assigns the worker objects and prepares the calculation. More...
 
bool reached_final_T () const
 True if final time is reached. More...
 
void run (int argc, char **argv, bool const do_step_=false)
 Run TDVP. More...
 
void save () const
 
void save () const
 Sends necessary data for serialization to main thread. More...
 
template<typename Archive >
void save (Archive &ar, const unsigned)
 Serialization. More...
 
template<typename Archive >
void save (Archive &ar, const unsigned) const
 Overload to satisfy boost. More...
 

Static Public Attributes

static constexpr unsigned int version = 1
 Bump this if data changes. More...
 

Private Member Functions

void check_norms_renormalise (Vec< SRDef > const &n)
 
void check_norms_renormalise (Vec< SRDef > const &n)
 Check norms and renormalise. More...
 
bool checkSignals () const
 Return false if we must exit due to having received some signal. More...
 
std::vector< SRDefcompute_norms () const
 
std::vector< SRDefcompute_norms () const
 Compute norms. More...
 
template<typename T >
void init_distribute (Index const t, T &input, T &target) const
 Distribute data in setup. More...
 
void init_distribute (Index const t, T &input, T &target) const
 
void init_worker (Index const t, std::vector< Operator > &&op, State &&psi, Vec< Conf > &confs, Tensor< 2 > &c, Index const lbound, Index const rbound)
 
void init_worker (Index const t, std::vector< Operator > &&op, State &&psi, Vec< Conf > &confs, Tensor< 2 > &c, Index const lbound, Index const rbound)
 Initialises workers. More...
 
void mpi_clear (std::vector< T > &) const
 
void mpi_clear_save ()
 
void mpi_comm_after_sync ()
 
void mpi_comm_before_sync ()
 
void mpi_init (bool const)
 
void mpi_sync_errs ()
 
void mpi_sync_positions ()
 
void mpi_sync_save ()
 
void mpi_sync_zero_pos ()
 
void print_timers () const
 
void print_timers () const
 Prints timers. More...
 
std::string saveState (bool const verbose=false)
 Saves the state to disk and returns the filename used. More...
 
void sweep ()
 
void sweep ()
 Performs the actual sweeping. More...
 
void sync (SRDef const forward_prefactor, SRDef const backward_prefactor, std::string const &id)
 
void sync (SRDef const forward_prefactor, SRDef const backward_prefactor, std::string const &id)
 Performs sync of the boundaries. More...
 
std::vector< Statesync_state (bool const move)
 
std::vector< Statesync_state (bool const move)
 Sync to construct state. More...
 

Private Attributes

Conf conf
 Config containing the parameters. More...
 
std::vector< Tensor< 2 > > connections
 vector of connectors between consecutive segments, already inverted More...
 
Errors errs
 Total errors. More...
 
Index length
 Total system size. More...
 
Index numWorkers
 number of workers, constant throughout the calculation More...
 
std::vector< Workerworkers
 vector of worker objects More...
 

Static Private Attributes

static std::string const uuid = "877097c2-ceba-11eb-b8bc-0242ac130003"
 UUID. More...
 

MPI related stuff.

mpi::Communicator world = SYTEN_MPI_VOID_COMMUNICATOR
 Used for MPI communication. More...
 
static constexpr mpi::Enable enabled = enable
 Stores switch. More...
 
void mpi_init (bool const is_copy)
 Initialises communicator. More...
 
void mpi_comm_before_sync ()
 Communication before sync. More...
 
void mpi_comm_after_sync ()
 Communication after sync. More...
 
void mpi_sync_positions ()
 Syncronize all worker positions to main. More...
 
void mpi_sync_zero_pos ()
 Syncronizes zero position of all workers. More...
 
template<typename T >
void mpi_clear (std::vector< T > &v) const
 Clear all but this slot. More...
 
void mpi_sync_errs ()
 Syncs all errors to main worker. More...
 
void mpi_sync_save ()
 Syncs workers and connectors before serialization. More...
 
void mpi_clear_save ()
 Clears unnecessary stuff afterwards. More...
 
Index mpi_size () const
 Number of slots. More...
 
Index mpi_rank () const
 Current rank. More...
 
bool mpi_main () const
 One of these is not like the others. More...
 

Detailed Description

template<mpi::Enable enable = mpi::Enable::No>
class syten::MPS::TDVP::PTDVP< enable >

Parallel TDVP run, containing TDVP workers executing the actual calculations.


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