photon  1.1
photon_xsp_forwarder.h
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 #ifndef PHOTON_XSP_FORWARDER_H
15 #define PHOTON_XSP_FORWARDER_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include <libxsp_client.h>
22 #include <netinet/in.h>
23 #include <mpi.h>
24 
25 #include "photon_io.h"
26 
27 /* This must be synchronized with xsp/include/option_types.h */
28 #define XSP_PHOTON_CI 0x00
29 #define XSP_PHOTON_RI 0x01
30 #define XSP_PHOTON_SI 0x02
31 #define XSP_PHOTON_FI 0x03
32 #define XSP_PHOTON_IO 0x04
33 
34 /*
35  * The actual XSP message for PhotonIOInfo must have variable size.
36  * This is the current format (size = length = int):
37  *
38  * |size_of_fileURI|fileURI...|amode|niter|combiner|nints|integers...|
39  * |naddrs|addresses...|ndatatypes|datatypes...|
40  */
41 
44 };
45 
46 typedef struct photon_mpi_datatype_t {
47  int combiner;
48  int nints;
49  int *integers;
50  int naddrs;
51  MPI_Aint *addresses;
53  int *datatypes;
55 
56 typedef struct photon_io_info_t {
57  char *fileURI;
58  int amode;
59  int niter;
61 } PhotonIOInfo;
62 
63 int photon_xsp_register_session(libxspSess *sess);
64 int photon_xsp_unregister_session(libxspSess *sess);
65 int photon_xsp_forwarder_connect_peer(libxspSess *sess, void *remote_ci, void **ret_ci, int *ret_len);
66 int photon_xsp_set_info(libxspSess *sess, void *info, int size, void **ret_info, int *ret_size, photon_info_t type);
67 int photon_xsp_do_io(libxspSess *sess);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif
photon_info_t
Definition: photon_io.h:21
int photon_xsp_register_session(libxspSess *sess)
int photon_xsp_do_io(libxspSess *sess)
int photon_xsp_unregister_session(libxspSess *sess)
PhotonMPITypes
int photon_xsp_set_info(libxspSess *sess, void *info, int size, void **ret_info, int *ret_size, photon_info_t type)
PhotonMPIDatatype view
int photon_xsp_forwarder_connect_peer(libxspSess *sess, void *remote_ci, void **ret_ci, int *ret_len)