Remote Communication

Wraps remote communication for Arbor. This is meant to facilitate sending data _to_ Arbor, not for pulling data into Arbor from the outside, which is done automatically. If you are developing a bridge between Arbor and another simulator that supports calling C++, this is the correct place. In all other cases it is likely not what you are looking for. For a description of the protocol see here

Control Messages

class msg_null

Empty message, possibly used as a keep-alive signal.

class msg_abort

Request termination, giving the reason as a message.

char reason[512]
class msg_epoch

Commence next epoch, giving the open interval \([from, to)\) with times in ms.

double t_start
double t_end
class msg_done

Conclude simulation, giving the final time \(t_{\mathrm{final}}\) in ms.

double time
using ctrl_message = std::variant<msg_null, msg_abort, msg_epoch, msg_done>
exchange_ctrl(ctrl_message message, MPI_Comm comm)

Send message to all peers in the MPI intercomm comm and receive the unanimous answer. message must be one of the types msg_* above.

Spike Exchange

class arb_spike
uint32_t gid

Global id of the spiking cell, must fit in an unsigned 32b integer. gid must be unique in the external network.

uint32_t lid

Local id on the spiking cell, must fit in an unsigned 32b integer. This lid describes which logical part of the cell gid emitted the spike. If the external simulation doesn’t distinguish betwenn different sources on the same cell, always set this to zero.

double time

Time at which the event occured.

gather_spikes(const std::vector<arb_spike>& spikes, MPI_Comm comm)

Sends a buffer of spikes over comm receiving back the concatenated result of all calling MPI tasks in Arbor. This is a collective operation; each MPI task on the remote side must call it simultaneously with its _local_ part of the spikes to send.