OpenMPI  0.1.1
mpool_gpusm_module.c File Reference

This file implements a simple memory pool that is used by the GPU buffer on the sending side. More...

#include "ompi_config.h"
#include "ompi/mca/mpool/base/base.h"
#include "ompi/mca/mpool/gpusm/mpool_gpusm.h"
#include "ompi/runtime/params.h"
#include "ompi/mca/common/cuda/common_cuda.h"

Functions

static void mca_mpool_gpusm_registration_constructor (mca_mpool_gpusm_registration_t *item)
 Called when the registration free list is created. More...
 
static void mca_mpool_gpusm_registration_destructor (mca_mpool_gpusm_registration_t *item)
 Called when the program is exiting. More...
 
 OBJ_CLASS_INSTANCE (mca_mpool_gpusm_registration_t, mca_mpool_base_registration_t, mca_mpool_gpusm_registration_constructor, mca_mpool_gpusm_registration_destructor)
 
void mca_mpool_gpusm_module_init (mca_mpool_gpusm_module_t *mpool)
 
int mca_mpool_gpusm_find (mca_mpool_base_module_t *mpool, void *addr, size_t size, mca_mpool_base_registration_t **reg)
 Just go ahead and get a new registration. More...
 
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
 
int mca_mpool_gpusm_deregister (struct mca_mpool_base_module_t *mpool, mca_mpool_base_registration_t *reg)
 deregister memory
 
void mca_mpool_gpusm_finalize (struct mca_mpool_base_module_t *mpool)
 Free up the resources. More...
 
int mca_mpool_gpusm_ft_event (int state)
 Fault Tolerance Event Notification Function. More...
 

Detailed Description

This file implements a simple memory pool that is used by the GPU buffer on the sending side.

It just gets a memory handle and event handle that can be sent to the remote side which can then use the handles to get access to the memory and the event to determine when it can start accessing the memory. There is no caching of the memory handles as getting new ones is fast. The event handles are cached by the cuda_common code.

Function Documentation

void mca_mpool_gpusm_finalize ( struct mca_mpool_base_module_t mpool)

Free up the resources.

finalize mpool

References OBJ_DESTRUCT.

int mca_mpool_gpusm_find ( mca_mpool_base_module_t mpool,
void *  addr,
size_t  size,
mca_mpool_base_registration_t **  reg 
)

Just go ahead and get a new registration.

find registration for a given block of memory

The find and register functions are the same thing for this memory pool.

References mca_mpool_gpusm_register().

int mca_mpool_gpusm_ft_event ( int  state)

Fault Tolerance Event Notification Function.

Parameters
stateCheckpoint Stae
Returns
OMPI_SUCCESS or failure status
static void mca_mpool_gpusm_registration_constructor ( mca_mpool_gpusm_registration_t item)
static

Called when the registration free list is created.

An event is created for each entry.

static void mca_mpool_gpusm_registration_destructor ( mca_mpool_gpusm_registration_t item)
static

Called when the program is exiting.

This destroys the events.