* rename ompi_list to opal_list
This commit was SVN r6322.
This commit is contained in:
parent
499e4de1e7
commit
761402f95f
@ -26,7 +26,7 @@ static void ompi_free_list_destruct(ompi_free_list_t* fl);
|
||||
|
||||
opal_class_t ompi_free_list_t_class = {
|
||||
"ompi_free_list_t",
|
||||
OBJ_CLASS(ompi_list_t),
|
||||
OBJ_CLASS(opal_list_t),
|
||||
(opal_construct_t)ompi_free_list_construct,
|
||||
(opal_destruct_t)ompi_free_list_destruct
|
||||
};
|
||||
@ -98,7 +98,7 @@ int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elements)
|
||||
if (NULL != flist->fl_elem_class) {
|
||||
OBJ_CONSTRUCT_INTERNAL(item, flist->fl_elem_class);
|
||||
}
|
||||
ompi_list_append(&(flist->super), &(item->super));
|
||||
opal_list_append(&(flist->super), &(item->super));
|
||||
ptr += flist->fl_elem_size;
|
||||
}
|
||||
flist->fl_num_allocated += num_elements;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define OMPI_FREE_LIST_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "threads/thread.h"
|
||||
#include "threads/condition.h"
|
||||
#include "include/constants.h"
|
||||
@ -33,7 +33,7 @@ struct mca_mem_pool_t;
|
||||
|
||||
struct ompi_free_list_t
|
||||
{
|
||||
ompi_list_t super;
|
||||
opal_list_t super;
|
||||
size_t fl_max_to_alloc;
|
||||
size_t fl_num_allocated;
|
||||
size_t fl_num_per_alloc;
|
||||
@ -49,7 +49,7 @@ typedef struct ompi_free_list_t ompi_free_list_t;
|
||||
|
||||
struct ompi_free_list_item_t
|
||||
{
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
void* user_data;
|
||||
};
|
||||
typedef struct ompi_free_list_item_t ompi_free_list_item_t;
|
||||
@ -94,17 +94,17 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen
|
||||
{ \
|
||||
if(ompi_using_threads()) { \
|
||||
ompi_mutex_lock(&((fl)->fl_lock)); \
|
||||
item = ompi_list_remove_first(&((fl)->super)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
if(NULL == item) { \
|
||||
ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
item = ompi_list_remove_first(&((fl)->super)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
ompi_mutex_unlock(&((fl)->fl_lock)); \
|
||||
} else { \
|
||||
item = ompi_list_remove_first(&((fl)->super)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
if(NULL == item) { \
|
||||
ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
item = ompi_list_remove_first(&((fl)->super)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
} \
|
||||
rc = (NULL == item) ? OMPI_ERR_TEMP_OUT_OF_RESOURCE : OMPI_SUCCESS; \
|
||||
@ -127,7 +127,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen
|
||||
#define OMPI_FREE_LIST_WAIT(fl, item, rc) \
|
||||
{ \
|
||||
OMPI_THREAD_LOCK(&((fl)->fl_lock)); \
|
||||
item = ompi_list_remove_first(&((fl)->super)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
while(NULL == item) { \
|
||||
if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \
|
||||
(fl)->fl_num_waiting++; \
|
||||
@ -136,7 +136,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen
|
||||
} else { \
|
||||
ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
} \
|
||||
item = ompi_list_remove_first(&((fl)->super)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
OMPI_THREAD_UNLOCK(&((fl)->fl_lock)); \
|
||||
rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \
|
||||
@ -154,7 +154,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen
|
||||
#define OMPI_FREE_LIST_RETURN(fl, item) \
|
||||
{ \
|
||||
OMPI_THREAD_LOCK(&(fl)->fl_lock); \
|
||||
ompi_list_prepend(&((fl)->super), (item)); \
|
||||
opal_list_prepend(&((fl)->super), (item)); \
|
||||
if((fl)->fl_num_waiting > 0) { \
|
||||
ompi_condition_signal(&((fl)->fl_condition)); \
|
||||
} \
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "class/ompi_rb_tree.h"
|
||||
|
||||
/* declare the instance of the classes */
|
||||
OBJ_CLASS_INSTANCE(ompi_rb_tree_node_t, ompi_list_item_t, NULL, NULL);
|
||||
OBJ_CLASS_INSTANCE(ompi_rb_tree_node_t, opal_list_item_t, NULL, NULL);
|
||||
OBJ_CLASS_INSTANCE(ompi_rb_tree_t, opal_object_t, ompi_rb_tree_construct,
|
||||
ompi_rb_tree_destruct);
|
||||
|
||||
@ -69,7 +69,7 @@ int ompi_rb_tree_init(ompi_rb_tree_t * tree,
|
||||
{
|
||||
int rc;
|
||||
|
||||
ompi_list_item_t * node;
|
||||
opal_list_item_t * node;
|
||||
/* we need to get memory for the root pointer from the free list */
|
||||
OMPI_FREE_LIST_GET(&(tree->free_list), node, rc);
|
||||
tree->root_ptr = (ompi_rb_tree_node_t *) node;
|
||||
@ -108,7 +108,7 @@ int ompi_rb_tree_insert(ompi_rb_tree_t *tree, void * key, void * value)
|
||||
{
|
||||
ompi_rb_tree_node_t * y;
|
||||
ompi_rb_tree_node_t * node;
|
||||
ompi_list_item_t * item;
|
||||
opal_list_item_t * item;
|
||||
int rc;
|
||||
|
||||
/* get the memory for a node */
|
||||
@ -216,7 +216,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
|
||||
ompi_rb_tree_node_t * p;
|
||||
ompi_rb_tree_node_t * todelete;
|
||||
ompi_rb_tree_node_t * y;
|
||||
ompi_list_item_t * item;
|
||||
opal_list_item_t * item;
|
||||
|
||||
p = ompi_rb_tree_find_node(tree, key);
|
||||
if (NULL == p) {
|
||||
@ -254,7 +254,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
|
||||
if (todelete->color == BLACK) {
|
||||
btree_delete_fixup(tree, y);
|
||||
}
|
||||
item = (ompi_list_item_t *) todelete;
|
||||
item = (opal_list_item_t *) todelete;
|
||||
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
||||
--tree->tree_size;
|
||||
return(OMPI_SUCCESS);
|
||||
@ -264,17 +264,17 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
|
||||
/* Destroy the hashmap */
|
||||
int ompi_rb_tree_destroy(ompi_rb_tree_t *tree)
|
||||
{
|
||||
ompi_list_item_t * item;
|
||||
opal_list_item_t * item;
|
||||
/* Recursive inorder traversal for delete */
|
||||
|
||||
inorder_destroy(tree, tree->root_ptr);
|
||||
/* Now free the root -- root does not get free'd in the above
|
||||
* inorder destroy */
|
||||
item = (ompi_list_item_t *) tree->root_ptr;
|
||||
item = (opal_list_item_t *) tree->root_ptr;
|
||||
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
||||
|
||||
/* free the tree->nill node */
|
||||
item = (ompi_list_item_t *) tree->nill;
|
||||
item = (opal_list_item_t *) tree->nill;
|
||||
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
||||
return(OMPI_SUCCESS);
|
||||
}
|
||||
@ -409,7 +409,7 @@ void btree_delete_fixup(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * x)
|
||||
void
|
||||
inorder_destroy(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * node)
|
||||
{
|
||||
ompi_list_item_t * item;
|
||||
opal_list_item_t * item;
|
||||
|
||||
if (node == tree->nill) {
|
||||
return;
|
||||
@ -418,14 +418,14 @@ inorder_destroy(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * node)
|
||||
inorder_destroy(tree, node->left);
|
||||
|
||||
if (node->left != tree->nill) {
|
||||
item = (ompi_list_item_t *) node->left;
|
||||
item = (opal_list_item_t *) node->left;
|
||||
--tree->tree_size;
|
||||
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
||||
}
|
||||
|
||||
inorder_destroy(tree, node->right);
|
||||
if (node->right != tree->nill) {
|
||||
item = (ompi_list_item_t *) node->right;
|
||||
item = (opal_list_item_t *) node->right;
|
||||
--tree->tree_size;
|
||||
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ typedef enum {RED, BLACK} ompi_rb_tree_nodecolor_t;
|
||||
*/
|
||||
struct ompi_rb_tree_node_t
|
||||
{
|
||||
ompi_list_item_t super; /**< the parent class */
|
||||
opal_list_item_t super; /**< the parent class */
|
||||
ompi_rb_tree_nodecolor_t color; /**< the node color */
|
||||
struct ompi_rb_tree_node_t * parent;/**< the parent node, can be NULL */
|
||||
struct ompi_rb_tree_node_t * left; /**< the left child - can be nill */
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "proc/proc.h"
|
||||
#include "include/constants.h"
|
||||
#include "class/ompi_pointer_array.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "mca/pml/pml.h"
|
||||
#include "mca/coll/coll.h"
|
||||
#include "mca/coll/base/base.h"
|
||||
@ -86,7 +86,7 @@ static int ompi_comm_unregister_cid (uint32_t contextid);
|
||||
static uint32_t ompi_comm_lowest_cid ( void );
|
||||
|
||||
struct ompi_comm_reg_t{
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
uint32_t cid;
|
||||
};
|
||||
typedef struct ompi_comm_reg_t ompi_comm_reg_t;
|
||||
@ -96,14 +96,14 @@ static void ompi_comm_reg_constructor(ompi_comm_reg_t *regcom);
|
||||
static void ompi_comm_reg_destructor(ompi_comm_reg_t *regcom);
|
||||
|
||||
OBJ_CLASS_INSTANCE (ompi_comm_reg_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
ompi_comm_reg_constructor,
|
||||
ompi_comm_reg_destructor );
|
||||
|
||||
#if OMPI_HAVE_THREAD_SUPPORT
|
||||
static ompi_mutex_t ompi_cid_lock;
|
||||
#endif /* OMPI_HAVE_THREAD_SUPPORT */
|
||||
static ompi_list_t ompi_registered_comms;
|
||||
static opal_list_t ompi_registered_comms;
|
||||
|
||||
|
||||
int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
|
||||
@ -234,7 +234,7 @@ static void ompi_comm_reg_destructor (ompi_comm_reg_t *regcom)
|
||||
|
||||
void ompi_comm_reg_init (void)
|
||||
{
|
||||
OBJ_CONSTRUCT(&ompi_registered_comms, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&ompi_registered_comms, opal_list_t);
|
||||
}
|
||||
|
||||
void ompi_comm_reg_finalize (void)
|
||||
@ -245,25 +245,25 @@ void ompi_comm_reg_finalize (void)
|
||||
|
||||
static int ompi_comm_register_cid (uint32_t cid )
|
||||
{
|
||||
ompi_list_item_t *item=NULL;
|
||||
opal_list_item_t *item=NULL;
|
||||
ompi_comm_reg_t *regcom=NULL;
|
||||
ompi_comm_reg_t *newentry = OBJ_NEW(ompi_comm_reg_t);
|
||||
|
||||
newentry->cid = cid;
|
||||
if ( !(ompi_list_is_empty (&ompi_registered_comms)) ) {
|
||||
for (item = ompi_list_get_first(&ompi_registered_comms);
|
||||
item != ompi_list_get_end(&ompi_registered_comms);
|
||||
item = ompi_list_get_next(item)) {
|
||||
if ( !(opal_list_is_empty (&ompi_registered_comms)) ) {
|
||||
for (item = opal_list_get_first(&ompi_registered_comms);
|
||||
item != opal_list_get_end(&ompi_registered_comms);
|
||||
item = opal_list_get_next(item)) {
|
||||
regcom = (ompi_comm_reg_t *)item;
|
||||
if ( regcom->cid > cid ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
ompi_list_insert_pos (&ompi_registered_comms, (ompi_list_item_t *)regcom,
|
||||
(ompi_list_item_t *)newentry);
|
||||
opal_list_insert_pos (&ompi_registered_comms, (opal_list_item_t *)regcom,
|
||||
(opal_list_item_t *)newentry);
|
||||
}
|
||||
else {
|
||||
ompi_list_append (&ompi_registered_comms, (ompi_list_item_t *)newentry);
|
||||
opal_list_append (&ompi_registered_comms, (opal_list_item_t *)newentry);
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
@ -272,7 +272,7 @@ static int ompi_comm_register_cid (uint32_t cid )
|
||||
static int ompi_comm_unregister_cid (uint32_t cid)
|
||||
{
|
||||
ompi_comm_reg_t *regcom=NULL;
|
||||
ompi_list_item_t *item=ompi_list_remove_first(&ompi_registered_comms);
|
||||
opal_list_item_t *item=opal_list_remove_first(&ompi_registered_comms);
|
||||
|
||||
regcom = (ompi_comm_reg_t *) item;
|
||||
OBJ_RELEASE(regcom);
|
||||
@ -283,7 +283,7 @@ static int ompi_comm_unregister_cid (uint32_t cid)
|
||||
static uint32_t ompi_comm_lowest_cid (void)
|
||||
{
|
||||
ompi_comm_reg_t *regcom=NULL;
|
||||
ompi_list_item_t *item=ompi_list_get_first (&ompi_registered_comms);
|
||||
opal_list_item_t *item=opal_list_get_first (&ompi_registered_comms);
|
||||
|
||||
regcom = (ompi_comm_reg_t *)item;
|
||||
return regcom->cid;
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "file/file.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "ompi/runtime/params.h"
|
||||
#include "mca/io/base/base.h"
|
||||
#include "info/info.h"
|
||||
@ -243,7 +243,7 @@ static void file_constructor(ompi_file_t *file)
|
||||
file->f_io_selected_data = NULL;
|
||||
|
||||
/* Construct the io request freelist */
|
||||
OBJ_CONSTRUCT(&file->f_io_requests, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&file->f_io_requests, opal_list_t);
|
||||
|
||||
/* If the user doesn't want us to ever free it, then add an extra
|
||||
RETAIN here */
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define OMPI_FILE_H
|
||||
|
||||
#include "mpi.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "errhandler/errhandler.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "mca/io/io.h"
|
||||
@ -84,7 +84,7 @@ struct ompi_file_t {
|
||||
struct mca_io_base_file_t *f_io_selected_data;
|
||||
|
||||
/** Per-module io request freelist */
|
||||
ompi_list_t f_io_requests;
|
||||
opal_list_t f_io_requests;
|
||||
|
||||
/** Lock for the per-module io request freelist */
|
||||
ompi_mutex_t f_io_requests_lock;
|
||||
|
@ -42,7 +42,7 @@ static ompi_info_entry_t *info_find_key (ompi_info_t *info, char *key);
|
||||
* ompi_info_t classes
|
||||
*/
|
||||
OBJ_CLASS_INSTANCE(ompi_info_t,
|
||||
ompi_list_t,
|
||||
opal_list_t,
|
||||
info_constructor,
|
||||
info_destructor);
|
||||
|
||||
@ -50,7 +50,7 @@ OBJ_CLASS_INSTANCE(ompi_info_t,
|
||||
* ompi_info_entry_t classes
|
||||
*/
|
||||
OBJ_CLASS_INSTANCE(ompi_info_entry_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
info_entry_constructor,
|
||||
info_entry_destructor);
|
||||
|
||||
@ -87,13 +87,13 @@ int ompi_info_init(void)
|
||||
int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo)
|
||||
{
|
||||
int err;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
ompi_info_entry_t *iterator;
|
||||
|
||||
OMPI_THREAD_LOCK(info->i_lock);
|
||||
for (item = ompi_list_get_first(&(info->super));
|
||||
item != ompi_list_get_end(&(info->super));
|
||||
item = ompi_list_get_next(iterator)) {
|
||||
for (item = opal_list_get_first(&(info->super));
|
||||
item != opal_list_get_end(&(info->super));
|
||||
item = opal_list_get_next(iterator)) {
|
||||
iterator = (ompi_info_entry_t *) item;
|
||||
err = ompi_info_set(*newinfo, iterator->ie_key, iterator->ie_value);
|
||||
if (MPI_SUCCESS != err) {
|
||||
@ -136,7 +136,7 @@ int ompi_info_set (ompi_info_t *info, char *key, char *value)
|
||||
}
|
||||
strcpy (new_info->ie_key, key);
|
||||
new_info->ie_value = new_value;
|
||||
ompi_list_append (&(info->super), (ompi_list_item_t *) new_info);
|
||||
opal_list_append (&(info->super), (opal_list_item_t *) new_info);
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(info->i_lock);
|
||||
return MPI_SUCCESS;
|
||||
@ -211,8 +211,8 @@ int ompi_info_delete (ompi_info_t *info, char *key)
|
||||
* and free the memory allocated to it
|
||||
*/
|
||||
found = (ompi_info_entry_t *)
|
||||
ompi_list_remove_item (&(info->super),
|
||||
(ompi_list_item_t *)search);
|
||||
opal_list_remove_item (&(info->super),
|
||||
(opal_list_item_t *)search);
|
||||
OBJ_RELEASE(search);
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(info->i_lock);
|
||||
@ -256,18 +256,18 @@ int ompi_info_get_nthkey (ompi_info_t *info, int n, char *key)
|
||||
* Iterate over and over till we get to the nth key
|
||||
*/
|
||||
OMPI_THREAD_LOCK(info->i_lock);
|
||||
for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super));
|
||||
for (iterator = (ompi_info_entry_t *)opal_list_get_first(&(info->super));
|
||||
n > 0;
|
||||
--n) {
|
||||
iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator);
|
||||
if (ompi_list_get_end(&(info->super)) ==
|
||||
(ompi_list_item_t *) iterator) {
|
||||
iterator = (ompi_info_entry_t *)opal_list_get_next(iterator);
|
||||
if (opal_list_get_end(&(info->super)) ==
|
||||
(opal_list_item_t *) iterator) {
|
||||
OMPI_THREAD_UNLOCK(info->i_lock);
|
||||
return MPI_ERR_ARG;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* iterator is of the type ompi_list_item_t. We have to
|
||||
* iterator is of the type opal_list_item_t. We have to
|
||||
* cast it to ompi_info_entry_t before we can use it to
|
||||
* access the value
|
||||
*/
|
||||
@ -284,7 +284,7 @@ int ompi_info_finalize(void)
|
||||
{
|
||||
size_t i, max;
|
||||
ompi_info_t *info;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
ompi_info_entry_t *entry;
|
||||
bool found = false;
|
||||
|
||||
@ -323,9 +323,9 @@ int ompi_info_finalize(void)
|
||||
if (!info->i_freed && ompi_debug_show_handle_leaks) {
|
||||
if (ompi_debug_show_handle_leaks) {
|
||||
ompi_output(0, "WARNING: MPI_Info still allocated at MPI_FINALIZE");
|
||||
for (item = ompi_list_get_first(&(info->super));
|
||||
ompi_list_get_end(&(info->super)) != item;
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(&(info->super));
|
||||
opal_list_get_end(&(info->super)) != item;
|
||||
item = opal_list_get_next(item)) {
|
||||
entry = (ompi_info_entry_t *) item;
|
||||
ompi_output(0, "WARNING: key=\"%s\", value=\"%s\"",
|
||||
entry->ie_key,
|
||||
@ -380,14 +380,14 @@ static void info_constructor(ompi_info_t *info)
|
||||
*/
|
||||
static void info_destructor(ompi_info_t *info)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
ompi_info_entry_t *iterator;
|
||||
|
||||
/* Remove every key in the list */
|
||||
|
||||
for (item = ompi_list_remove_first(&(info->super));
|
||||
for (item = opal_list_remove_first(&(info->super));
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&(info->super))) {
|
||||
item = opal_list_remove_first(&(info->super))) {
|
||||
iterator = (ompi_info_entry_t *) item;
|
||||
OBJ_RELEASE(iterator);
|
||||
}
|
||||
@ -442,9 +442,9 @@ static ompi_info_entry_t *info_find_key (ompi_info_t *info, char *key)
|
||||
* return immediately. Else, the loop will fall of the edge
|
||||
* and NULL is returned
|
||||
*/
|
||||
for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super));
|
||||
ompi_list_get_end(&(info->super)) != (ompi_list_item_t*) iterator;
|
||||
iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator)) {
|
||||
for (iterator = (ompi_info_entry_t *)opal_list_get_first(&(info->super));
|
||||
opal_list_get_end(&(info->super)) != (opal_list_item_t*) iterator;
|
||||
iterator = (ompi_info_entry_t *)opal_list_get_next(iterator)) {
|
||||
if (0 == strcmp(key, iterator->ie_key)) {
|
||||
return iterator;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "util/strncpy.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_pointer_array.h"
|
||||
#include "threads/mutex.h"
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
* ompi_info_t structure. MPI_Info is a pointer to this structure
|
||||
*/
|
||||
struct ompi_info_t {
|
||||
ompi_list_t super;
|
||||
opal_list_t super;
|
||||
/**< generic list pointer which is the container for (key,value)
|
||||
pairs */
|
||||
int i_f_to_c_index;
|
||||
@ -55,7 +55,7 @@ typedef struct ompi_info_t ompi_info_t;
|
||||
* type. It contains (key,value) pairs
|
||||
*/
|
||||
struct ompi_info_entry_t {
|
||||
ompi_list_item_t super; /**< required for ompi_list_t type */
|
||||
opal_list_item_t super; /**< required for opal_list_t type */
|
||||
char *ie_value; /**< value part of the (key, value) pair.
|
||||
* Maximum length is MPI_MAX_INFO_VAL */
|
||||
char ie_key[MPI_MAX_INFO_KEY + 1]; /**< "key" part of the (key, value)
|
||||
@ -242,7 +242,7 @@ static inline bool ompi_info_is_freed(ompi_info_t *info)
|
||||
static inline int
|
||||
ompi_info_get_nkeys(ompi_info_t *info, int *nkeys)
|
||||
{
|
||||
*nkeys = (int) ompi_list_get_size(&(info->super));
|
||||
*nkeys = (int) opal_list_get_size(&(info->super));
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
ompi_list_t mca_allocator_base_components;
|
||||
opal_list_t mca_allocator_base_components;
|
||||
int mca_allocator_base_output = -1;
|
||||
|
||||
/**
|
||||
@ -63,10 +63,10 @@ int mca_allocator_base_open(void)
|
||||
mca_allocator_base_component_t* mca_allocator_component_lookup(const char* name)
|
||||
{
|
||||
/* Traverse the list of available components; call their init functions. */
|
||||
ompi_list_item_t* item;
|
||||
for (item = ompi_list_get_first(&mca_allocator_base_components);
|
||||
item != ompi_list_get_end(&mca_allocator_base_components);
|
||||
item = ompi_list_get_next(item)) {
|
||||
opal_list_item_t* item;
|
||||
for (item = opal_list_get_first(&mca_allocator_base_components);
|
||||
item != opal_list_get_end(&mca_allocator_base_components);
|
||||
item = opal_list_get_next(item)) {
|
||||
mca_base_component_list_item_t *cli = (mca_base_component_list_item_t *) item;
|
||||
mca_allocator_base_component_t* component = (mca_allocator_base_component_t *) cli->cli_component;
|
||||
if(strcmp(component->allocator_version.mca_component_name,
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/allocator/allocator.h"
|
||||
|
||||
@ -32,8 +32,8 @@ extern "C" {
|
||||
* Structure which describes a selected module.
|
||||
*/
|
||||
struct mca_allocator_base_selected_module_t {
|
||||
ompi_list_item_t super;
|
||||
/**< Makes this an object of type ompi_list_item */
|
||||
opal_list_item_t super;
|
||||
/**< Makes this an object of type opal_list_item */
|
||||
mca_allocator_base_component_t *allocator_component;
|
||||
/**< Info about the module */
|
||||
mca_allocator_base_module_t *allocator_module;
|
||||
@ -65,7 +65,7 @@ OMPI_DECLSPEC mca_allocator_base_component_t* mca_allocator_component_lookup(con
|
||||
/**
|
||||
* The list of all the selected components.
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_allocator_base_components;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_allocator_base_components;
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@ mca_allocator_base_component_t mca_allocator_basic_component = {
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_allocator_basic_segment_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
@ -93,7 +93,7 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init(
|
||||
module->super.alc_mpool = mpool;
|
||||
module->seg_alloc = segment_alloc;
|
||||
module->seg_free = segment_free;
|
||||
OBJ_CONSTRUCT(&module->seg_list, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&module->seg_list, opal_list_t);
|
||||
OBJ_CONSTRUCT(&module->seg_lock, ompi_mutex_t);
|
||||
OBJ_CONSTRUCT(&module->seg_descriptors, ompi_free_list_t);
|
||||
|
||||
@ -116,12 +116,12 @@ static void mca_allocator_basic_combine_prev(
|
||||
mca_allocator_basic_module_t* module,
|
||||
mca_allocator_basic_segment_t* seg)
|
||||
{
|
||||
ompi_list_item_t* item = ompi_list_get_prev(seg);
|
||||
if(item != ompi_list_get_begin(&module->seg_list)) {
|
||||
opal_list_item_t* item = opal_list_get_prev(seg);
|
||||
if(item != opal_list_get_begin(&module->seg_list)) {
|
||||
mca_allocator_basic_segment_t *prev = (mca_allocator_basic_segment_t*)item;
|
||||
if(prev->seg_addr + prev->seg_size == seg->seg_addr) {
|
||||
prev->seg_size += seg->seg_size;
|
||||
ompi_list_remove_item(&module->seg_list, &seg->seg_item);
|
||||
opal_list_remove_item(&module->seg_list, &seg->seg_item);
|
||||
OMPI_FREE_LIST_RETURN(&module->seg_descriptors, &seg->seg_item);
|
||||
return;
|
||||
}
|
||||
@ -132,13 +132,13 @@ static void mca_allocator_basic_combine_next(
|
||||
mca_allocator_basic_module_t* module,
|
||||
mca_allocator_basic_segment_t* seg)
|
||||
{
|
||||
ompi_list_item_t *item = ompi_list_get_next(seg);
|
||||
if(item != ompi_list_get_end(&module->seg_list)) {
|
||||
opal_list_item_t *item = opal_list_get_next(seg);
|
||||
if(item != opal_list_get_end(&module->seg_list)) {
|
||||
mca_allocator_basic_segment_t *next = (mca_allocator_basic_segment_t*)item;
|
||||
if(seg->seg_addr + seg->seg_size == next->seg_addr) {
|
||||
next->seg_addr = seg->seg_addr;
|
||||
next->seg_size += seg->seg_size;
|
||||
ompi_list_remove_item(&module->seg_list, &seg->seg_item);
|
||||
opal_list_remove_item(&module->seg_list, &seg->seg_item);
|
||||
OMPI_FREE_LIST_RETURN(&module->seg_descriptors, &seg->seg_item);
|
||||
return;
|
||||
}
|
||||
@ -165,16 +165,16 @@ void *mca_allocator_basic_alloc(
|
||||
{
|
||||
mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base;
|
||||
mca_allocator_basic_segment_t* seg;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
unsigned char* addr;
|
||||
size_t allocated_size;
|
||||
OMPI_THREAD_LOCK(&module->seg_lock);
|
||||
|
||||
/* search the list for a segment of the required size */
|
||||
size += sizeof(size_t);
|
||||
for(item = ompi_list_get_first(&module->seg_list);
|
||||
item != ompi_list_get_end(&module->seg_list);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for(item = opal_list_get_first(&module->seg_list);
|
||||
item != opal_list_get_end(&module->seg_list);
|
||||
item = opal_list_get_next(item)) {
|
||||
seg = (mca_allocator_basic_segment_t*)item;
|
||||
|
||||
/* split the segment */
|
||||
@ -187,7 +187,7 @@ void *mca_allocator_basic_alloc(
|
||||
return addr+sizeof(size_t);
|
||||
} else if (seg->seg_size == size) {
|
||||
addr = seg->seg_addr;
|
||||
ompi_list_remove_item(&module->seg_list, item);
|
||||
opal_list_remove_item(&module->seg_list, item);
|
||||
OMPI_FREE_LIST_RETURN(&module->seg_descriptors, item);
|
||||
OMPI_THREAD_UNLOCK(&module->seg_lock);
|
||||
*(size_t*)addr = size;
|
||||
@ -213,7 +213,7 @@ void *mca_allocator_basic_alloc(
|
||||
seg = (mca_allocator_basic_segment_t*)item;
|
||||
seg->seg_addr = addr + size;
|
||||
seg->seg_size = allocated_size - size;
|
||||
ompi_list_append(&module->seg_list, item);
|
||||
opal_list_append(&module->seg_list, item);
|
||||
}
|
||||
|
||||
*(size_t*)addr = size;
|
||||
@ -272,16 +272,16 @@ void mca_allocator_basic_free(
|
||||
{
|
||||
mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base;
|
||||
mca_allocator_basic_segment_t* seg;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
unsigned char* addr = (unsigned char*)ptr - sizeof(size_t);
|
||||
size_t size = *(size_t*)addr;
|
||||
int rc;
|
||||
OMPI_THREAD_LOCK(&module->seg_lock);
|
||||
|
||||
/* maintain the free list in sorted order by address */
|
||||
for(item = ompi_list_get_first(&module->seg_list);
|
||||
item != ompi_list_get_end(&module->seg_list);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for(item = opal_list_get_first(&module->seg_list);
|
||||
item != opal_list_get_end(&module->seg_list);
|
||||
item = opal_list_get_next(item)) {
|
||||
seg = (mca_allocator_basic_segment_t*)item;
|
||||
|
||||
if (seg->seg_addr < addr) {
|
||||
@ -316,7 +316,7 @@ void mca_allocator_basic_free(
|
||||
new_seg = (mca_allocator_basic_segment_t*)item;
|
||||
new_seg->seg_addr = addr;
|
||||
new_seg->seg_size = size;
|
||||
ompi_list_insert_pos(&module->seg_list, &seg->seg_item, item);
|
||||
opal_list_insert_pos(&module->seg_list, &seg->seg_item, item);
|
||||
OMPI_THREAD_UNLOCK(&module->seg_lock);
|
||||
return;
|
||||
}
|
||||
@ -332,7 +332,7 @@ void mca_allocator_basic_free(
|
||||
seg = (mca_allocator_basic_segment_t*)item;
|
||||
seg->seg_addr = addr;
|
||||
seg->seg_size = size;
|
||||
ompi_list_append(&module->seg_list, item);
|
||||
opal_list_append(&module->seg_list, item);
|
||||
OMPI_THREAD_UNLOCK(&module->seg_lock);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
struct mca_allocator_basic_segment_t {
|
||||
ompi_list_item_t seg_item;
|
||||
opal_list_item_t seg_item;
|
||||
unsigned char* seg_addr;
|
||||
size_t seg_size;
|
||||
};
|
||||
@ -49,7 +49,7 @@ struct mca_allocator_basic_module_t {
|
||||
mca_allocator_base_module_t super;
|
||||
mca_allocator_base_component_segment_alloc_fn_t seg_alloc;
|
||||
mca_allocator_base_component_segment_free_fn_t seg_free;
|
||||
ompi_list_t seg_list;
|
||||
opal_list_t seg_list;
|
||||
ompi_mutex_t seg_lock;
|
||||
ompi_free_list_t seg_descriptors;
|
||||
};
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define MCA_BTL_BASE_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/btl/btl.h"
|
||||
|
||||
@ -29,7 +29,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
struct mca_btl_base_selected_module_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
mca_btl_base_component_t *btl_component;
|
||||
mca_btl_base_module_t *btl_module;
|
||||
};
|
||||
@ -63,8 +63,8 @@ OMPI_DECLSPEC int mca_btl_base_close(void);
|
||||
OMPI_DECLSPEC extern int mca_btl_base_output;
|
||||
OMPI_DECLSPEC extern char* mca_btl_base_include;
|
||||
OMPI_DECLSPEC extern char* mca_btl_base_exclude;
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_btl_base_components_opened;
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_btl_base_modules_initialized;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_btl_base_components_opened;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_btl_base_modules_initialized;
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
int mca_btl_base_close(void)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
mca_btl_base_selected_module_t *sm;
|
||||
|
||||
/* disable event processing while cleaning up btls */
|
||||
@ -37,9 +37,9 @@ int mca_btl_base_close(void)
|
||||
|
||||
/* Finalize all the btl components and free their list items */
|
||||
|
||||
for (item = ompi_list_remove_first(&mca_btl_base_modules_initialized);
|
||||
for (item = opal_list_remove_first(&mca_btl_base_modules_initialized);
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&mca_btl_base_modules_initialized)) {
|
||||
item = opal_list_remove_first(&mca_btl_base_modules_initialized)) {
|
||||
sm = (mca_btl_base_selected_module_t *) item;
|
||||
|
||||
/* Blatebtly ignore the return code (what would we do to recover,
|
||||
@ -53,7 +53,7 @@ int mca_btl_base_close(void)
|
||||
/* Close all remaining opened components (may be one if this is a
|
||||
OMPI RTE program, or [possibly] multiple if this is ompi_info) */
|
||||
|
||||
if (0 != ompi_list_get_size(&mca_btl_base_components_opened)) {
|
||||
if (0 != opal_list_get_size(&mca_btl_base_components_opened)) {
|
||||
mca_base_components_close(mca_btl_base_output,
|
||||
&mca_btl_base_components_opened, NULL);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ static void mca_btl_base_descriptor_destructor(mca_btl_base_descriptor_t* des)
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_btl_base_descriptor_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
mca_btl_base_descriptor_constructor,
|
||||
mca_btl_base_descriptor_destructor);
|
||||
|
||||
@ -66,8 +66,8 @@ OBJ_CLASS_INSTANCE(
|
||||
int mca_btl_base_output = -1;
|
||||
char* mca_btl_base_include = NULL;
|
||||
char* mca_btl_base_exclude = NULL;
|
||||
ompi_list_t mca_btl_base_components_opened;
|
||||
ompi_list_t mca_btl_base_modules_initialized;
|
||||
opal_list_t mca_btl_base_components_opened;
|
||||
opal_list_t mca_btl_base_modules_initialized;
|
||||
|
||||
|
||||
/**
|
||||
@ -88,7 +88,7 @@ int mca_btl_base_open(void)
|
||||
iterate over it (even if it's empty, as in the case of
|
||||
ompi_info) */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_btl_base_modules_initialized, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_base_modules_initialized, opal_list_t);
|
||||
|
||||
/* register parameters */
|
||||
mca_base_param_lookup_string(
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_btl_base_selected_module_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
@ -36,13 +36,13 @@ OBJ_CLASS_INSTANCE(
|
||||
* Call the init function on all available components to find out if
|
||||
* they want to run. Select all components that don't fail. Failing
|
||||
* components will be closed and unloaded. The selected modules will
|
||||
* be returned to the caller in a ompi_list_t.
|
||||
* be returned to the caller in a opal_list_t.
|
||||
*/
|
||||
int mca_btl_base_select(bool enable_progress_threads,
|
||||
bool enable_mpi_threads)
|
||||
{
|
||||
int i, num_btls;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
mca_base_component_list_item_t *cli;
|
||||
mca_btl_base_component_t *component;
|
||||
mca_btl_base_module_t **modules;
|
||||
@ -54,9 +54,9 @@ int mca_btl_base_select(bool enable_progress_threads,
|
||||
/* Traverse the list of opened modules; call their init
|
||||
functions. */
|
||||
|
||||
item = ompi_list_get_first(&mca_btl_base_components_opened);
|
||||
while(item != ompi_list_get_end(&mca_btl_base_components_opened)) {
|
||||
ompi_list_item_t *next = ompi_list_get_next(item);
|
||||
item = opal_list_get_first(&mca_btl_base_components_opened);
|
||||
while(item != opal_list_get_end(&mca_btl_base_components_opened)) {
|
||||
opal_list_item_t *next = opal_list_get_next(item);
|
||||
cli = (mca_base_component_list_item_t *) item;
|
||||
|
||||
component = (mca_btl_base_component_t *) cli->cli_component;
|
||||
@ -116,7 +116,7 @@ int mca_btl_base_select(bool enable_progress_threads,
|
||||
component->btl_version.mca_component_name);
|
||||
|
||||
mca_base_component_repository_release((mca_base_component_t *) component);
|
||||
ompi_list_remove_item(&mca_btl_base_components_opened, item);
|
||||
opal_list_remove_item(&mca_btl_base_components_opened, item);
|
||||
}
|
||||
|
||||
/* Otherwise, it initialized properly. Save it. */
|
||||
@ -132,8 +132,8 @@ int mca_btl_base_select(bool enable_progress_threads,
|
||||
}
|
||||
sm->btl_component = component;
|
||||
sm->btl_module = modules[i];
|
||||
ompi_list_append(&mca_btl_base_modules_initialized,
|
||||
(ompi_list_item_t*) sm);
|
||||
opal_list_append(&mca_btl_base_modules_initialized,
|
||||
(opal_list_item_t*) sm);
|
||||
}
|
||||
free(modules);
|
||||
}
|
||||
@ -143,7 +143,7 @@ int mca_btl_base_select(bool enable_progress_threads,
|
||||
|
||||
/* Finished querying all components. Check for the bozo case. */
|
||||
|
||||
if (0 == ompi_list_get_size(&mca_btl_base_modules_initialized)) {
|
||||
if (0 == opal_list_get_size(&mca_btl_base_modules_initialized)) {
|
||||
/* JMS Replace with show_help */
|
||||
orte_abort(1, "No btl components available. This shouldn't happen.");
|
||||
}
|
||||
|
@ -569,9 +569,9 @@ static void mca_btl_gm_send_callback( struct gm_port* port, void* context, gm_st
|
||||
frag->base.des_cbfunc(&btl->super, frag->endpoint, &frag->base, OMPI_SUCCESS);
|
||||
|
||||
/* check for pending fragments */
|
||||
if(ompi_list_get_size(&btl->gm_pending)) {
|
||||
if(opal_list_get_size(&btl->gm_pending)) {
|
||||
OMPI_THREAD_LOCK(&btl->gm_lock);
|
||||
frag = (mca_btl_gm_frag_t*)ompi_list_remove_first(&btl->gm_pending);
|
||||
frag = (mca_btl_gm_frag_t*)opal_list_remove_first(&btl->gm_pending);
|
||||
OMPI_THREAD_UNLOCK(&btl->gm_lock);
|
||||
mca_btl_gm_send(&btl->super, frag->endpoint, &frag->base, frag->hdr->tag);
|
||||
}
|
||||
@ -634,7 +634,7 @@ int mca_btl_gm_send(
|
||||
/* queue the descriptor if there are no send tokens */
|
||||
if(OMPI_THREAD_ADD32(&gm_btl->gm_num_send_tokens, -1) < 0) {
|
||||
OMPI_THREAD_LOCK(&gm_btl->gm_lock);
|
||||
ompi_list_append(&gm_btl->gm_pending, (ompi_list_item_t*)frag);
|
||||
opal_list_append(&gm_btl->gm_pending, (opal_list_item_t*)frag);
|
||||
OMPI_THREAD_UNLOCK(&gm_btl->gm_lock);
|
||||
OMPI_THREAD_ADD32(&gm_btl->gm_num_send_tokens, 1);
|
||||
return OMPI_SUCCESS;
|
||||
@ -737,22 +737,22 @@ int mca_btl_gm_finalize(struct mca_btl_base_module_t* btl)
|
||||
mca_btl_gm_module_t* gm_btl = (mca_btl_gm_module_t*) btl;
|
||||
|
||||
if(gm_btl->gm_frag_eager.fl_num_allocated !=
|
||||
gm_btl->gm_frag_eager.super.ompi_list_length){
|
||||
gm_btl->gm_frag_eager.super.opal_list_length){
|
||||
ompi_output(0, "btl gm_frag_eager: %d allocated %d returned \n",
|
||||
gm_btl->gm_frag_eager.fl_num_allocated,
|
||||
gm_btl->gm_frag_eager.super.ompi_list_length);
|
||||
gm_btl->gm_frag_eager.super.opal_list_length);
|
||||
}
|
||||
if(gm_btl->gm_frag_max.fl_num_allocated !=
|
||||
gm_btl->gm_frag_max.super.ompi_list_length) {
|
||||
gm_btl->gm_frag_max.super.opal_list_length) {
|
||||
ompi_output(0, "btl gm_frag_max: %d allocated %d returned \n",
|
||||
gm_btl->gm_frag_max.fl_num_allocated,
|
||||
gm_btl->gm_frag_max.super.ompi_list_length);
|
||||
gm_btl->gm_frag_max.super.opal_list_length);
|
||||
}
|
||||
if(gm_btl->gm_frag_user.fl_num_allocated !=
|
||||
gm_btl->gm_frag_user.super.ompi_list_length){
|
||||
gm_btl->gm_frag_user.super.opal_list_length){
|
||||
ompi_output(0, "btl gm_frag_user: %d allocated %d returned \n",
|
||||
gm_btl->gm_frag_user.fl_num_allocated,
|
||||
gm_btl->gm_frag_user.super.ompi_list_length);
|
||||
gm_btl->gm_frag_user.super.opal_list_length);
|
||||
}
|
||||
|
||||
OBJ_DESTRUCT(&gm_btl->gm_lock);
|
||||
|
@ -60,7 +60,7 @@ struct mca_btl_gm_component_t {
|
||||
int gm_free_list_max; /**< maximum size of free lists */
|
||||
int gm_free_list_inc; /**< number of elements to alloc when growing free lists */
|
||||
|
||||
ompi_list_t gm_procs; /**< list of gm proc structures */
|
||||
opal_list_t gm_procs; /**< list of gm proc structures */
|
||||
ompi_mutex_t gm_lock; /**< lock for accessing module state */
|
||||
char* gm_mpool_name; /**< name of memory pool */
|
||||
|
||||
@ -96,7 +96,7 @@ struct mca_btl_gm_module_t {
|
||||
unsigned int gm_max_recv_tokens;
|
||||
|
||||
/* lock for accessing module state */
|
||||
ompi_list_t gm_pending; /**< list of pending send descriptors */
|
||||
opal_list_t gm_pending; /**< list of pending send descriptors */
|
||||
ompi_mutex_t gm_lock;
|
||||
struct mca_mpool_base_module_t* gm_mpool;
|
||||
};
|
||||
|
@ -107,7 +107,7 @@ int mca_btl_gm_component_open(void)
|
||||
mca_btl_gm_component.gm_port_name=NULL;
|
||||
|
||||
/* initialize objects */
|
||||
OBJ_CONSTRUCT(&mca_btl_gm_component.gm_procs, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_gm_component.gm_procs, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_gm_component.gm_lock, ompi_mutex_t);
|
||||
|
||||
/* register GM component parameters */
|
||||
@ -178,7 +178,7 @@ mca_btl_gm_module_init (mca_btl_gm_module_t * btl)
|
||||
OBJ_CONSTRUCT(&btl->gm_frag_eager, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&btl->gm_frag_max, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&btl->gm_frag_user, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&btl->gm_pending, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&btl->gm_pending, opal_list_t);
|
||||
OBJ_CONSTRUCT(&btl->gm_lock, ompi_mutex_t);
|
||||
|
||||
/* query nic tokens */
|
||||
|
@ -53,7 +53,7 @@ static void mca_btl_gm_endpoint_destruct(mca_btl_base_endpoint_t* endpoint)
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_btl_gm_endpoint_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
mca_btl_gm_endpoint_construct,
|
||||
mca_btl_gm_endpoint_destruct);
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef MCA_BTL_GM_ENDPOINT_H
|
||||
#define MCA_BTL_GM_ENDPOINT_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/pml/pml.h"
|
||||
#include "mca/btl/btl.h"
|
||||
@ -51,7 +51,7 @@ typedef struct mca_btl_gm_addr_t mca_btl_gm_addr_t;
|
||||
*/
|
||||
|
||||
struct mca_btl_base_endpoint_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
struct mca_btl_gm_module_t* endpoint_btl;
|
||||
/**< BTL instance that created this connection */
|
||||
|
@ -66,7 +66,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
||||
#define MCA_BTL_GM_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_eager, item, rc); \
|
||||
frag = (mca_btl_gm_frag_t*) item; \
|
||||
}
|
||||
@ -74,13 +74,13 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
||||
#define MCA_BTL_GM_FRAG_RETURN_EAGER(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_gm_module_t*)btl)->gm_frag_eager, \
|
||||
(ompi_list_item_t*)(frag)); \
|
||||
(opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#define MCA_BTL_GM_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_max, item, rc); \
|
||||
frag = (mca_btl_gm_frag_t*) item; \
|
||||
}
|
||||
@ -88,13 +88,13 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
||||
#define MCA_BTL_GM_FRAG_RETURN_MAX(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_gm_module_t*)btl)->gm_frag_max, \
|
||||
(ompi_list_item_t*)(frag)); \
|
||||
(opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_GM_FRAG_ALLOC_USER(btl, frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_user, item, rc); \
|
||||
frag = (mca_btl_gm_frag_t*) item; \
|
||||
}
|
||||
@ -102,7 +102,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
||||
#define MCA_BTL_GM_FRAG_RETURN_USER(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_gm_module_t*)btl)->gm_frag_user, \
|
||||
(ompi_list_item_t*)(frag)); \
|
||||
(opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ static void mca_btl_gm_proc_construct(mca_btl_gm_proc_t* proc);
|
||||
static void mca_btl_gm_proc_destruct(mca_btl_gm_proc_t* proc);
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_btl_gm_proc_t,
|
||||
ompi_list_item_t, mca_btl_gm_proc_construct,
|
||||
opal_list_item_t, mca_btl_gm_proc_construct,
|
||||
mca_btl_gm_proc_destruct);
|
||||
|
||||
void mca_btl_gm_proc_construct(mca_btl_gm_proc_t* proc)
|
||||
@ -38,7 +38,7 @@ void mca_btl_gm_proc_construct(mca_btl_gm_proc_t* proc)
|
||||
OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t);
|
||||
/* add to list of all proc instance */
|
||||
OMPI_THREAD_LOCK(&mca_btl_gm_component.gm_lock);
|
||||
ompi_list_append(&mca_btl_gm_component.gm_procs, &proc->super);
|
||||
opal_list_append(&mca_btl_gm_component.gm_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_gm_component.gm_lock);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ void mca_btl_gm_proc_destruct(mca_btl_gm_proc_t* proc)
|
||||
{
|
||||
/* remove from list of all proc instances */
|
||||
OMPI_THREAD_LOCK(&mca_btl_gm_component.gm_lock);
|
||||
ompi_list_remove_item(&mca_btl_gm_component.gm_procs, &proc->super);
|
||||
opal_list_remove_item(&mca_btl_gm_component.gm_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_gm_component.gm_lock);
|
||||
|
||||
/* release resources */
|
||||
@ -71,10 +71,10 @@ static mca_btl_gm_proc_t* mca_btl_gm_proc_lookup_ompi(ompi_proc_t* ompi_proc)
|
||||
OMPI_THREAD_LOCK(&mca_btl_gm_component.gm_lock);
|
||||
|
||||
for(gm_proc = (mca_btl_gm_proc_t*)
|
||||
ompi_list_get_first(&mca_btl_gm_component.gm_procs);
|
||||
opal_list_get_first(&mca_btl_gm_component.gm_procs);
|
||||
gm_proc != (mca_btl_gm_proc_t*)
|
||||
ompi_list_get_end(&mca_btl_gm_component.gm_procs);
|
||||
gm_proc = (mca_btl_gm_proc_t*)ompi_list_get_next(gm_proc)) {
|
||||
opal_list_get_end(&mca_btl_gm_component.gm_procs);
|
||||
gm_proc = (mca_btl_gm_proc_t*)opal_list_get_next(gm_proc)) {
|
||||
|
||||
if(gm_proc->proc_ompi == ompi_proc) {
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_gm_component.gm_lock);
|
||||
|
@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_proc_t);
|
||||
* BTL instance that attempts to open a connection to the process.
|
||||
*/
|
||||
struct mca_btl_gm_proc_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
/**< allow proc to be placed on a list */
|
||||
|
||||
ompi_proc_t *proc_ompi;
|
||||
|
@ -267,7 +267,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src(
|
||||
}
|
||||
|
||||
if(is_leave_pinned) {
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)){
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)){
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
@ -296,15 +296,15 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src(
|
||||
OBJ_RETAIN(vapi_reg);
|
||||
if(is_leave_pinned) {
|
||||
vapi_reg->is_leave_pinned = is_leave_pinned;
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
}
|
||||
else if(is_leave_pinned) {
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) {
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
|
||||
frag->mem_hndl = vapi_reg->hndl;
|
||||
@ -345,11 +345,11 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src(
|
||||
|
||||
|
||||
if(mca_btl_mvapi_component.leave_pinned) {
|
||||
if(mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) {
|
||||
if(mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) {
|
||||
|
||||
mca_mpool_mvapi_registration_t* old_reg =
|
||||
(mca_mpool_mvapi_registration_t*)
|
||||
ompi_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
opal_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
|
||||
if( NULL == old_reg) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
@ -383,7 +383,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src(
|
||||
|
||||
vapi_reg->is_leave_pinned = true;
|
||||
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
|
||||
} else {
|
||||
mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool,
|
||||
@ -522,7 +522,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst(
|
||||
}
|
||||
|
||||
if(is_leave_pinned) {
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) {
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
@ -549,27 +549,27 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst(
|
||||
|
||||
if(is_leave_pinned) {
|
||||
vapi_reg->is_leave_pinned = is_leave_pinned;
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
|
||||
}
|
||||
else if(is_leave_pinned){
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) {
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
} else {
|
||||
|
||||
if(mca_btl_mvapi_component.leave_pinned) {
|
||||
|
||||
|
||||
if( mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) {
|
||||
if( mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) {
|
||||
|
||||
mca_mpool_mvapi_registration_t* old_reg =
|
||||
(mca_mpool_mvapi_registration_t*)
|
||||
ompi_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
opal_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
|
||||
if( NULL == old_reg) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
@ -603,7 +603,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst(
|
||||
}
|
||||
|
||||
OBJ_RETAIN(vapi_reg);
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
|
||||
} else {
|
||||
mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool,
|
||||
@ -641,36 +641,36 @@ int mca_btl_mvapi_finalize(struct mca_btl_base_module_t* btl)
|
||||
mvapi_btl = (mca_btl_mvapi_module_t*) btl;
|
||||
|
||||
if(mvapi_btl->send_free_eager.fl_num_allocated !=
|
||||
mvapi_btl->send_free_eager.super.ompi_list_length){
|
||||
mvapi_btl->send_free_eager.super.opal_list_length){
|
||||
ompi_output(0, "btl ib send_free_eager frags: %d allocated %d returned \n",
|
||||
mvapi_btl->send_free_eager.fl_num_allocated,
|
||||
mvapi_btl->send_free_eager.super.ompi_list_length);
|
||||
mvapi_btl->send_free_eager.super.opal_list_length);
|
||||
}
|
||||
if(mvapi_btl->send_free_max.fl_num_allocated !=
|
||||
mvapi_btl->send_free_max.super.ompi_list_length){
|
||||
mvapi_btl->send_free_max.super.opal_list_length){
|
||||
ompi_output(0, "btl ib send_free_max frags: %d allocated %d returned \n",
|
||||
mvapi_btl->send_free_max.fl_num_allocated,
|
||||
mvapi_btl->send_free_max.super.ompi_list_length);
|
||||
mvapi_btl->send_free_max.super.opal_list_length);
|
||||
}
|
||||
if(mvapi_btl->send_free_frag.fl_num_allocated !=
|
||||
mvapi_btl->send_free_frag.super.ompi_list_length){
|
||||
mvapi_btl->send_free_frag.super.opal_list_length){
|
||||
ompi_output(0, "btl ib send_free_frag frags: %d allocated %d returned \n",
|
||||
mvapi_btl->send_free_frag.fl_num_allocated,
|
||||
mvapi_btl->send_free_frag.super.ompi_list_length);
|
||||
mvapi_btl->send_free_frag.super.opal_list_length);
|
||||
}
|
||||
|
||||
if(mvapi_btl->recv_free_eager.fl_num_allocated !=
|
||||
mvapi_btl->recv_free_eager.super.ompi_list_length){
|
||||
mvapi_btl->recv_free_eager.super.opal_list_length){
|
||||
ompi_output(0, "btl ib recv_free_eager frags: %d allocated %d returned \n",
|
||||
mvapi_btl->recv_free_eager.fl_num_allocated,
|
||||
mvapi_btl->recv_free_eager.super.ompi_list_length);
|
||||
mvapi_btl->recv_free_eager.super.opal_list_length);
|
||||
}
|
||||
|
||||
if(mvapi_btl->recv_free_max.fl_num_allocated !=
|
||||
mvapi_btl->recv_free_max.super.ompi_list_length){
|
||||
mvapi_btl->recv_free_max.super.opal_list_length){
|
||||
ompi_output(0, "btl ib recv_free_max frags: %d allocated %d returned \n",
|
||||
mvapi_btl->recv_free_max.fl_num_allocated,
|
||||
mvapi_btl->recv_free_max.super.ompi_list_length);
|
||||
mvapi_btl->recv_free_max.super.opal_list_length);
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -65,7 +65,7 @@ struct mca_btl_mvapi_component_t {
|
||||
int ib_free_list_inc;
|
||||
/**< number of elements to alloc when growing free lists */
|
||||
|
||||
ompi_list_t ib_procs;
|
||||
opal_list_t ib_procs;
|
||||
/**< list of ib proc structures */
|
||||
|
||||
ompi_event_t ib_send_event;
|
||||
@ -130,10 +130,10 @@ struct mca_btl_mvapi_module_t {
|
||||
ompi_free_list_t recv_free_eager; /**< High priority free list of buffer descriptors */
|
||||
ompi_free_list_t recv_free_max; /**< Low priority free list of buffer descriptors */
|
||||
|
||||
ompi_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t
|
||||
opal_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t
|
||||
entries, this allows us to keep a working set of memory pinned */
|
||||
|
||||
ompi_list_t repost; /**< list of buffers to repost */
|
||||
opal_list_t repost; /**< list of buffers to repost */
|
||||
ompi_mutex_t ib_lock; /**< module level lock */
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ int mca_btl_mvapi_component_open(void)
|
||||
mca_btl_mvapi_component.mvapi_btls=NULL;
|
||||
|
||||
/* initialize objects */
|
||||
OBJ_CONSTRUCT(&mca_btl_mvapi_component.ib_procs, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mvapi_component.ib_procs, opal_list_t);
|
||||
/* OBJ_CONSTRUCT (&mca_btl_mvapi_component.ib_recv_frags, ompi_free_list_t); */
|
||||
|
||||
/* register IB component parameters */
|
||||
@ -250,10 +250,10 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules,
|
||||
mca_btl_base_module_t** btls;
|
||||
uint32_t i,j, length;
|
||||
struct mca_mpool_base_resources_t hca_pd;
|
||||
ompi_list_t btl_list;
|
||||
opal_list_t btl_list;
|
||||
mca_btl_mvapi_module_t * mvapi_btl;
|
||||
mca_btl_base_selected_module_t* ib_selected;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
/* initialization */
|
||||
*num_btl_modules = 0;
|
||||
|
||||
@ -282,7 +282,7 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules,
|
||||
for each hca we query the number of ports on the hca and set up
|
||||
a distinct btl module for each hca port */
|
||||
|
||||
OBJ_CONSTRUCT(&btl_list, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&btl_list, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mvapi_component.ib_lock, ompi_mutex_t);
|
||||
|
||||
|
||||
@ -320,7 +320,7 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules,
|
||||
mvapi_btl->nic = hca_hndl;
|
||||
mvapi_btl->port_id = (IB_port_t) j;
|
||||
mvapi_btl->port = hca_port;
|
||||
ompi_list_append(&btl_list, (ompi_list_item_t*) ib_selected);
|
||||
opal_list_append(&btl_list, (opal_list_item_t*) ib_selected);
|
||||
mca_btl_mvapi_component.ib_num_btls ++;
|
||||
|
||||
}
|
||||
@ -347,7 +347,7 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules,
|
||||
|
||||
|
||||
for(i = 0; i < mca_btl_mvapi_component.ib_num_btls; i++){
|
||||
item = ompi_list_remove_first(&btl_list);
|
||||
item = opal_list_remove_first(&btl_list);
|
||||
ib_selected = (mca_btl_base_selected_module_t*)item;
|
||||
mvapi_btl = (mca_btl_mvapi_module_t*) ib_selected->btl_module;
|
||||
memcpy(&(mca_btl_mvapi_component.mvapi_btls[i]), mvapi_btl , sizeof(mca_btl_mvapi_module_t));
|
||||
@ -370,8 +370,8 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules,
|
||||
OBJ_CONSTRUCT(&mvapi_btl->recv_free_max, ompi_free_list_t);
|
||||
|
||||
|
||||
OBJ_CONSTRUCT(&mvapi_btl->repost, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mvapi_btl->repost, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, opal_list_t);
|
||||
|
||||
|
||||
|
||||
@ -532,7 +532,7 @@ int mca_btl_mvapi_component_progress()
|
||||
/* advance the segment address past the header and subtract from the length..*/
|
||||
mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata);
|
||||
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (ompi_list_item_t*) frag);
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (opal_list_item_t*) frag);
|
||||
OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_high, -1);
|
||||
|
||||
mca_btl_mvapi_endpoint_post_rr(((mca_btl_mvapi_frag_t*)comp.id)->endpoint, 0);
|
||||
@ -578,7 +578,7 @@ int mca_btl_mvapi_component_progress()
|
||||
/* advance the segment address past the header and subtract from the length..*/
|
||||
mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata);
|
||||
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (ompi_list_item_t*) frag);
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (opal_list_item_t*) frag);
|
||||
OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_low, -1);
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ static inline int mca_btl_mvapi_endpoint_post_send(mca_btl_mvapi_module_t* mvapi
|
||||
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_btl_mvapi_endpoint_t,
|
||||
ompi_list_item_t, mca_btl_mvapi_endpoint_construct,
|
||||
opal_list_item_t, mca_btl_mvapi_endpoint_construct,
|
||||
mca_btl_mvapi_endpoint_destruct);
|
||||
|
||||
/*
|
||||
@ -113,7 +113,7 @@ static void mca_btl_mvapi_endpoint_construct(mca_btl_base_endpoint_t* endpoint)
|
||||
endpoint->endpoint_retries = 0;
|
||||
OBJ_CONSTRUCT(&endpoint->endpoint_send_lock, ompi_mutex_t);
|
||||
OBJ_CONSTRUCT(&endpoint->endpoint_recv_lock, ompi_mutex_t);
|
||||
OBJ_CONSTRUCT(&endpoint->pending_send_frags, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&endpoint->pending_send_frags, opal_list_t);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -413,10 +413,10 @@ static void mca_btl_mvapi_endpoint_recv(
|
||||
int rc;
|
||||
|
||||
for(ib_proc = (mca_btl_mvapi_proc_t*)
|
||||
ompi_list_get_first(&mca_btl_mvapi_component.ib_procs);
|
||||
opal_list_get_first(&mca_btl_mvapi_component.ib_procs);
|
||||
ib_proc != (mca_btl_mvapi_proc_t*)
|
||||
ompi_list_get_end(&mca_btl_mvapi_component.ib_procs);
|
||||
ib_proc = (mca_btl_mvapi_proc_t*)ompi_list_get_next(ib_proc)) {
|
||||
opal_list_get_end(&mca_btl_mvapi_component.ib_procs);
|
||||
ib_proc = (mca_btl_mvapi_proc_t*)opal_list_get_next(ib_proc)) {
|
||||
|
||||
if(ib_proc->proc_guid.vpid == endpoint->vpid) {
|
||||
|
||||
@ -517,8 +517,8 @@ int mca_btl_mvapi_endpoint_send(
|
||||
|
||||
DEBUG_OUT("Queing because state is connecting");
|
||||
|
||||
ompi_list_append(&endpoint->pending_send_frags,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_append(&endpoint->pending_send_frags,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
rc = OMPI_SUCCESS;
|
||||
break;
|
||||
@ -527,8 +527,8 @@ int mca_btl_mvapi_endpoint_send(
|
||||
|
||||
DEBUG_OUT("Queuing because waiting for ack");
|
||||
|
||||
ompi_list_append(&endpoint->pending_send_frags,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_append(&endpoint->pending_send_frags,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
rc = OMPI_SUCCESS;
|
||||
break;
|
||||
@ -537,8 +537,8 @@ int mca_btl_mvapi_endpoint_send(
|
||||
|
||||
DEBUG_OUT("Connection to endpoint closed ... connecting ...");
|
||||
|
||||
ompi_list_append(&endpoint->pending_send_frags,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_append(&endpoint->pending_send_frags,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
rc = mca_btl_mvapi_endpoint_start_connect(endpoint);
|
||||
|
||||
@ -575,7 +575,7 @@ int mca_btl_mvapi_endpoint_send(
|
||||
|
||||
void mca_btl_mvapi_progress_send_frags(mca_btl_mvapi_endpoint_t* endpoint)
|
||||
{
|
||||
ompi_list_item_t *frag_item;
|
||||
opal_list_item_t *frag_item;
|
||||
mca_btl_mvapi_frag_t *frag;
|
||||
mca_btl_mvapi_module_t* mvapi_btl;
|
||||
/*Check if endpoint is connected */
|
||||
@ -587,8 +587,8 @@ void mca_btl_mvapi_progress_send_frags(mca_btl_mvapi_endpoint_t* endpoint)
|
||||
/* While there are frags in the list,
|
||||
* process them */
|
||||
|
||||
while(!ompi_list_is_empty(&(endpoint->pending_send_frags))) {
|
||||
frag_item = ompi_list_remove_first(&(endpoint->pending_send_frags));
|
||||
while(!opal_list_is_empty(&(endpoint->pending_send_frags))) {
|
||||
frag_item = opal_list_remove_first(&(endpoint->pending_send_frags));
|
||||
frag = (mca_btl_mvapi_frag_t *) frag_item;
|
||||
mvapi_btl = endpoint->endpoint_btl;
|
||||
/* We need to post this one */
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef MCA_BTL_IB_ENDPOINT_H
|
||||
#define MCA_BTL_IB_ENDPOINT_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/pml/pml.h"
|
||||
#include "mca/btl/btl.h"
|
||||
@ -62,7 +62,7 @@ typedef enum {
|
||||
*/
|
||||
|
||||
struct mca_btl_base_endpoint_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
struct mca_btl_mvapi_module_t* endpoint_btl;
|
||||
/**< BTL instance that created this connection */
|
||||
@ -85,7 +85,7 @@ struct mca_btl_base_endpoint_t {
|
||||
ompi_mutex_t endpoint_recv_lock;
|
||||
/**< lock for concurrent access to endpoint state */
|
||||
|
||||
ompi_list_t pending_send_frags;
|
||||
opal_list_t pending_send_frags;
|
||||
/**< list of pending send frags for this endpoint */
|
||||
|
||||
VAPI_qp_num_t rem_qp_num_high;
|
||||
@ -131,7 +131,7 @@ static inline int mca_btl_mvapi_endpoint_post_rr_sub(int cnt,
|
||||
{
|
||||
|
||||
int rc, i;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
mca_btl_mvapi_frag_t* frag;
|
||||
mca_btl_mvapi_module_t *mvapi_btl = endpoint->endpoint_btl;
|
||||
VAPI_rr_desc_t* rr_desc_post = mvapi_btl->rr_desc_post;
|
||||
|
@ -99,42 +99,42 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_recv_frag_max_t);
|
||||
#define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, item, rc); \
|
||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_IB_FRAG_RETURN_EAGER(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_max, item, rc); \
|
||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_IB_FRAG_RETURN_MAX(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_max, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_max, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, item, rc); \
|
||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_IB_FRAG_RETURN_FRAG(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ static void mca_btl_mvapi_proc_construct(mca_btl_mvapi_proc_t* proc);
|
||||
static void mca_btl_mvapi_proc_destruct(mca_btl_mvapi_proc_t* proc);
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_btl_mvapi_proc_t,
|
||||
ompi_list_item_t, mca_btl_mvapi_proc_construct,
|
||||
opal_list_item_t, mca_btl_mvapi_proc_construct,
|
||||
mca_btl_mvapi_proc_destruct);
|
||||
|
||||
void mca_btl_mvapi_proc_construct(mca_btl_mvapi_proc_t* proc)
|
||||
@ -38,7 +38,7 @@ void mca_btl_mvapi_proc_construct(mca_btl_mvapi_proc_t* proc)
|
||||
OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t);
|
||||
/* add to list of all proc instance */
|
||||
OMPI_THREAD_LOCK(&mca_btl_mvapi_component.ib_lock);
|
||||
ompi_list_append(&mca_btl_mvapi_component.ib_procs, &proc->super);
|
||||
opal_list_append(&mca_btl_mvapi_component.ib_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_mvapi_component.ib_lock);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ void mca_btl_mvapi_proc_destruct(mca_btl_mvapi_proc_t* proc)
|
||||
{
|
||||
/* remove from list of all proc instances */
|
||||
OMPI_THREAD_LOCK(&mca_btl_mvapi_component.ib_lock);
|
||||
ompi_list_remove_item(&mca_btl_mvapi_component.ib_procs, &proc->super);
|
||||
opal_list_remove_item(&mca_btl_mvapi_component.ib_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_mvapi_component.ib_lock);
|
||||
|
||||
/* release resources */
|
||||
@ -71,10 +71,10 @@ static mca_btl_mvapi_proc_t* mca_btl_mvapi_proc_lookup_ompi(ompi_proc_t* ompi_pr
|
||||
OMPI_THREAD_LOCK(&mca_btl_mvapi_component.ib_lock);
|
||||
|
||||
for(ib_proc = (mca_btl_mvapi_proc_t*)
|
||||
ompi_list_get_first(&mca_btl_mvapi_component.ib_procs);
|
||||
opal_list_get_first(&mca_btl_mvapi_component.ib_procs);
|
||||
ib_proc != (mca_btl_mvapi_proc_t*)
|
||||
ompi_list_get_end(&mca_btl_mvapi_component.ib_procs);
|
||||
ib_proc = (mca_btl_mvapi_proc_t*)ompi_list_get_next(ib_proc)) {
|
||||
opal_list_get_end(&mca_btl_mvapi_component.ib_procs);
|
||||
ib_proc = (mca_btl_mvapi_proc_t*)opal_list_get_next(ib_proc)) {
|
||||
|
||||
if(ib_proc->proc_ompi == ompi_proc) {
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_mvapi_component.ib_lock);
|
||||
|
@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_proc_t);
|
||||
* BTL instance that attempts to open a connection to the process.
|
||||
*/
|
||||
struct mca_btl_mvapi_proc_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
/**< allow proc to be placed on a list */
|
||||
|
||||
ompi_proc_t *proc_ompi;
|
||||
|
@ -267,7 +267,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
|
||||
}
|
||||
|
||||
if(is_leave_pinned) {
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)){
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)){
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
@ -296,15 +296,15 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
|
||||
OBJ_RETAIN(vapi_reg);
|
||||
if(is_leave_pinned) {
|
||||
vapi_reg->is_leave_pinned = is_leave_pinned;
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
}
|
||||
else if(is_leave_pinned) {
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) {
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
|
||||
frag->mem_hndl = vapi_reg->hndl;
|
||||
@ -345,11 +345,11 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
|
||||
|
||||
|
||||
if(mca_btl_openib_component.leave_pinned) {
|
||||
if(mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) {
|
||||
if(mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) {
|
||||
|
||||
mca_mpool_mvapi_registration_t* old_reg =
|
||||
(mca_mpool_mvapi_registration_t*)
|
||||
ompi_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
opal_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
|
||||
if( NULL == old_reg) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
@ -383,7 +383,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
|
||||
|
||||
vapi_reg->is_leave_pinned = true;
|
||||
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
|
||||
} else {
|
||||
mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool,
|
||||
@ -522,7 +522,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
|
||||
}
|
||||
|
||||
if(is_leave_pinned) {
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) {
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
@ -549,27 +549,27 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
|
||||
|
||||
if(is_leave_pinned) {
|
||||
vapi_reg->is_leave_pinned = is_leave_pinned;
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
|
||||
}
|
||||
else if(is_leave_pinned){
|
||||
if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) {
|
||||
if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
return NULL;
|
||||
}
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
}
|
||||
} else {
|
||||
|
||||
if(mca_btl_openib_component.leave_pinned) {
|
||||
|
||||
|
||||
if( mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) {
|
||||
if( mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) {
|
||||
|
||||
mca_mpool_mvapi_registration_t* old_reg =
|
||||
(mca_mpool_mvapi_registration_t*)
|
||||
ompi_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
opal_list_remove_last(&mvapi_btl->reg_mru_list);
|
||||
|
||||
if( NULL == old_reg) {
|
||||
ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__);
|
||||
@ -603,7 +603,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
|
||||
}
|
||||
|
||||
OBJ_RETAIN(vapi_reg);
|
||||
ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg);
|
||||
opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg);
|
||||
|
||||
} else {
|
||||
mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool,
|
||||
@ -641,36 +641,36 @@ int mca_btl_openib_finalize(struct mca_btl_base_module_t* btl)
|
||||
mvapi_btl = (mca_btl_openib_module_t*) btl;
|
||||
|
||||
if(mvapi_btl->send_free_eager.fl_num_allocated !=
|
||||
mvapi_btl->send_free_eager.super.ompi_list_length){
|
||||
mvapi_btl->send_free_eager.super.opal_list_length){
|
||||
ompi_output(0, "btl ib send_free_eager frags: %d allocated %d returned \n",
|
||||
mvapi_btl->send_free_eager.fl_num_allocated,
|
||||
mvapi_btl->send_free_eager.super.ompi_list_length);
|
||||
mvapi_btl->send_free_eager.super.opal_list_length);
|
||||
}
|
||||
if(mvapi_btl->send_free_max.fl_num_allocated !=
|
||||
mvapi_btl->send_free_max.super.ompi_list_length){
|
||||
mvapi_btl->send_free_max.super.opal_list_length){
|
||||
ompi_output(0, "btl ib send_free_max frags: %d allocated %d returned \n",
|
||||
mvapi_btl->send_free_max.fl_num_allocated,
|
||||
mvapi_btl->send_free_max.super.ompi_list_length);
|
||||
mvapi_btl->send_free_max.super.opal_list_length);
|
||||
}
|
||||
if(mvapi_btl->send_free_frag.fl_num_allocated !=
|
||||
mvapi_btl->send_free_frag.super.ompi_list_length){
|
||||
mvapi_btl->send_free_frag.super.opal_list_length){
|
||||
ompi_output(0, "btl ib send_free_frag frags: %d allocated %d returned \n",
|
||||
mvapi_btl->send_free_frag.fl_num_allocated,
|
||||
mvapi_btl->send_free_frag.super.ompi_list_length);
|
||||
mvapi_btl->send_free_frag.super.opal_list_length);
|
||||
}
|
||||
|
||||
if(mvapi_btl->recv_free_eager.fl_num_allocated !=
|
||||
mvapi_btl->recv_free_eager.super.ompi_list_length){
|
||||
mvapi_btl->recv_free_eager.super.opal_list_length){
|
||||
ompi_output(0, "btl ib recv_free_eager frags: %d allocated %d returned \n",
|
||||
mvapi_btl->recv_free_eager.fl_num_allocated,
|
||||
mvapi_btl->recv_free_eager.super.ompi_list_length);
|
||||
mvapi_btl->recv_free_eager.super.opal_list_length);
|
||||
}
|
||||
|
||||
if(mvapi_btl->recv_free_max.fl_num_allocated !=
|
||||
mvapi_btl->recv_free_max.super.ompi_list_length){
|
||||
mvapi_btl->recv_free_max.super.opal_list_length){
|
||||
ompi_output(0, "btl ib recv_free_max frags: %d allocated %d returned \n",
|
||||
mvapi_btl->recv_free_max.fl_num_allocated,
|
||||
mvapi_btl->recv_free_max.super.ompi_list_length);
|
||||
mvapi_btl->recv_free_max.super.opal_list_length);
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -65,7 +65,7 @@ struct mca_btl_openib_component_t {
|
||||
int ib_free_list_inc;
|
||||
/**< number of elements to alloc when growing free lists */
|
||||
|
||||
ompi_list_t ib_procs;
|
||||
opal_list_t ib_procs;
|
||||
/**< list of ib proc structures */
|
||||
|
||||
ompi_event_t ib_send_event;
|
||||
@ -132,10 +132,10 @@ struct mca_btl_openib_module_t {
|
||||
ompi_free_list_t recv_free_eager; /**< High priority free list of buffer descriptors */
|
||||
ompi_free_list_t recv_free_max; /**< Low priority free list of buffer descriptors */
|
||||
|
||||
ompi_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t
|
||||
opal_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t
|
||||
entries, this allows us to keep a working set of memory pinned */
|
||||
|
||||
ompi_list_t repost; /**< list of buffers to repost */
|
||||
opal_list_t repost; /**< list of buffers to repost */
|
||||
ompi_mutex_t ib_lock; /**< module level lock */
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ int mca_btl_openib_component_open(void)
|
||||
mca_btl_openib_component.mvapi_btls=NULL;
|
||||
|
||||
/* initialize objects */
|
||||
OBJ_CONSTRUCT(&mca_btl_openib_component.ib_procs, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_openib_component.ib_procs, opal_list_t);
|
||||
/* OBJ_CONSTRUCT (&mca_btl_openib_component.ib_recv_frags, ompi_free_list_t); */
|
||||
|
||||
/* register IB component parameters */
|
||||
@ -251,10 +251,10 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
|
||||
mca_btl_base_module_t** btls;
|
||||
uint32_t i,j, length;
|
||||
struct mca_mpool_base_resources_t hca_pd;
|
||||
ompi_list_t btl_list;
|
||||
opal_list_t btl_list;
|
||||
mca_btl_openib_module_t * mvapi_btl;
|
||||
mca_btl_base_selected_module_t* ib_selected;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
/* initialization */
|
||||
*num_btl_modules = 0;
|
||||
num_devs = 0;
|
||||
@ -293,7 +293,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
|
||||
for each hca we query the number of ports on the hca and set up
|
||||
a distinct btl module for each hca port */
|
||||
|
||||
OBJ_CONSTRUCT(&btl_list, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&btl_list, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_openib_component.ib_lock, ompi_mutex_t);
|
||||
|
||||
|
||||
@ -329,7 +329,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
|
||||
mvapi_btl->nic = hca_hndl;
|
||||
mvapi_btl->port_id = (IB_port_t) j;
|
||||
mvapi_btl->port = hca_port;
|
||||
ompi_list_append(&btl_list, (ompi_list_item_t*) ib_selected);
|
||||
opal_list_append(&btl_list, (opal_list_item_t*) ib_selected);
|
||||
mca_btl_openib_component.ib_num_btls ++;
|
||||
|
||||
}
|
||||
@ -356,7 +356,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
|
||||
|
||||
|
||||
for(i = 0; i < mca_btl_openib_component.ib_num_btls; i++){
|
||||
item = ompi_list_remove_first(&btl_list);
|
||||
item = opal_list_remove_first(&btl_list);
|
||||
ib_selected = (mca_btl_base_selected_module_t*)item;
|
||||
mvapi_btl = (mca_btl_openib_module_t*) ib_selected->btl_module;
|
||||
memcpy(&(mca_btl_openib_component.mvapi_btls[i]), mvapi_btl , sizeof(mca_btl_openib_module_t));
|
||||
@ -379,8 +379,8 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
|
||||
OBJ_CONSTRUCT(&mvapi_btl->recv_free_max, ompi_free_list_t);
|
||||
|
||||
|
||||
OBJ_CONSTRUCT(&mvapi_btl->repost, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mvapi_btl->repost, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, opal_list_t);
|
||||
|
||||
|
||||
|
||||
@ -541,7 +541,7 @@ int mca_btl_openib_component_progress()
|
||||
/* advance the segment address past the header and subtract from the length..*/
|
||||
mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata);
|
||||
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (ompi_list_item_t*) frag);
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (opal_list_item_t*) frag);
|
||||
OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_high, -1);
|
||||
|
||||
mca_btl_openib_endpoint_post_rr(((mca_btl_openib_frag_t*)comp.id)->endpoint, 0);
|
||||
@ -587,7 +587,7 @@ int mca_btl_openib_component_progress()
|
||||
/* advance the segment address past the header and subtract from the length..*/
|
||||
mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata);
|
||||
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (ompi_list_item_t*) frag);
|
||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (opal_list_item_t*) frag);
|
||||
OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_low, -1);
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ static inline int mca_btl_openib_endpoint_post_send(mca_btl_openib_module_t* mva
|
||||
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_btl_openib_endpoint_t,
|
||||
ompi_list_item_t, mca_btl_openib_endpoint_construct,
|
||||
opal_list_item_t, mca_btl_openib_endpoint_construct,
|
||||
mca_btl_openib_endpoint_destruct);
|
||||
|
||||
/*
|
||||
@ -113,7 +113,7 @@ static void mca_btl_openib_endpoint_construct(mca_btl_base_endpoint_t* endpoint)
|
||||
endpoint->endpoint_retries = 0;
|
||||
OBJ_CONSTRUCT(&endpoint->endpoint_send_lock, ompi_mutex_t);
|
||||
OBJ_CONSTRUCT(&endpoint->endpoint_recv_lock, ompi_mutex_t);
|
||||
OBJ_CONSTRUCT(&endpoint->pending_send_frags, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&endpoint->pending_send_frags, opal_list_t);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -413,10 +413,10 @@ static void mca_btl_openib_endpoint_recv(
|
||||
int rc;
|
||||
|
||||
for(ib_proc = (mca_btl_openib_proc_t*)
|
||||
ompi_list_get_first(&mca_btl_openib_component.ib_procs);
|
||||
opal_list_get_first(&mca_btl_openib_component.ib_procs);
|
||||
ib_proc != (mca_btl_openib_proc_t*)
|
||||
ompi_list_get_end(&mca_btl_openib_component.ib_procs);
|
||||
ib_proc = (mca_btl_openib_proc_t*)ompi_list_get_next(ib_proc)) {
|
||||
opal_list_get_end(&mca_btl_openib_component.ib_procs);
|
||||
ib_proc = (mca_btl_openib_proc_t*)opal_list_get_next(ib_proc)) {
|
||||
|
||||
if(ib_proc->proc_guid.vpid == endpoint->vpid) {
|
||||
|
||||
@ -517,8 +517,8 @@ int mca_btl_openib_endpoint_send(
|
||||
|
||||
DEBUG_OUT("Queing because state is connecting");
|
||||
|
||||
ompi_list_append(&endpoint->pending_send_frags,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_append(&endpoint->pending_send_frags,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
rc = OMPI_SUCCESS;
|
||||
break;
|
||||
@ -527,8 +527,8 @@ int mca_btl_openib_endpoint_send(
|
||||
|
||||
DEBUG_OUT("Queuing because waiting for ack");
|
||||
|
||||
ompi_list_append(&endpoint->pending_send_frags,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_append(&endpoint->pending_send_frags,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
rc = OMPI_SUCCESS;
|
||||
break;
|
||||
@ -537,8 +537,8 @@ int mca_btl_openib_endpoint_send(
|
||||
|
||||
DEBUG_OUT("Connection to endpoint closed ... connecting ...");
|
||||
|
||||
ompi_list_append(&endpoint->pending_send_frags,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_append(&endpoint->pending_send_frags,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
rc = mca_btl_openib_endpoint_start_connect(endpoint);
|
||||
|
||||
@ -575,7 +575,7 @@ int mca_btl_openib_endpoint_send(
|
||||
|
||||
void mca_btl_openib_progress_send_frags(mca_btl_openib_endpoint_t* endpoint)
|
||||
{
|
||||
ompi_list_item_t *frag_item;
|
||||
opal_list_item_t *frag_item;
|
||||
mca_btl_openib_frag_t *frag;
|
||||
mca_btl_openib_module_t* mvapi_btl;
|
||||
/*Check if endpoint is connected */
|
||||
@ -587,8 +587,8 @@ void mca_btl_openib_progress_send_frags(mca_btl_openib_endpoint_t* endpoint)
|
||||
/* While there are frags in the list,
|
||||
* process them */
|
||||
|
||||
while(!ompi_list_is_empty(&(endpoint->pending_send_frags))) {
|
||||
frag_item = ompi_list_remove_first(&(endpoint->pending_send_frags));
|
||||
while(!opal_list_is_empty(&(endpoint->pending_send_frags))) {
|
||||
frag_item = opal_list_remove_first(&(endpoint->pending_send_frags));
|
||||
frag = (mca_btl_openib_frag_t *) frag_item;
|
||||
mvapi_btl = endpoint->endpoint_btl;
|
||||
/* We need to post this one */
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef MCA_BTL_IB_ENDPOINT_H
|
||||
#define MCA_BTL_IB_ENDPOINT_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/pml/pml.h"
|
||||
#include "mca/btl/btl.h"
|
||||
@ -62,7 +62,7 @@ typedef enum {
|
||||
*/
|
||||
|
||||
struct mca_btl_base_endpoint_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
struct mca_btl_openib_module_t* endpoint_btl;
|
||||
/**< BTL instance that created this connection */
|
||||
@ -85,7 +85,7 @@ struct mca_btl_base_endpoint_t {
|
||||
ompi_mutex_t endpoint_recv_lock;
|
||||
/**< lock for concurrent access to endpoint state */
|
||||
|
||||
ompi_list_t pending_send_frags;
|
||||
opal_list_t pending_send_frags;
|
||||
/**< list of pending send frags for this endpoint */
|
||||
|
||||
VAPI_qp_num_t rem_qp_num_high;
|
||||
@ -131,7 +131,7 @@ static inline int mca_btl_openib_endpoint_post_rr_sub(int cnt,
|
||||
{
|
||||
|
||||
int rc, i;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
mca_btl_openib_frag_t* frag;
|
||||
mca_btl_openib_module_t *mvapi_btl = endpoint->endpoint_btl;
|
||||
VAPI_rr_desc_t* rr_desc_post = mvapi_btl->rr_desc_post;
|
||||
|
@ -99,42 +99,42 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_recv_frag_max_t);
|
||||
#define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_eager, item, rc); \
|
||||
frag = (mca_btl_openib_frag_t*) item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_IB_FRAG_RETURN_EAGER(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_eager, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_eager, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_max, item, rc); \
|
||||
frag = (mca_btl_openib_frag_t*) item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_IB_FRAG_RETURN_MAX(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_max, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_max, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_frag, item, rc); \
|
||||
frag = (mca_btl_openib_frag_t*) item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_IB_FRAG_RETURN_FRAG(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_frag, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_frag, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ static void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc);
|
||||
static void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc);
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_btl_openib_proc_t,
|
||||
ompi_list_item_t, mca_btl_openib_proc_construct,
|
||||
opal_list_item_t, mca_btl_openib_proc_construct,
|
||||
mca_btl_openib_proc_destruct);
|
||||
|
||||
void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc)
|
||||
@ -38,7 +38,7 @@ void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc)
|
||||
OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t);
|
||||
/* add to list of all proc instance */
|
||||
OMPI_THREAD_LOCK(&mca_btl_openib_component.ib_lock);
|
||||
ompi_list_append(&mca_btl_openib_component.ib_procs, &proc->super);
|
||||
opal_list_append(&mca_btl_openib_component.ib_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc)
|
||||
{
|
||||
/* remove from list of all proc instances */
|
||||
OMPI_THREAD_LOCK(&mca_btl_openib_component.ib_lock);
|
||||
ompi_list_remove_item(&mca_btl_openib_component.ib_procs, &proc->super);
|
||||
opal_list_remove_item(&mca_btl_openib_component.ib_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
||||
|
||||
/* release resources */
|
||||
@ -71,10 +71,10 @@ static mca_btl_openib_proc_t* mca_btl_openib_proc_lookup_ompi(ompi_proc_t* ompi_
|
||||
OMPI_THREAD_LOCK(&mca_btl_openib_component.ib_lock);
|
||||
|
||||
for(ib_proc = (mca_btl_openib_proc_t*)
|
||||
ompi_list_get_first(&mca_btl_openib_component.ib_procs);
|
||||
opal_list_get_first(&mca_btl_openib_component.ib_procs);
|
||||
ib_proc != (mca_btl_openib_proc_t*)
|
||||
ompi_list_get_end(&mca_btl_openib_component.ib_procs);
|
||||
ib_proc = (mca_btl_openib_proc_t*)ompi_list_get_next(ib_proc)) {
|
||||
opal_list_get_end(&mca_btl_openib_component.ib_procs);
|
||||
ib_proc = (mca_btl_openib_proc_t*)opal_list_get_next(ib_proc)) {
|
||||
|
||||
if(ib_proc->proc_ompi == ompi_proc) {
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
||||
|
@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_proc_t);
|
||||
* BTL instance that attempts to open a connection to the process.
|
||||
*/
|
||||
struct mca_btl_openib_proc_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
/**< allow proc to be placed on a list */
|
||||
|
||||
ompi_proc_t *proc_ompi;
|
||||
|
@ -46,38 +46,38 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
|
||||
|
||||
#define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_eager, item, rc); \
|
||||
frag = (mca_btl_self_frag_t*)item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SELF_FRAG_RETURN_EAGER(frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_eager, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_eager, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_send, item, rc); \
|
||||
frag = (mca_btl_self_frag_t*)item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SELF_FRAG_RETURN_SEND(frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_send, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_send, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_rdma, item, rc); \
|
||||
frag = (mca_btl_self_frag_t*)item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SELF_FRAG_RETURN_RDMA(frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_rdma, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_rdma, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -56,26 +56,26 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_frag2_t);
|
||||
|
||||
#define MCA_BTL_SM_FRAG_ALLOC1(frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags1, item, rc); \
|
||||
frag = (mca_btl_sm_frag_t*)item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SM_FRAG_ALLOC2(frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags2, item, rc); \
|
||||
frag = (mca_btl_sm_frag_t*)item; \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SM_FRAG_RETURN1(frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags1, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags1, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#define MCA_BTL_SM_FRAG_RETURN2(frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags2, (ompi_list_item_t*)(frag)); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags2, (opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -596,22 +596,22 @@ int mca_btl_template_finalize(struct mca_btl_base_module_t* btl)
|
||||
mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl;
|
||||
|
||||
if(template_btl->template_frag_eager.fl_num_allocated !=
|
||||
template_btl->template_frag_eager.super.ompi_list_length){
|
||||
template_btl->template_frag_eager.super.opal_list_length){
|
||||
ompi_output(0, "btl template_frag_eager: %d allocated %d returned \n",
|
||||
template_btl->template_frag_eager.fl_num_allocated,
|
||||
template_btl->template_frag_eager.super.ompi_list_length);
|
||||
template_btl->template_frag_eager.super.opal_list_length);
|
||||
}
|
||||
if(template_btl->template_frag_max.fl_num_allocated !=
|
||||
template_btl->template_frag_max.super.ompi_list_length) {
|
||||
template_btl->template_frag_max.super.opal_list_length) {
|
||||
ompi_output(0, "btl template_frag_max: %d allocated %d returned \n",
|
||||
template_btl->template_frag_max.fl_num_allocated,
|
||||
template_btl->template_frag_max.super.ompi_list_length);
|
||||
template_btl->template_frag_max.super.opal_list_length);
|
||||
}
|
||||
if(template_btl->template_frag_user.fl_num_allocated !=
|
||||
template_btl->template_frag_user.super.ompi_list_length){
|
||||
template_btl->template_frag_user.super.opal_list_length){
|
||||
ompi_output(0, "btl template_frag_user: %d allocated %d returned \n",
|
||||
template_btl->template_frag_user.fl_num_allocated,
|
||||
template_btl->template_frag_user.super.ompi_list_length);
|
||||
template_btl->template_frag_user.super.opal_list_length);
|
||||
}
|
||||
|
||||
OBJ_DESTRUCT(&template_btl->template_lock);
|
||||
|
@ -63,7 +63,7 @@ struct mca_btl_template_component_t {
|
||||
int template_free_list_inc;
|
||||
/**< number of elements to alloc when growing free lists */
|
||||
|
||||
ompi_list_t template_procs;
|
||||
opal_list_t template_procs;
|
||||
/**< list of template proc structures */
|
||||
|
||||
ompi_mutex_t template_lock;
|
||||
|
@ -104,7 +104,7 @@ int mca_btl_template_component_open(void)
|
||||
mca_btl_template_component.template_btls=NULL;
|
||||
|
||||
/* initialize objects */
|
||||
OBJ_CONSTRUCT(&mca_btl_template_component.template_procs, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_template_component.template_procs, opal_list_t);
|
||||
|
||||
/* register TEMPLATE component parameters */
|
||||
mca_btl_template_component.template_free_list_num =
|
||||
|
@ -53,7 +53,7 @@ static void mca_btl_template_endpoint_destruct(mca_btl_base_endpoint_t* endpoint
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_btl_template_endpoint_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
mca_btl_template_endpoint_construct,
|
||||
mca_btl_template_endpoint_destruct);
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef MCA_BTL_TEMPLATE_ENDPOINT_H
|
||||
#define MCA_BTL_TEMPLATE_ENDPOINT_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/pml/pml.h"
|
||||
#include "mca/btl/btl.h"
|
||||
@ -37,7 +37,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_endpoint_t);
|
||||
*/
|
||||
|
||||
struct mca_btl_base_endpoint_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
struct mca_btl_template_module_t* endpoint_btl;
|
||||
/**< BTL instance that created this connection */
|
||||
|
@ -67,7 +67,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
||||
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_eager, item, rc); \
|
||||
frag = (mca_btl_template_frag_t*) item; \
|
||||
}
|
||||
@ -75,13 +75,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
||||
#define MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_eager, \
|
||||
(ompi_list_item_t*)(frag)); \
|
||||
(opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||
{ \
|
||||
\
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_max, item, rc); \
|
||||
frag = (mca_btl_template_frag_t*) item; \
|
||||
}
|
||||
@ -89,13 +89,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
||||
#define MCA_BTL_TEMPLATE_FRAG_RETURN_MAX(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_max, \
|
||||
(ompi_list_item_t*)(frag)); \
|
||||
(opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_USER(btl, frag, rc) \
|
||||
{ \
|
||||
ompi_list_item_t *item; \
|
||||
opal_list_item_t *item; \
|
||||
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_user, item, rc); \
|
||||
frag = (mca_btl_template_frag_t*) item; \
|
||||
}
|
||||
@ -103,7 +103,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
||||
#define MCA_BTL_TEMPLATE_FRAG_RETURN_USER(btl, frag) \
|
||||
{ \
|
||||
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_user, \
|
||||
(ompi_list_item_t*)(frag)); \
|
||||
(opal_list_item_t*)(frag)); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ static void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc);
|
||||
static void mca_btl_template_proc_destruct(mca_btl_template_proc_t* proc);
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_btl_template_proc_t,
|
||||
ompi_list_item_t, mca_btl_template_proc_construct,
|
||||
opal_list_item_t, mca_btl_template_proc_construct,
|
||||
mca_btl_template_proc_destruct);
|
||||
|
||||
void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc)
|
||||
@ -38,7 +38,7 @@ void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc)
|
||||
OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t);
|
||||
/* add to list of all proc instance */
|
||||
OMPI_THREAD_LOCK(&mca_btl_template_component.template_lock);
|
||||
ompi_list_append(&mca_btl_template_component.template_procs, &proc->super);
|
||||
opal_list_append(&mca_btl_template_component.template_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_template_component.template_lock);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ void mca_btl_template_proc_destruct(mca_btl_template_proc_t* proc)
|
||||
{
|
||||
/* remove from list of all proc instances */
|
||||
OMPI_THREAD_LOCK(&mca_btl_template_component.template_lock);
|
||||
ompi_list_remove_item(&mca_btl_template_component.template_procs, &proc->super);
|
||||
opal_list_remove_item(&mca_btl_template_component.template_procs, &proc->super);
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_template_component.template_lock);
|
||||
|
||||
/* release resources */
|
||||
@ -71,10 +71,10 @@ static mca_btl_template_proc_t* mca_btl_template_proc_lookup_ompi(ompi_proc_t* o
|
||||
OMPI_THREAD_LOCK(&mca_btl_template_component.template_lock);
|
||||
|
||||
for(template_proc = (mca_btl_template_proc_t*)
|
||||
ompi_list_get_first(&mca_btl_template_component.template_procs);
|
||||
opal_list_get_first(&mca_btl_template_component.template_procs);
|
||||
template_proc != (mca_btl_template_proc_t*)
|
||||
ompi_list_get_end(&mca_btl_template_component.template_procs);
|
||||
template_proc = (mca_btl_template_proc_t*)ompi_list_get_next(template_proc)) {
|
||||
opal_list_get_end(&mca_btl_template_component.template_procs);
|
||||
template_proc = (mca_btl_template_proc_t*)opal_list_get_next(template_proc)) {
|
||||
|
||||
if(template_proc->proc_ompi == ompi_proc) {
|
||||
OMPI_THREAD_UNLOCK(&mca_btl_template_component.template_lock);
|
||||
|
@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_proc_t);
|
||||
* BTL instance that attempts to open a connection to the process.
|
||||
*/
|
||||
struct mca_btl_template_proc_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
/**< allow proc to be placed on a list */
|
||||
|
||||
ompi_proc_t *proc_ompi;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "mca/coll/coll.h"
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ OMPI_DECLSPEC extern bool mca_coll_base_components_opened_valid;
|
||||
* initialized and destroyed when we reduce the list to all available
|
||||
* coll components.
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_coll_base_components_opened;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_opened;
|
||||
/**
|
||||
* Indicator as to whether the list of available coll components is valid
|
||||
* or not.
|
||||
@ -255,7 +255,7 @@ OMPI_DECLSPEC extern bool mca_coll_base_components_available_valid;
|
||||
* components to all those who indicate that they may run during this
|
||||
* process.
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_coll_base_components_available;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_available;
|
||||
|
||||
/**
|
||||
* Pointer to the "basic" component so that it can be found easily
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "communicator/communicator.h"
|
||||
#include "util/argv.h"
|
||||
#include "util/show_help.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/class/opal_object.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
@ -53,7 +53,7 @@ static mca_coll_base_module_1_0_0_t null_module = {
|
||||
* Local types
|
||||
*/
|
||||
struct avail_coll_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
int ac_priority;
|
||||
const mca_coll_base_component_1_0_0_t *ac_component;
|
||||
@ -66,7 +66,7 @@ typedef struct avail_coll_t avail_coll_t;
|
||||
/*
|
||||
* Local functions
|
||||
*/
|
||||
static ompi_list_t *check_components(ompi_list_t *components,
|
||||
static opal_list_t *check_components(opal_list_t *components,
|
||||
ompi_communicator_t *comm,
|
||||
char **names, int num_names);
|
||||
static int check_one_component(ompi_communicator_t *comm,
|
||||
@ -100,7 +100,7 @@ static int replace_null_with_basic(ompi_communicator_t *comm);
|
||||
/*
|
||||
* Stuff for the OBJ interface
|
||||
*/
|
||||
static OBJ_CLASS_INSTANCE(avail_coll_t, ompi_list_item_t, NULL, NULL);
|
||||
static OBJ_CLASS_INSTANCE(avail_coll_t, opal_list_item_t, NULL, NULL);
|
||||
|
||||
|
||||
/*
|
||||
@ -119,8 +119,8 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm,
|
||||
char *names, **name_array;
|
||||
char *str;
|
||||
avail_coll_t *avail;
|
||||
ompi_list_t *selectable;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_t *selectable;
|
||||
opal_list_item_t *item;
|
||||
const mca_coll_base_component_1_0_0_t *selected_component, *component;
|
||||
const mca_coll_base_module_1_0_0_t *selected_module;
|
||||
struct mca_coll_base_comm_t *selected_data;
|
||||
@ -238,7 +238,7 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm,
|
||||
|
||||
if (NULL != selectable) {
|
||||
using_basic = false;
|
||||
item = ompi_list_remove_first(selectable);
|
||||
item = opal_list_remove_first(selectable);
|
||||
avail = (avail_coll_t *) item;
|
||||
selected_component = avail->ac_component;
|
||||
selected_module = avail->ac_module;
|
||||
@ -259,8 +259,8 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm,
|
||||
invoked, but will never have init() invoked in this scope). */
|
||||
|
||||
if (NULL != selectable) {
|
||||
for (item = ompi_list_remove_first(selectable); item != NULL;
|
||||
item = ompi_list_remove_first(selectable)) {
|
||||
for (item = opal_list_remove_first(selectable); item != NULL;
|
||||
item = opal_list_remove_first(selectable)) {
|
||||
avail = (avail_coll_t *) item;
|
||||
component = avail->ac_component;
|
||||
unquery(component, comm, avail->ac_data);
|
||||
@ -311,30 +311,30 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm,
|
||||
* only those who returned that they want to run, and put them in
|
||||
* priority order.
|
||||
*/
|
||||
static ompi_list_t *check_components(ompi_list_t *components,
|
||||
static opal_list_t *check_components(opal_list_t *components,
|
||||
ompi_communicator_t *comm,
|
||||
char **names, int num_names)
|
||||
{
|
||||
int i, priority;
|
||||
const mca_base_component_t *component;
|
||||
ompi_list_item_t *item, *item2;
|
||||
opal_list_item_t *item, *item2;
|
||||
const mca_coll_base_module_1_0_0_t *module;
|
||||
bool want_to_check;
|
||||
ompi_list_t *selectable;
|
||||
opal_list_t *selectable;
|
||||
avail_coll_t *avail, *avail2;
|
||||
struct mca_coll_base_comm_t *data;
|
||||
|
||||
/* Make a list of the components that query successfully */
|
||||
|
||||
selectable = OBJ_NEW(ompi_list_t);
|
||||
selectable = OBJ_NEW(opal_list_t);
|
||||
|
||||
/* Scan through the list of components. This nested loop is O(N^2),
|
||||
but we should never have too many components and/or names, so this
|
||||
*hopefully* shouldn't matter... */
|
||||
|
||||
for (item = ompi_list_get_first(components);
|
||||
item != ompi_list_get_end(components);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(components);
|
||||
item != opal_list_get_end(components);
|
||||
item = opal_list_get_next(item)) {
|
||||
component = ((mca_base_component_priority_list_item_t *)
|
||||
item)->super.cli_component;
|
||||
|
||||
@ -370,20 +370,20 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
/* Put this item on the list in priority order (highest
|
||||
priority first). Should it go first? */
|
||||
|
||||
if (ompi_list_is_empty(selectable)) {
|
||||
ompi_list_prepend(selectable, (ompi_list_item_t *) avail);
|
||||
if (opal_list_is_empty(selectable)) {
|
||||
opal_list_prepend(selectable, (opal_list_item_t *) avail);
|
||||
} else {
|
||||
item2 = ompi_list_get_first(selectable);
|
||||
item2 = opal_list_get_first(selectable);
|
||||
avail2 = (avail_coll_t *) item2;
|
||||
if (avail->ac_priority > avail2->ac_priority) {
|
||||
ompi_list_prepend(selectable, (ompi_list_item_t *) avail);
|
||||
opal_list_prepend(selectable, (opal_list_item_t *) avail);
|
||||
} else {
|
||||
for (i = 1; item2 != ompi_list_get_end(selectable);
|
||||
item2 = ompi_list_get_next(item2), ++i) {
|
||||
for (i = 1; item2 != opal_list_get_end(selectable);
|
||||
item2 = opal_list_get_next(item2), ++i) {
|
||||
avail2 = (avail_coll_t *) item2;
|
||||
if (avail->ac_priority > avail2->ac_priority) {
|
||||
ompi_list_insert(selectable,
|
||||
(ompi_list_item_t *) avail, i);
|
||||
opal_list_insert(selectable,
|
||||
(opal_list_item_t *) avail, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -392,8 +392,8 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
append it (because it has the lowest priority found so
|
||||
far) */
|
||||
|
||||
if (ompi_list_get_end(selectable) == item2) {
|
||||
ompi_list_append(selectable, (ompi_list_item_t *) avail);
|
||||
if (opal_list_get_end(selectable) == item2) {
|
||||
opal_list_append(selectable, (opal_list_item_t *) avail);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -403,7 +403,7 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
|
||||
/* If we didn't find any available components, return an error */
|
||||
|
||||
if (0 == ompi_list_get_size(selectable)) {
|
||||
if (0 == opal_list_get_size(selectable)) {
|
||||
OBJ_RELEASE(selectable);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "mca/coll/coll.h"
|
||||
#include "mca/coll/base/base.h"
|
||||
|
||||
extern ompi_list_t mca_coll_base_available;
|
||||
extern opal_list_t mca_coll_base_available;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "util/output.h"
|
||||
#include "util/show_help.h"
|
||||
#include "mca/mca.h"
|
||||
@ -35,7 +35,7 @@
|
||||
* Global variables
|
||||
*/
|
||||
bool mca_coll_base_components_available_valid = false;
|
||||
ompi_list_t mca_coll_base_components_available;
|
||||
opal_list_t mca_coll_base_components_available;
|
||||
const mca_coll_base_component_1_0_0_t *mca_coll_base_basic_component = NULL;
|
||||
|
||||
|
||||
@ -69,21 +69,21 @@ int mca_coll_base_find_available(bool enable_progress_threads,
|
||||
{
|
||||
bool found = false;
|
||||
mca_base_component_priority_list_item_t *entry;
|
||||
ompi_list_item_t *p;
|
||||
opal_list_item_t *p;
|
||||
const mca_base_component_t *component;
|
||||
|
||||
/* Initialize the list */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_coll_base_components_available, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_coll_base_components_available, opal_list_t);
|
||||
mca_coll_base_components_available_valid = true;
|
||||
|
||||
/* The list of components that we should check has already been
|
||||
established in mca_coll_base_open. */
|
||||
|
||||
for (found = false,
|
||||
p = ompi_list_remove_first(&mca_coll_base_components_opened);
|
||||
p = opal_list_remove_first(&mca_coll_base_components_opened);
|
||||
p != NULL;
|
||||
p = ompi_list_remove_first(&mca_coll_base_components_opened)) {
|
||||
p = opal_list_remove_first(&mca_coll_base_components_opened)) {
|
||||
component = ((mca_base_component_list_item_t *) p)->cli_component;
|
||||
|
||||
/* Call a subroutine to do the work, because the component may
|
||||
@ -114,8 +114,8 @@ int mca_coll_base_find_available(bool enable_progress_threads,
|
||||
level for this process. */
|
||||
|
||||
else {
|
||||
ompi_list_append(&mca_coll_base_components_available,
|
||||
(ompi_list_item_t *) entry);
|
||||
opal_list_append(&mca_coll_base_components_available,
|
||||
(opal_list_item_t *) entry);
|
||||
}
|
||||
|
||||
/* Either way, we found something :-) */
|
||||
|
@ -50,7 +50,7 @@ int mca_coll_base_bcast_collmaxlin = 4;
|
||||
int mca_coll_base_bcast_collmaxdim = 64;
|
||||
|
||||
bool mca_coll_base_components_opened_valid = false;
|
||||
ompi_list_t mca_coll_base_components_opened;
|
||||
opal_list_t mca_coll_base_components_opened;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "opal/class/opal_object.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "include/sys/atomic.h"
|
||||
#include "mca/mpool/mpool.h"
|
||||
|
||||
@ -55,7 +55,7 @@ typedef struct mca_common_sm_file_header_t mca_common_sm_file_header_t;
|
||||
|
||||
struct mca_common_sm_mmap_t {
|
||||
/* double link list element */
|
||||
ompi_list_item_t map_item;
|
||||
opal_list_item_t map_item;
|
||||
/* pointer to header imbeded in the shared memory file */
|
||||
mca_common_sm_file_header_t* map_seg;
|
||||
/* base address of the mmap'ed file */
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_free_list.h"
|
||||
#include "mca/io/io.h"
|
||||
|
||||
@ -291,7 +291,7 @@ OMPI_DECLSPEC extern bool mca_io_base_components_opened_valid;
|
||||
* initialized and destroyed when we reduce the list to all available
|
||||
* io components.
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_io_base_components_opened;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_io_base_components_opened;
|
||||
/**
|
||||
* Indicator as to whether the list of available io components is valid
|
||||
* or not.
|
||||
@ -302,7 +302,7 @@ OMPI_DECLSPEC extern bool mca_io_base_components_available_valid;
|
||||
* components to all those who indicate that they may run during this
|
||||
* process.
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_io_base_components_available;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_io_base_components_available;
|
||||
/**
|
||||
* Indicator as to whether the freelist of IO requests is valid or
|
||||
* not.
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/io/io.h"
|
||||
@ -27,19 +27,19 @@
|
||||
* Private variables
|
||||
*/
|
||||
static bool initialized = false;
|
||||
static ompi_list_t components_in_use;
|
||||
static opal_list_t components_in_use;
|
||||
#if OMPI_HAVE_THREAD_SUPPORT
|
||||
static ompi_mutex_t mutex;
|
||||
#endif /* OMPI_HAVE_THREAD_SUPPORT */
|
||||
|
||||
struct component_item_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
int refcount;
|
||||
mca_io_base_version_t version;
|
||||
mca_io_base_components_t component;
|
||||
};
|
||||
typedef struct component_item_t component_item_t;
|
||||
static OBJ_CLASS_INSTANCE(component_item_t, ompi_list_item_t, NULL, NULL);
|
||||
static OBJ_CLASS_INSTANCE(component_item_t, opal_list_item_t, NULL, NULL);
|
||||
|
||||
|
||||
/*
|
||||
@ -47,7 +47,7 @@ static OBJ_CLASS_INSTANCE(component_item_t, ompi_list_item_t, NULL, NULL);
|
||||
*/
|
||||
int mca_io_base_component_init(void)
|
||||
{
|
||||
OBJ_CONSTRUCT(&components_in_use, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&components_in_use, opal_list_t);
|
||||
|
||||
initialized = true;
|
||||
|
||||
@ -63,7 +63,7 @@ int mca_io_base_component_init(void)
|
||||
*/
|
||||
int mca_io_base_component_add(mca_io_base_components_t *comp)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
component_item_t *citem;
|
||||
mca_base_component_t *c;
|
||||
|
||||
@ -75,9 +75,9 @@ int mca_io_base_component_add(mca_io_base_components_t *comp)
|
||||
refcount. Otherwise, add it to the list with a refcount of
|
||||
1. */
|
||||
|
||||
for (item = ompi_list_get_first(&components_in_use);
|
||||
item != ompi_list_get_end(&components_in_use);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(&components_in_use);
|
||||
item != opal_list_get_end(&components_in_use);
|
||||
item = opal_list_get_next(item)) {
|
||||
citem = (component_item_t *) item;
|
||||
|
||||
/* Note the memory / pointer trickery here: we don't care what
|
||||
@ -98,7 +98,7 @@ int mca_io_base_component_add(mca_io_base_components_t *comp)
|
||||
|
||||
/* If we didn't find it, save it */
|
||||
|
||||
if (ompi_list_get_end(&components_in_use) == item) {
|
||||
if (opal_list_get_end(&components_in_use) == item) {
|
||||
citem = OBJ_NEW(component_item_t);
|
||||
citem->refcount = 1;
|
||||
citem->component = *comp;
|
||||
@ -111,7 +111,7 @@ int mca_io_base_component_add(mca_io_base_components_t *comp)
|
||||
} else {
|
||||
citem->version = MCA_IO_BASE_V_NONE;
|
||||
}
|
||||
ompi_list_append(&components_in_use, (ompi_list_item_t *) citem);
|
||||
opal_list_append(&components_in_use, (opal_list_item_t *) citem);
|
||||
}
|
||||
|
||||
OMPI_THREAD_UNLOCK(&mutex);
|
||||
@ -128,16 +128,16 @@ int mca_io_base_component_add(mca_io_base_components_t *comp)
|
||||
*/
|
||||
int mca_io_base_component_del(mca_io_base_components_t *comp)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
component_item_t *citem;
|
||||
|
||||
OMPI_THREAD_LOCK(&mutex);
|
||||
|
||||
/* Find the component in the list */
|
||||
|
||||
for (item = ompi_list_get_first(&components_in_use);
|
||||
item != ompi_list_get_end(&components_in_use);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(&components_in_use);
|
||||
item != opal_list_get_end(&components_in_use);
|
||||
item = opal_list_get_next(item)) {
|
||||
citem = (component_item_t *) item;
|
||||
|
||||
/* Note the memory / pointer trickery here: we don't care what
|
||||
@ -150,8 +150,8 @@ int mca_io_base_component_del(mca_io_base_components_t *comp)
|
||||
(const mca_base_component_t *) comp) == 0) {
|
||||
--citem->refcount;
|
||||
if (0 == citem->refcount) {
|
||||
ompi_list_remove_item(&components_in_use,
|
||||
(ompi_list_item_t *) citem);
|
||||
opal_list_remove_item(&components_in_use,
|
||||
(opal_list_item_t *) citem);
|
||||
}
|
||||
OBJ_RELEASE(citem);
|
||||
break;
|
||||
@ -170,7 +170,7 @@ int mca_io_base_component_del(mca_io_base_components_t *comp)
|
||||
int mca_io_base_component_run_progress(void)
|
||||
{
|
||||
int ret, count = 0;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
component_item_t *citem;
|
||||
|
||||
if (! initialized) return 0;
|
||||
@ -180,9 +180,9 @@ int mca_io_base_component_run_progress(void)
|
||||
/* Go through all the components and call their progress
|
||||
function */
|
||||
|
||||
for (item = ompi_list_get_first(&components_in_use);
|
||||
item != ompi_list_get_end(&components_in_use);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(&components_in_use);
|
||||
item != opal_list_get_end(&components_in_use);
|
||||
item = opal_list_get_next(item)) {
|
||||
citem = (component_item_t *) item;
|
||||
|
||||
switch (citem->version) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "file/file.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "util/argv.h"
|
||||
#include "util/output.h"
|
||||
#include "mca/mca.h"
|
||||
@ -34,7 +34,7 @@
|
||||
* Local types
|
||||
*/
|
||||
struct avail_io_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
mca_io_base_version_t ai_version;
|
||||
|
||||
@ -47,7 +47,7 @@ typedef struct avail_io_t avail_io_t;
|
||||
/*
|
||||
* Local functions
|
||||
*/
|
||||
static ompi_list_t *check_components(ompi_list_t *components,
|
||||
static opal_list_t *check_components(opal_list_t *components,
|
||||
char *filename, struct ompi_info_t *info,
|
||||
char **names, int num_names);
|
||||
static avail_io_t *check_one_component(const mca_base_component_t *component,
|
||||
@ -66,7 +66,7 @@ static int delete_file(avail_io_t *avail, char *filename, struct ompi_info_t *in
|
||||
/*
|
||||
* Stuff for the OBJ interface
|
||||
*/
|
||||
static OBJ_CLASS_INSTANCE(avail_io_t, ompi_list_item_t, NULL, NULL);
|
||||
static OBJ_CLASS_INSTANCE(avail_io_t, opal_list_item_t, NULL, NULL);
|
||||
|
||||
|
||||
/*
|
||||
@ -75,8 +75,8 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info)
|
||||
{
|
||||
int err, num_names;
|
||||
char *names, **name_array;
|
||||
ompi_list_t *selectable;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_t *selectable;
|
||||
opal_list_item_t *item;
|
||||
avail_io_t *avail, selected;
|
||||
|
||||
/* Announce */
|
||||
@ -138,7 +138,7 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info)
|
||||
#if 1
|
||||
/* For the moment, just take the top module off the list */
|
||||
|
||||
item = ompi_list_remove_first(selectable);
|
||||
item = opal_list_remove_first(selectable);
|
||||
avail = (avail_io_t *) item;
|
||||
selected = *avail;
|
||||
OBJ_RELEASE(avail);
|
||||
@ -151,8 +151,8 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info)
|
||||
query() invoked, but will never have init() invoked in this
|
||||
scope). */
|
||||
|
||||
for (item = ompi_list_remove_first(selectable); item != NULL;
|
||||
item = ompi_list_remove_first(selectable)) {
|
||||
for (item = opal_list_remove_first(selectable); item != NULL;
|
||||
item = opal_list_remove_first(selectable)) {
|
||||
avail = (avail_io_t *) item;
|
||||
unquery(avail, filename, info);
|
||||
OBJ_RELEASE(item);
|
||||
@ -182,28 +182,28 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info)
|
||||
* be only those who returned that they want to run, and put them in
|
||||
* priority order.
|
||||
*/
|
||||
static ompi_list_t *check_components(ompi_list_t *components,
|
||||
static opal_list_t *check_components(opal_list_t *components,
|
||||
char *filename, struct ompi_info_t *info,
|
||||
char **names, int num_names)
|
||||
{
|
||||
int i;
|
||||
const mca_base_component_t *component;
|
||||
ompi_list_item_t *item, *item2;
|
||||
opal_list_item_t *item, *item2;
|
||||
bool want_to_check;
|
||||
ompi_list_t *selectable;
|
||||
opal_list_t *selectable;
|
||||
avail_io_t *avail, *avail2;
|
||||
|
||||
/* Make a list of the components that query successfully */
|
||||
|
||||
selectable = OBJ_NEW(ompi_list_t);
|
||||
selectable = OBJ_NEW(opal_list_t);
|
||||
|
||||
/* Scan through the list of components. This nested loop is
|
||||
O(N^2), but we should never have too many components and/or
|
||||
names, so this *hopefully* shouldn't matter... */
|
||||
|
||||
for (item = ompi_list_get_first(components);
|
||||
item != ompi_list_get_end(components);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(components);
|
||||
item != opal_list_get_end(components);
|
||||
item = opal_list_get_next(item)) {
|
||||
component = ((mca_base_component_priority_list_item_t *)
|
||||
item)->super.cli_component;
|
||||
|
||||
@ -230,18 +230,18 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
/* Put this item on the list in priority order
|
||||
(highest priority first). Should it go first? */
|
||||
|
||||
item2 = ompi_list_get_first(selectable);
|
||||
item2 = opal_list_get_first(selectable);
|
||||
avail2 = (avail_io_t *) item2;
|
||||
if (ompi_list_get_end(selectable) == item2 ||
|
||||
if (opal_list_get_end(selectable) == item2 ||
|
||||
avail->ai_priority > avail2->ai_priority) {
|
||||
ompi_list_prepend(selectable, (ompi_list_item_t*) avail);
|
||||
opal_list_prepend(selectable, (opal_list_item_t*) avail);
|
||||
} else {
|
||||
for (i = 1; item2 != ompi_list_get_end(selectable);
|
||||
item2 = ompi_list_get_next(selectable), ++i) {
|
||||
for (i = 1; item2 != opal_list_get_end(selectable);
|
||||
item2 = opal_list_get_next(selectable), ++i) {
|
||||
avail2 = (avail_io_t *) item2;
|
||||
if (avail->ai_priority > avail2->ai_priority) {
|
||||
ompi_list_insert(selectable,
|
||||
(ompi_list_item_t *) avail, i);
|
||||
opal_list_insert(selectable,
|
||||
(opal_list_item_t *) avail, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -250,9 +250,9 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
list, then append it (because it has the lowest
|
||||
priority found so far) */
|
||||
|
||||
if (ompi_list_get_end(selectable) == item2) {
|
||||
ompi_list_append(selectable,
|
||||
(ompi_list_item_t *) avail);
|
||||
if (opal_list_get_end(selectable) == item2) {
|
||||
opal_list_append(selectable,
|
||||
(opal_list_item_t *) avail);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -261,7 +261,7 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
|
||||
/* If we didn't find any available components, return an error */
|
||||
|
||||
if (0 == ompi_list_get_size(selectable)) {
|
||||
if (0 == opal_list_get_size(selectable)) {
|
||||
OBJ_RELEASE(selectable);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "file/file.h"
|
||||
#include "util/argv.h"
|
||||
#include "util/output.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/class/opal_object.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
@ -37,7 +37,7 @@
|
||||
* Local types
|
||||
*/
|
||||
struct avail_io_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
|
||||
mca_io_base_version_t ai_version;
|
||||
|
||||
@ -51,7 +51,7 @@ typedef struct avail_io_t avail_io_t;
|
||||
/*
|
||||
* Local functions
|
||||
*/
|
||||
static ompi_list_t *check_components(ompi_list_t *components,
|
||||
static opal_list_t *check_components(opal_list_t *components,
|
||||
ompi_file_t *file,
|
||||
char **names, int num_names);
|
||||
static avail_io_t *check_one_component(ompi_file_t *file,
|
||||
@ -70,7 +70,7 @@ static int module_init(ompi_file_t *file);
|
||||
/*
|
||||
* Stuff for the OBJ interface
|
||||
*/
|
||||
static OBJ_CLASS_INSTANCE(avail_io_t, ompi_list_item_t, NULL, NULL);
|
||||
static OBJ_CLASS_INSTANCE(avail_io_t, opal_list_item_t, NULL, NULL);
|
||||
|
||||
|
||||
/*
|
||||
@ -84,8 +84,8 @@ int mca_io_base_file_select(ompi_file_t *file,
|
||||
int err, num_names;
|
||||
char *names, **name_array;
|
||||
char *str;
|
||||
ompi_list_t *selectable;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_t *selectable;
|
||||
opal_list_item_t *item;
|
||||
avail_io_t *avail, selected;
|
||||
|
||||
/* Announce */
|
||||
@ -178,7 +178,7 @@ int mca_io_base_file_select(ompi_file_t *file,
|
||||
#if 1
|
||||
/* For the moment, just take the top module off the list */
|
||||
|
||||
item = ompi_list_remove_first(selectable);
|
||||
item = opal_list_remove_first(selectable);
|
||||
avail = (avail_io_t *) item;
|
||||
selected = *avail;
|
||||
OBJ_RELEASE(avail);
|
||||
@ -191,8 +191,8 @@ int mca_io_base_file_select(ompi_file_t *file,
|
||||
query() invoked, but will never have init() invoked in this
|
||||
scope). */
|
||||
|
||||
for (item = ompi_list_remove_first(selectable); item != NULL;
|
||||
item = ompi_list_remove_first(selectable)) {
|
||||
for (item = opal_list_remove_first(selectable); item != NULL;
|
||||
item = opal_list_remove_first(selectable)) {
|
||||
avail = (avail_io_t *) item;
|
||||
unquery(avail, file);
|
||||
OBJ_RELEASE(item);
|
||||
@ -234,28 +234,28 @@ int mca_io_base_file_select(ompi_file_t *file,
|
||||
* (component, module) tuples (of type avail_io_t) to be only those
|
||||
* who returned that they want to run, and put them in priority order.
|
||||
*/
|
||||
static ompi_list_t *check_components(ompi_list_t *components,
|
||||
static opal_list_t *check_components(opal_list_t *components,
|
||||
ompi_file_t *file,
|
||||
char **names, int num_names)
|
||||
{
|
||||
int i;
|
||||
const mca_base_component_t *component;
|
||||
ompi_list_item_t *item, *item2;
|
||||
opal_list_item_t *item, *item2;
|
||||
bool want_to_check;
|
||||
ompi_list_t *selectable;
|
||||
opal_list_t *selectable;
|
||||
avail_io_t *avail, *avail2;
|
||||
|
||||
/* Make a list of the components that query successfully */
|
||||
|
||||
selectable = OBJ_NEW(ompi_list_t);
|
||||
selectable = OBJ_NEW(opal_list_t);
|
||||
|
||||
/* Scan through the list of components. This nested loop is
|
||||
O(N^2), but we should never have too many components and/or
|
||||
names, so this *hopefully* shouldn't matter... */
|
||||
|
||||
for (item = ompi_list_get_first(components);
|
||||
item != ompi_list_get_end(components);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(components);
|
||||
item != opal_list_get_end(components);
|
||||
item = opal_list_get_next(item)) {
|
||||
component = ((mca_base_component_priority_list_item_t *)
|
||||
item)->super.cli_component;
|
||||
|
||||
@ -282,18 +282,18 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
/* Put this item on the list in priority order
|
||||
(highest priority first). Should it go first? */
|
||||
|
||||
item2 = ompi_list_get_first(selectable);
|
||||
item2 = opal_list_get_first(selectable);
|
||||
avail2 = (avail_io_t *) item2;
|
||||
if (ompi_list_get_end(selectable) == item2 ||
|
||||
if (opal_list_get_end(selectable) == item2 ||
|
||||
avail->ai_priority > avail2->ai_priority) {
|
||||
ompi_list_prepend(selectable, (ompi_list_item_t*) avail);
|
||||
opal_list_prepend(selectable, (opal_list_item_t*) avail);
|
||||
} else {
|
||||
for (i = 1; item2 != ompi_list_get_end(selectable);
|
||||
item2 = ompi_list_get_next(selectable), ++i) {
|
||||
for (i = 1; item2 != opal_list_get_end(selectable);
|
||||
item2 = opal_list_get_next(selectable), ++i) {
|
||||
avail2 = (avail_io_t *) item2;
|
||||
if (avail->ai_priority > avail2->ai_priority) {
|
||||
ompi_list_insert(selectable,
|
||||
(ompi_list_item_t *) avail, i);
|
||||
opal_list_insert(selectable,
|
||||
(opal_list_item_t *) avail, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -302,9 +302,9 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
list, then append it (because it has the lowest
|
||||
priority found so far) */
|
||||
|
||||
if (ompi_list_get_end(selectable) == item2) {
|
||||
ompi_list_append(selectable,
|
||||
(ompi_list_item_t *) avail);
|
||||
if (opal_list_get_end(selectable) == item2) {
|
||||
opal_list_append(selectable,
|
||||
(opal_list_item_t *) avail);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -313,7 +313,7 @@ static ompi_list_t *check_components(ompi_list_t *components,
|
||||
|
||||
/* If we didn't find any available components, return an error */
|
||||
|
||||
if (0 == ompi_list_get_size(selectable)) {
|
||||
if (0 == opal_list_get_size(selectable)) {
|
||||
OBJ_RELEASE(selectable);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "include/constants.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "util/output.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
@ -61,20 +61,20 @@ int mca_io_base_find_available(bool enable_progress_threads,
|
||||
{
|
||||
int err;
|
||||
mca_base_component_priority_list_item_t *entry;
|
||||
ompi_list_item_t *p;
|
||||
opal_list_item_t *p;
|
||||
const mca_base_component_t *component;
|
||||
|
||||
/* Initialize the list */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_io_base_components_available, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_io_base_components_available, opal_list_t);
|
||||
mca_io_base_components_available_valid = true;
|
||||
|
||||
/* The list of components that we should check has already been
|
||||
established in mca_io_base_open. */
|
||||
|
||||
for (p = ompi_list_remove_first(&mca_io_base_components_opened);
|
||||
for (p = opal_list_remove_first(&mca_io_base_components_opened);
|
||||
p != NULL;
|
||||
p = ompi_list_remove_first(&mca_io_base_components_opened)) {
|
||||
p = opal_list_remove_first(&mca_io_base_components_opened)) {
|
||||
component = ((mca_base_component_list_item_t *) p)->cli_component;
|
||||
|
||||
/* Call a subroutine to do the work, because the component may
|
||||
@ -94,8 +94,8 @@ int mca_io_base_find_available(bool enable_progress_threads,
|
||||
the initial selection algorithm can negotiate the
|
||||
overall thread level for this process. */
|
||||
|
||||
ompi_list_append(&mca_io_base_components_available,
|
||||
(ompi_list_item_t *) entry);
|
||||
opal_list_append(&mca_io_base_components_available,
|
||||
(opal_list_item_t *) entry);
|
||||
} else {
|
||||
|
||||
/* If the component doesn't want to run, then close it.
|
||||
|
@ -47,10 +47,10 @@ int mca_io_base_param = -1;
|
||||
int mca_io_base_output = -1;
|
||||
|
||||
bool mca_io_base_components_opened_valid = false;
|
||||
ompi_list_t mca_io_base_components_opened;
|
||||
opal_list_t mca_io_base_components_opened;
|
||||
|
||||
bool mca_io_base_components_available_valid = false;
|
||||
ompi_list_t mca_io_base_components_available;
|
||||
opal_list_t mca_io_base_components_available;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -61,7 +61,7 @@ static void io_base_request_constructor(mca_io_base_request_t *req)
|
||||
*/
|
||||
int mca_io_base_request_create_freelist(void)
|
||||
{
|
||||
ompi_list_item_t *p;
|
||||
opal_list_item_t *p;
|
||||
const mca_base_component_t *component;
|
||||
const mca_io_base_component_1_0_0_t *v100;
|
||||
size_t size = 0;
|
||||
@ -70,9 +70,9 @@ int mca_io_base_request_create_freelist(void)
|
||||
/* Find the maximum additional number of bytes required by all io
|
||||
components for requests and make that the request size */
|
||||
|
||||
for (p = ompi_list_get_first(&mca_io_base_components_available);
|
||||
p != ompi_list_get_end(&mca_io_base_components_available);
|
||||
p = ompi_list_get_next(p)) {
|
||||
for (p = opal_list_get_first(&mca_io_base_components_available);
|
||||
p != opal_list_get_end(&mca_io_base_components_available);
|
||||
p = opal_list_get_next(p)) {
|
||||
component = ((mca_base_component_priority_list_item_t *)
|
||||
p)->super.cli_component;
|
||||
|
||||
@ -117,7 +117,7 @@ int mca_io_base_request_alloc(ompi_file_t *file,
|
||||
{
|
||||
int err;
|
||||
mca_io_base_module_request_once_init_fn_t func;
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
|
||||
/* See if we've got a request on the module's freelist (which is
|
||||
cached on the file, since there's only one module per
|
||||
@ -125,11 +125,11 @@ int mca_io_base_request_alloc(ompi_file_t *file,
|
||||
enough) check as a slight optimization to potentially having to
|
||||
avoid locking and unlocking. */
|
||||
|
||||
if (ompi_list_get_size(&file->f_io_requests) > 0) {
|
||||
if (opal_list_get_size(&file->f_io_requests) > 0) {
|
||||
OMPI_THREAD_LOCK(&file->f_io_requests_lock);
|
||||
if (ompi_list_get_size(&file->f_io_requests) > 0) {
|
||||
if (opal_list_get_size(&file->f_io_requests) > 0) {
|
||||
*req = (mca_io_base_request_t*)
|
||||
ompi_list_remove_first(&file->f_io_requests);
|
||||
opal_list_remove_first(&file->f_io_requests);
|
||||
} else {
|
||||
*req = NULL;
|
||||
}
|
||||
@ -208,7 +208,7 @@ void mca_io_base_request_free(ompi_file_t *file,
|
||||
been initialized for that module */
|
||||
|
||||
OMPI_THREAD_LOCK(&file->f_io_requests_lock);
|
||||
ompi_list_prepend(&file->f_io_requests, (ompi_list_item_t*) req);
|
||||
opal_list_prepend(&file->f_io_requests, (opal_list_item_t*) req);
|
||||
OMPI_THREAD_UNLOCK(&file->f_io_requests_lock);
|
||||
}
|
||||
|
||||
@ -218,13 +218,13 @@ void mca_io_base_request_free(ompi_file_t *file,
|
||||
*/
|
||||
void mca_io_base_request_return(ompi_file_t *file)
|
||||
{
|
||||
ompi_list_item_t *p, *next;
|
||||
opal_list_item_t *p, *next;
|
||||
|
||||
OMPI_THREAD_LOCK(&file->f_io_requests_lock);
|
||||
for (p = ompi_list_get_first(&file->f_io_requests);
|
||||
p != ompi_list_get_end(&file->f_io_requests);
|
||||
for (p = opal_list_get_first(&file->f_io_requests);
|
||||
p != opal_list_get_end(&file->f_io_requests);
|
||||
p = next) {
|
||||
next = ompi_list_get_next(p);
|
||||
next = opal_list_get_next(p);
|
||||
OMPI_FREE_LIST_RETURN(&mca_io_base_requests, p);
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(&file->f_io_requests_lock);
|
||||
|
@ -34,7 +34,7 @@ extern "C" {
|
||||
*/
|
||||
extern ompi_mutex_t mca_io_romio_mutex;
|
||||
extern mca_io_base_module_1_0_0_t mca_io_romio_module;
|
||||
extern ompi_list_t mca_io_romio_pending_requests;
|
||||
extern opal_list_t mca_io_romio_pending_requests;
|
||||
|
||||
|
||||
/*
|
||||
@ -73,7 +73,7 @@ int mca_io_romio_request_cancel(ompi_request_t *req, int flag);
|
||||
*/
|
||||
#define MCA_IO_ROMIO_REQUEST_ADD(request) \
|
||||
((ompi_request_t*) request)->req_state = OMPI_REQUEST_ACTIVE; \
|
||||
ompi_list_append(&mca_io_romio_pending_requests, (ompi_list_item_t *) request); \
|
||||
opal_list_append(&mca_io_romio_pending_requests, (opal_list_item_t *) request); \
|
||||
mca_io_base_request_progress_add();
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "mpi.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/io/io.h"
|
||||
@ -61,7 +61,7 @@ ompi_mutex_t mca_io_romio_mutex;
|
||||
/*
|
||||
* Global list of requests for this component
|
||||
*/
|
||||
ompi_list_t mca_io_romio_pending_requests;
|
||||
opal_list_t mca_io_romio_pending_requests;
|
||||
|
||||
|
||||
/*
|
||||
@ -129,7 +129,7 @@ static int open_component(void)
|
||||
|
||||
/* Create the list of pending requests */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_io_romio_pending_requests, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_io_romio_pending_requests, opal_list_t);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -236,7 +236,7 @@ static int delete_select(char *filename, struct ompi_info_t *info,
|
||||
|
||||
static int progress()
|
||||
{
|
||||
ompi_list_item_t *item, *next;
|
||||
opal_list_item_t *item, *next;
|
||||
int ret, flag, count;
|
||||
ROMIO_PREFIX(MPIO_Request) romio_rq;
|
||||
mca_io_base_request_t *ioreq;
|
||||
@ -246,10 +246,10 @@ static int progress()
|
||||
|
||||
count = 0;
|
||||
OMPI_THREAD_LOCK (&mca_io_romio_mutex);
|
||||
for (item = ompi_list_get_first(&mca_io_romio_pending_requests);
|
||||
item != ompi_list_get_end(&mca_io_romio_pending_requests);
|
||||
for (item = opal_list_get_first(&mca_io_romio_pending_requests);
|
||||
item != opal_list_get_end(&mca_io_romio_pending_requests);
|
||||
item = next) {
|
||||
next = ompi_list_get_next(item);
|
||||
next = opal_list_get_next(item);
|
||||
|
||||
ioreq = (mca_io_base_request_t*) item;
|
||||
romio_rq = ((mca_io_romio_request_t *) item)->romio_rq;
|
||||
@ -263,7 +263,7 @@ static int progress()
|
||||
/* mark as complete (and make sure to wake up any waiters */
|
||||
ompi_request_complete((ompi_request_t*) item);
|
||||
/* we're done, so remove us from the pending list */
|
||||
ompi_list_remove_item(&mca_io_romio_pending_requests, item);
|
||||
opal_list_remove_item(&mca_io_romio_pending_requests, item);
|
||||
mca_io_base_request_progress_del();
|
||||
/* if the request has been freed already, the user isn't
|
||||
* going to call test or wait on us, so we need to do it
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_rb_tree.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/mpool/mpool.h"
|
||||
@ -32,7 +32,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
struct mca_mpool_base_selected_module_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
mca_mpool_base_component_t *mpool_component;
|
||||
mca_mpool_base_module_t *mpool_module;
|
||||
void* user_data;
|
||||
@ -79,7 +79,7 @@ typedef struct mca_mpool_base_reg_mpool_t mca_mpool_base_reg_mpool_t;
|
||||
*/
|
||||
struct mca_mpool_base_chunk_t
|
||||
{
|
||||
ompi_list_item_t super; /**< the parent class */
|
||||
opal_list_item_t super; /**< the parent class */
|
||||
mca_mpool_base_key_t key; /**< the key which holds the memory pointers */
|
||||
mca_mpool_base_reg_mpool_t mpools[MCA_MPOOL_BASE_MAX_REG];
|
||||
/**< the mpools the memory is registered with */
|
||||
@ -111,8 +111,8 @@ OMPI_DECLSPEC mca_mpool_base_module_t* mca_mpool_base_module_create(
|
||||
* Globals
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_mpool_base_output;
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_mpool_base_components;
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_mpool_base_modules;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_mpool_base_components;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_mpool_base_modules;
|
||||
OMPI_DECLSPEC extern ompi_free_list_t mca_mpool_base_mem_list;
|
||||
OMPI_DECLSPEC extern ompi_rb_tree_t mca_mpool_base_tree;
|
||||
OMPI_DECLSPEC extern ompi_mutex_t mca_mpool_base_tree_lock;
|
||||
|
@ -102,7 +102,7 @@ static void mca_mpool_base_registration_destructor( mca_mpool_base_registration_
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_mpool_base_registration_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
mca_mpool_base_registration_constructor,
|
||||
mca_mpool_base_registration_destructor);
|
||||
|
||||
@ -139,7 +139,7 @@ int mca_mpool_base_insert(void * addr, size_t size,
|
||||
void* user_data,
|
||||
mca_mpool_base_registration_t* registration)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
int rc;
|
||||
OMPI_FREE_LIST_GET(&mca_mpool_base_mem_list, item, rc);
|
||||
if(rc != OMPI_SUCCESS)
|
||||
@ -208,8 +208,8 @@ int mca_mpool_base_remove(void * base)
|
||||
*/
|
||||
void * mca_mpool_base_alloc(size_t size, ompi_info_t * info)
|
||||
{
|
||||
ompi_list_item_t * item;
|
||||
int num_modules = ompi_list_get_size(&mca_mpool_base_modules);
|
||||
opal_list_item_t * item;
|
||||
int num_modules = opal_list_get_size(&mca_mpool_base_modules);
|
||||
int reg_module_num = 0;
|
||||
int i, num_keys;
|
||||
mca_mpool_base_selected_module_t * current;
|
||||
@ -223,9 +223,9 @@ void * mca_mpool_base_alloc(size_t size, ompi_info_t * info)
|
||||
|
||||
if(&ompi_mpi_info_null == info)
|
||||
{
|
||||
for(item = ompi_list_get_first(&mca_mpool_base_modules);
|
||||
item != ompi_list_get_end(&mca_mpool_base_modules);
|
||||
item = ompi_list_get_next(item))
|
||||
for(item = opal_list_get_first(&mca_mpool_base_modules);
|
||||
item != opal_list_get_end(&mca_mpool_base_modules);
|
||||
item = opal_list_get_next(item))
|
||||
{
|
||||
current = ((mca_mpool_base_selected_module_t *) item);
|
||||
if(NULL == current->mpool_module->mpool_register)
|
||||
@ -246,9 +246,9 @@ void * mca_mpool_base_alloc(size_t size, ompi_info_t * info)
|
||||
{
|
||||
match_found = false;
|
||||
ompi_info_get_nthkey(info, i, key);
|
||||
for(item = ompi_list_get_first(&mca_mpool_base_modules);
|
||||
item != ompi_list_get_end(&mca_mpool_base_modules);
|
||||
item = ompi_list_get_next(item))
|
||||
for(item = opal_list_get_first(&mca_mpool_base_modules);
|
||||
item != opal_list_get_end(&mca_mpool_base_modules);
|
||||
item = opal_list_get_next(item))
|
||||
{
|
||||
current = ((mca_mpool_base_selected_module_t *)item);
|
||||
if(0 == strcmp(key,
|
||||
@ -400,7 +400,7 @@ int mca_mpool_base_free(void * base)
|
||||
if(chunk->mpools[0].mpool == NULL)
|
||||
{
|
||||
free(chunk->key.bottom);
|
||||
OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (ompi_list_item_t*) chunk);
|
||||
OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (opal_list_item_t*) chunk);
|
||||
rc = ompi_rb_tree_delete(&mca_mpool_base_tree, &chunk->key);
|
||||
OMPI_THREAD_UNLOCK(&mca_mpool_base_tree_lock);
|
||||
return rc;
|
||||
@ -418,7 +418,7 @@ int mca_mpool_base_free(void * base)
|
||||
);
|
||||
}
|
||||
chunk->mpools[i].mpool->mpool_free(chunk->mpools[i].mpool, chunk->key.bottom, chunk->mpools[i].mpool_registration);
|
||||
OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (ompi_list_item_t *) chunk);
|
||||
OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (opal_list_item_t *) chunk);
|
||||
|
||||
rc = ompi_rb_tree_delete(&mca_mpool_base_tree, &chunk->key);
|
||||
OMPI_THREAD_UNLOCK(&mca_mpool_base_tree_lock);
|
||||
|
@ -27,14 +27,14 @@
|
||||
|
||||
int mca_mpool_base_close(void)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
opal_list_item_t *item;
|
||||
mca_mpool_base_selected_module_t *sm;
|
||||
|
||||
/* Finalize all the mpool components and free their list items */
|
||||
|
||||
for (item = ompi_list_remove_first(&mca_mpool_base_modules);
|
||||
for (item = opal_list_remove_first(&mca_mpool_base_modules);
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&mca_mpool_base_modules)) {
|
||||
item = opal_list_remove_first(&mca_mpool_base_modules)) {
|
||||
sm = (mca_mpool_base_selected_module_t *) item;
|
||||
|
||||
/* Blatently ignore the return code (what would we do to recover,
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "class/ompi_free_list.h"
|
||||
#include "threads/mutex.h"
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_mpool_base_selected_module_t, ompi_list_item_t, NULL, NULL);
|
||||
OBJ_CLASS_INSTANCE(mca_mpool_base_selected_module_t, opal_list_item_t, NULL, NULL);
|
||||
static bool mca_mpool_enable_progress_threads = true;
|
||||
static bool mca_mpool_enable_mpi_threads = true;
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_mpool_base_chunk_t, ompi_list_item_t, NULL, NULL);
|
||||
OBJ_CLASS_INSTANCE(mca_mpool_base_chunk_t, opal_list_item_t, NULL, NULL);
|
||||
|
||||
/**
|
||||
* Function for weeding out mpool modules that don't want to run.
|
||||
@ -38,7 +38,7 @@ OBJ_CLASS_INSTANCE(mca_mpool_base_chunk_t, ompi_list_item_t, NULL, NULL);
|
||||
* Call the init function on all available components to find out if they
|
||||
* want to run. Select all components that don't fail. Failing modules
|
||||
* will be closed and unloaded. The selected modules will be returned
|
||||
* to the caller in a ompi_list_t.
|
||||
* to the caller in a opal_list_t.
|
||||
*/
|
||||
int mca_mpool_base_init(bool enable_progress_threads, bool enable_mpi_threads)
|
||||
{
|
||||
|
@ -28,10 +28,10 @@
|
||||
mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char* name)
|
||||
{
|
||||
/* Traverse the list of available modules; call their init functions. */
|
||||
ompi_list_item_t* item;
|
||||
for (item = ompi_list_get_first(&mca_mpool_base_components);
|
||||
item != ompi_list_get_end(&mca_mpool_base_components);
|
||||
item = ompi_list_get_next(item)) {
|
||||
opal_list_item_t* item;
|
||||
for (item = opal_list_get_first(&mca_mpool_base_components);
|
||||
item != opal_list_get_end(&mca_mpool_base_components);
|
||||
item = opal_list_get_next(item)) {
|
||||
mca_base_component_list_item_t *cli =
|
||||
(mca_base_component_list_item_t *) item;
|
||||
mca_mpool_base_component_t* component =
|
||||
@ -52,12 +52,12 @@ mca_mpool_base_module_t* mca_mpool_base_module_create(
|
||||
|
||||
mca_mpool_base_component_t* component = NULL;
|
||||
mca_mpool_base_module_t* module = NULL;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
mca_mpool_base_selected_module_t *sm;
|
||||
|
||||
for (item = ompi_list_get_first(&mca_mpool_base_components);
|
||||
item != ompi_list_get_end(&mca_mpool_base_components);
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = opal_list_get_first(&mca_mpool_base_components);
|
||||
item != opal_list_get_end(&mca_mpool_base_components);
|
||||
item = opal_list_get_next(item)) {
|
||||
mca_base_component_list_item_t *cli =
|
||||
(mca_base_component_list_item_t *) item;
|
||||
component =
|
||||
@ -75,6 +75,6 @@ mca_mpool_base_module_t* mca_mpool_base_module_create(
|
||||
sm->mpool_module = module;
|
||||
sm->user_data = user_data;
|
||||
sm->mpool_resources = resources;
|
||||
ompi_list_append(&mca_mpool_base_modules, (ompi_list_item_t*) sm);
|
||||
opal_list_append(&mca_mpool_base_modules, (opal_list_item_t*) sm);
|
||||
return module;
|
||||
}
|
||||
|
@ -41,8 +41,8 @@
|
||||
* Global variables
|
||||
*/
|
||||
int mca_mpool_base_output = -1;
|
||||
ompi_list_t mca_mpool_base_components;
|
||||
ompi_list_t mca_mpool_base_modules;
|
||||
opal_list_t mca_mpool_base_components;
|
||||
opal_list_t mca_mpool_base_modules;
|
||||
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@ int mca_mpool_base_open(void)
|
||||
iterate over it (even if it's empty, as in the case of
|
||||
ompi_info) */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_mpool_base_modules, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t);
|
||||
|
||||
/* All done */
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include <gm.h>
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_free_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/mpool/mpool.h"
|
||||
|
@ -117,9 +117,9 @@ static mca_mpool_base_module_t* mca_mpool_gm_init(
|
||||
/* if specified allocator cannout be loaded - look for an alternative */
|
||||
allocator_component = mca_allocator_component_lookup(mca_mpool_gm_component.gm_allocator_name);
|
||||
if(NULL == allocator_component) {
|
||||
if(ompi_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
if(opal_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
mca_base_component_list_item_t* item = (mca_base_component_list_item_t*)
|
||||
ompi_list_get_first(&mca_allocator_base_components);
|
||||
opal_list_get_first(&mca_allocator_base_components);
|
||||
allocator_component = (mca_allocator_base_component_t*)item->cli_component;
|
||||
ompi_output(0, "[%d:%d] unable to locate allocator: %s - using %s\n",
|
||||
__FILE__, __LINE__,
|
||||
|
@ -21,13 +21,13 @@
|
||||
#define MCA_MPOOL_H
|
||||
#include "mca/mca.h"
|
||||
#include "info/info.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
|
||||
|
||||
struct mca_mpool_base_resources_t;
|
||||
|
||||
struct mca_mpool_base_registration_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
struct mca_mpool_base_module_t *mpool;
|
||||
unsigned char* base;
|
||||
unsigned char* bound;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef MCA_MPOOL_VAPI_H
|
||||
#define MCA_MPOOL_VAPI_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_free_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/mpool/mpool.h"
|
||||
|
@ -145,9 +145,9 @@ static mca_mpool_base_module_t* mca_mpool_mvapi_init(
|
||||
/* if specified allocator cannout be loaded - look for an alternative */
|
||||
allocator_component = mca_allocator_component_lookup(mca_mpool_mvapi_component.vapi_allocator_name);
|
||||
if(NULL == allocator_component) {
|
||||
if(ompi_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
if(opal_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
mca_base_component_list_item_t* item = (mca_base_component_list_item_t*)
|
||||
ompi_list_get_first(&mca_allocator_base_components);
|
||||
opal_list_get_first(&mca_allocator_base_components);
|
||||
allocator_component = (mca_allocator_base_component_t*)item->cli_component;
|
||||
ompi_output(0, "mca_mpool_mvapi_init: unable to locate allocator: %s - using %s\n",
|
||||
mca_mpool_mvapi_component.vapi_allocator_name, allocator_component->allocator_version.mca_component_name);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef MCA_MPOOL_VAPI_H
|
||||
#define MCA_MPOOL_VAPI_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_free_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/mpool/mpool.h"
|
||||
|
@ -152,9 +152,9 @@ static mca_mpool_base_module_t* mca_mpool_openib_init(
|
||||
/* if specified allocator cannout be loaded - look for an alternative */
|
||||
allocator_component = mca_allocator_component_lookup(mca_mpool_openib_component.vapi_allocator_name);
|
||||
if(NULL == allocator_component) {
|
||||
if(ompi_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
if(opal_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
mca_base_component_list_item_t* item = (mca_base_component_list_item_t*)
|
||||
ompi_list_get_first(&mca_allocator_base_components);
|
||||
opal_list_get_first(&mca_allocator_base_components);
|
||||
allocator_component = (mca_allocator_base_component_t*)item->cli_component;
|
||||
ompi_output(0, "mca_mpool_openib_init: unable to locate allocator: %s - using %s\n",
|
||||
mca_mpool_openib_component.vapi_allocator_name, allocator_component->allocator_version.mca_component_name);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef MCA_MPOOL_SM_H
|
||||
#define MCA_MPOOL_SM_H
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_free_list.h"
|
||||
#include "event/event.h"
|
||||
#include "mca/mpool/mpool.h"
|
||||
|
@ -108,9 +108,9 @@ static mca_mpool_base_module_t* mca_mpool_sm_init(
|
||||
|
||||
/* if specified allocator cannout be loaded - look for an alternative */
|
||||
if(NULL == allocator_component) {
|
||||
if(ompi_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
if(opal_list_get_size(&mca_allocator_base_components) == 0) {
|
||||
mca_base_component_list_item_t* item = (mca_base_component_list_item_t*)
|
||||
ompi_list_get_first(&mca_allocator_base_components);
|
||||
opal_list_get_first(&mca_allocator_base_components);
|
||||
allocator_component = (mca_allocator_base_component_t*)item->cli_component;
|
||||
ompi_output(0, "mca_mpool_sm_init: unable to locate allocator: %s - using %s\n",
|
||||
mca_mpool_sm_component.sm_allocator_name, allocator_component->allocator_version.mca_component_name);
|
||||
|
@ -41,7 +41,7 @@ OMPI_DECLSPEC int mca_pml_base_close(void);
|
||||
* Globals
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_pml_base_output;
|
||||
OMPI_DECLSPEC extern ompi_list_t mca_pml_base_components_available;
|
||||
OMPI_DECLSPEC extern opal_list_t mca_pml_base_components_available;
|
||||
OMPI_DECLSPEC extern mca_pml_base_component_t mca_pml_base_selected_component;
|
||||
OMPI_DECLSPEC extern mca_pml_base_module_t mca_pml;
|
||||
OMPI_DECLSPEC extern char* mca_pml_base_pml;
|
||||
|
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
struct mca_base_modex_module_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
mca_base_component_t component;
|
||||
void *module_data;
|
||||
size_t module_data_size;
|
||||
@ -70,7 +70,7 @@ static void mca_base_modex_module_destruct(mca_base_modex_module_t *module)
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_base_modex_module_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
mca_base_modex_module_construct,
|
||||
mca_base_modex_module_destruct
|
||||
);
|
||||
@ -83,13 +83,13 @@ OBJ_CLASS_INSTANCE(
|
||||
*/
|
||||
struct mca_base_modex_t {
|
||||
opal_object_t super;
|
||||
ompi_list_t modex_modules;
|
||||
opal_list_t modex_modules;
|
||||
};
|
||||
typedef struct mca_base_modex_t mca_base_modex_t;
|
||||
|
||||
static void mca_base_modex_construct(mca_base_modex_t* modex)
|
||||
{
|
||||
OBJ_CONSTRUCT(&modex->modex_modules, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&modex->modex_modules, opal_list_t);
|
||||
}
|
||||
|
||||
static void mca_base_modex_destruct(mca_base_modex_t* modex)
|
||||
@ -111,14 +111,14 @@ OBJ_CLASS_INSTANCE(
|
||||
*/
|
||||
|
||||
struct mca_base_modex_subscription_t {
|
||||
ompi_list_item_t item;
|
||||
opal_list_item_t item;
|
||||
orte_jobid_t jobid;
|
||||
};
|
||||
typedef struct mca_base_modex_subscription_t mca_base_modex_subscription_t;
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_base_modex_subscription_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
@ -126,7 +126,7 @@ OBJ_CLASS_INSTANCE(
|
||||
* Globals to track the list of subscriptions.
|
||||
*/
|
||||
|
||||
static ompi_list_t mca_base_modex_subscriptions;
|
||||
static opal_list_t mca_base_modex_subscriptions;
|
||||
static ompi_mutex_t mca_base_modex_lock;
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ static ompi_mutex_t mca_base_modex_lock;
|
||||
*/
|
||||
int mca_base_modex_init(void)
|
||||
{
|
||||
OBJ_CONSTRUCT(&mca_base_modex_subscriptions, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_base_modex_subscriptions, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_base_modex_lock, ompi_mutex_t);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -145,8 +145,8 @@ int mca_base_modex_init(void)
|
||||
*/
|
||||
int mca_base_modex_finalize(void)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
while(NULL != (item = ompi_list_remove_first(&mca_base_modex_subscriptions)))
|
||||
opal_list_item_t *item;
|
||||
while(NULL != (item = opal_list_remove_first(&mca_base_modex_subscriptions)))
|
||||
OBJ_RELEASE(item);
|
||||
OBJ_DESTRUCT(&mca_base_modex_subscriptions);
|
||||
return OMPI_SUCCESS;
|
||||
@ -162,9 +162,9 @@ static mca_base_modex_module_t* mca_base_modex_lookup_module(
|
||||
mca_base_component_t* component)
|
||||
{
|
||||
mca_base_modex_module_t* modex_module;
|
||||
for(modex_module = (mca_base_modex_module_t*)ompi_list_get_first(&modex->modex_modules);
|
||||
modex_module != (mca_base_modex_module_t*)ompi_list_get_end(&modex->modex_modules);
|
||||
modex_module = (mca_base_modex_module_t*)ompi_list_get_next(modex_module)) {
|
||||
for(modex_module = (mca_base_modex_module_t*)opal_list_get_first(&modex->modex_modules);
|
||||
modex_module != (mca_base_modex_module_t*)opal_list_get_end(&modex->modex_modules);
|
||||
modex_module = (mca_base_modex_module_t*)opal_list_get_next(modex_module)) {
|
||||
if(mca_base_component_compatible(&modex_module->component, component) == 0) {
|
||||
return modex_module;
|
||||
}
|
||||
@ -186,7 +186,7 @@ static mca_base_modex_module_t* mca_base_modex_create_module(
|
||||
modex_module = OBJ_NEW(mca_base_modex_module_t);
|
||||
if(NULL != modex_module) {
|
||||
modex_module->component = *component;
|
||||
ompi_list_append(&modex->modex_modules, (ompi_list_item_t*)modex_module);
|
||||
opal_list_append(&modex->modex_modules, (opal_list_item_t*)modex_module);
|
||||
}
|
||||
}
|
||||
return modex_module;
|
||||
@ -377,16 +377,16 @@ static int mca_base_modex_subscribe(orte_process_name_t* name)
|
||||
orte_gpr_trigger_t trig, *trigs;
|
||||
orte_gpr_subscription_t sub, *subs;
|
||||
orte_jobid_t jobid;
|
||||
ompi_list_item_t* item;
|
||||
opal_list_item_t* item;
|
||||
mca_base_modex_subscription_t* subscription;
|
||||
int rc;
|
||||
|
||||
/* check for an existing subscription */
|
||||
OMPI_LOCK(&mca_base_modex_lock);
|
||||
if (!ompi_list_is_empty(&mca_base_modex_subscriptions)) {
|
||||
for(item = ompi_list_get_first(&mca_base_modex_subscriptions);
|
||||
item != ompi_list_get_end(&mca_base_modex_subscriptions);
|
||||
item = ompi_list_get_next(item)) {
|
||||
if (!opal_list_is_empty(&mca_base_modex_subscriptions)) {
|
||||
for(item = opal_list_get_first(&mca_base_modex_subscriptions);
|
||||
item != opal_list_get_end(&mca_base_modex_subscriptions);
|
||||
item = opal_list_get_next(item)) {
|
||||
subscription = (mca_base_modex_subscription_t*)item;
|
||||
if(subscription->jobid == name->jobid) {
|
||||
OMPI_UNLOCK(&mca_base_modex_lock);
|
||||
@ -503,7 +503,7 @@ static int mca_base_modex_subscribe(orte_process_name_t* name)
|
||||
OMPI_LOCK(&mca_base_modex_lock);
|
||||
subscription = OBJ_NEW(mca_base_modex_subscription_t);
|
||||
subscription->jobid = name->jobid;
|
||||
ompi_list_append(&mca_base_modex_subscriptions, &subscription->item);
|
||||
opal_list_append(&mca_base_modex_subscriptions, &subscription->item);
|
||||
OMPI_UNLOCK(&mca_base_modex_lock);
|
||||
OBJ_DESTRUCT(&sub);
|
||||
OBJ_DESTRUCT(&trig);
|
||||
|
@ -60,7 +60,7 @@ OMPI_DECLSPEC mca_pml_base_module_t mca_pml = {
|
||||
NULL /* pml_start */
|
||||
};
|
||||
|
||||
ompi_list_t mca_pml_base_components_available;
|
||||
opal_list_t mca_pml_base_components_available;
|
||||
mca_pml_base_component_t mca_pml_base_selected_component;
|
||||
char *mca_pml_base_pml;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
typedef struct opened_component_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
mca_pml_base_component_t *om_component;
|
||||
} opened_component_t;
|
||||
|
||||
@ -44,11 +44,11 @@ int mca_pml_base_select(bool enable_progress_threads,
|
||||
bool enable_mpi_threads)
|
||||
{
|
||||
int priority = 0, best_priority = 0;
|
||||
ompi_list_item_t *item = NULL;
|
||||
opal_list_item_t *item = NULL;
|
||||
mca_base_component_list_item_t *cli = NULL;
|
||||
mca_pml_base_component_t *component = NULL, *best_component = NULL;
|
||||
mca_pml_base_module_t *module = NULL, *best_module = NULL;
|
||||
ompi_list_t opened;
|
||||
opal_list_t opened;
|
||||
opened_component_t *om = NULL;
|
||||
|
||||
/* Traverse the list of available components; call their init
|
||||
@ -57,10 +57,10 @@ int mca_pml_base_select(bool enable_progress_threads,
|
||||
best_priority = -1;
|
||||
best_component = NULL;
|
||||
module = NULL;
|
||||
OBJ_CONSTRUCT(&opened, ompi_list_t);
|
||||
for (item = ompi_list_get_first(&mca_pml_base_components_available);
|
||||
ompi_list_get_end(&mca_pml_base_components_available) != item;
|
||||
item = ompi_list_get_next(item)) {
|
||||
OBJ_CONSTRUCT(&opened, opal_list_t);
|
||||
for (item = opal_list_get_first(&mca_pml_base_components_available);
|
||||
opal_list_get_end(&mca_pml_base_components_available) != item;
|
||||
item = opal_list_get_next(item)) {
|
||||
cli = (mca_base_component_list_item_t *) item;
|
||||
component = (mca_pml_base_component_t *) cli->cli_component;
|
||||
|
||||
@ -95,9 +95,9 @@ int mca_pml_base_select(bool enable_progress_threads,
|
||||
if (NULL == om) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
OBJ_CONSTRUCT(om, ompi_list_item_t);
|
||||
OBJ_CONSTRUCT(om, opal_list_item_t);
|
||||
om->om_component = component;
|
||||
ompi_list_append(&opened, (ompi_list_item_t*) om);
|
||||
opal_list_append(&opened, (opal_list_item_t*) om);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -111,9 +111,9 @@ int mca_pml_base_select(bool enable_progress_threads,
|
||||
|
||||
/* Finalize all non-selected components */
|
||||
|
||||
for (item = ompi_list_remove_first(&opened);
|
||||
for (item = opal_list_remove_first(&opened);
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&opened)) {
|
||||
item = opal_list_remove_first(&opened)) {
|
||||
om = (opened_component_t *) item;
|
||||
if (om->om_component != best_component) {
|
||||
|
||||
|
@ -44,7 +44,7 @@ int mca_pml_example_del_comm(ompi_communicator_t* comm)
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_example_add_ptls(ompi_list_t *ptls)
|
||||
int mca_pml_example_add_ptls(opal_list_t *ptls)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ struct mca_pml_example_t {
|
||||
mca_ptl_base_module_t** example_ptl_modules;
|
||||
size_t example_num_ptl_modules;
|
||||
|
||||
ompi_list_t example_procs;
|
||||
opal_list_t example_procs;
|
||||
ompi_mutex_t example_lock;
|
||||
|
||||
/* free list of requests */
|
||||
@ -40,7 +40,7 @@ struct mca_pml_example_t {
|
||||
ompi_free_list_t example_recv_requests;
|
||||
|
||||
/* list of pending send requests */
|
||||
ompi_list_t example_send_pending;
|
||||
opal_list_t example_send_pending;
|
||||
};
|
||||
typedef struct mca_pml_example_t mca_pml_example_t;
|
||||
|
||||
@ -55,7 +55,7 @@ extern int mca_pml_example_del_comm( struct ompi_communicator_t* comm );
|
||||
extern int mca_pml_example_add_procs( struct ompi_proc_t **procs, size_t nprocs );
|
||||
extern int mca_pml_example_del_procs( struct ompi_proc_t **procs, size_t nprocs );
|
||||
|
||||
extern int mca_pml_example_add_ptls( ompi_list_t *ptls );
|
||||
extern int mca_pml_example_add_ptls( opal_list_t *ptls );
|
||||
|
||||
extern int mca_pml_example_control( int param, void *size, size_t value );
|
||||
|
||||
|
@ -106,9 +106,9 @@ static int btl_exclusivity_compare(const void* arg1, const void* arg2)
|
||||
int mca_pml_ob1_add_btls()
|
||||
{
|
||||
/* build an array of ob1s and ob1 modules */
|
||||
ompi_list_t* btls = &mca_btl_base_modules_initialized;
|
||||
opal_list_t* btls = &mca_btl_base_modules_initialized;
|
||||
mca_btl_base_selected_module_t* selected_btl;
|
||||
size_t num_btls = ompi_list_get_size(btls);
|
||||
size_t num_btls = opal_list_get_size(btls);
|
||||
|
||||
mca_pml_ob1.num_btl_modules = 0;
|
||||
mca_pml_ob1.num_btl_progress = 0;
|
||||
@ -123,9 +123,9 @@ int mca_pml_ob1_add_btls()
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
for(selected_btl = (mca_btl_base_selected_module_t*)ompi_list_get_first(btls);
|
||||
selected_btl != (mca_btl_base_selected_module_t*)ompi_list_get_end(btls);
|
||||
selected_btl = (mca_btl_base_selected_module_t*)ompi_list_get_next(selected_btl)) {
|
||||
for(selected_btl = (mca_btl_base_selected_module_t*)opal_list_get_first(btls);
|
||||
selected_btl != (mca_btl_base_selected_module_t*)opal_list_get_end(btls);
|
||||
selected_btl = (mca_btl_base_selected_module_t*)opal_list_get_next(selected_btl)) {
|
||||
mca_btl_base_module_t *btl = selected_btl->btl_module;
|
||||
size_t i;
|
||||
int rc;
|
||||
|
@ -73,10 +73,10 @@ struct mca_pml_ob1_t {
|
||||
ompi_free_list_t buffers;
|
||||
|
||||
/* list of pending operations */
|
||||
ompi_list_t acks_pending;
|
||||
ompi_list_t send_pending;
|
||||
ompi_list_t recv_pending;
|
||||
ompi_list_t rdma_pending;
|
||||
opal_list_t acks_pending;
|
||||
opal_list_t send_pending;
|
||||
opal_list_t recv_pending;
|
||||
opal_list_t rdma_pending;
|
||||
};
|
||||
typedef struct mca_pml_ob1_t mca_pml_ob1_t;
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
static void mca_pml_ob1_comm_proc_construct(mca_pml_ob1_comm_proc_t* proc)
|
||||
{
|
||||
proc->expected_sequence = 1;
|
||||
OBJ_CONSTRUCT(&proc->frags_cant_match, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&proc->specific_receives, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&proc->unexpected_frags, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&proc->frags_cant_match, opal_list_t);
|
||||
OBJ_CONSTRUCT(&proc->specific_receives, opal_list_t);
|
||||
OBJ_CONSTRUCT(&proc->unexpected_frags, opal_list_t);
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ static OBJ_CLASS_INSTANCE(
|
||||
|
||||
static void mca_pml_ob1_comm_construct(mca_pml_ob1_comm_t* comm)
|
||||
{
|
||||
OBJ_CONSTRUCT(&comm->wild_receives, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&comm->wild_receives, opal_list_t);
|
||||
OBJ_CONSTRUCT(&comm->matching_lock, ompi_mutex_t);
|
||||
comm->recv_sequence = 0;
|
||||
comm->procs = NULL;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "threads/mutex.h"
|
||||
#include "threads/condition.h"
|
||||
#include "mca/ptl/ptl.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -31,9 +31,9 @@ extern "C" {
|
||||
struct mca_pml_ob1_comm_proc_t {
|
||||
opal_object_t super;
|
||||
uint16_t expected_sequence; /**< send message sequence number - receiver side */
|
||||
ompi_list_t frags_cant_match; /**< out-of-order fragment queues */
|
||||
ompi_list_t specific_receives; /**< queues of unmatched specific receives */
|
||||
ompi_list_t unexpected_frags; /**< unexpected fragment queues */
|
||||
opal_list_t frags_cant_match; /**< out-of-order fragment queues */
|
||||
opal_list_t specific_receives; /**< queues of unmatched specific receives */
|
||||
opal_list_t unexpected_frags; /**< unexpected fragment queues */
|
||||
};
|
||||
typedef struct mca_pml_ob1_comm_proc_t mca_pml_ob1_comm_proc_t;
|
||||
|
||||
@ -46,7 +46,7 @@ struct mca_pml_comm_t {
|
||||
opal_object_t super;
|
||||
mca_ptl_sequence_t recv_sequence; /**< recv request sequence number - receiver side */
|
||||
ompi_mutex_t matching_lock; /**< matching lock */
|
||||
ompi_list_t wild_receives; /**< queue of unmatched wild (source process not specified) receives */
|
||||
opal_list_t wild_receives; /**< queue of unmatched wild (source process not specified) receives */
|
||||
mca_pml_ob1_comm_proc_t* procs;
|
||||
size_t num_procs;
|
||||
};
|
||||
|
@ -90,9 +90,9 @@ int mca_pml_ob1_component_open(void)
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.buffers, ompi_free_list_t);
|
||||
|
||||
/* pending operations */
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.recv_pending, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.acks_pending, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.recv_pending, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pml_ob1.acks_pending, opal_list_t);
|
||||
|
||||
mca_pml_ob1.btl_components = NULL;
|
||||
mca_pml_ob1.num_btl_components = 0;
|
||||
@ -135,16 +135,16 @@ int mca_pml_ob1_component_close(void)
|
||||
|
||||
#if OMPI_ENABLE_DEBUG
|
||||
if (mca_pml_ob1.send_requests.fl_num_allocated !=
|
||||
mca_pml_ob1.send_requests.super.ompi_list_length) {
|
||||
mca_pml_ob1.send_requests.super.opal_list_length) {
|
||||
ompi_output(0, "ob1 send requests: %d allocated %d returned\n",
|
||||
mca_pml_ob1.send_requests.fl_num_allocated,
|
||||
mca_pml_ob1.send_requests.super.ompi_list_length);
|
||||
mca_pml_ob1.send_requests.super.opal_list_length);
|
||||
}
|
||||
if (mca_pml_ob1.recv_requests.fl_num_allocated !=
|
||||
mca_pml_ob1.recv_requests.super.ompi_list_length) {
|
||||
mca_pml_ob1.recv_requests.super.opal_list_length) {
|
||||
ompi_output(0, "ob1 recv requests: %d allocated %d returned\n",
|
||||
mca_pml_ob1.recv_requests.fl_num_allocated,
|
||||
mca_pml_ob1.recv_requests.super.ompi_list_length);
|
||||
mca_pml_ob1.recv_requests.super.opal_list_length);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_pml_ob1_rdma_frag_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
NULL,
|
||||
NULL);
|
||||
|
@ -31,7 +31,7 @@ typedef enum {
|
||||
} mca_pml_ob1_rdma_state_t;
|
||||
|
||||
struct mca_pml_ob1_rdma_frag_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
mca_btl_base_module_t* rdma_btl;
|
||||
mca_pml_ob1_hdr_t rdma_hdr;
|
||||
mca_pml_ob1_rdma_state_t rdma_state;
|
||||
@ -47,7 +47,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_rdma_frag_t);
|
||||
|
||||
#define MCA_PML_OB1_RDMA_FRAG_ALLOC(frag,rc) \
|
||||
do { \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.rdma_frags, item, rc); \
|
||||
frag = (mca_pml_ob1_rdma_frag_t*)item; \
|
||||
} while(0)
|
||||
@ -56,7 +56,7 @@ do { \
|
||||
do { \
|
||||
/* return fragment */ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.rdma_frags, \
|
||||
(ompi_list_item_t*)frag); \
|
||||
(opal_list_item_t*)frag); \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "include/constants.h"
|
||||
#include "communicator/communicator.h"
|
||||
@ -36,14 +36,14 @@
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_pml_ob1_buffer_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
mca_pml_ob1_recv_frag_t,
|
||||
ompi_list_item_t,
|
||||
opal_list_item_t,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
@ -141,7 +141,7 @@ void mca_pml_ob1_recv_frag_callback(
|
||||
#define MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr,comm,proc,return_match) \
|
||||
do { \
|
||||
/* local parameters */ \
|
||||
ompi_list_t* wild_receives = &comm->wild_receives; \
|
||||
opal_list_t* wild_receives = &comm->wild_receives; \
|
||||
mca_pml_ob1_recv_request_t *wild_recv; \
|
||||
int frag_tag,recv_tag; \
|
||||
\
|
||||
@ -154,11 +154,11 @@ do { \
|
||||
* change this list. \
|
||||
*/ \
|
||||
for(wild_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_first(wild_receives); \
|
||||
opal_list_get_first(wild_receives); \
|
||||
wild_recv != (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_end(wild_receives); \
|
||||
opal_list_get_end(wild_receives); \
|
||||
wild_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
((ompi_list_item_t *)wild_recv)->ompi_list_next) { \
|
||||
((opal_list_item_t *)wild_recv)->opal_list_next) { \
|
||||
\
|
||||
recv_tag = wild_recv->req_recv.req_base.req_tag; \
|
||||
if ( \
|
||||
@ -176,8 +176,8 @@ do { \
|
||||
return_match = wild_recv; \
|
||||
\
|
||||
/* remove this irecv from the postd wild ireceive list */ \
|
||||
ompi_list_remove_item(wild_receives, \
|
||||
(ompi_list_item_t *)wild_recv); \
|
||||
opal_list_remove_item(wild_receives, \
|
||||
(opal_list_item_t *)wild_recv); \
|
||||
\
|
||||
/* found match - no need to continue */ \
|
||||
break; \
|
||||
@ -203,7 +203,7 @@ do { \
|
||||
#define MCA_PML_OB1_CHECK_SPECIFIC_RECEIVES_FOR_MATCH(hdr,comm,proc,return_match) \
|
||||
do { \
|
||||
/* local variables */ \
|
||||
ompi_list_t* specific_receives = &proc->specific_receives; \
|
||||
opal_list_t* specific_receives = &proc->specific_receives; \
|
||||
mca_pml_ob1_recv_request_t *specific_recv; \
|
||||
int recv_tag,frag_tag; \
|
||||
\
|
||||
@ -214,11 +214,11 @@ do { \
|
||||
* Loop over the specific irecvs. \
|
||||
*/ \
|
||||
for(specific_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_first(specific_receives); \
|
||||
opal_list_get_first(specific_receives); \
|
||||
specific_recv != (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_end(specific_receives); \
|
||||
opal_list_get_end(specific_receives); \
|
||||
specific_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
((ompi_list_item_t *)specific_recv)->ompi_list_next) { \
|
||||
((opal_list_item_t *)specific_recv)->opal_list_next) { \
|
||||
/* \
|
||||
* Check for a match \
|
||||
*/ \
|
||||
@ -232,8 +232,8 @@ do { \
|
||||
return_match = specific_recv; \
|
||||
\
|
||||
/* remove descriptor from posted specific ireceive list */ \
|
||||
ompi_list_remove_item(specific_receives, \
|
||||
(ompi_list_item_t *)specific_recv); \
|
||||
opal_list_remove_item(specific_receives, \
|
||||
(opal_list_item_t *)specific_recv); \
|
||||
\
|
||||
break; \
|
||||
} \
|
||||
@ -273,9 +273,9 @@ do { \
|
||||
* have been posted. \
|
||||
*/ \
|
||||
specific_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_first(&(proc)->specific_receives); \
|
||||
opal_list_get_first(&(proc)->specific_receives); \
|
||||
wild_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_first(&comm->wild_receives); \
|
||||
opal_list_get_first(&comm->wild_receives); \
|
||||
\
|
||||
specific_recv_seq = specific_recv->req_recv.req_base.req_sequence; \
|
||||
wild_recv_seq = wild_recv->req_recv.req_base.req_sequence; \
|
||||
@ -297,8 +297,8 @@ do { \
|
||||
return_match=wild_recv; \
|
||||
\
|
||||
/* remove this recv from the wild receive queue */ \
|
||||
ompi_list_remove_item(&comm->wild_receives, \
|
||||
(ompi_list_item_t *)wild_recv); \
|
||||
opal_list_remove_item(&comm->wild_receives, \
|
||||
(opal_list_item_t *)wild_recv); \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
@ -306,14 +306,14 @@ do { \
|
||||
* No match, go to the next. \
|
||||
*/ \
|
||||
wild_recv=(mca_pml_ob1_recv_request_t *) \
|
||||
((ompi_list_item_t *)wild_recv)->ompi_list_next; \
|
||||
((opal_list_item_t *)wild_recv)->opal_list_next; \
|
||||
\
|
||||
/* \
|
||||
* If that was the last wild one, just look at the \
|
||||
* rest of the specific ones. \
|
||||
*/ \
|
||||
if (wild_recv == (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_end(&comm->wild_receives) ) \
|
||||
opal_list_get_end(&comm->wild_receives) ) \
|
||||
{ \
|
||||
MCA_PML_OB1_CHECK_SPECIFIC_RECEIVES_FOR_MATCH(hdr, comm, proc, return_match); \
|
||||
break; \
|
||||
@ -338,8 +338,8 @@ do { \
|
||||
*/ \
|
||||
return_match = specific_recv; \
|
||||
/* remove descriptor from specific receive list */ \
|
||||
ompi_list_remove_item(&(proc)->specific_receives, \
|
||||
(ompi_list_item_t *)specific_recv); \
|
||||
opal_list_remove_item(&(proc)->specific_receives, \
|
||||
(opal_list_item_t *)specific_recv); \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
@ -347,14 +347,14 @@ do { \
|
||||
* No match, go on to the next specific irecv. \
|
||||
*/ \
|
||||
specific_recv = (mca_pml_ob1_recv_request_t *) \
|
||||
((ompi_list_item_t *)specific_recv)->ompi_list_next; \
|
||||
((opal_list_item_t *)specific_recv)->opal_list_next; \
|
||||
\
|
||||
/* \
|
||||
* If that was the last specific irecv, process the \
|
||||
* rest of the wild ones. \
|
||||
*/ \
|
||||
if (specific_recv == (mca_pml_ob1_recv_request_t *) \
|
||||
ompi_list_get_end(&(proc)->specific_receives)) \
|
||||
opal_list_get_end(&(proc)->specific_receives)) \
|
||||
{ \
|
||||
MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr, comm, proc, return_match); \
|
||||
break; \
|
||||
@ -374,7 +374,7 @@ do { \
|
||||
*/
|
||||
|
||||
static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
ompi_list_t *additional_matches,
|
||||
opal_list_t *additional_matches,
|
||||
mca_pml_ob1_comm_t* comm,
|
||||
mca_pml_ob1_comm_proc_t *proc);
|
||||
|
||||
@ -422,7 +422,7 @@ int mca_pml_ob1_recv_frag_match(
|
||||
mca_pml_ob1_comm_t *comm;
|
||||
mca_pml_ob1_comm_proc_t *proc;
|
||||
bool additional_match=false;
|
||||
ompi_list_t additional_matches;
|
||||
opal_list_t additional_matches;
|
||||
int rc;
|
||||
|
||||
/* communicator pointer */
|
||||
@ -460,13 +460,13 @@ int mca_pml_ob1_recv_frag_match(
|
||||
* look only at "specific" receives, or "wild" receives,
|
||||
* or if we need to traverse both sets at the same time.
|
||||
*/
|
||||
if (ompi_list_get_size(&proc->specific_receives) == 0 ){
|
||||
if (opal_list_get_size(&proc->specific_receives) == 0 ){
|
||||
/*
|
||||
* There are only wild irecvs, so specialize the algorithm.
|
||||
*/
|
||||
MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr, comm, proc, match);
|
||||
|
||||
} else if (ompi_list_get_size(&comm->wild_receives) == 0 ) {
|
||||
} else if (opal_list_get_size(&comm->wild_receives) == 0 ) {
|
||||
/*
|
||||
* There are only specific irecvs, so specialize the algorithm.
|
||||
*/
|
||||
@ -498,7 +498,7 @@ int mca_pml_ob1_recv_frag_match(
|
||||
return rc;
|
||||
}
|
||||
MCA_PML_OB1_RECV_FRAG_INIT(frag,btl,hdr,segments,num_segments);
|
||||
ompi_list_append( &proc->unexpected_frags, (ompi_list_item_t *)frag );
|
||||
opal_list_append( &proc->unexpected_frags, (opal_list_item_t *)frag );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -506,7 +506,7 @@ int mca_pml_ob1_recv_frag_match(
|
||||
* any fragments on the c_c_frags_cant_match list
|
||||
* may now be used to form new matchs
|
||||
*/
|
||||
if (0 < ompi_list_get_size(&proc->frags_cant_match)) {
|
||||
if (0 < opal_list_get_size(&proc->frags_cant_match)) {
|
||||
additional_match = mca_pml_ob1_check_cantmatch_for_match(&additional_matches,comm,proc);
|
||||
}
|
||||
|
||||
@ -523,7 +523,7 @@ int mca_pml_ob1_recv_frag_match(
|
||||
return rc;
|
||||
}
|
||||
MCA_PML_OB1_RECV_FRAG_INIT(frag,btl,hdr,segments,num_segments);
|
||||
ompi_list_append(&proc->frags_cant_match, (ompi_list_item_t *)frag);
|
||||
opal_list_append(&proc->frags_cant_match, (opal_list_item_t *)frag);
|
||||
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(&pml_comm->matching_lock);
|
||||
@ -535,8 +535,8 @@ int mca_pml_ob1_recv_frag_match(
|
||||
mca_pml_ob1_recv_request_progress(match,btl,segments,num_segments);
|
||||
}
|
||||
if(additional_match) {
|
||||
ompi_list_item_t* item;
|
||||
while(NULL != (item = ompi_list_remove_first(&additional_matches))) {
|
||||
opal_list_item_t* item;
|
||||
while(NULL != (item = opal_list_remove_first(&additional_matches))) {
|
||||
mca_pml_ob1_recv_frag_t* frag = (mca_pml_ob1_recv_frag_t*)item;
|
||||
MCA_PML_OB1_RECV_REQUEST_MATCHED(frag->request, hdr);
|
||||
mca_pml_ob1_recv_request_progress(frag->request,frag->btl,frag->segments,frag->num_segments);
|
||||
@ -563,7 +563,7 @@ int mca_pml_ob1_recv_frag_match(
|
||||
*/
|
||||
|
||||
static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
ompi_list_t *additional_matches,
|
||||
opal_list_t *additional_matches,
|
||||
mca_pml_ob1_comm_t* comm,
|
||||
mca_pml_ob1_comm_proc_t *proc)
|
||||
{
|
||||
@ -580,7 +580,7 @@ static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
*/
|
||||
|
||||
match_found = 1;
|
||||
while ((0 < ompi_list_get_size(&proc->frags_cant_match)) && match_found) {
|
||||
while ((0 < opal_list_get_size(&proc->frags_cant_match)) && match_found) {
|
||||
|
||||
/* initialize match flag for this search */
|
||||
match_found = 0;
|
||||
@ -592,11 +592,11 @@ static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
* number next_msg_seq_expected
|
||||
*/
|
||||
for(frag = (mca_pml_ob1_recv_frag_t *)
|
||||
ompi_list_get_first(&proc->frags_cant_match);
|
||||
opal_list_get_first(&proc->frags_cant_match);
|
||||
frag != (mca_pml_ob1_recv_frag_t *)
|
||||
ompi_list_get_end(&proc->frags_cant_match);
|
||||
opal_list_get_end(&proc->frags_cant_match);
|
||||
frag = (mca_pml_ob1_recv_frag_t *)
|
||||
ompi_list_get_next(frag))
|
||||
opal_list_get_next(frag))
|
||||
{
|
||||
/*
|
||||
* If the message has the next expected seq from that proc...
|
||||
@ -614,8 +614,8 @@ static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
/*
|
||||
* remove frag from list
|
||||
*/
|
||||
ompi_list_remove_item(&proc->frags_cant_match,
|
||||
(ompi_list_item_t *)frag);
|
||||
opal_list_remove_item(&proc->frags_cant_match,
|
||||
(opal_list_item_t *)frag);
|
||||
|
||||
/*
|
||||
* figure out what sort of matching logic to use, if need to
|
||||
@ -623,12 +623,12 @@ static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
* or if we need to traverse both sets at the same time.
|
||||
*/
|
||||
proc = comm->procs + hdr->hdr_src;
|
||||
if (ompi_list_get_size(&proc->specific_receives) == 0 ) {
|
||||
if (opal_list_get_size(&proc->specific_receives) == 0 ) {
|
||||
/*
|
||||
* There are only wild irecvs, so specialize the algorithm.
|
||||
*/
|
||||
MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr, comm, proc, match);
|
||||
} else if (ompi_list_get_size(&comm->wild_receives) == 0 ) {
|
||||
} else if (opal_list_get_size(&comm->wild_receives) == 0 ) {
|
||||
/*
|
||||
* There are only specific irecvs, so specialize the algorithm.
|
||||
*/
|
||||
@ -653,14 +653,14 @@ static bool mca_pml_ob1_check_cantmatch_for_match(
|
||||
*/
|
||||
if(match_made == false) {
|
||||
match_made = true;
|
||||
OBJ_CONSTRUCT(additional_matches, ompi_list_t);
|
||||
OBJ_CONSTRUCT(additional_matches, opal_list_t);
|
||||
}
|
||||
ompi_list_append(additional_matches, (ompi_list_item_t *)frag);
|
||||
opal_list_append(additional_matches, (opal_list_item_t *)frag);
|
||||
|
||||
} else {
|
||||
|
||||
/* if no match found, place on unexpected queue */
|
||||
ompi_list_append( &proc->unexpected_frags, (ompi_list_item_t *)frag);
|
||||
opal_list_append( &proc->unexpected_frags, (opal_list_item_t *)frag);
|
||||
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "pml_ob1_hdr.h"
|
||||
|
||||
struct mca_pml_ob1_buffer_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
unsigned char addr[1];
|
||||
};
|
||||
typedef struct mca_pml_ob1_buffer_t mca_pml_ob1_buffer_t;
|
||||
@ -33,7 +33,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_buffer_t);
|
||||
|
||||
|
||||
struct mca_pml_ob1_recv_frag_t {
|
||||
ompi_list_item_t super;
|
||||
opal_list_item_t super;
|
||||
mca_btl_base_module_t* btl;
|
||||
mca_pml_ob1_hdr_t hdr;
|
||||
struct mca_pml_ob1_recv_request_t* request;
|
||||
@ -48,7 +48,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_frag_t);
|
||||
|
||||
#define MCA_PML_OB1_RECV_FRAG_ALLOC(frag,rc) \
|
||||
do { \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.recv_frags, item, rc); \
|
||||
frag = (mca_pml_ob1_recv_frag_t*)item; \
|
||||
} while(0)
|
||||
@ -67,7 +67,7 @@ do { \
|
||||
\
|
||||
/* copy over data */ \
|
||||
for(i=0; i<cnt; i++) { \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
mca_pml_ob1_buffer_t* buff; \
|
||||
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.buffers, item, rc); \
|
||||
buff = (mca_pml_ob1_buffer_t*)item; \
|
||||
@ -89,13 +89,13 @@ do { \
|
||||
/* return buffers */ \
|
||||
for(i=0; i<frag->num_segments; i++) { \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.buffers, \
|
||||
(ompi_list_item_t*)frag->buffers[i]); \
|
||||
(opal_list_item_t*)frag->buffers[i]); \
|
||||
} \
|
||||
frag->num_segments = 0; \
|
||||
\
|
||||
/* return recv_frag */ \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_frags, \
|
||||
(ompi_list_item_t*)frag); \
|
||||
(opal_list_item_t*)frag); \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
@ -54,10 +54,10 @@ static int mca_pml_ob1_recv_request_cancel(struct ompi_request_t* ompi_request,
|
||||
OMPI_THREAD_LOCK(&comm->matching_lock);
|
||||
if( OMPI_ANY_TAG == ompi_request->req_status.MPI_TAG ) { /* the match has not been already done */
|
||||
if( request->req_recv.req_base.req_peer == OMPI_ANY_SOURCE ) {
|
||||
ompi_list_remove_item( &comm->wild_receives, (ompi_list_item_t*)request );
|
||||
opal_list_remove_item( &comm->wild_receives, (opal_list_item_t*)request );
|
||||
} else {
|
||||
mca_pml_ob1_comm_proc_t* proc = comm->procs + request->req_recv.req_base.req_peer;
|
||||
ompi_list_remove_item(&proc->specific_receives, (ompi_list_item_t*)request);
|
||||
opal_list_remove_item(&proc->specific_receives, (opal_list_item_t*)request);
|
||||
}
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(&comm->matching_lock);
|
||||
@ -204,7 +204,7 @@ retry:
|
||||
frag->hdr.hdr_rndv = *hdr;
|
||||
frag->num_segments = 0;
|
||||
frag->request = recvreq;
|
||||
ompi_list_append(&mca_pml_ob1.acks_pending, (ompi_list_item_t*)frag);
|
||||
opal_list_append(&mca_pml_ob1.acks_pending, (opal_list_item_t*)frag);
|
||||
}
|
||||
|
||||
|
||||
@ -407,7 +407,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
||||
#endif
|
||||
if(dst == NULL) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq);
|
||||
opal_list_append(&mca_pml_ob1.recv_pending, (opal_list_item_t*)recvreq);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
break;
|
||||
}
|
||||
@ -423,7 +423,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
||||
if(ctl == NULL) {
|
||||
ep->btl_free(ep->btl,dst);
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq);
|
||||
opal_list_append(&mca_pml_ob1.recv_pending, (opal_list_item_t*)recvreq);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
break;
|
||||
}
|
||||
@ -455,7 +455,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
||||
recvreq->req_rdma_offset -= size;
|
||||
OMPI_THREAD_ADD32(&recvreq->req_pipeline_depth,-1);
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq);
|
||||
opal_list_append(&mca_pml_ob1.recv_pending, (opal_list_item_t*)recvreq);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
break;
|
||||
}
|
||||
@ -484,7 +484,7 @@ void mca_pml_ob1_recv_request_match_specific(mca_pml_ob1_recv_request_t* request
|
||||
/* assign sequence number */
|
||||
request->req_recv.req_base.req_sequence = comm->recv_sequence++;
|
||||
|
||||
if (ompi_list_get_size(&proc->unexpected_frags) > 0 &&
|
||||
if (opal_list_get_size(&proc->unexpected_frags) > 0 &&
|
||||
(frag = mca_pml_ob1_recv_request_match_specific_proc(request, proc)) != NULL) {
|
||||
OMPI_THREAD_UNLOCK(&comm->matching_lock);
|
||||
|
||||
@ -500,7 +500,7 @@ void mca_pml_ob1_recv_request_match_specific(mca_pml_ob1_recv_request_t* request
|
||||
* it when the message comes in.
|
||||
*/
|
||||
if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) {
|
||||
ompi_list_append(&proc->specific_receives, (ompi_list_item_t*)request);
|
||||
opal_list_append(&proc->specific_receives, (opal_list_item_t*)request);
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(&comm->matching_lock);
|
||||
}
|
||||
@ -533,7 +533,7 @@ void mca_pml_ob1_recv_request_match_wild(mca_pml_ob1_recv_request_t* request)
|
||||
mca_pml_ob1_recv_frag_t* frag;
|
||||
|
||||
/* continue if no frags to match */
|
||||
if (ompi_list_get_size(&proc->unexpected_frags) == 0) {
|
||||
if (opal_list_get_size(&proc->unexpected_frags) == 0) {
|
||||
proc++;
|
||||
continue;
|
||||
}
|
||||
@ -557,7 +557,7 @@ void mca_pml_ob1_recv_request_match_wild(mca_pml_ob1_recv_request_t* request)
|
||||
*/
|
||||
|
||||
if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE)
|
||||
ompi_list_append(&comm->wild_receives, (ompi_list_item_t*)request);
|
||||
opal_list_append(&comm->wild_receives, (opal_list_item_t*)request);
|
||||
OMPI_THREAD_UNLOCK(&comm->matching_lock);
|
||||
}
|
||||
|
||||
@ -571,15 +571,15 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc(
|
||||
mca_pml_ob1_recv_request_t* request,
|
||||
mca_pml_ob1_comm_proc_t* proc)
|
||||
{
|
||||
ompi_list_t* unexpected_frags = &proc->unexpected_frags;
|
||||
opal_list_t* unexpected_frags = &proc->unexpected_frags;
|
||||
mca_pml_ob1_recv_frag_t* frag;
|
||||
mca_pml_ob1_match_hdr_t* hdr;
|
||||
int tag = request->req_recv.req_base.req_tag;
|
||||
|
||||
if( OMPI_ANY_TAG == tag ) {
|
||||
for (frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_first(unexpected_frags);
|
||||
frag != (mca_pml_ob1_recv_frag_t*)ompi_list_get_end(unexpected_frags);
|
||||
frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_next(frag)) {
|
||||
for (frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_first(unexpected_frags);
|
||||
frag != (mca_pml_ob1_recv_frag_t*)opal_list_get_end(unexpected_frags);
|
||||
frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_next(frag)) {
|
||||
hdr = &(frag->hdr.hdr_match);
|
||||
|
||||
/* check first frag - we assume that process matching has been done already */
|
||||
@ -588,9 +588,9 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_first(unexpected_frags);
|
||||
frag != (mca_pml_ob1_recv_frag_t*)ompi_list_get_end(unexpected_frags);
|
||||
frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_next(frag)) {
|
||||
for (frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_first(unexpected_frags);
|
||||
frag != (mca_pml_ob1_recv_frag_t*)opal_list_get_end(unexpected_frags);
|
||||
frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_next(frag)) {
|
||||
hdr = &(frag->hdr.hdr_match);
|
||||
|
||||
/* check first frag - we assume that process matching has been done already */
|
||||
@ -605,7 +605,7 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc(
|
||||
MCA_PML_OB1_RECV_REQUEST_MATCHED(request, hdr);
|
||||
if( !((MCA_PML_REQUEST_IPROBE == request->req_recv.req_base.req_type) ||
|
||||
(MCA_PML_REQUEST_PROBE == request->req_recv.req_base.req_type)) ) {
|
||||
ompi_list_remove_item(unexpected_frags, (ompi_list_item_t*)frag);
|
||||
opal_list_remove_item(unexpected_frags, (opal_list_item_t*)frag);
|
||||
frag->request = request;
|
||||
}
|
||||
return frag;
|
||||
|
@ -73,7 +73,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_request_t);
|
||||
*/
|
||||
#define MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq, rc) \
|
||||
do { \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
rc = OMPI_SUCCESS; \
|
||||
OMPI_FREE_LIST_GET(&mca_pml_ob1.recv_requests, item, rc); \
|
||||
recvreq = (mca_pml_ob1_recv_request_t*)item; \
|
||||
@ -129,7 +129,7 @@ do {
|
||||
} \
|
||||
\
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (ompi_list_item_t*)(recvreq)); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (opal_list_item_t*)(recvreq)); \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
|
@ -173,7 +173,7 @@ static void mca_pml_ob1_send_completion(
|
||||
break;
|
||||
}
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.ob1_lock);
|
||||
sendreq = (mca_pml_ob1_send_request_t*)ompi_list_remove_first(&mca_pml_ob1.send_pending);
|
||||
sendreq = (mca_pml_ob1_send_request_t*)opal_list_remove_first(&mca_pml_ob1.send_pending);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.ob1_lock);
|
||||
}
|
||||
}
|
||||
@ -423,7 +423,7 @@ int mca_pml_ob1_send_request_schedule(mca_pml_ob1_send_request_t* sendreq)
|
||||
&size);
|
||||
if(des == NULL) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.send_pending, (ompi_list_item_t*)sendreq);
|
||||
opal_list_append(&mca_pml_ob1.send_pending, (opal_list_item_t*)sendreq);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
break;
|
||||
}
|
||||
@ -452,7 +452,7 @@ int mca_pml_ob1_send_request_schedule(mca_pml_ob1_send_request_t* sendreq)
|
||||
OMPI_THREAD_ADD32(&sendreq->req_pipeline_depth,-1);
|
||||
ep->btl_free(ep->btl,des);
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.send_pending, (ompi_list_item_t*)sendreq);
|
||||
opal_list_append(&mca_pml_ob1.send_pending, (opal_list_item_t*)sendreq);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
break;
|
||||
}
|
||||
@ -533,7 +533,7 @@ static void mca_pml_ob1_put_completion(
|
||||
MCA_PML_OB1_ENDPOINT_DES_ALLOC(frag->rdma_ep, fin, sizeof(mca_pml_ob1_fin_hdr_t));
|
||||
if(NULL == fin) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag);
|
||||
opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag);
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
goto cleanup;
|
||||
}
|
||||
@ -560,7 +560,7 @@ static void mca_pml_ob1_put_completion(
|
||||
btl->btl_free(btl, fin);
|
||||
if(rc == OMPI_ERR_OUT_OF_RESOURCE) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag);
|
||||
opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag);
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
} else {
|
||||
/* TSW - FIX */
|
||||
@ -647,7 +647,7 @@ void mca_pml_ob1_send_request_put(
|
||||
&size);
|
||||
if(NULL == des) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag);
|
||||
opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
}
|
||||
frag->rdma_state = MCA_PML_OB1_RDMA_PUT;
|
||||
@ -668,7 +668,7 @@ void mca_pml_ob1_send_request_put(
|
||||
if(OMPI_SUCCESS != (rc = btl->btl_put(btl, ep->btl_endpoint, des))) {
|
||||
if(rc == OMPI_ERR_OUT_OF_RESOURCE) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag);
|
||||
opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag);
|
||||
OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock);
|
||||
} else {
|
||||
/* TSW - FIX */
|
||||
|
@ -78,7 +78,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
|
||||
rc) \
|
||||
{ \
|
||||
mca_pml_ob1_proc_t *proc = comm->c_pml_procs[dst]; \
|
||||
ompi_list_item_t* item; \
|
||||
opal_list_item_t* item; \
|
||||
\
|
||||
if(NULL == proc) { \
|
||||
rc = OMPI_ERR_OUT_OF_RESOURCE; \
|
||||
@ -238,7 +238,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
|
||||
/* Let the base handle the reference counts */ \
|
||||
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
||||
OMPI_FREE_LIST_RETURN( \
|
||||
&mca_pml_ob1.send_requests, (ompi_list_item_t*)sendreq); \
|
||||
&mca_pml_ob1.send_requests, (opal_list_item_t*)sendreq); \
|
||||
}
|
||||
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user