OpenMPI  0.1.1
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
38  uint64_t memHandle[MEMHANDLE_SIZE];
39  uint64_t evtHandle[EVTHANDLE_SIZE];
40  uint64_t event;
41 };
44 
47 };
49 
50 OMPI_DECLSPEC extern mca_mpool_gpusm_component_t mca_mpool_gpusm_component;
51 
53  void *reg_data;
54  size_t sizeof_reg;
55  int (*register_mem)(void *base, size_t size, mca_mpool_base_registration_t *newreg,
57  int (*deregister_mem)(void *reg_data, mca_mpool_base_registration_t *reg);
58 };
60 
63  struct mca_mpool_base_resources_t resources;
64  ompi_free_list_t reg_list;
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  */
76  size_t size, uint32_t flags, mca_mpool_base_registration_t **reg);
77 
78 /**
79  * deregister memory
80  */
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  */
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
void mca_mpool_gpusm_finalize(struct mca_mpool_base_module_t *mpool)
finalize mpool
Definition: mpool_gpusm_module.c:179
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
Structure to represent a single event.
Definition: event_struct.h:87
Definition: mpool_gpusm.h:61
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
Definition: mpool.h:44
mpool component descriptor.
Definition: mpool.h:154
int mca_mpool_gpusm_ft_event(int state)
Fault Tolerance Event Notification Function.
Definition: mpool_gpusm_module.c:195
Definition: mpool_gpusm.h:45
Definition: ompi_free_list.h:39
Definition: mpool_gpusm.h:36
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
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
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
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
Definition: mpool_fake.h:38
mpool module descriptor.
Definition: mpool.h:174