PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_proxy.h File Reference

PRT communication proxy. More...

#include "prt.h"

Go to the source code of this file.

Data Structures

struct  prt_proxy_s
 VSA's proxy. More...
 

Macros

#define PRT_PROXY_MAX_TAGS_PER_NODE   10003
 Maximum tags per node. Size of the proxy's hash table for tags. It should be a prime number.
 
#define PRT_PROXY_MAX_SENDS_PER_AGENT   1
 Maximum numbers of outstanding MPI send requests per agent.
 
#define PRT_PROXY_MAX_RECVS_PER_AGENT   1
 Maximum numbers of outstanding MPI receive requests per agent.
 

Typedefs

typedef struct prt_proxy_s prt_proxy_t
 VSA's proxy. More...
 

Functions

prt_proxy_tprt_proxy_new (int num_agents)
 Creates a proxy. More...
 
void prt_proxy_delete (prt_proxy_t *proxy)
 Destroys a proxy. Checks if all the lists are empty at the time of destruction. Not destroying the list of receives (destroyed at the end of the proxy's cycle). More...
 
void prt_proxy_max_channel_size (prt_proxy_t *proxy, struct prt_channel_s *channel)
 Looks for maximum channel/packet size. More...
 
void prt_proxy_recv (prt_proxy_t *proxy, struct prt_request_s *request)
 Receives to a channel. More...
 
void prt_proxy_mpi (prt_proxy_t *proxy)
 Implements the proxy's MPI cycle. Services all MPI requests. More...
 
void prt_proxy_cuda (prt_proxy_t *proxy)
 Implements the proxy's CUDA cycle. Services all local transfer requests. Runs all device code. More...
 
double prt_proxy_run (prt_proxy_t *proxy)
 Implements the proxy's production cycle. First, barriers with all MPI processes. Then, barriers with all local worker threads and starts measuring time. When finished, barriers with all local worker threads. Then, barriers with all MPI processes and stops the timer. More...
 

Detailed Description

PRT communication proxy.

Author
Jakub Kurzak

PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.

Definition in file prt_proxy.h.

Typedef Documentation

typedef struct prt_proxy_s prt_proxy_t

VSA's proxy.

The reason for the num_callbacks counter is the following: Empty transfers queue does not mean there is nothing pending. Communication requests may be sitting in a stream waiting to be queued.

Function Documentation

void prt_proxy_cuda ( prt_proxy_t proxy)

Implements the proxy's CUDA cycle. Services all local transfer requests. Runs all device code.

Parameters
proxy– The proxy to cycle CUDA.

Definition at line 256 of file prt_proxy.c.

void prt_proxy_delete ( prt_proxy_t proxy)

Destroys a proxy. Checks if all the lists are empty at the time of destruction. Not destroying the list of receives (destroyed at the end of the proxy's cycle).

Parameters
proxy– The proxy to destroy.

Definition at line 86 of file prt_proxy.c.

void prt_proxy_max_channel_size ( prt_proxy_t proxy,
prt_channel_t channel 
)

Looks for maximum channel/packet size.

Parameters
proxy– The proxy registering the size.
channel– The channel to register the size of.

Definition at line 132 of file prt_proxy.c.

void prt_proxy_mpi ( prt_proxy_t proxy)

Implements the proxy's MPI cycle. Services all MPI requests.

Parameters
proxy– The proxy to cycle MPI.

Definition at line 187 of file prt_proxy.c.

prt_proxy_t* prt_proxy_new ( int  num_agents)

Creates a proxy.

Parameters
num_agents– The number of local agents (threads + devices).
Returns
A new proxy.

Definition at line 30 of file prt_proxy.c.

void prt_proxy_recv ( prt_proxy_t proxy,
prt_request_t request 
)

Receives to a channel.

Parameters
proxy– The proxy to receive the request.
request– The receive request to process.

Definition at line 150 of file prt_proxy.c.

double prt_proxy_run ( prt_proxy_t proxy)

Implements the proxy's production cycle. First, barriers with all MPI processes. Then, barriers with all local worker threads and starts measuring time. When finished, barriers with all local worker threads. Then, barriers with all MPI processes and stops the timer.

Parameters
proxy– The proxy to run.
Returns
The execution time.

Definition at line 319 of file prt_proxy.c.