Go to the documentation of this file.
18 #ifndef __SERVER_MPIPROXY_MPIPROXY_H
19 #define __SERVER_MPIPROXY_MPIPROXY_H
139 const struct sockaddr & addr)
const;
152 const struct sockaddr & addr)
const;
249 const Size coreCount);
262 const Size coreCount);
277 const Size coreCount);
Result udpSend(const void *packet, const Size size, const struct sockaddr &addr) const
Send UDP packet.
NetworkClient * m_client
Networking client object.
Server that bridges IP/UDP to local MPI communication channels.
Result processRecv(const Header *header, const u8 *packet, const Size size, const struct sockaddr &addr)
Process MPI recv request.
int m_sock
IP/UDP socket for external communication.
static const Size MaximumChannels
Maximum number of supported MPI channels.
Result processRequest(const u8 *packet, const Size size, const struct sockaddr &addr)
Process incoming packet.
POSIX-compatible application.
Result processTerminate(const Header *header, const u8 *packet, const Size size, const struct sockaddr &addr)
Process MPI terminate request.
Result udpReceive(void *packet, Size &size, struct sockaddr &addr) const
Receive UDP packet.
Result startRemoteProcess(const Size coreId, const char *command, const Size rankId, const Size coreCount)
Start a process on a secondary processor.
Defines a socket address and port pair.
static const Size MaximumPacketSize
Maximum size of packet payload.
Array< ProcessID, MaximumChannels > m_pids
Records the PID of each process participating in the computation.
MpiProxy(int argc, char **argv)
Constructor.
SystemDescriptorHeader header
unsigned short u16
Unsigned 16-bit number.
Result createChannels(const Size rankId, const Size coreCount)
Create communication channels.
static const Size ReceiveTimeoutMs
Timeout in milliseconds to wait for packet receive.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
Index< MemoryChannel, MaximumChannels > m_readChannels
Stores all channels for receiving data from processes.
Unidirectional point-to-point channel using shared memory.
Networking Client implementation.
Result startLocalProcess(const char *command, const Size rankId, const Size coreCount)
Start a process on the local processor.
Input/Output vector for multi-packet operations.
virtual ~MpiProxy()
Destructor.
Result processExec(const Header *header, const u8 *packet, const Size size, const struct sockaddr &addr)
Process execute request.
Result processSend(const Header *header, const u8 *packet, const Size size)
Process MPI send request.
unsigned char u8
Unsigned 8-bit number.
virtual Result exec()
Run the server.
static const u16 UdpPort
Port number for IP/UDP traffic.
Memory::Range m_memChannelBase
Memory base address for local MPI communication.
Operation
Encodes various MPI operations.
virtual Result initialize()
Initialize the server.
Index< MemoryChannel, MaximumChannels > m_writeChannels
Stores all channels for sending data to processes.
Result udpSendMultiple(const struct iovec *vec, const Size count, const struct sockaddr &addr) const
Send multiple UDP packets.