QuIDS: Quantum Irregular Dynamic Simulator
|
mpi iteration (wave function) class, ineriting from the quids::iteration class More...
#include <quids_mpi.hpp>
Public Member Functions | |
mpi_iteration () | |
simple empty wavefunction constructor. | |
mpi_iteration (char *object_begin_, char *object_end_) | |
constructor that insert a single object with magnitude 1 More... | |
size_t | get_total_num_object (MPI_Comm communicator) const |
getter for the total amount of distributed objects. More... | |
size_t | get_total_num_symbolic_object (MPI_Comm communicator) const |
getter for the total amount of distributed symbolic objects. More... | |
PROBA_TYPE | average_value (const quids::observable_t observable) const |
function to get the average local value of a custom observable. More... | |
PROBA_TYPE | average_value (const quids::observable_t observable, MPI_Comm communicator) const |
function to get the average value of a custom observable accross the total distributed wave function. More... | |
void | send_objects (size_t num_object_sent, int node, MPI_Comm communicator, bool send_num_child=false) |
function to send objects (from the "tail" of the memory representation). More... | |
void | receive_objects (int node, MPI_Comm communicator, bool receive_num_child=false, size_t max_mem=-1) |
function to receive objects (at the "tail" of the memory representation). More... | |
void | equalize (MPI_Comm communicator) |
equalize the number of object across node pairs. More... | |
void | distribute_objects (MPI_Comm communicator, int node_id) |
distribute objects eqaully from a single node to all others. More... | |
void | gather_objects (MPI_Comm communicator, int node_id) |
gather objects to a single node from all others. More... | |
![]() | |
iteration () | |
simple empty wavefunction constructor | |
iteration (char *object_begin_, char *object_end_) | |
constructor that insert a single object with magnitude 1 More... | |
void | append (char const *object_begin_, char const *object_end_, mag_t const mag=1) |
function that insert a single object with a given magnitude More... | |
void | pop (size_t n=1, bool normalize_=true) |
function that removes a given number of object from the "tail" of the memory representation More... | |
PROBA_TYPE | average_value (const observable_t observable) const |
function to get the average value of a custom observable More... | |
void | get_object (size_t const object_id, char *&object_begin_, uint &object_size_, mag_t *&mag) |
function to access a particular object (read-write access) More... | |
void | get_object (size_t const object_id, char const *&object_begin_, uint &object_size_, mag_t &mag) const |
function to access a particular object (read-only access) More... | |
Data Fields | |
PROBA_TYPE | node_total_proba = 0 |
total probability retained locally after previous truncation (if any). | |
![]() | |
size_t | num_object = 0 |
number of objects contained in the wave function | |
PROBA_TYPE | total_proba = 1 |
total probability retained after previous truncation (if any). | |
Friends | |
void | simulate (mpi_it_t &iteration, quids::rule_t const *rule, mpi_it_t &next_iteration, mpi_sy_it_t &symbolic_iteration, MPI_Comm communicator, size_t max_num_object, quids::debug_t mid_step_function) |
function to apply a dynamic to a wave function distributed accross multiple nodes More... | |
Additional Inherited Members | |
![]() | |
size_t | truncated_num_object = 0 |
uint | ub_symbolic_object_size = 0 |
utils::fast_vector< mag_t > | magnitude |
utils::fast_vector< char > | objects |
utils::fast_vector< size_t > | object_begin |
utils::fast_vector< uint > | object_size |
utils::fast_vector< uint > | num_childs |
utils::fast_vector< size_t > | child_begin |
utils::fast_vector< size_t > | truncated_oid |
utils::fast_vector< float > | random_selector |
mpi iteration (wave function) class, ineriting from the quids::iteration class
|
inline |
constructor that insert a single object with magnitude 1
[in] | object_begin_,object_end_ | delimitations of the object to insert. |
|
inline |
function to get the average local value of a custom observable.
[in] | observable | observable that should be computed. |
|
inline |
function to get the average value of a custom observable accross the total distributed wave function.
[in] | observable | observable that should be computed. |
[in] | communicator | MPI communcator. |
void quids::mpi::mpi_iteration::distribute_objects | ( | MPI_Comm | communicator, |
int | node_id = 0 |
||
) |
distribute objects eqaully from a single node to all others.
[in] | communicator | MPI communcator. |
[in] | node | node identifier that objects should be distributed from. |
void quids::mpi::mpi_iteration::equalize | ( | MPI_Comm | communicator | ) |
equalize the number of object across node pairs.
[in] | communicator | MPI communcator. |
void quids::mpi::mpi_iteration::gather_objects | ( | MPI_Comm | communicator, |
int | node_id = 0 |
||
) |
gather objects to a single node from all others.
[in] | communicator | MPI communcator. |
[in] | node | node identifier that objects should be gathered to. |
|
inline |
getter for the total amount of distributed objects.
[in] | communicator | MPI communcator. |
|
inline |
getter for the total amount of distributed symbolic objects.
[in] | communicator | MPI communcator. |
|
inline |
function to receive objects (at the "tail" of the memory representation).
[in] | node | node identifier that objects should be received from. @params[in] communicator MPI communcator. @params[in] receive_num_child wether to also receive the number of children per object or not. @params[in] max_mem the maximum amount of memory that can be received, -1 means no limits. |
|
inline |
function to send objects (from the "tail" of the memory representation).
[in] | num_object_sent | number of object to be sent. |
[in] | node | node identifier that objects should be sent to. @params[in] communicator MPI communcator. @params[in] send_num_child wether to also send the number of children per object or not. |
|
friend |
function to apply a dynamic to a wave function distributed accross multiple nodes
[in] | iteration | wavefunction that the dynamic will be applied to. |
[in] | rule | dynamic that will be applied. |
[out] | next_iteration | wave function that will be overwritten to then contained the final wave function. |
[out] | symbolic_iteration | symbolic iteration that will be used. |
[in] | communicator | MPI communcator. |
[in] | max_num_object | maximum number of objects to be kept per node, -1 means no maximum, 0 means automaticaly finding the maximum ammount of objects that can be kept in memory. |
[in] | mid_step_function | debuging function called between steps. |