QuIDS: Quantum Irregular Dynamic Simulator
Data Structures | Namespaces | Macros | Typedefs | Functions | Variables
quids_mpi.hpp File Reference
#include "quids.hpp"
#include <mpi.h>
#include "utils/mpi_utils.hpp"

Go to the source code of this file.

Data Structures

class  quids::mpi::mpi_iteration
 mpi iteration (wave function) class, ineriting from the quids::iteration class More...
 
class  quids::mpi::mpi_symbolic_iteration
 symbolic mpi iteration (computation intermediary) More...
 

Namespaces

namespace  quids
 QuIDS namespace.
 
namespace  quids::mpi
 mpi implementation namespace
 

Macros

#define GRANULARITY   64
 granularity, i.e. the typical loop size we consider when doing a 2d loop. More...
 
#define MIN_INBALANCE_STEP   0.2
 

Typedefs

typedef unsigned uint
 
typedef class mpi_iteration quids::mpi::mpi_it_t
 mpi iteration type
 
typedef class mpi_symbolic_iteration quids::mpi::mpi_sy_it_t
 mpi symbolic iteration type
 

Functions

void quids::mpi::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=0, quids::debug_t mid_step_function=[](const char *){})
 function to apply a dynamic to a wave function distributed accross multiple nodes More...
 

Variables

size_t quids::mpi::min_equalize_size = MIN_EQUALIZE_SIZE
 minimum number of object that should be attained (in at least one node) before equalizing (load-sharing) bewteen nodes.
 
float quids::mpi::equalize_inbalance = EQUALIZE_INBALANCE
 maximum imbalance between nodes (max_obj - avg_obj)/max_obj allowed before equalizing.
 
float quids::mpi::min_equalize_step = MIN_INBALANCE_STEP
 minimum jump in equalize before breaking
 
bool quids::mpi::equalize_children = true
 if true, equalize the number of children. Otherwise equalize the number of objects.
 

Macro Definition Documentation

◆ GRANULARITY

#define GRANULARITY   64

granularity, i.e. the typical loop size we consider when doing a 2d loop.

The idea is that GRANULARITY should be large enough for the loop to gain from cache optimization, while being small enough to be considered "small" compared to the number of object per thread.

This is used to introduce some "implicite work stealing" without killing performance, by inserting "GRANULARITY" object from each node into the hashmap when computing collisions, before moving to the next node.