photon  1.1
photon_config.h
Go to the documentation of this file.
1 // =============================================================================
2 // Photon RDMA Library (libphoton)
3 //
4 // Copyright (c) 2017, Trustees of Indiana University,
5 // All rights reserved.
6 //
7 // This software may be modified and distributed under the terms of the BSD
8 // license. See the COPYING file for details.
9 //
10 // This software was created at the Indiana University Center for Research in
11 // Extreme Scale Technologies (CREST).
12 // =============================================================================
13 
14 #ifndef PHOTON_CONFIG_H
15 #define PHOTON_CONFIG_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
24 
26 
27 #define PHOTON_ORDER_DEFAULT 0x0000
28 #define PHOTON_ORDER_NONE 0x0001
29 #define PHOTON_ORDER_STRICT 0x0002
30 
31 static const char* const PHOTON_ORDER_TO_STRING[] = {
33  "default",
34  "none",
35  "strict",
36  "INVALID_COMP_ORDER"
37 };
38 
40 typedef enum {
47 
49 static const char* const PHOTON_BACKEND_TO_STRING[] = {
50  "default",
51  "verbs",
52  "ugni",
53  "fi",
54  "INVALID_BACKEND"
55 };
56 
60  int address;
61  int nproc;
62 
64  struct {
65  const char *eth_dev;
66  const char *ib_dev;
67  int use_cma;
68  int use_ud;
69  int num_srq;
70  const char *ud_gid_prefix;
71  } ibv;
72 
74  struct {
75  const char *eth_dev;
76  int bte_thresh;
77  } ugni;
78 
80  struct {
81  const char *eth_dev;
82  const char *domain;
83  const char *node;
84  const char *service;
85  const char *provider;
86  } fi;
87 
89  struct {
92  } forwarder;
93 
94  // Photon library capabilities
95  struct {
102  int max_rd;
104  int num_cq;
105  int use_rcq;
106  } cap;
107 
109  struct {
111  } attr;
112 
114  struct {
115  int (*barrier)(void *);
116  int (*allgather)(void *, void *, void *, int);
117  } exch;
118 
119  void *comm;
120  int meta_exch;
121  photon_cfg_backend_t backend;
123 };
124 
125 typedef struct photon_config_t * photonConfig;
126 
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif
struct photon_config_t::@5 ugni
Options for the uGNI backend.
const char * domain
Set the libfabric domain string.
Definition: photon_config.h:82
int ledger_entries
The number of ledger entries (default 64)
int default_rd
Initial number of request descriptors allocated per peer (default 1024)
int bte_thresh
Message size in bytes where BTE will be used (default 8192, 0 to disable BTE)
Definition: photon_config.h:76
Use uGNI photon backend.
Definition: photon_config.h:43
struct photon_config_t::@8 cap
int use_rcq
Use remote completions when possible (default 0, disabled)
int max_rd
Max number of request descriptors, power of 2 (default 1M, set 0 for unbounded)
Use libfabric backend.
Definition: photon_config.h:44
The main Photon configuration structure, passed to photon_init(). -1 may be set for integer values to...
Definition: photon_config.h:59
int nproc
The total number of processes.
Definition: photon_config.h:61
int meta_exch
See PHOTON_EXCH types below (default MPI)
photon_cfg_coll_iface_t coll
The collective implementation to initialize.
int(* barrier)(void *)
Method that implements a global barrier.
char ** forwarder_eids
Definition: photon_config.h:91
int use_cma
Use the RMA connection manager to establish RDMA context.
Definition: photon_config.h:67
const char * service
Set the libfabric service string.
Definition: photon_config.h:84
struct photon_config_t::@7 forwarder
EXPERIMENTAL: forwarder interface to XSPd.
struct photon_config_t::@10 exch
Metadata exchange function pointers.
void * comm
Optional communicator to use for exchange.
int num_srq
The number of shared receive queues for remote completions (default 0)
Definition: photon_config.h:69
const char * ib_dev
IB interface name filter, e.g.: 'qib0:1+mlx4_0:2'.
Definition: photon_config.h:66
photon_cfg_coll_iface_t
int(* allgather)(void *, void *, void *, int)
Method that implements a global allgather.
int use_ud
EXPERIMENTAL: unreliable datagram mode (uses multicast)
Definition: photon_config.h:68
const char * eth_dev
Interface name for CMA mode.
Definition: photon_config.h:65
const char * node
Set the libfabric node string.
Definition: photon_config.h:83
Use Verbs photon backend.
Definition: photon_config.h:42
int address
The process rank.
Definition: photon_config.h:60
int small_msg_size
Messages <= bytes will use eager buffers (default 1024, set 0 to disable)
Definition: photon_config.h:99
photon_cfg_backend_t
The network fabric backends Photon can use.
Definition: photon_config.h:40
int eager_buf_size
Size of eager buffer per rank in bytes (default 64K, set 0 to disable)
Definition: photon_config.h:97
struct photon_config_t::@9 attr
Photon library attributes.
int small_pwc_size
Messages <= bytes will be packed in PWC buffer (default 128, set 0 to disable)
Set a default backend (verbs).
Definition: photon_config.h:41
int pwc_buf_size
Size of PWC packed buffer per rank in bytes (default 64K, set 0 to disable)
Definition: photon_config.h:98
struct photon_config_t::@4 ibv
Options for the verbs backend.
int num_cq
Number of completion queues to assign peers (default 1)
const char * provider
Set the libfabric provider string (e.g. "sockets" or "psm2")
Definition: photon_config.h:85
int comp_order
specify completion ordering constraints (NONE, STRICT)
int max_cid_size
Max size of completion IDs in bytes for PWC (default 8)
Definition: photon_config.h:96
photon_cfg_backend_t backend
The backend for Photon to initialize.
struct photon_config_t::@6 fi
Options for the libfabric (fi) backend.
const char * ud_gid_prefix
EXPERIMENTAL: GID prefix to use for UD multicast.
Definition: photon_config.h:70