NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
urom_ping_pong_sample.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <mpi.h>
#include <doca_ctx.h>
#include <doca_dev.h>
#include <doca_error.h>
#include <doca_log.h>
#include <doca_pe.h>
#include <doca_urom.h>
#include <worker_sandbox.h>
#include "common.h"
#include "urom_common.h"
Include dependency graph for urom_ping_pong_sample.c:

Go to the source code of this file.

Data Structures

struct  recv_result
 
struct  send_result
 

Macros

#define PING_TAG   0x1234 /* UCX data for ping tag */
 
#define PONG_TAG   0x5678 /* UCX data for pong tag */
 
#define RECV_MAX_LEN   100 /* Receive message maximum size */
 
#define PING_RECV_CTX   0xdead /* Ping recv context */
 
#define PONG_RECV_CTX   0xbeef /* Pong recv context */
 

Enumerations

enum  pp_res_type_t { PP_RES_TYPE_UNKNOWN = 0 , PP_RES_TYPE_SEND , PP_RES_TYPE_RECV }
 

Functions

 DOCA_LOG_REGISTER (UROM_PING_PONG::SAMPLE)
 
static doca_error_t oob_allgather (void *sbuf, void *rbuf, size_t msglen, void *coll_info, void **req)
 
static doca_error_t oob_allgather_test (void *req)
 
static doca_error_t oob_allgather_free (void *req)
 
static void recv_finished_cb (doca_error_t result, union doca_data cookie, union doca_data context, void *buffer, uint64_t buf_len, uint64_t sender_tag, ucs_status_t status)
 
static void send_finished_cb (doca_error_t result, union doca_data cookie, union doca_data context, ucs_status_t status)
 
doca_error_t ping_pong (struct doca_pe *pe, struct doca_urom_worker *worker, const char *msg, int my_rank, int size)
 
doca_error_t urom_ping_pong (const char *message, const char *device_name, uint32_t rank, uint32_t size)
 

Macro Definition Documentation

◆ PING_RECV_CTX

#define PING_RECV_CTX   0xdead /* Ping recv context */

Definition at line 56 of file urom_ping_pong_sample.c.

◆ PING_TAG

#define PING_TAG   0x1234 /* UCX data for ping tag */

Definition at line 53 of file urom_ping_pong_sample.c.

◆ PONG_RECV_CTX

#define PONG_RECV_CTX   0xbeef /* Pong recv context */

Definition at line 57 of file urom_ping_pong_sample.c.

◆ PONG_TAG

#define PONG_TAG   0x5678 /* UCX data for pong tag */

Definition at line 54 of file urom_ping_pong_sample.c.

◆ RECV_MAX_LEN

#define RECV_MAX_LEN   100 /* Receive message maximum size */

Definition at line 55 of file urom_ping_pong_sample.c.

Enumeration Type Documentation

◆ pp_res_type_t

Enumerator
PP_RES_TYPE_UNKNOWN 
PP_RES_TYPE_SEND 
PP_RES_TYPE_RECV 

Definition at line 47 of file urom_ping_pong_sample.c.

Function Documentation

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( UROM_PING_PONG::SAMPLE  )

◆ oob_allgather()

static doca_error_t oob_allgather ( void *  sbuf,
void *  rbuf,
size_t  msglen,
void *  coll_info,
void **  req 
)
static

Definition at line 69 of file urom_ping_pong_sample.c.

◆ oob_allgather_free()

static doca_error_t oob_allgather_free ( void *  req)
static

Definition at line 106 of file urom_ping_pong_sample.c.

◆ oob_allgather_test()

static doca_error_t oob_allgather_test ( void *  req)
static

Definition at line 90 of file urom_ping_pong_sample.c.

◆ ping_pong()

doca_error_t ping_pong ( struct doca_pe *  pe,
struct doca_urom_worker *  worker,
const char *  msg,
int  my_rank,
int  size 
)

Definition at line 201 of file urom_ping_pong_sample.c.

◆ recv_finished_cb()

static void recv_finished_cb ( doca_error_t  result,
union doca_data  cookie,
union doca_data  context,
void *  buffer,
uint64_t  buf_len,
uint64_t  sender_tag,
ucs_status_t  status 
)
static

Definition at line 146 of file urom_ping_pong_sample.c.

◆ send_finished_cb()

static void send_finished_cb ( doca_error_t  result,
union doca_data  cookie,
union doca_data  context,
ucs_status_t  status 
)
static

Definition at line 178 of file urom_ping_pong_sample.c.

◆ urom_ping_pong()

doca_error_t urom_ping_pong ( const char *  message,
const char *  device_name,
uint32_t  rank,
uint32_t  size 
)

Definition at line 373 of file urom_ping_pong_sample.c.