OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

mpool_gpusm.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2006 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2006 Voltaire. All rights reserved.
13 * Copyright (c) 2012 NVIDIA Corporation. All rights reserved.
14 *
15 * $COPYRIGHT$
16 *
17 * Additional copyrights may follow
18 *
19 * $HEADER$
20 */
21 /**
22 * @file
23 */
24 #ifndef MCA_MPOOL_GPUSM_H
25 #define MCA_MPOOL_GPUSM_H
26
27 #include "ompi_config.h"
28 #include "opal/class/opal_list.h"
29 #include "ompi/class/ompi_free_list.h"
30 #include "ompi/mca/mpool/mpool.h"
31
32 BEGIN_C_DECLS
33
34 #define MEMHANDLE_SIZE 8
35 #define EVTHANDLE_SIZE 8
36 struct mca_mpool_gpusm_registration_t {
37 mca_mpool_base_registration_t base;
38 uint64_t memHandle[MEMHANDLE_SIZE];
39 uint64_t evtHandle[EVTHANDLE_SIZE];
40 uint64_t event;
41 };
42 typedef struct mca_mpool_gpusm_registration_t mca_mpool_gpusm_registration_t;
43 OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_gpusm_registration_t);
44
45 struct mca_mpool_gpusm_component_t {
46 mca_mpool_base_component_t super;
47 };
48 typedef struct mca_mpool_gpusm_component_t mca_mpool_gpusm_component_t;
49
50 OMPI_DECLSPEC extern mca_mpool_gpusm_component_t mca_mpool_gpusm_component;
51
52 struct mca_mpool_base_resources_t {
53 void *reg_data;
54 size_t sizeof_reg;
55 int (*register_mem)(void *base, size_t size, mca_mpool_base_registration_t *newreg,
56 mca_mpool_base_registration_t *hdrreg);
57 int (*deregister_mem)(void *reg_data, mca_mpool_base_registration_t *reg);
58 };
59 typedef struct mca_mpool_base_resources_t mca_mpool_base_resources_t;
60
61 struct mca_mpool_gpusm_module_t {
62 mca_mpool_base_module_t super;
63 struct mca_mpool_base_resources_t resources;
64 ompi_free_list_t reg_list;
65 }; typedef struct mca_mpool_gpusm_module_t mca_mpool_gpusm_module_t;
66
67 /*
68 * Initializes the mpool module.
69 */
70 void mca_mpool_gpusm_module_init(mca_mpool_gpusm_module_t *mpool);
71
72 /**
73 * register block of memory
74 */
75 int mca_mpool_gpusm_register(mca_mpool_base_module_t* mpool, void *addr,
76 size_t size, uint32_t flags, mca_mpool_base_registration_t **reg);
77
78 /**
79 * deregister memory
80 */
81 int mca_mpool_gpusm_deregister(mca_mpool_base_module_t *mpool,
82 mca_mpool_base_registration_t *reg);
83
84 /**
85 * find registration for a given block of memory
86 */
87 int mca_mpool_gpusm_find(struct mca_mpool_base_module_t* mpool, void* addr,
88 size_t size, mca_mpool_base_registration_t **reg);
89
90 /**
91 * finalize mpool
92 */
93 void mca_mpool_gpusm_finalize(struct mca_mpool_base_module_t *mpool);
94
95 /**
96 * Fault Tolerance Event Notification Function
97 * @param state Checkpoint Stae
98 * @return OMPI_SUCCESS or failure status
99 */
100 int mca_mpool_gpusm_ft_event(int state);
101
102 END_C_DECLS
103 #endif
mca_mpool_gpusm_finalize
void mca_mpool_gpusm_finalize(struct mca_mpool_base_module_t *mpool)
finalize mpool
Definition: mpool_gpusm_module.c:179
mca_mpool_gpusm_deregister
int mca_mpool_gpusm_deregister(mca_mpool_base_module_t *mpool, mca_mpool_base_registration_t *reg)
deregister memory
Definition: mpool_gpusm_module.c:165
event
Structure to represent a single event.
Definition: event_struct.h:87
mca_mpool_gpusm_module_t
Definition: mpool_gpusm.h:61
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
mca_mpool_base_registration_t
Definition: mpool.h:44
mca_mpool_base_component_2_0_0_t
mpool component descriptor.
Definition: mpool.h:154
mca_mpool_gpusm_ft_event
int mca_mpool_gpusm_ft_event(int state)
Fault Tolerance Event Notification Function.
Definition: mpool_gpusm_module.c:195
mca_mpool_gpusm_component_t
Definition: mpool_gpusm.h:45
ompi_free_list_t
Definition: ompi_free_list.h:39
mca_mpool_gpusm_registration_t
Definition: mpool_gpusm.h:36
mpool.h
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
mca_mpool_gpusm_find
int mca_mpool_gpusm_find(struct mca_mpool_base_module_t *mpool, void *addr, size_t size, mca_mpool_base_registration_t **reg)
find registration for a given block of memory
Definition: mpool_gpusm_module.c:106
mca_mpool_gpusm_register
int mca_mpool_gpusm_register(mca_mpool_base_module_t *mpool, void *addr, size_t size, uint32_t flags, mca_mpool_base_registration_t **reg)
register block of memory
Definition: mpool_gpusm_module.c:119
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
mca_mpool_base_resources_t
Definition: mpool_fake.h:38
mca_mpool_base_module_t
mpool module descriptor.
Definition: mpool.h:174