photon  1.1
photon_exchange.c
Go to the documentation of this file.
1 // =============================================================================
2 // Photon RDMA Library (libphoton)
3 //
4 // Copyright (c) 2016, 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 #include <stdlib.h>
15 #include <string.h>
16 #include <inttypes.h>
17 
18 #include "libphoton.h"
19 #include "photon_backend.h"
20 #include "photon_exchange.h"
21 #include "photon_collectives.h"
22 #include "logging.h"
23 
24 #ifdef HAVE_MPI
25 #include <mpi.h>
26 #endif
27 
28 #ifdef HAVE_PMI
29 #include <pmi_cray.h>
30 #endif
31 
51 
67 
68 int photon_exchange_init(photonConfig lcfg, photonConfig cfg) {
69 #ifdef HAVE_MPI
70  int flag;
71  MPI_Initialized(&flag);
72  if (flag) {
73  goto exit_default;
74  }
75 
76  MPI_Init(NULL, NULL);
77 
78  //MPI_Comm _photon_comm = __photon_config->comm;
79  MPI_Comm _photon_comm = 0;
80  if (!_photon_comm)
81  _photon_comm = MPI_COMM_WORLD;
82 
83  MPI_Comm_rank(MPI_COMM_WORLD, &_photon_myrank);
84  MPI_Comm_size(MPI_COMM_WORLD, &_photon_nproc);
85 
86  lcfg->address = cfg->address = _photon_myrank;
87  lcfg->nproc = cfg->nproc = _photon_nproc;
88 
89  PHOTON_COMM_WORLD = MPI_COMM_WORLD;
90  photon_datatype_null = MPI_DATATYPE_NULL;
91  photon_char = MPI_CHAR;
92  photon_signed_char = MPI_SIGNED_CHAR;
93  photon_unsigned_char = MPI_UNSIGNED_CHAR;
94  photon_byte = MPI_BYTE;
95  photon_short = MPI_SHORT;
96  photon_unsigned_short = MPI_UNSIGNED_SHORT;
97  photon_int = MPI_INT;
98  photon_unsigned = MPI_UNSIGNED;
99  photon_long = MPI_LONG;
100  photon_unsigned_long = MPI_UNSIGNED_LONG;
101  photon_long_long_int = MPI_LONG_LONG_INT;
102  photon_unsigned_long_long = MPI_UNSIGNED_LONG_LONG;
103  photon_float = MPI_FLOAT;
104  photon_double = MPI_DOUBLE;
105  photon_long_double = MPI_LONG_DOUBLE;
106  photon_wchar = MPI_WCHAR;
107  photon_packed = MPI_PACKED;
108 
109  photon_op_null = MPI_OP_NULL;
110  photon_op_min = MPI_MIN;
111  photon_op_max = MPI_MAX;
112  photon_op_sum = MPI_SUM;
113  photon_op_prod = MPI_PROD;
114  photon_op_land = MPI_LAND;
115  photon_op_band = MPI_BAND;
116  photon_op_lor = MPI_LOR;
117  photon_op_bor = MPI_BOR;
118  photon_op_lxor = MPI_LXOR;
119  photon_op_bxor = MPI_BXOR;
120  photon_op_maxloc = MPI_MAXLOC;
121  photon_op_minloc = MPI_MINLOC;
122  photon_op_replace = MPI_REPLACE;
123  photon_op_no_op = MPI_NO_OP;
124 #endif
125 
126  exit_default:
127  _photon_myrank = lcfg->address = (int)cfg->address;
128  _photon_nproc = lcfg->nproc = (int)cfg->nproc;
129 
130  return PHOTON_OK;
131 }
132 
133 int photon_exchange_finalize(photonConfig lcfg) {
134 #ifdef HAVE_MPI
135  int flag;
136  MPI_Finalized(&flag);
137  if (flag) {
138  goto exit;
139  }
140  MPI_Finalize();
141 #endif
142 
143  exit:
144  return PHOTON_OK;
145 }
146 
147 int photon_exchange_allgather(void *ptr, void *ivec_ptr, int n) {
148  int rc;
149 
150  switch(__photon_config->meta_exch) {
151  case PHOTON_EXCH_MPI:
152  {
153 #ifdef HAVE_MPI
154  //MPI_Comm _photon_comm = __photon_config->comm;
155  MPI_Comm _photon_comm = 0;
156  if (!_photon_comm)
157  _photon_comm = MPI_COMM_WORLD;
158  rc = MPI_Allgather(ptr, n, MPI_BYTE, ivec_ptr, n, MPI_BYTE, _photon_comm);
159  if (rc != MPI_SUCCESS)
160  goto error_exit;
161 #endif
162  }
163  break;
164  case PHOTON_EXCH_PMI:
165 #ifdef HAVE_PMI
166  rc = PMI_Allgather(ptr, ivec_ptr, n);
167  if (rc != PMI_SUCCESS)
168  goto error_exit;
169 #endif
170  break;
171  case PHOTON_EXCH_XSP:
172 #ifdef HAVE_XSP
173 #endif
174  break;
176  rc = __photon_config->exch.allgather(NULL, ptr, ivec_ptr, n);
177  if (rc != 0) {
178  log_err("Error in external exchange");
179  goto error_exit;
180  }
181  break;
182  default:
183  log_err("Unrecognized exchange type requested!");
184  goto error_exit;
185  break;
186  }
187  return PHOTON_OK;
188 
189  error_exit:
190  return PHOTON_ERROR;
191 }
192 
194  int rc;
195 
196  switch(__photon_config->meta_exch) {
197  case PHOTON_EXCH_MPI:
198  {
199 #ifdef HAVE_MPI
200  //MPI_Comm _photon_comm = __photon_config->comm;
201  MPI_Comm _photon_comm = 0;
202  if (!_photon_comm)
203  _photon_comm = MPI_COMM_WORLD;
204  rc = MPI_Barrier(_photon_comm);
205  if (rc != MPI_SUCCESS)
206  goto error_exit;
207 #endif
208  }
209  break;
210  case PHOTON_EXCH_PMI:
211 #ifdef HAVE_PMI
212  rc = PMI_Barrier();
213  if (rc != PMI_SUCCESS)
214  goto error_exit;
215 #endif
216  break;
217  case PHOTON_EXCH_XSP:
218 #ifdef HAVE_XSP
219 #endif
220  break;
222  rc = __photon_config->exch.barrier(NULL);
223  if (rc != 0) {
224  log_err("Error in external barrier");
225  goto error_exit;
226  }
227  break;
228  default:
229  log_err("Unrecognized exchange type requested!");
230  goto error_exit;
231  break;
232  }
233 
234  return PHOTON_OK;
235 
236  error_exit:
237  return PHOTON_ERROR;
238 }
239 
240 int photon_exchange_ledgers(ProcessInfo *processes, int flags) {
241  int i, ret;
242  uint64_t pval;
243  uint64_t *key_0, *key_1, *va;
244 
245  key_0 = (uint64_t *)malloc(_photon_nproc * sizeof(uint64_t));
246  key_1 = (uint64_t *)malloc(_photon_nproc * sizeof(uint64_t));
247  va = (uint64_t *)malloc(_photon_nproc * sizeof(uint64_t));
248 
249  memset(key_0, 0, _photon_nproc);
250  memset(key_1, 0, _photon_nproc);
251  memset(va, 0, _photon_nproc);
252 
253  pval = shared_storage->bint.buf.priv.key0;
254  ret = photon_exchange_allgather(&pval, (void*)key_0, sizeof(pval));
255  if (ret != PHOTON_OK) {
256  log_err("Could not gather shared storage key_0");
257  goto error_exit;
258  }
259 
260  pval = shared_storage->bint.buf.priv.key1;
261  ret = photon_exchange_allgather(&pval, (void*)key_1, sizeof(pval));
262  if (ret != PHOTON_OK) {
263  log_err("Could not gather shared storage key_1");
264  goto error_exit;
265  }
266 
267  pval = (uint64_t)shared_storage->bint.buf.addr;
268  ret = photon_exchange_allgather(&pval, (void*)va, sizeof(pval));
269  if (ret != PHOTON_OK) {
270  log_err("Could not gather shared storage base ptrs");
271  goto error_exit;
272  }
273 
274  if (flags & LEDGER_INFO) {
275  for (i=0; i<_photon_nproc; i++) {
276  processes[i].remote_rcv_info_ledger->remote.addr = PHOTON_LRI_PTR(va[i]) + PHOTON_INFO_SIZE * _photon_myrank;
277  processes[i].remote_rcv_info_ledger->remote.priv.key0 = key_0[i];
278  processes[i].remote_rcv_info_ledger->remote.priv.key1 = key_1[i];
279 
280  processes[i].remote_snd_info_ledger->remote.addr = PHOTON_LSI_PTR(va[i]) + PHOTON_INFO_SIZE * _photon_myrank;
281  processes[i].remote_snd_info_ledger->remote.priv.key0 = key_0[i];
282  processes[i].remote_snd_info_ledger->remote.priv.key1 = key_1[i];
283  }
284  }
285 
286  if (flags & LEDGER_FIN) {
287  for (i=0; i<_photon_nproc; i++) {
288  processes[i].remote_fin_ledger->remote.addr = PHOTON_LF_PTR(va[i]) + PHOTON_LEDG_SIZE * _photon_myrank;
289  processes[i].remote_fin_ledger->remote.priv.key0 = key_0[i];
290  processes[i].remote_fin_ledger->remote.priv.key1 = key_1[i];
291  }
292  }
293 
294  if (flags & LEDGER_PWC) {
295  for (i=0; i<_photon_nproc; i++) {
296  processes[i].remote_pwc_ledger->remote.addr = PHOTON_LP_PTR(va[i]) + PHOTON_RPEDG_SIZE * _photon_myrank;
297  processes[i].remote_pwc_ledger->remote.priv.key0 = key_0[i];
298  processes[i].remote_pwc_ledger->remote.priv.key1 = key_1[i];
299  }
300  }
301 
302  if (flags & LEDGER_EAGER) {
303  for (i=0; i<_photon_nproc; i++) {
304  processes[i].remote_eager_ledger->remote.addr = PHOTON_LE_PTR(va[i]) + PHOTON_LEDG_SIZE * _photon_myrank;
305  processes[i].remote_eager_ledger->remote.priv.key0 = key_0[i];
306  processes[i].remote_eager_ledger->remote.priv.key1 = key_1[i];
307  }
308  }
309 
310  if (flags & LEDGER_BUF) {
311  for (i=0; i<_photon_nproc; i++) {
312  processes[i].remote_eager_buf->remote.addr = PHOTON_LEB_PTR(va[i]) + PHOTON_EBUF_SIZE * _photon_myrank;
313  processes[i].remote_eager_buf->remote.priv.key0 = key_0[i];
314  processes[i].remote_eager_buf->remote.priv.key1 = key_1[i];
315  }
316  }
317 
318  if (flags & LEDGER_PBUF) {
319  for (i=0; i<_photon_nproc; i++) {
320  processes[i].remote_pwc_buf->remote.addr = PHOTON_LPB_PTR(va[i]) + PHOTON_PBUF_SIZE * _photon_myrank;
321  processes[i].remote_pwc_buf->remote.priv.key0 = key_0[i];
322  processes[i].remote_pwc_buf->remote.priv.key1 = key_1[i];
323  }
324  }
325 
326  free(key_0);
327  free(key_1);
328  free(va);
329 
330  return PHOTON_OK;
331 
332  error_exit:
333  free(key_0);
334  free(key_1);
335  free(va);
336  return PHOTON_ERROR;
337 }
338 
339 int photon_setup_ri_ledger(ProcessInfo *photon_processes, char *buf, int num_entries) {
340  int i;
341  int ledger_size, offset;
342  photonRILedgerEntry bptr;
343 
344  dbg_trace("Setting up RI ledgers");
345 
346  ledger_size = PHOTON_INFO_SSIZE(num_entries);
347 
348  // Allocate the receive info ledgers
349  for(i = 0; i < PHOTON_TPROC; i++) {
350  bptr = (photonRILedgerEntry)(buf + ledger_size * i);
351 
352  dbg_trace("allocating rcv info ledger for %d: %p", i, bptr);
353  dbg_trace("Offset: %d", ledger_size * i);
354 
355  // allocate the ledger
356  photon_processes[i].local_rcv_info_ledger = photon_ri_ledger_create_reuse(bptr, num_entries, REQUEST_COOK_RINFO);
357  if (!photon_processes[i].local_rcv_info_ledger) {
358  log_err("couldn't create local rcv info ledger for process %d", i);
359  return PHOTON_ERROR;
360  }
361 
362  bptr = (photonRILedgerEntry)(buf + ledger_size * PHOTON_TPROC + ledger_size * i);
363 
364  dbg_trace("allocating remote ri ledger for %d: %p", i, bptr);
365  dbg_trace("Offset: %d", ledger_size * PHOTON_TPROC + ledger_size * i);
366 
367  photon_processes[i].remote_rcv_info_ledger = photon_ri_ledger_create_reuse(bptr, num_entries, REQUEST_COOK_RINFO);
368  if (!photon_processes[i].remote_rcv_info_ledger) {
369  log_err("couldn't create remote rcv info ledger for process %d", i);
370  return PHOTON_ERROR;
371  }
372  }
373 
374  // Allocate the send info ledgers
375  offset = 2 * ledger_size * PHOTON_TPROC;
376  for(i = 0; i < PHOTON_TPROC; i++) {
377  bptr = (photonRILedgerEntry)(buf + offset + ledger_size * i);
378 
379  dbg_trace("allocating snd info ledger for %d: %p", i, bptr);
380  dbg_trace("Offset: %d", offset + ledger_size * i);
381 
382  // allocate the ledger
383  photon_processes[i].local_snd_info_ledger = photon_ri_ledger_create_reuse(bptr, num_entries, REQUEST_COOK_SINFO);
384  if (!photon_processes[i].local_snd_info_ledger) {
385  log_err("couldn't create local snd info ledger for process %d", i);
386  return PHOTON_ERROR;
387  }
388 
389  bptr = (photonRILedgerEntry)(buf + offset + ledger_size * PHOTON_TPROC + ledger_size * i);
390 
391  dbg_trace("allocating remote ri ledger for %d: %p", i, bptr);
392  dbg_trace("Offset: %d", offset + ledger_size * PHOTON_TPROC + ledger_size * i);
393 
394  photon_processes[i].remote_snd_info_ledger = photon_ri_ledger_create_reuse(bptr, num_entries, REQUEST_COOK_SINFO);
395  if (!photon_processes[i].remote_snd_info_ledger) {
396  log_err("couldn't create remote snd info ledger for process %d", i);
397  return PHOTON_ERROR;
398  }
399  }
400 
401  return PHOTON_OK;
402 }
403 
404 int photon_setup_fin_ledger(ProcessInfo *photon_processes, char *buf, int num_entries) {
405  int i, esize;
406  int ledger_size;
408 
409  dbg_trace("Setting up FIN ledgers");
410 
411  esize = sizeof(struct photon_rdma_ledger_entry_t);
412  ledger_size = PHOTON_LEDG_SSIZE(num_entries, esize);
413 
414  for(i = 0; i < PHOTON_TPROC; i++) {
415  // allocate the ledger
416  dbg_trace("allocating local FIN ledger for %d", i);
417 
418  bptr = (photonRDMALedgerEntry)(buf + ledger_size * i);
419  photon_processes[i].local_fin_ledger = photon_rdma_ledger_create_reuse(bptr, num_entries, esize, REQUEST_COOK_FIN);
420  if (!photon_processes[i].local_fin_ledger) {
421  log_err("couldn't create local FIN ledger for process %d", i);
422  return PHOTON_ERROR;
423  }
424 
425  dbg_trace("allocating remote FIN ledger for %d", i);
426 
427  bptr = (photonRDMALedgerEntry)(buf + ledger_size * PHOTON_TPROC + ledger_size * i);
428  photon_processes[i].remote_fin_ledger = photon_rdma_ledger_create_reuse(bptr, num_entries, esize, REQUEST_COOK_FIN);
429  if (!photon_processes[i].remote_fin_ledger) {
430  log_err("couldn't create remote FIN ledger for process %d", i);
431  return PHOTON_ERROR;
432  }
433  }
434 
435  return PHOTON_OK;
436 }
437 
438 int photon_setup_pwc_ledger(ProcessInfo *photon_processes, char *buf, int num_entries) {
439  int i, esize, ersize;
440  int ledger_size, recv_ledger_size;
443 
444  dbg_trace("Setting up PWC ledgers");
445 
446  esize = PHOTON_CID_ENTRY_SIZE;
448  ledger_size = PHOTON_LEDG_SSIZE(num_entries, esize);
449  recv_ledger_size = PHOTON_LEDG_SSIZE(num_entries, ersize);
450 
451  for(i = 0; i < PHOTON_TPROC; i++) {
452  // allocate the ledger
453  dbg_trace("allocating local (recv) PWC ledger for %d", i);
454 
455  rbptr = (photonCIDRecvLedgerEntry)(buf + recv_ledger_size * i);
456  photon_processes[i].local_pwc_ledger = photon_rdma_ledger_create_reuse(rbptr, num_entries, ersize, REQUEST_COOK_PLEDG);
457  if (!photon_processes[i].local_pwc_ledger) {
458  log_err("couldn't create local PWC ledger for process %d", i);
459  return PHOTON_ERROR;
460  }
461 
462  dbg_trace("allocating remote PWC ledger for %d", i);
463 
464  bptr = (photonCIDLedgerEntry)(buf + recv_ledger_size * PHOTON_TPROC + ledger_size * i);
465  photon_processes[i].remote_pwc_ledger = photon_rdma_ledger_create_reuse(bptr, num_entries, esize, REQUEST_COOK_PLEDG);
466  if (!photon_processes[i].remote_pwc_ledger) {
467  log_err("couldn't create remote PWC ledger for process %d", i);
468  return PHOTON_ERROR;
469  }
470  }
471 
472  return PHOTON_OK;
473 }
474 
475 int photon_setup_eager_ledger(ProcessInfo *photon_processes, char *buf, int num_entries) {
476  int i, esize;
477  int ledger_size;
479 
480  dbg_trace("Setting up EAGER ledgers");
481 
482  esize = sizeof(struct photon_rdma_ledger_entry_t);
483  ledger_size = PHOTON_LEDG_SSIZE(num_entries, esize);
484 
485  for(i = 0; i < PHOTON_TPROC; i++) {
486  // allocate the ledger
487  dbg_trace("allocating local EAGER ledger for %d", i);
488 
489  bptr = (photonRDMALedgerEntry)(buf + ledger_size * i);
490  photon_processes[i].local_eager_ledger = photon_rdma_ledger_create_reuse(bptr, num_entries, esize, REQUEST_COOK_ELEDG);
491  if (!photon_processes[i].local_eager_ledger) {
492  log_err("couldn't create local EAGER ledger for process %d", i);
493  return PHOTON_ERROR;
494  }
495 
496  dbg_trace("allocating remote EAGER ledger for %d", i);
497 
498  bptr = (photonRDMALedgerEntry)(buf + ledger_size * PHOTON_TPROC + ledger_size * i);
499  photon_processes[i].remote_eager_ledger = photon_rdma_ledger_create_reuse(bptr, num_entries, esize, REQUEST_COOK_ELEDG);
500  if (!photon_processes[i].remote_eager_ledger) {
501  log_err("couldn't create remote EAGER ledger for process %d", i);
502  return PHOTON_ERROR;
503  }
504  }
505 
506  return PHOTON_OK;
507 }
508 
510  int i;
511  int buf_size;
512  uint8_t *bptr;
513 
514  dbg_trace("Setting up EAGER buffers");
515 
516  //buf_size = sizeof(struct photon_rdma_eager_buf_entry_t) * num_entries;
517  buf_size = PHOTON_EBUF_SSIZE(size);
518 
519  for(i = 0; i < PHOTON_TPROC; i++) {
520 
521  dbg_trace("allocating local eager buffer for %d", i);
522 
523  bptr = (uint8_t *) (buf + buf_size * i);
524  photon_processes[i].local_eager_buf = photon_rdma_eager_buf_create_reuse(bptr, size, REQUEST_COOK_EBUF);
525  if (!photon_processes[i].local_eager_buf) {
526  log_err("couldn't create local eager buffer for process %d", i);
527  return PHOTON_ERROR;
528  }
529 
530  dbg_trace("allocating remote eager buffer for %d", i);
531 
532  bptr = (uint8_t *) (buf + buf_size * PHOTON_TPROC + buf_size * i);
533  photon_processes[i].remote_eager_buf = photon_rdma_eager_buf_create_reuse(bptr, size, REQUEST_COOK_EBUF);
534  if (!photon_processes[i].remote_eager_buf) {
535  log_err("couldn't create remote eager buffer for process %d", i);
536  return PHOTON_ERROR;
537  }
538  }
539 
540  return PHOTON_OK;
541 }
542 
544  int i;
545  int buf_size;
546  uint8_t *bptr;
547 
548  dbg_trace("Setting up PWC buffers");
549 
550  buf_size = PHOTON_EBUF_SSIZE(size);
551 
552  for(i = 0; i < PHOTON_TPROC; i++) {
553 
554  dbg_trace("allocating local pwc eager buffer for %d", i);
555 
556  bptr = (uint8_t *) (buf + buf_size * i);
557  photon_processes[i].local_pwc_buf = photon_rdma_eager_buf_create_reuse(bptr, size, REQUEST_COOK_PBUF);
558  if (!photon_processes[i].local_eager_buf) {
559  log_err("couldn't create local pwc eager buffer for process %d", i);
560  return PHOTON_ERROR;
561  }
562 
563  dbg_trace("allocating remote pwc eager buffer for %d", i);
564 
565  bptr = (uint8_t *) (buf + buf_size * PHOTON_TPROC + buf_size * i);
566  photon_processes[i].remote_pwc_buf = photon_rdma_eager_buf_create_reuse(bptr, size, REQUEST_COOK_PBUF);
567  if (!photon_processes[i].remote_eager_buf) {
568  log_err("couldn't create remote pwc eager buffer for process %d", i);
569  return PHOTON_ERROR;
570  }
571  }
572 
573  return PHOTON_OK;
574 }
photonLedger remote_pwc_ledger
photon_op_t photon_op_band
#define PHOTON_LSI_PTR(a)
photon_datatype_t photon_unsigned_long
photon_datatype_t photon_long_long_int
void * photon_op_t
photonRILedger photon_ri_ledger_create_reuse(photonRILedgerEntry ledger_buffer, int ledger_size, int prefix)
photonLedger photon_rdma_ledger_create_reuse(void *ledger_buffer, int num_entries, int entry_size, int prefix)
int photon_exchange_barrier()
#define PHOTON_EXCH_PMI
Use PMI for metadata exchange.
Definition: photon.h:37
photonLedger local_pwc_ledger
photon_datatype_t photon_byte
struct photon_ri_ledger_entry_t * photonRILedgerEntry
photonBufferHandle shared_storage
#define PHOTON_RPEDG_SIZE
#define PHOTON_LRI_PTR(a)
photon_datatype_t photon_unsigned_char
photon_datatype_t photon_char
photon_datatype_t photon_unsigned
#define LEDGER_INFO
photon_datatype_t photon_long_double
#define REQUEST_COOK_PBUF
#define PHOTON_LEDG_SSIZE(c, s)
photonLedger remote_eager_ledger
int _photon_nproc
Definition: libphoton.c:55
photon_datatype_t photon_packed
#define PHOTON_LEDG_SIZE
struct photon_rdma_ledger_entry_t * photonRDMALedgerEntry
int photon_exchange_finalize(photonConfig lcfg)
photon_op_t photon_op_lor
struct photon_cid_ledger_entry_t * photonCIDLedgerEntry
photonRILedger remote_rcv_info_ledger
photon_datatype_t photon_long
photon_op_t photon_op_sum
photonEagerBuf local_pwc_buf
photon_datatype_t photon_int
#define PHOTON_LPB_PTR(a)
photon_op_t photon_op_prod
photon_op_t photon_op_bxor
photon_op_t photon_op_minloc
photon_op_t photon_op_min
#define REQUEST_COOK_RINFO
#define PHOTON_LEB_PTR(a)
photon_op_t photon_op_no_op
#define PHOTON_INFO_SIZE
#define REQUEST_COOK_SINFO
photon_op_t photon_op_replace
int _photon_myrank
Definition: libphoton.c:54
photon_op_t photon_op_bor
#define REQUEST_COOK_ELEDG
#define PHOTON_LE_PTR(a)
#define PHOTON_INFO_SSIZE(c)
int photon_setup_eager_buf(ProcessInfo *photon_processes, char *buf, int size)
photonLedger remote_fin_ledger
#define PHOTON_LP_PTR(a)
#define REQUEST_COOK_EBUF
#define PHOTON_PBUF_SIZE
ProcessInfo * photon_processes
int photon_setup_pwc_buf(ProcessInfo *photon_processes, char *buf, int size)
int photon_setup_ri_ledger(ProcessInfo *photon_processes, char *buf, int num_entries)
photon_datatype_t photon_datatype_null
#define PHOTON_ERROR
Error code, general error.
Definition: photon.h:32
#define PHOTON_CID_ENTRY_SIZE
photon_datatype_t photon_double
void * photon_datatype_t
#define LEDGER_PWC
photonLedger local_eager_ledger
photon_op_t photon_op_lxor
photonRILedger local_snd_info_ledger
#define REQUEST_COOK_FIN
photon_op_t photon_op_null
photon_datatype_t photon_unsigned_long_long
photonEagerBuf remote_pwc_buf
photonEagerBuf photon_rdma_eager_buf_create_reuse(uint8_t *eager_buffer, int size, int prefix)
photon_datatype_t photon_signed_char
#define PHOTON_OK
Photon success code.
Definition: photon.h:30
#define PHOTON_EBUF_SIZE
#define LEDGER_EAGER
#define PHOTON_EXCH_MPI
Use MPI for metadata exchange.
Definition: photon.h:36
#define PHOTON_EBUF_SSIZE(c)
photon_op_t photon_op_land
photonRILedger local_rcv_info_ledger
#define LEDGER_PBUF
#define REQUEST_COOK_PLEDG
#define PHOTON_EXCH_XSP
Use XSP for metadata exchange.
Definition: photon.h:38
#define PHOTON_LF_PTR(a)
#define PHOTON_TPROC
photon_datatype_t photon_float
photonEagerBuf local_eager_buf
int photon_exchange_init(photonConfig lcfg, photonConfig cfg)
photonEagerBuf remote_eager_buf
photon_datatype_t photon_wchar
photonRILedger remote_snd_info_ledger
struct photon_cid_recv_ledger_entry_t * photonCIDRecvLedgerEntry
int photon_setup_pwc_ledger(ProcessInfo *photon_processes, char *buf, int num_entries)
photonConfig __photon_config
Definition: libphoton.c:48
int photon_exchange_allgather(void *ptr, void *ivec_ptr, int n)
#define PHOTON_EXCH_EXTERNAL
Use externally defined functions for metadata exchange.
Definition: photon.h:39
#define PHOTON_CID_RECV_ENTRY_SIZE
int photon_setup_eager_ledger(ProcessInfo *photon_processes, char *buf, int num_entries)
int photon_setup_fin_ledger(ProcessInfo *photon_processes, char *buf, int num_entries)
#define LEDGER_FIN
void * photonComm
photon_datatype_t photon_short
int photon_exchange_ledgers(ProcessInfo *processes, int flags)
photon_op_t photon_op_maxloc
#define LEDGER_BUF
photon_op_t photon_op_max
photon_datatype_t photon_unsigned_short
photonComm PHOTON_COMM_WORLD
photonLedger local_fin_ledger