NEST
2.6.0,not_revisioned_source_dir@0
|
#include <communicator.h>
Classes | |
class | NodeAddressingData |
class | OffGridSpike |
Combined storage of GID and offset information for off-grid spikes. More... | |
Public Member Functions | |
Communicator () | |
~Communicator () | |
Communicator () | |
~Communicator () | |
Static Public Member Functions | |
static void | enter_runtime (double_t h_min_delay) |
Enter the runtime mode. More... | |
static MUSIC::Setup * | get_music_setup () |
static MUSIC::Runtime * | get_music_runtime () |
static void | advance_music_time (long_t num_steps) |
Advance the time of music by num_steps simulation steps. More... | |
static void | register_music_event_in_proxy (std::string portname, int channel, nest::Node *mp) |
Register a music_event_in_proxy for a given port and a given channel. More... | |
static void | init (int *argc, char **argv[]) |
Set up MPI and establish number of processes and rank. More... | |
static void | finalize () |
Finish off MPI routines. More... | |
static void | mpi_abort (int exitcode) |
static void | communicate (std::vector< uint_t > &send_buffer, std::vector< uint_t > &recv_buffer, std::vector< int > &displacements) |
communicate (on-grid) if compiled without MPI More... | |
static void | communicate (std::vector< OffGridSpike > &send_buffer, std::vector< OffGridSpike > &recv_buffer, std::vector< int > &displacements) |
communicate (off-grid) if compiled without MPI More... | |
static void | communicate (std::vector< double_t > &send_buffer, std::vector< double_t > &recv_buffer, std::vector< int > &displacements) |
static void | communicate (double_t, std::vector< double_t > &) |
static void | communicate (std::vector< int_t > &) |
communicate function for sending set-up information More... | |
static void | communicate (std::vector< long_t > &) |
template<typename NodeListType > | |
static void | communicate (const NodeListType &local_nodes, std::vector< NodeAddressingData > &all_nodes, bool remote=false) |
Collect GIDs for all nodes in a given node list across processes. More... | |
template<typename NodeListType > | |
static void | communicate (const NodeListType &local_nodes, std::vector< NodeAddressingData > &all_nodes, Network &net, DictionaryDatum params, bool remote=false) |
static void | communicate_connector_properties (DictionaryDatum &dict) |
static void | synchronize () |
Ensure all processes have reached the same stage by waiting until all processes have sent a dummy message to process 0. More... | |
static void | test_link (int, int) |
static void | test_links () |
static bool | grng_synchrony (unsigned long) |
static double_t | time_communicate (int num_bytes, int samples=1000) |
static double_t | time_communicatev (int num_bytes, int samples=1000) |
static double_t | time_communicate_offgrid (int num_bytes, int samples=1000) |
static double_t | time_communicate_alltoall (int num_bytes, int samples=1000) |
static double_t | time_communicate_alltoallv (int num_bytes, int samples=1000) |
static std::string | get_processor_name () |
static int | get_rank () |
static int | get_num_processes () |
static void | set_num_processes (int) |
static int | get_num_virtual_processes () |
static int | get_send_buffer_size () |
static int | get_recv_buffer_size () |
static bool | get_use_Allgather () |
static bool | get_initialized () |
static void | set_num_threads (thread num_threads) |
static void | set_buffer_sizes (int send_buffer_size, int recv_buffer_size) |
static void | set_use_Allgather (bool use_Allgather) |
static void | communicate (std::vector< uint_t > &send_buffer, std::vector< uint_t > &recv_buffer, std::vector< int > &displacements) |
static void | communicate (std::vector< OffGridSpike > &send_buffer, std::vector< OffGridSpike > &recv_buffer, std::vector< int > &displacements) |
static void | communicate (std::vector< double_t > &send_buffer, std::vector< double_t > &recv_buffer, std::vector< int > &displacements) |
static void | communicate (double_t, std::vector< double_t > &) |
static void | communicate (std::vector< int_t > &) |
static void | communicate (std::vector< long_t > &) |
template<typename NodeListType > | |
static void | communicate (const NodeListType &local_nodes, std::vector< NodeAddressingData > &all_nodes, bool remote=false) |
Collect GIDs for all nodes in a given node list across processes. More... | |
template<typename NodeListType > | |
static void | communicate (const NodeListType &local_nodes, std::vector< NodeAddressingData > &all_nodes, Network &net, DictionaryDatum params, bool remote=false) |
static void | communicate_connector_properties (DictionaryDatum &) |
static void | synchronize () |
static bool | grng_synchrony (unsigned long) |
static double_t | time_communicate (int, int) |
static double_t | time_communicatev (int, int) |
static double_t | time_communicate_offgrid (int, int) |
static double_t | time_communicate_alltoall (int, int) |
static double_t | time_communicate_alltoallv (int, int) |
static std::string | get_processor_name () |
static int | get_rank () |
static int | get_num_processes () |
static void | set_num_processes (int) |
static int | get_num_virtual_processes () |
static int | get_send_buffer_size () |
static int | get_recv_buffer_size () |
static bool | get_use_Allgather () |
static bool | get_initialized () |
static void | set_num_threads (thread num_threads) |
static void | set_buffer_sizes (int send_buffer_size, int recv_buffer_size) |
static void | set_use_Allgather (bool use_Allgather) |
Static Public Attributes | |
static MUSIC::Setup * | music_setup =0 |
pointer to a MUSIC setup object More... | |
static MUSIC::Runtime * | music_runtime =0 |
pointer to a MUSIC runtime object More... | |
Static Private Member Functions | |
static void | init_communication () |
Perform the CPEX algorithm to determine the communication partner of the process for each communication step. More... | |
static void | communicate_Allgather (std::vector< uint_t > &send_buffer, std::vector< uint_t > &recv_buffer, std::vector< int > &displacements) |
static void | communicate_Allgather (std::vector< OffGridSpike > &send_buffer, std::vector< OffGridSpike > &recv_buffer, std::vector< int > &displacements) |
static void | communicate_Allgather (std::vector< int_t > &) |
static void | communicate_Allgather (std::vector< long_t > &) |
template<typename T > | |
static void | communicate_Allgatherv (std::vector< T > &send_buffer, std::vector< T > &recv_buffer, std::vector< int > &displacements, std::vector< int > &recv_counts) |
template<typename T > | |
static void | communicate_Allgather (std::vector< T > &send_buffer, std::vector< T > &recv_buffer, std::vector< int > &displacements) |
static void | communicate_CPEX (std::vector< uint_t > &send_buffer, std::vector< uint_t > &recv_buffer, std::vector< int > &displacements) |
static void | communicate_CPEX (std::vector< OffGridSpike > &send_buffer, std::vector< OffGridSpike > &recv_buffer, std::vector< int > &displacements) |
static void | communicate_CPEX (std::vector< int_t > &) |
static void | communicate_CPEX (std::vector< long_t > &) |
Static Private Attributes | |
static Network * | net_ = 0 |
Pointer to the Network class. More... | |
static int | rank_ = 0 |
the rank of the machine More... | |
static int | num_processes_ = 1 |
the number of mpi-processes More... | |
static int | n_vps_ = 1 |
the number of virtual processes More... | |
static int | send_buffer_size_ = 1 |
expected size of send buffer More... | |
static int | recv_buffer_size_ = 1 |
size of receive buffer More... | |
static bool | initialized_ = false |
whether MPI is initialized More... | |
static bool | use_Allgather_ = true |
using Allgather communication More... | |
static std::vector< int > | comm_step_ = std::vector<int>() |
array containing communication partner for each step. More... | |
static uint_t | COMM_OVERFLOW_ERROR = std::numeric_limits<unsigned int>::max() |
Friends | |
class | Network |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Advance the time of music by num_steps simulation steps.
num_steps | number of simulation steps, the time to propagate. /TODO: put this into scheduler. |
Referenced by nest::Scheduler::update().
|
static |
communicate (on-grid) if compiled without MPI
Referenced by nest::FreeLayer< D >::communicate_positions_(), nest::Network::divergent_connect(), nest::NestModule::GetNodes_i_D_b_bFunction::execute(), nest::NestModule::GetLeaves_i_D_bFunction::execute(), nest::NestModule::GetChildren_i_D_bFunction::execute(), nest::Scheduler::prepare_nodes(), nest::Network::random_divergent_connect(), and nest::Scheduler::update_delay_extrema_().
|
static |
communicate (off-grid) if compiled without MPI
|
static |
|
static |
References comm.
|
static |
communicate function for sending set-up information
|
static |
|
static |
Collect GIDs for all nodes in a given node list across processes.
The NodeListType should be one of LocalNodeList, LocalLeafList, LocalChildList.
References assert(), nest::names::n, num_processes_, and rank_.
|
static |
References assert(), nest::Network::get_status(), Token::matches_as_string(), nest::names::n, num_processes_, and rank_.
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
static |
Collect GIDs for all nodes in a given node list across processes.
The NodeListType should be one of LocalNodeList, LocalLeafList, LocalChildList. Collect GIDs for all nodes in a given node list across processes. The NodeListType should be one of LocalNodeList, LocalLeafList, LocalChildList.
|
static |
|
staticprivate |
References comm.
|
staticprivate |
References comm, and MPI_OFFGRID_SPIKE.
|
staticprivate |
References comm.
|
staticprivate |
References comm.
|
staticprivate |
References comm.
|
staticprivate |
References comm.
|
static |
References nest::names::delays, nest::names::targets, and nest::names::weights.
|
inlinestatic |
|
staticprivate |
References comm.
|
staticprivate |
References comm, and MPI_OFFGRID_SPIKE.
|
staticprivate |
References comm.
|
staticprivate |
References comm.
|
static |
Enter the runtime mode.
This must be done before simulating. After having entered runtime mode ports cannot be published anymore.
h_min_delay | is the length of a time slice, after which commmunication should take place. |
References numerics::e.
Referenced by nest::Scheduler::prepare_simulation().
|
static |
Finish off MPI routines.
References numerics::e, SLIInterpreter::M_INFO, and MPI_OFFGRID_SPIKE.
Referenced by nestshutdown().
|
inlinestatic |
References initialized_.
Referenced by nest::NestModule::init().
|
static |
|
static |
|
static |
|
inlinestatic |
References num_processes_.
Referenced by nest::cg_create_masks(), nest::cg_set_masks(), nest::Scheduler::configure_spike_buffers_(), nest::NestModule::NumProcessesFunction::execute(), nest::Scheduler::finalize_simulation(), nest::Scheduler::get_num_processes(), nest::Scheduler::init_(), nest::Scheduler::prepare_nodes(), nest::Scheduler::prepare_simulation(), and nest::Scheduler::update_delay_extrema_().
|
static |
|
inlinestatic |
References n_vps_.
Referenced by nest::RecordingDevice::build_filename_(), nest::FixedTotalNumberBuilder::connect_(), and nest::Scheduler::prepare_nodes().
|
static |
|
inlinestatic |
Referenced by nest::NestModule::ProcessorNameFunction::execute().
|
static |
|
inlinestatic |
|
static |
|
inlinestatic |
References recv_buffer_size_.
Referenced by nest::Scheduler::prepare_nodes().
|
static |
|
inlinestatic |
References send_buffer_size_.
Referenced by nest::Scheduler::prepare_nodes().
|
static |
|
inlinestatic |
References use_Allgather_.
Referenced by nest::Scheduler::prepare_nodes().
|
static |
|
static |
References comm.
Referenced by nest::Scheduler::finalize_simulation(), and nest::Scheduler::prepare_simulation().
|
inlinestatic |
|
static |
Set up MPI and establish number of processes and rank.
References nest::names::address, nest::Communicator::OffGridSpike::assert_datatype_compatibility(), comm, nest::Communicator::OffGridSpike::gid_, init_communication(), initialized_, MPI_OFFGRID_SPIKE, music_setup, num_processes_, nest::Communicator::OffGridSpike::offset_, nest::names::offsets, rank_, recv_buffer_size_, send_buffer_size_, and use_Allgather_.
|
staticprivate |
Perform the CPEX algorithm to determine the communication partner of the process for each communication step.
See: A. Tam and C. Wang: Efficient scheduling of complete exchange on clusters. In 13th International Conference on Parallel and Distributed Computing Systems (PDCS 2000), Las Vegas, 2000
Referenced by init(), and set_use_Allgather().
|
static |
Referenced by nest::NestModule::MPIAbort_iFunction::execute().
|
static |
Register a music_event_in_proxy for a given port and a given channel.
As a consequence, the proxy will be informed, whenever an event over this port and channel comes in.
|
inlinestatic |
References recv_buffer_size_, and send_buffer_size_.
Referenced by nest::Scheduler::configure_spike_buffers_().
|
static |
|
inlinestatic |
References num_processes_.
Referenced by nest::NestModule::SetFakeNumProcessesFunction_i::execute().
|
static |
|
inlinestatic |
References n_vps_, and num_processes_.
Referenced by nest::Scheduler::prepare_nodes().
|
static |
|
inlinestatic |
References init_communication(), and use_Allgather_.
Referenced by nest::Scheduler::prepare_nodes().
|
static |
|
static |
Ensure all processes have reached the same stage by waiting until all processes have sent a dummy message to process 0.
References comm.
Referenced by nest::NestModule::SyncProcessesFunction::execute(), and nest::Scheduler::resume().
|
inlinestatic |
|
static |
|
static |
|
static |
References nest::Stopwatch::elapsed(), nest::Stopwatch::start(), and nest::Stopwatch::stop().
Referenced by nest::NestModule::TimeCommunication_i_i_bFunction::execute().
|
inlinestatic |
|
static |
References nest::Stopwatch::elapsed(), nest::Stopwatch::start(), and nest::Stopwatch::stop().
Referenced by nest::NestModule::TimeCommunicationAlltoall_i_iFunction::execute().
|
inlinestatic |
|
static |
References nest::Stopwatch::elapsed(), nest::Stopwatch::start(), and nest::Stopwatch::stop().
Referenced by nest::NestModule::TimeCommunicationAlltoallv_i_iFunction::execute().
|
inlinestatic |
|
static |
References nest::Stopwatch::elapsed(), MPI_OFFGRID_SPIKE, nest::Stopwatch::start(), and nest::Stopwatch::stop().
Referenced by nest::NestModule::TimeCommunication_i_i_bFunction::execute().
|
inlinestatic |
|
static |
References nest::Stopwatch::elapsed(), nest::Stopwatch::start(), and nest::Stopwatch::stop().
Referenced by nest::NestModule::TimeCommunicationv_i_iFunction::execute().
|
inlinestatic |
|
friend |
|
staticprivate |
|
staticprivate |
array containing communication partner for each step.
|
staticprivate |
whether MPI is initialized
Referenced by get_initialized(), and init().
|
static |
pointer to a MUSIC runtime object
|
static |
pointer to a MUSIC setup object
Referenced by init().
|
staticprivate |
the number of virtual processes
Referenced by get_num_virtual_processes(), and set_num_threads().
|
staticprivate |
Pointer to the Network class.
Referenced by nest::Network::Network().
|
staticprivate |
the number of mpi-processes
Referenced by communicate(), get_num_processes(), init(), set_num_processes(), and set_num_threads().
|
staticprivate |
the rank of the machine
Referenced by communicate(), get_rank(), and init().
|
staticprivate |
size of receive buffer
Referenced by get_recv_buffer_size(), init(), and set_buffer_sizes().
|
staticprivate |
expected size of send buffer
Referenced by get_send_buffer_size(), init(), and set_buffer_sizes().
|
staticprivate |
using Allgather communication
Referenced by get_use_Allgather(), init(), and set_use_Allgather().