1
1

Update code base to use the new opal_free_list_t

Use of the old ompi_free_list_t and ompi_free_list_item_t is
deprecated. These classes will be removed in a future commit.

This commit updates the entire code base to use opal_free_list_t and
opal_free_list_item_t.

Notes:

OMPI_FREE_LIST_*_MT -> opal_free_list_* (uses opal_using_threads ())

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2015-02-19 13:41:41 -07:00
родитель ed78553512
Коммит 5f1254d710
152 изменённых файлов: 1476 добавлений и 1372 удалений

Просмотреть файл

@ -32,7 +32,7 @@ static int ompi_comm_request_progress (void);
void ompi_comm_request_init (void)
{
OBJ_CONSTRUCT(&ompi_comm_requests, opal_free_list_t);
(void) opal_free_list_init (&ompi_comm_requests, sizeof (ompi_comm_request_t),
(void) opal_free_list_init (&ompi_comm_requests, sizeof (ompi_comm_request_t), 8,
OBJ_CLASS(ompi_comm_request_t), 0, 0, 0, -1, 8,
NULL, 0, NULL, NULL, NULL);

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2007-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2004-2013 The University of Tennessee and The University
@ -8,6 +9,8 @@
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -76,7 +79,7 @@ static int host_is_big_endian = 0;
* internal objects. We have to make sure we're able to find all of
* them in the image and compute their ofset in order to be able to
* parse them later. We need to find the opal_list_item_t, the
* opal_list_t, the ompi_free_list_item_t, and the ompi_free_list_t.
* opal_list_t, the opal_free_list_item_t, and the opal_free_list_t.
*
* Once we have these offsets, we should make sure that we have access
* to all requests lists and types. We're looking here only at the
@ -111,41 +114,41 @@ int ompi_fill_in_type_info(mqs_image *image, char **message)
qh_type, opal_list_t, opal_list_sentinel);
}
{
mqs_type* qh_type = mqs_find_type( image, "ompi_free_list_item_t", mqs_lang_c );
mqs_type* qh_type = mqs_find_type( image, "opal_free_list_item_t", mqs_lang_c );
if( !qh_type ) {
missing_in_action = "ompi_free_list_item_t";
missing_in_action = "opal_free_list_item_t";
goto type_missing;
}
/* This is just an overloaded opal_list_item_t */
i_info->ompi_free_list_item_t.type = qh_type;
i_info->ompi_free_list_item_t.size = mqs_sizeof(qh_type);
i_info->opal_free_list_item_t.type = qh_type;
i_info->opal_free_list_item_t.size = mqs_sizeof(qh_type);
}
{
mqs_type* qh_type = mqs_find_type( image, "ompi_free_list_t", mqs_lang_c );
mqs_type* qh_type = mqs_find_type( image, "opal_free_list_t", mqs_lang_c );
if( !qh_type ) {
missing_in_action = "ompi_free_list_t";
missing_in_action = "opal_free_list_t";
goto type_missing;
}
i_info->ompi_free_list_t.type = qh_type;
i_info->ompi_free_list_t.size = mqs_sizeof(qh_type);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_mpool,
qh_type, ompi_free_list_t, fl_mpool);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_allocations,
qh_type, ompi_free_list_t, fl_allocations);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_frag_class,
qh_type, ompi_free_list_t, fl_frag_class);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_frag_size,
qh_type, ompi_free_list_t, fl_frag_size);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_frag_alignment,
qh_type, ompi_free_list_t, fl_frag_alignment);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_max_to_alloc,
qh_type, ompi_free_list_t, fl_max_to_alloc);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_num_per_alloc,
qh_type, ompi_free_list_t, fl_num_per_alloc);
ompi_field_offset(i_info->ompi_free_list_t.offset.fl_num_allocated,
qh_type, ompi_free_list_t, fl_num_allocated);
i_info->opal_free_list_t.type = qh_type;
i_info->opal_free_list_t.size = mqs_sizeof(qh_type);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_mpool,
qh_type, opal_free_list_t, fl_mpool);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_allocations,
qh_type, opal_free_list_t, fl_allocations);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_frag_class,
qh_type, opal_free_list_t, fl_frag_class);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_frag_size,
qh_type, opal_free_list_t, fl_frag_size);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_frag_alignment,
qh_type, opal_free_list_t, fl_frag_alignment);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_max_to_alloc,
qh_type, opal_free_list_t, fl_max_to_alloc);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_num_per_alloc,
qh_type, opal_free_list_t, fl_num_per_alloc);
ompi_field_offset(i_info->opal_free_list_t.offset.fl_num_allocated,
qh_type, opal_free_list_t, fl_num_allocated);
}
{
mqs_type* qh_type = mqs_find_type( image, "opal_hash_table_t", mqs_lang_c );

Просмотреть файл

@ -1,9 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2007-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2012-2013 Inria. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -65,7 +68,7 @@ typedef struct
struct {
mqs_type *type;
int size;
} ompi_free_list_item_t;
} opal_free_list_item_t;
struct {
mqs_type *type;
int size;
@ -79,7 +82,7 @@ typedef struct
int fl_num_per_alloc; /* size_t */
int fl_num_allocated; /* size_t */
} offset;
} ompi_free_list_t;
} opal_free_list_t;
struct {
mqs_type *type;
int size;

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -11,8 +11,8 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -62,7 +62,7 @@
* debuggers will be unable to initialize the Open MPI debug library.
*/
#include "opal/class/opal_list.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "ompi/request/request.h"
#include "ompi/mca/pml/base/pml_base_request.h"
#include "ompi/mca/pml/base/pml_base_sendreq.h"
@ -110,8 +110,8 @@ OMPI_DECLSPEC int MPIR_debug_typedefs_sizeof[] = {
*/
OMPI_DECLSPEC opal_list_item_t* opal_list_item_t_type_force_inclusion = NULL;
OMPI_DECLSPEC opal_list_t* opal_list_t_type_force_inclusion = NULL;
OMPI_DECLSPEC ompi_free_list_item_t* ompi_free_list_item_t_type_force_inclusion = NULL;
OMPI_DECLSPEC ompi_free_list_t* ompi_free_list_t_type_force_inclusion = NULL;
OMPI_DECLSPEC opal_free_list_item_t* opal_free_list_item_t_type_force_inclusion = NULL;
OMPI_DECLSPEC opal_free_list_t* opal_free_list_t_type_force_inclusion = NULL;
OMPI_DECLSPEC ompi_request_t* ompi_request_t_type_force_inclusion = NULL;
OMPI_DECLSPEC mca_pml_base_request_t* mca_pml_base_request_t_type_force_inclusion = NULL;
OMPI_DECLSPEC mca_pml_base_send_request_t* mca_pml_base_send_request_t_type_force_inclusion = NULL;

Просмотреть файл

@ -1,9 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2004-2010 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -860,9 +863,9 @@ static int next_item_opal_list_t( mqs_process *proc, mpi_process_info *p_info,
#if defined(CODE_NOT_USED)
/**
* Parsing the ompi_free_list lists.
* Parsing the opal_free_list lists.
*/
static void ompi_free_list_t_dump_position( mqs_ompi_free_list_t_pos* position )
static void opal_free_list_t_dump_position( mqs_opal_free_list_t_pos* position )
{
printf( "position->opal_list_t_pos.current_item = 0x%llx\n", (long long)position->opal_list_t_pos.current_item );
printf( "position->opal_list_t_pos.list = 0x%llx\n", (long long)position->opal_list_t_pos.list );
@ -881,8 +884,8 @@ static void ompi_free_list_t_dump_position( mqs_ompi_free_list_t_pos* position )
}
#endif /* CODE_NOT_USED */
static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_info,
mqs_ompi_free_list_t_pos* position, mqs_taddr_t free_list )
static int opal_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_info,
mqs_opal_free_list_t_pos* position, mqs_taddr_t free_list )
{
mqs_image * image = mqs_get_image (proc);
mpi_image_info *i_info = (mpi_image_info *)mqs_get_image_info (image);
@ -891,22 +894,22 @@ static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_
position->free_list = free_list;
position->fl_frag_size =
ompi_fetch_size_t( proc, position->free_list + i_info->ompi_free_list_t.offset.fl_frag_size,
ompi_fetch_size_t( proc, position->free_list + i_info->opal_free_list_t.offset.fl_frag_size,
p_info );
position->fl_frag_alignment =
ompi_fetch_size_t( proc, position->free_list + i_info->ompi_free_list_t.offset.fl_frag_alignment,
ompi_fetch_size_t( proc, position->free_list + i_info->opal_free_list_t.offset.fl_frag_alignment,
p_info );
position->fl_frag_class =
ompi_fetch_pointer( proc, position->free_list + i_info->ompi_free_list_t.offset.fl_frag_class,
ompi_fetch_pointer( proc, position->free_list + i_info->opal_free_list_t.offset.fl_frag_class,
p_info );
position->fl_mpool =
ompi_fetch_pointer( proc, position->free_list + i_info->ompi_free_list_t.offset.fl_mpool,
ompi_fetch_pointer( proc, position->free_list + i_info->opal_free_list_t.offset.fl_mpool,
p_info );
position->fl_num_per_alloc =
ompi_fetch_size_t( proc, position->free_list + i_info->ompi_free_list_t.offset.fl_num_per_alloc,
ompi_fetch_size_t( proc, position->free_list + i_info->opal_free_list_t.offset.fl_num_per_alloc,
p_info );
position->fl_num_allocated =
ompi_fetch_size_t( proc, position->free_list + i_info->ompi_free_list_t.offset.fl_num_allocated,
ompi_fetch_size_t( proc, position->free_list + i_info->opal_free_list_t.offset.fl_num_allocated,
p_info );
if( 0 == position->fl_mpool ) {
@ -919,7 +922,7 @@ static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_
position->fl_frag_alignment, mqs_taddr_t );
/**
* Work around the strange ompi_free_list_t way to allocate elements. The first chunk is
* Work around the strange opal_free_list_t way to allocate elements. The first chunk is
* not required to have the same size as the others.
* A similar work around should be set for the last chunk of allocations too !!! But how
* can we solve ONE equation with 2 unknowns ?
@ -931,7 +934,7 @@ static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_
if( 0 == position->fl_num_initial_alloc )
position->fl_num_initial_alloc = position->fl_num_per_alloc;
}
DEBUG(VERBOSE_LISTS,("ompi_free_list_t fl_frag_size = %lld fl_header_space = %lld\n"
DEBUG(VERBOSE_LISTS,("opal_free_list_t fl_frag_size = %lld fl_header_space = %lld\n"
" fl_frag_alignment = %lld fl_num_per_alloc = %lld\n"
" fl_num_allocated = %lld fl_num_initial_alloc = %lld\n"
" header_space = %lld\n",
@ -944,7 +947,7 @@ static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_
* Initialize the pointer to the opal_list_t.
*/
opal_list_t_init_parser( proc, p_info, &position->opal_list_t_pos,
position->free_list + i_info->ompi_free_list_t.offset.fl_allocations );
position->free_list + i_info->opal_free_list_t.offset.fl_allocations );
next_item_opal_list_t( proc, p_info, &position->opal_list_t_pos, &active_allocation );
DEBUG(VERBOSE_LISTS,("active_allocation 0x%llx header_space %d\n",
(long long)active_allocation, (int)position->header_space));
@ -954,7 +957,7 @@ static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_
/**
* Handle alignment issues...
*/
active_allocation += i_info->ompi_free_list_item_t.size;
active_allocation += i_info->opal_free_list_item_t.size;
active_allocation = OPAL_ALIGN( active_allocation,
position->fl_frag_alignment, mqs_taddr_t );
/**
@ -968,15 +971,15 @@ static int ompi_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_
}
position->current_item = active_allocation;
/*ompi_free_list_t_dump_position( position );*/
/*opal_free_list_t_dump_position( position );*/
return mqs_ok;
}
/**
* Return the current position and move the internal counter to the next element.
*/
static int ompi_free_list_t_next_item( mqs_process *proc, mpi_process_info *p_info,
mqs_ompi_free_list_t_pos* position, mqs_taddr_t* active_item )
static int opal_free_list_t_next_item( mqs_process *proc, mpi_process_info *p_info,
mqs_opal_free_list_t_pos* position, mqs_taddr_t* active_item )
{
mqs_image * image = mqs_get_image (proc);
mpi_image_info *i_info = (mpi_image_info *)mqs_get_image_info (image);
@ -988,7 +991,7 @@ static int ompi_free_list_t_next_item( mqs_process *proc, mpi_process_info *p_in
position->current_item += position->header_space;
if( position->current_item >= position->upper_bound ) {
DEBUG(VERBOSE_LISTS,("Reach the end of one of the ompi_free_list_t "
DEBUG(VERBOSE_LISTS,("Reach the end of one of the opal_free_list_t "
"allocations. Go to the next one\n"));
/* we should go to the next allocation */
next_item_opal_list_t( proc, p_info,
@ -1000,7 +1003,7 @@ static int ompi_free_list_t_next_item( mqs_process *proc, mpi_process_info *p_in
/**
* Handle alignment issues...
*/
active_allocation += i_info->ompi_free_list_item_t.size;
active_allocation += i_info->opal_free_list_item_t.size;
active_allocation = OPAL_ALIGN( active_allocation,
position->fl_frag_alignment, mqs_taddr_t );
/**
@ -1012,7 +1015,7 @@ static int ompi_free_list_t_next_item( mqs_process *proc, mpi_process_info *p_in
DEBUG(VERBOSE_LISTS,("there are more elements in the list "
"active_allocation = %llx upper_bound = %llx\n",
(long long)active_allocation, (long long)position->upper_bound));
/*ompi_free_list_t_dump_position( position );*/
/*opal_free_list_t_dump_position( position );*/
}
DEBUG(VERBOSE_LISTS,("Free list actual position 0x%llx next element at 0x%llx\n",
(long long)*active_item, (long long)position->current_item));
@ -1079,7 +1082,7 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info,
/* If we get a PML request with an internal tag we will jump back here */
rescan_requests:
while( 1 ) {
ompi_free_list_t_next_item( proc, p_info,
opal_free_list_t_next_item( proc, p_info,
&extra->next_msg, &current_item );
if( 0 == current_item ) {
DEBUG(VERBOSE_REQ,("no more items in the %s request queue\n",
@ -1239,12 +1242,12 @@ int mqs_setup_operation_iterator (mqs_process *proc, int op)
switch (op) {
case mqs_pending_sends:
DEBUG(VERBOSE_REQ,("setup the send queue iterator\n"));
ompi_free_list_t_init_parser( proc, p_info, &extra->next_msg, extra->send_queue_base );
opal_free_list_t_init_parser( proc, p_info, &extra->next_msg, extra->send_queue_base );
return mqs_ok;
case mqs_pending_receives:
DEBUG(VERBOSE_REQ,("setup the receive queue iterator\n"));
ompi_free_list_t_init_parser( proc, p_info, &extra->next_msg, extra->recv_queue_base );
opal_free_list_t_init_parser( proc, p_info, &extra->next_msg, extra->recv_queue_base );
return mqs_ok;
case mqs_unexpected_messages: /* TODO */

Просмотреть файл

@ -1,8 +1,11 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -86,7 +89,7 @@ typedef struct {
mqs_tword_t fl_num_per_alloc; /* size_t */
mqs_tword_t fl_num_allocated; /* size_t */
mqs_tword_t fl_num_initial_alloc; /* size_t */
} mqs_ompi_free_list_t_pos;
} mqs_opal_free_list_t_pos;
/* Information for a single process, a list of communicators, some
@ -112,7 +115,7 @@ typedef struct
int world_proc_array_entries;
mqs_taddr_t* world_proc_array;
mqs_ompi_free_list_t_pos next_msg; /* And state for the message iterator */
mqs_opal_free_list_t_pos next_msg; /* And state for the message iterator */
mqs_op_class what; /* What queue are we looking on */
} mpi_process_info_extra;

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -767,7 +767,7 @@ typedef struct mca_bcol_base_function_t mca_bcol_base_function_t;
struct mca_bcol_base_descriptor_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
/* Vasily: will be described in the future */
};
typedef struct mca_bcol_base_descriptor_t mca_bcol_base_descriptor_t;

Просмотреть файл

@ -1,6 +1,9 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -74,7 +77,7 @@ struct mca_bcol_ptpcoll_component_t {
};
struct mca_bcol_ptpcoll_collreq_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
int tag;
int num_reqs;
@ -342,7 +345,7 @@ struct mca_bcol_ptpcoll_module_t {
int **allgather_offsets;
/* Free lists of outstanding collective operations */
ompi_free_list_t collreqs_free;
opal_free_list_t collreqs_free;
int log_group_size;
struct iovec *alltoall_iovec;

Просмотреть файл

@ -1,9 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -51,11 +54,11 @@ static int bcol_ptpcoll_barrier_recurs_knomial_new(
**rank_exchanges = my_exchange_node->rank_exchanges;
ompi_request_t **requests;
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_bcol_ptpcoll_collreq_t *collreq;
OMPI_FREE_LIST_WAIT_MT(&ptpcoll_module->collreqs_free, item);
item = opal_free_list_wait (&ptpcoll_module->collreqs_free);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -213,7 +216,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_new(
}
}
OMPI_FREE_LIST_RETURN_MT(&ptpcoll_module->collreqs_free, (ompi_free_list_item_t *) collreq);
opal_free_list_return (&ptpcoll_module->collreqs_free, (opal_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}
@ -382,11 +385,11 @@ static int bcol_ptpcoll_barrier_recurs_knomial_extra_new(
int *extra_sources_array = my_exchange_node->rank_extra_sources_array;
ompi_request_t **requests;
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_bcol_ptpcoll_collreq_t *collreq;
OMPI_FREE_LIST_WAIT_MT(&ptpcoll_module->collreqs_free, item);
item = opal_free_list_wait (&ptpcoll_module->collreqs_free);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -440,7 +443,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_extra_new(
return BCOL_FN_STARTED;
}
OMPI_FREE_LIST_RETURN_MT(&ptpcoll_module->collreqs_free, (ompi_free_list_item_t *) collreq);
opal_free_list_return (&ptpcoll_module->collreqs_free, (opal_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}
@ -464,11 +467,11 @@ static int bcol_ptpcoll_barrier_recurs_dbl_new(
n_exchange = ptp_module->super.sbgp_partner_module->n_levels_pow2;
ompi_request_t **requests;
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_bcol_ptpcoll_collreq_t *collreq;
OMPI_FREE_LIST_WAIT_MT(&ptp_module->collreqs_free, item);
item = opal_free_list_wait (&ptp_module->collreqs_free);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -618,7 +621,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_new(
}
}
OMPI_FREE_LIST_RETURN_MT(&ptp_module->collreqs_free, (ompi_free_list_item_t *) collreq);
opal_free_list_return (&ptp_module->collreqs_free, (opal_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}
@ -765,7 +768,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_extra_new(
tag, my_extra_partner_comm_rank;
ompi_request_t **requests;
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_bcol_ptpcoll_collreq_t *collreq;
@ -773,7 +776,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_extra_new(
(mca_bcol_ptpcoll_module_t *) const_args->bcol_module;
ompi_communicator_t *comm = ptp_module->super.sbgp_partner_module->group_comm;
OMPI_FREE_LIST_WAIT_MT(&ptp_module->collreqs_free, item);
item = opal_free_list_wait (&ptp_module->collreqs_free);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -829,7 +832,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_extra_new(
return BCOL_FN_STARTED;
}
OMPI_FREE_LIST_RETURN_MT(&ptp_module->collreqs_free, (ompi_free_list_item_t *) collreq);
opal_free_list_return (&ptp_module->collreqs_free, (opal_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}

Просмотреть файл

@ -1,6 +1,9 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -101,7 +104,7 @@ collreq_destruct(mca_bcol_ptpcoll_collreq_t *collreq)
}
OBJ_CLASS_INSTANCE(mca_bcol_ptpcoll_collreq_t,
ompi_free_list_item_t,
opal_free_list_item_t,
collreq_construct,
collreq_destruct);

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -612,7 +612,7 @@ static int load_recursive_knomial_info(mca_bcol_ptpcoll_module_t *ptpcoll_module
return rc;
}
static void bcol_ptpcoll_collreq_init(ompi_free_list_item_t *item, void* ctx)
static int bcol_ptpcoll_collreq_init(opal_free_list_item_t *item, void* ctx)
{
mca_bcol_ptpcoll_module_t *ptpcoll_module= (mca_bcol_ptpcoll_module_t *) ctx;
mca_bcol_ptpcoll_collreq_t *collreq = (mca_bcol_ptpcoll_collreq_t *) item;
@ -627,6 +627,12 @@ static void bcol_ptpcoll_collreq_init(ompi_free_list_item_t *item, void* ctx)
calloc(2 * ptpcoll_module->k_nomial_radix, sizeof(ompi_request_t *));
break;
}
if (NULL == collreq->requests) {
return OPAL_ERR_OUT_OF_RESOURCE;
}
return OPAL_SUCCESS;
}
/* query to see if the module is available for use on the given
@ -705,8 +711,8 @@ mca_bcol_base_module_t **mca_bcol_ptpcoll_comm_query(mca_sbgp_base_module_t *sbg
}
/* creating collfrag free list */
OBJ_CONSTRUCT(&ptpcoll_module->collreqs_free, ompi_free_list_t);
rc = ompi_free_list_init_ex_new(&ptpcoll_module->collreqs_free,
OBJ_CONSTRUCT(&ptpcoll_module->collreqs_free, opal_free_list_t);
rc = opal_free_list_init (&ptpcoll_module->collreqs_free,
sizeof(mca_bcol_ptpcoll_collreq_t),
BCOL_PTP_CACHE_LINE_SIZE,
OBJ_CLASS(mca_bcol_ptpcoll_collreq_t),
@ -714,7 +720,7 @@ mca_bcol_base_module_t **mca_bcol_ptpcoll_comm_query(mca_sbgp_base_module_t *sbg
256 /* free_list_num */,
-1 /* free_list_max, -1 = infinite */,
32 /* free_list_inc */,
NULL,
NULL, 0, NULL,
bcol_ptpcoll_collreq_init,
ptpcoll_module);
if (OMPI_SUCCESS != rc) {

Просмотреть файл

@ -81,7 +81,7 @@ struct mca_coll_hcoll_component_t {
/* FCA global stuff */
mca_coll_hcoll_ops_t hcoll_ops;
ompi_free_list_t requests;
opal_free_list_t requests;
};
typedef struct mca_coll_hcoll_component_t mca_coll_hcoll_component_t;

Просмотреть файл

@ -1,9 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -119,8 +122,8 @@ static void init_module_fns(void){
void hcoll_rte_fns_setup(void)
{
init_module_fns();
OBJ_CONSTRUCT(&mca_coll_hcoll_component.requests, ompi_free_list_t);
ompi_free_list_init_ex_new(
OBJ_CONSTRUCT(&mca_coll_hcoll_component.requests, opal_free_list_t);
opal_free_list_init(
&(mca_coll_hcoll_component.requests),
sizeof(ompi_request_t),
/* no special alignment needed */
@ -132,7 +135,9 @@ void hcoll_rte_fns_setup(void)
10,
-1,
10,
/* No Mpool */
/* No Mpool or init function */
NULL,
0,
NULL,
NULL,
NULL
@ -175,7 +180,7 @@ static int recv_nb(struct dte_data_representation_t data,
int rc;
size_t size;
ompi_request_t *ompi_req;
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
if (!buffer && !HCOL_DTE_IS_ZERO(data)) {
fprintf(stderr, "***Error in hcolrte_rml_recv_nb: buffer pointer is NULL"
@ -246,7 +251,6 @@ static int send_nb( dte_data_representation_t data,
int rc;
size_t size;
ompi_request_t *ompi_req;
ompi_free_list_item_t *item;
if (!buffer && !HCOL_DTE_IS_ZERO(data)) {
fprintf(stderr, "***Error in hcolrte_rml_send_nb: buffer pointer is NULL"
" for non DTE_ZERO INLINE data representation\n");
@ -390,8 +394,8 @@ request_free(struct ompi_request_t **ompi_req)
static void* get_coll_handle(void)
{
ompi_request_t *ompi_req;
ompi_free_list_item_t *item;
OMPI_FREE_LIST_WAIT_MT(&(mca_coll_hcoll_component.requests),item);
opal_free_list_item_t *item;
item = opal_free_list_wait (&(mca_coll_hcoll_component.requests));
if (OPAL_UNLIKELY(NULL == item)) {
HCOL_ERROR("Wait for free list failed.\n");
return NULL;
@ -412,8 +416,8 @@ static int coll_handle_test(void* handle)
static void coll_handle_free(void *handle){
ompi_request_t *ompi_req = (ompi_request_t *)handle;
OMPI_FREE_LIST_RETURN_MT(&mca_coll_hcoll_component.requests,
(ompi_free_list_item_t *)ompi_req);
opal_free_list_return (&mca_coll_hcoll_component.requests,
(opal_free_list_item_t *)ompi_req);
}
static void coll_handle_complete(void *handle)

Просмотреть файл

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -69,7 +69,7 @@ BEGIN_C_DECLS
struct ompi_coll_libnbc_component_t {
mca_coll_base_component_2_0_0_t super;
ompi_free_list_t requests;
opal_free_list_t requests;
opal_list_t active_requests;
int32_t active_comms;
opal_atomic_lock_t progress_lock;
@ -123,8 +123,8 @@ typedef ompi_coll_libnbc_request_t NBC_Handle;
#define OMPI_COLL_LIBNBC_REQUEST_ALLOC(comm, req) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT_MT(&mca_coll_libnbc_component.requests, item); \
opal_free_list_item_t *item; \
item = opal_free_list_wait (&mca_coll_libnbc_component.requests); \
req = (ompi_coll_libnbc_request_t*) item; \
OMPI_REQUEST_INIT(&req->super, false); \
req->super.req_mpi_object.comm = comm; \
@ -135,8 +135,8 @@ typedef ompi_coll_libnbc_request_t NBC_Handle;
#define OMPI_COLL_LIBNBC_REQUEST_RETURN(req) \
do { \
OMPI_REQUEST_FINI(&request->super); \
OMPI_FREE_LIST_RETURN_MT(&mca_coll_libnbc_component.requests, \
(ompi_free_list_item_t*) req); \
opal_free_list_return (&mca_coll_libnbc_component.requests, \
(opal_free_list_item_t*) req); \
} while (0)
int ompi_coll_libnbc_progress(void);

Просмотреть файл

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -87,14 +87,11 @@ libnbc_open(void)
{
int ret;
OBJ_CONSTRUCT(&mca_coll_libnbc_component.requests, ompi_free_list_t);
ret = ompi_free_list_init(&mca_coll_libnbc_component.requests,
sizeof(ompi_coll_libnbc_request_t),
OBJ_CONSTRUCT(&mca_coll_libnbc_component.requests, opal_free_list_t);
ret = opal_free_list_init (&mca_coll_libnbc_component.requests,
sizeof(ompi_coll_libnbc_request_t), 8,
OBJ_CLASS(ompi_coll_libnbc_request_t),
0,
-1,
8,
NULL);
0, 0, 0, -1, 8, NULL, 0, NULL, NULL, NULL);
if (OMPI_SUCCESS != ret) return ret;
OBJ_CONSTRUCT(&mca_coll_libnbc_component.active_requests, opal_list_t);

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -29,7 +29,7 @@
#include "ompi/mca/bcol/bcol.h"
#include "ompi/mca/sbgp/sbgp.h"
#include "ompi/op/op.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "coll_ml_lmngr.h"
#include "coll_ml_functions.h"
@ -652,10 +652,10 @@ struct mca_coll_ml_module_t {
int32_t collective_sequence_num;
/** ompi free list of full message descriptors **/
ompi_free_list_t message_descriptors;
opal_free_list_t message_descriptors;
/** ompi free list of message fragment descriptors **/
ompi_free_list_t fragment_descriptors;
opal_free_list_t fragment_descriptors;
/** pointer to the payload memory block **/
struct mca_bcol_base_memory_block_desc_t *payload_block;
@ -672,7 +672,7 @@ struct mca_coll_ml_module_t {
/** collective operation descriptor free list - used to manage a single
* collective operation. */
ompi_free_list_t coll_ml_collective_descriptors;
opal_free_list_t coll_ml_collective_descriptors;
/** multiple function collective operation support */
/** broadcast */

Просмотреть файл

@ -1,9 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -35,7 +38,7 @@ static void mca_coll_ml_barrier_task_setup(
static int mca_coll_ml_barrier_launch(mca_coll_ml_module_t *ml_module,
ompi_request_t **req)
{
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_coll_ml_collective_operation_progress_t *coll_op;
mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL;
@ -49,8 +52,7 @@ static int mca_coll_ml_barrier_launch(mca_coll_ml_module_t *ml_module,
/* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */
OMPI_FREE_LIST_WAIT_MT(&(ml_module->coll_ml_collective_descriptors),
item);
item = opal_free_list_wait (&(ml_module->coll_ml_collective_descriptors));
coll_op = (mca_coll_ml_collective_operation_progress_t *) item;
assert(NULL != coll_op);

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -418,9 +418,9 @@ do {
bool is_coll_sync = IS_COLL_SYNCMEM(op); \
ML_VERBOSE(10, ("Releasing %p", op)); \
OMPI_REQUEST_FINI(&(op)->full_message.super); \
OMPI_FREE_LIST_RETURN_MT(&(((mca_coll_ml_module_t *)(op)->coll_module)-> \
opal_free_list_return (&(((mca_coll_ml_module_t *)(op)->coll_module)-> \
coll_ml_collective_descriptors), \
(ompi_free_list_item_t *)op); \
(opal_free_list_item_t *)op); \
/* Special check for memory synchronization completion */ \
/* We have to return it first to free list, since the communicator */ \
/* release potentially may trigger ML module distraction and having */ \

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -17,10 +17,10 @@
#include "ompi/mca/coll/ml/coll_ml_allocation.h"
/* collective managment descriptor initialization - called right after
* the constructor by ompi_free_list code
* the constructor by opal_free_list code
*/
static void mca_coll_ml_collective_operation_progress_init
(ompi_free_list_item_t* item, void* ctx)
(opal_free_list_item_t* item, void* ctx)
{
int i;
int max_dag_size = ((struct coll_desc_init *)ctx)->max_dag_size;
@ -161,7 +161,7 @@ int ml_coll_schedule_setup(mca_coll_ml_module_t *ml_module)
ml_module->coll_desc_init_data.bcol_base_module=(mca_coll_base_module_t *)
ml_module;
ret = ompi_free_list_init_ex_new(
ret = opal_free_list_init (
&(ml_module->coll_ml_collective_descriptors),
sizeof(mca_coll_ml_collective_operation_progress_t),
/* no special alignment needed */
@ -174,7 +174,7 @@ int ml_coll_schedule_setup(mca_coll_ml_module_t *ml_module)
cm->free_list_max_size,
cm->free_list_grow_size,
/* No Mpool */
NULL,
NULL, 0, NULL,
mca_coll_ml_collective_operation_progress_init,
(void *)&(ml_module->coll_desc_init_data)
);

Просмотреть файл

@ -5,6 +5,8 @@
* Copyright (c) 2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -468,13 +470,12 @@ mca_coll_ml_alloc_op_prog_single_frag_dag(
size_t offset_into_user_buffer
)
{
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_coll_ml_collective_operation_progress_t *coll_op = NULL;
ompi_request_t *req;
/* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */
OMPI_FREE_LIST_WAIT_MT(&(ml_module->coll_ml_collective_descriptors),
item);
item = opal_free_list_wait (&(ml_module->coll_ml_collective_descriptors));
coll_op = (mca_coll_ml_collective_operation_progress_t *) item;
ML_VERBOSE(10, (">>> Allocating coll op %p", coll_op));
@ -529,12 +530,11 @@ static inline __opal_attribute_always_inline__ mca_coll_ml_collective_operation_
size_t offset_into_user_buffer
)
{
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_coll_ml_collective_operation_progress_t *coll_op = NULL;
/* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */
OMPI_FREE_LIST_WAIT_MT(&(ml_module->coll_ml_collective_descriptors),
item);
item = opal_free_list_wait (&(ml_module->coll_ml_collective_descriptors));
coll_op = (mca_coll_ml_collective_operation_progress_t *) item;

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
@ -120,9 +120,9 @@ mca_coll_ml_module_construct(mca_coll_ml_module_t *module)
OBJ_CONSTRUCT(&module->active_bcols_list, opal_list_t);
OBJ_CONSTRUCT(&module->waiting_for_memory_list, opal_list_t);
OBJ_CONSTRUCT(&module->fragment_descriptors, ompi_free_list_t);
OBJ_CONSTRUCT(&module->message_descriptors, ompi_free_list_t);
OBJ_CONSTRUCT(&module->coll_ml_collective_descriptors, ompi_free_list_t);
OBJ_CONSTRUCT(&module->fragment_descriptors, opal_free_list_t);
OBJ_CONSTRUCT(&module->message_descriptors, opal_free_list_t);
OBJ_CONSTRUCT(&module->coll_ml_collective_descriptors, opal_free_list_t);
memset (&module->fallback, 0, sizeof (module->fallback));
}
@ -260,8 +260,8 @@ static int mca_coll_ml_request_free(ompi_request_t** request)
ML_VERBOSE(10, ("Releasing Master %p", ml_request));
/* Mark the request as invalid */
OMPI_REQUEST_FINI(&ml_request->full_message.super);
OMPI_FREE_LIST_RETURN_MT(&(ml_module->coll_ml_collective_descriptors),
(ompi_free_list_item_t *)ml_request);
opal_free_list_return (&(ml_module->coll_ml_collective_descriptors),
(opal_free_list_item_t *)ml_request);
/* MPI needs to return with the request object set to MPI_REQUEST_NULL
*/
@ -326,20 +326,20 @@ static void mca_coll_ml_collective_operation_progress_destruct
/* initialize the full message descriptor - can pass in module specific
* initialization data
*/
static void init_ml_fragment_desc(ompi_free_list_item_t *desc , void* ctx);
static void init_ml_message_desc(ompi_free_list_item_t *desc , void* ctx)
static void init_ml_fragment_desc(opal_free_list_item_t *desc , void* ctx);
static void init_ml_message_desc(opal_free_list_item_t *desc , void* ctx)
{
mca_coll_ml_module_t *module= (mca_coll_ml_module_t *) ctx;
mca_coll_ml_descriptor_t *msg_desc = (mca_coll_ml_descriptor_t *) desc;
/* finish setting up the fragment descriptor */
init_ml_fragment_desc((ompi_free_list_item_t*)&(msg_desc->fragment),module);
init_ml_fragment_desc((opal_free_list_item_t*)&(msg_desc->fragment),module);
}
/* initialize the fragment descriptor - can pass in module specific
* initialization data
*/
static void init_ml_fragment_desc(ompi_free_list_item_t *desc , void* ctx)
static void init_ml_fragment_desc(opal_free_list_item_t *desc , void* ctx)
{
mca_coll_ml_module_t *module= (mca_coll_ml_module_t *) ctx;
mca_coll_ml_fragment_t *frag_desc = (mca_coll_ml_fragment_t *) desc;
@ -2614,14 +2614,14 @@ static int init_lists(mca_coll_ml_module_t *ml_module)
/* no data associated with the message descriptor */
length = sizeof(mca_coll_ml_descriptor_t);
ret = ompi_free_list_init_ex_new(&(ml_module->message_descriptors), length,
ret = opal_free_list_init(&(ml_module->message_descriptors), length,
opal_cache_line_size, OBJ_CLASS(mca_coll_ml_descriptor_t),
length_payload, 0,
num_elements, max_elements, elements_per_alloc,
NULL,
NULL, 0, NULL,
init_ml_message_desc, ml_module);
if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) {
ML_ERROR(("ompi_free_list_init_ex_new exit with error"));
ML_ERROR(("opal_free_list_init exit with error"));
return ret;
}
@ -2632,14 +2632,14 @@ static int init_lists(mca_coll_ml_module_t *ml_module)
/* create a free list of fragment descriptors */
/*length_payload=sizeof(something);*/
length = sizeof(mca_coll_ml_fragment_t);
ret = ompi_free_list_init_ex_new(&(ml_module->fragment_descriptors), length,
ret = opal_free_list_init (&(ml_module->fragment_descriptors), length,
opal_cache_line_size, OBJ_CLASS(mca_coll_ml_fragment_t),
length_payload, 0,
num_elements, max_elements, elements_per_alloc,
NULL,
NULL, 0, NULL,
init_ml_fragment_desc, ml_module);
if (OMPI_SUCCESS != ret) {
ML_ERROR(("ompi_free_list_init_ex_new exit with error"));
ML_ERROR(("opal_free_list_init exit with error"));
return ret;
}

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -42,7 +45,7 @@ struct mca_coll_portals4_component_t {
ptl_handle_md_t md_h;
#endif
ompi_free_list_t requests; /* request free list for the i collectives */
opal_free_list_t requests; /* request free list for the i collectives */
};
typedef struct mca_coll_portals4_component_t mca_coll_portals4_component_t;
OMPI_MODULE_DECLSPEC extern mca_coll_portals4_component_t mca_coll_portals4_component;

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -11,6 +12,8 @@
* All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -110,17 +113,14 @@ portals4_open(void)
mca_coll_portals4_component.md_h = PTL_INVALID_HANDLE;
#endif
OBJ_CONSTRUCT(&mca_coll_portals4_component.requests, ompi_free_list_t);
ret = ompi_free_list_init(&mca_coll_portals4_component.requests,
OBJ_CONSTRUCT(&mca_coll_portals4_component.requests, opal_free_list_t);
ret = opal_free_list_init (&mca_coll_portals4_component.requests,
sizeof(ompi_coll_portals4_request_t),
OBJ_CLASS(ompi_coll_portals4_request_t),
8,
0,
8,
NULL);
0, 0, 8, 0, 8, NULL, 0, NULL, NULL, NULL);
if (OMPI_SUCCESS != ret) {
opal_output_verbose(1, ompi_coll_base_framework.framework_output,
"%s:%d: ompi_free_list_init failed: %d\n",
"%s:%d: opal_free_list_init failed: %d\n",
__FILE__, __LINE__, ret);
return ret;
}

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -29,9 +32,8 @@ OBJ_CLASS_DECLARATION(ompi_coll_portals4_request_t);
#define OMPI_COLL_PORTALS4_REQUEST_ALLOC(comm, req) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET_MT(&mca_coll_portals4_component.requests, \
item); \
opal_free_list_item_t *item; \
item = opal_free_list_get (&mca_coll_portals4_component.requests); \
req = (ompi_coll_portals4_request_t*) item; \
OMPI_REQUEST_INIT(&req->super, false); \
req->super.req_mpi_object.comm = comm; \
@ -42,8 +44,8 @@ OBJ_CLASS_DECLARATION(ompi_coll_portals4_request_t);
#define OMPI_COLL_PORTALS4_REQUEST_RETURN(req) \
do { \
OMPI_REQUEST_FINI(&request->super); \
OMPI_FREE_LIST_RETURN_MT(&mca_coll_portals4_component.requests, \
(ompi_free_list_item_t*) req); \
opal_free_list_return (&mca_coll_portals4_component.requests, \
(opal_free_list_item_t*) req); \
} while (0)

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University.
* All rights reserved.
@ -7,6 +8,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -50,13 +53,13 @@
* Object stuff
******************/
OBJ_CLASS_INSTANCE(ompi_crcp_base_pml_state_t,
ompi_free_list_item_t,
opal_free_list_item_t,
NULL,
NULL
);
OBJ_CLASS_INSTANCE(ompi_crcp_base_btl_state_t,
ompi_free_list_item_t,
opal_free_list_item_t,
NULL,
NULL
);

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2011 The Trustees of Indiana University.
* All rights reserved.
@ -5,8 +6,8 @@
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -41,7 +42,7 @@
#include "ompi/mca/crcp/crcp.h"
#include "ompi/mca/crcp/base/base.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "ompi/runtime/ompi_cr.h"
#include "orte/runtime/orte_wait.h"
@ -106,12 +107,12 @@ opal_list_t drained_msg_ack_list;
/*
* Free lists
*/
ompi_free_list_t coord_state_free_list;
ompi_free_list_t content_ref_free_list;
ompi_free_list_t peer_ref_free_list;
ompi_free_list_t traffic_msg_ref_free_list;
ompi_free_list_t drain_msg_ref_free_list;
ompi_free_list_t drain_ack_msg_ref_free_list;
opal_free_list_t coord_state_free_list;
opal_free_list_t content_ref_free_list;
opal_free_list_t peer_ref_free_list;
opal_free_list_t traffic_msg_ref_free_list;
opal_free_list_t drain_msg_ref_free_list;
opal_free_list_t drain_ack_msg_ref_free_list;
/*
* Quiescence requests to wait on
@ -618,74 +619,69 @@ static void traffic_message_dump_drain_msg_indv(ompi_crcp_bkmrk_pml_drain_messag
*/
#define HOKE_PEER_REF_ALLOC(peer_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&peer_ref_free_list, item); \
peer_ref = (ompi_crcp_bkmrk_pml_peer_ref_t*)item; \
} while(0);
peer_ref = (ompi_crcp_bkmrk_pml_peer_ref_t *) \
opal_free_list_wait (&peer_ref_free_list); \
} while(0)
#define HOKE_PEER_REF_RETURN(peer_ref) \
do { \
OMPI_FREE_LIST_RETURN_MT(&peer_ref_free_list, \
(ompi_free_list_item_t*)peer_ref); \
} while(0);
opal_free_list_return (&peer_ref_free_list, \
(opal_free_list_item_t*)peer_ref); \
} while(0)
#define HOKE_CONTENT_REF_ALLOC(content_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&content_ref_free_list, item); \
content_ref = (ompi_crcp_bkmrk_pml_message_content_ref_t*)item; \
content_ref = (ompi_crcp_bkmrk_pml_message_content_ref_t*) \
opal_free_list_wait (&content_ref_free_list); \
content_ref->msg_id = content_ref_seq_num; \
content_ref_seq_num++;\
} while(0);
content_ref_seq_num++; \
} while(0)
#define HOKE_CONTENT_REF_RETURN(content_ref) \
do { \
OMPI_FREE_LIST_RETURN_MT(&content_ref_free_list, \
(ompi_free_list_item_t*)content_ref); \
} while(0);
opal_free_list_return (&content_ref_free_list, \
(opal_free_list_item_t*)content_ref); \
} while(0)
#define HOKE_TRAFFIC_MSG_REF_ALLOC(msg_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&traffic_msg_ref_free_list, item); \
msg_ref = (ompi_crcp_bkmrk_pml_traffic_message_ref_t*)item; \
} while(0);
msg_ref = (ompi_crcp_bkmrk_pml_traffic_message_ref_t*) \
opal_free_list_wait (&traffic_msg_ref_free_list); \
} while(0)
#define HOKE_TRAFFIC_MSG_REF_RETURN(msg_ref) \
do { \
OMPI_FREE_LIST_RETURN_MT(&traffic_msg_ref_free_list, \
(ompi_free_list_item_t*)msg_ref); \
} while(0);
opal_free_list_return (&traffic_msg_ref_free_list, \
(opal_free_list_item_t*)msg_ref); \
} while(0)
#define HOKE_DRAIN_MSG_REF_ALLOC(msg_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&drain_msg_ref_free_list, item); \
msg_ref = (ompi_crcp_bkmrk_pml_drain_message_ref_t*)item; \
} while(0);
msg_ref = (ompi_crcp_bkmrk_pml_drain_message_ref_t *) \
opal_free_list_wait (&drain_msg_ref_free_list); \
} while(0)
#define HOKE_DRAIN_MSG_REF_RETURN(msg_ref) \
do { \
OMPI_FREE_LIST_RETURN_MT(&drain_msg_ref_free_list, \
(ompi_free_list_item_t*)msg_ref); \
} while(0);
opal_free_list_return (&drain_msg_ref_free_list, \
(opal_free_list_item_t*)msg_ref); \
} while(0)
#define HOKE_DRAIN_ACK_MSG_REF_ALLOC(msg_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&drain_ack_msg_ref_free_list, item); \
msg_ref = (ompi_crcp_bkmrk_pml_drain_message_ack_ref_t*)item; \
} while(0);
msg_ref = (ompi_crcp_bkmrk_pml_drain_message_ack_ref_t *) \
opal_free_list_wait (&drain_ack_msg_ref_free_list); \
} while(0)
#define HOKE_DRAIN_ACK_MSG_REF_RETURN(msg_ref) \
do { \
OMPI_FREE_LIST_RETURN_MT(&drain_ack_msg_ref_free_list, \
(ompi_free_list_item_t*)msg_ref); \
} while(0);
opal_free_list_return (&drain_ack_msg_ref_free_list, \
(opal_free_list_item_t*)msg_ref); \
} while(0)
/*
@ -969,16 +965,15 @@ OBJ_CLASS_INSTANCE(ompi_crcp_bkmrk_pml_state_t,
************************************/
#define CRCP_COORD_STATE_ALLOC(state_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&coord_state_free_list, item); \
state_ref = (ompi_crcp_bkmrk_pml_state_t*)item; \
} while(0);
state_ref = (ompi_crcp_bkmrk_pml_state_t *) \
opal_free_list_wait (&coord_state_free_list); \
} while(0)
#define CRCP_COORD_STATE_RETURN(state_ref) \
do { \
OMPI_FREE_LIST_RETURN_MT(&coord_state_free_list, \
(ompi_free_list_item_t*)state_ref); \
} while(0);
opal_free_list_return (&coord_state_free_list, \
(opal_free_list_item_t *)state_ref); \
} while(0)
#define CREATE_COORD_STATE(coord_state, pml_state, v_peer_ref, v_msg_ref) \
{ \
@ -1100,8 +1095,8 @@ int ompi_crcp_bkmrk_pml_init(void) {
* - Drain ACK Messsage Refs
* - Message Contents?
*/
OBJ_CONSTRUCT(&coord_state_free_list, ompi_free_list_t);
ompi_free_list_init_new( &coord_state_free_list,
OBJ_CONSTRUCT(&coord_state_free_list, opal_free_list_t);
opal_free_list_init (&coord_state_free_list,
sizeof(ompi_crcp_bkmrk_pml_state_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_bkmrk_pml_state_t),
@ -1109,10 +1104,10 @@ int ompi_crcp_bkmrk_pml_init(void) {
4, /* Initial number */
-1, /* Max = Unlimited */
4, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&content_ref_free_list, ompi_free_list_t);
ompi_free_list_init_new( &content_ref_free_list,
OBJ_CONSTRUCT(&content_ref_free_list, opal_free_list_t);
opal_free_list_init (&content_ref_free_list,
sizeof(ompi_crcp_bkmrk_pml_message_content_ref_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_bkmrk_pml_message_content_ref_t),
@ -1120,10 +1115,10 @@ int ompi_crcp_bkmrk_pml_init(void) {
80, /* Initial number */
-1, /* Max = Unlimited */
32, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&peer_ref_free_list, ompi_free_list_t);
ompi_free_list_init_new( &peer_ref_free_list,
OBJ_CONSTRUCT(&peer_ref_free_list, opal_free_list_t);
opal_free_list_init (&peer_ref_free_list,
sizeof(ompi_crcp_bkmrk_pml_peer_ref_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_bkmrk_pml_peer_ref_t),
@ -1131,10 +1126,10 @@ int ompi_crcp_bkmrk_pml_init(void) {
16, /* Initial number */
-1, /* Max = Unlimited */
16, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&traffic_msg_ref_free_list, ompi_free_list_t);
ompi_free_list_init_new( &traffic_msg_ref_free_list,
OBJ_CONSTRUCT(&traffic_msg_ref_free_list, opal_free_list_t);
opal_free_list_init (&traffic_msg_ref_free_list,
sizeof(ompi_crcp_bkmrk_pml_traffic_message_ref_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_bkmrk_pml_traffic_message_ref_t),
@ -1142,10 +1137,10 @@ int ompi_crcp_bkmrk_pml_init(void) {
32, /* Initial number */
-1, /* Max = Unlimited */
64, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&drain_msg_ref_free_list, ompi_free_list_t);
ompi_free_list_init_new( &drain_msg_ref_free_list,
OBJ_CONSTRUCT(&drain_msg_ref_free_list, opal_free_list_t);
opal_free_list_init (&drain_msg_ref_free_list,
sizeof(ompi_crcp_bkmrk_pml_drain_message_ref_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_bkmrk_pml_drain_message_ref_t),
@ -1153,10 +1148,10 @@ int ompi_crcp_bkmrk_pml_init(void) {
32, /* Initial number */
-1, /* Max = Unlimited */
64, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&drain_ack_msg_ref_free_list, ompi_free_list_t);
ompi_free_list_init_new( &drain_ack_msg_ref_free_list,
OBJ_CONSTRUCT(&drain_ack_msg_ref_free_list, opal_free_list_t);
opal_free_list_init (&drain_ack_msg_ref_free_list,
sizeof(ompi_crcp_bkmrk_pml_drain_message_ack_ref_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_bkmrk_pml_drain_message_ack_ref_t),
@ -1164,7 +1159,7 @@ int ompi_crcp_bkmrk_pml_init(void) {
16, /* Initial number */
-1, /* Max = Unlimited */
16, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
clear_timers();

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -34,7 +37,7 @@
#include "opal/mca/crs/base/base.h"
#include "opal/mca/btl/btl.h"
#include "opal/mca/btl/base/base.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/request/request.h"
@ -91,7 +94,7 @@ enum ompi_crcp_base_pml_states_t {
typedef enum ompi_crcp_base_pml_states_t ompi_crcp_base_pml_states_t;
struct ompi_crcp_base_pml_state_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
ompi_crcp_base_pml_states_t state;
int error_code;
mca_pml_base_component_t *wrapped_pml_component;
@ -183,7 +186,7 @@ enum ompi_crcp_base_btl_states_t {
typedef enum ompi_crcp_base_btl_states_t ompi_crcp_base_btl_states_t;
struct ompi_crcp_base_btl_state_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
ompi_crcp_base_btl_states_t state;
int error_code;
mca_btl_base_descriptor_t* des;

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,6 +11,8 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008-2011 University of Houston. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -21,7 +24,6 @@
#include "ompi_config.h"
#include <stdio.h>
#include "opal/class/ompi_free_list.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,6 +11,8 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008-2011 University of Houston. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -21,7 +24,6 @@
#include "ompi_config.h"
#include <stdio.h>
#include "opal/class/ompi_free_list.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"

Просмотреть файл

@ -1,8 +1,11 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) 2001-2011 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -657,6 +660,6 @@ static void ompi_mtl_mxm_mem_release_cb(void *buf, size_t length,
OBJ_CLASS_INSTANCE(
ompi_mtl_mxm_message_t,
ompi_free_list_item_t,
opal_free_list_item_t,
NULL,
NULL);

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -30,7 +33,7 @@
#include "ompi/mca/pml/pml.h"
#include "ompi/mca/mtl/mtl.h"
#include "ompi/mca/mtl/base/base.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "opal/util/output.h"
#include "opal/util/show_help.h"
@ -96,7 +99,7 @@ extern int ompi_mtl_mxm_finalize(struct mca_mtl_base_module_t* mtl);
int ompi_mtl_mxm_module_init(void);
struct ompi_mtl_mxm_message_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
mxm_mq_h mq;
mxm_conn_h conn;

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
@ -240,8 +241,8 @@ static int ompi_mtl_mxm_component_open(void)
return OPAL_ERR_NOT_AVAILABLE;
}
OBJ_CONSTRUCT(&mca_mtl_mxm_component.mxm_messages, ompi_free_list_t);
rc = ompi_free_list_init_new(&mca_mtl_mxm_component.mxm_messages,
OBJ_CONSTRUCT(&mca_mtl_mxm_component.mxm_messages, opal_free_list_t);
rc = opal_free_list_init (&mca_mtl_mxm_component.mxm_messages,
sizeof(ompi_mtl_mxm_message_t),
opal_cache_line_size,
OBJ_CLASS(ompi_mtl_mxm_message_t),
@ -249,7 +250,7 @@ static int ompi_mtl_mxm_component_open(void)
32 /* free list num */,
-1 /* free list max */,
32 /* free list inc */,
NULL);
NULL, 0, NULL, NULL, NULL);
if (OMPI_SUCCESS != rc) {
opal_show_help("help-mtl-mxm.txt", "mxm init", true,
mxm_error_string(err));

Просмотреть файл

@ -1,8 +1,11 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -57,10 +60,10 @@ int ompi_mtl_mxm_improbe(struct mca_mtl_base_module_t *mtl,
mxm_error_t err;
mxm_recv_req_t req;
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
ompi_mtl_mxm_message_t *msgp;
OMPI_FREE_LIST_WAIT_MT(&mca_mtl_mxm_component.mxm_messages, item);
item = opal_free_list_wait (&mca_mtl_mxm_component.mxm_messages);
if (OPAL_UNLIKELY(NULL == item)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -185,8 +188,8 @@ int ompi_mtl_mxm_imrecv(struct mca_mtl_base_module_t* mtl,
return OMPI_ERROR;
}
OMPI_FREE_LIST_RETURN_MT(&mca_mtl_mxm_component.mxm_messages,
(ompi_free_list_item_t *) msgp);
opal_free_list_wait (&mca_mtl_mxm_component.mxm_messages,
(opal_free_list_item_t *) msgp);
ompi_message_return(*message);
(*message) = MPI_MESSAGE_NULL;

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -54,7 +57,7 @@ extern mca_mtl_mxm_module_t ompi_mtl_mxm;
typedef struct mca_mtl_mxm_component_t {
mca_mtl_base_component_2_0_0_t super; /**< base MTL component */
ompi_free_list_t mxm_messages; /* will be used for MPI_Mprobe and MPI_Mrecv calls */
opal_free_list_t mxm_messages; /* will be used for MPI_Mprobe and MPI_Mrecv calls */
} mca_mtl_mxm_component_t;

Просмотреть файл

@ -92,7 +92,7 @@ ompi_mtl_ofi_component_open(void)
OBJ_CONSTRUCT(&ompi_mtl_ofi.free_messages, opal_free_list_t);
opal_free_list_init(&ompi_mtl_ofi.free_messages,
sizeof(ompi_mtl_ofi_message_t),
sizeof(ompi_mtl_ofi_message_t), 8,
OBJ_CLASS(ompi_mtl_ofi_message_t), 0, 0,
1, -1, 1, NULL, 0, NULL, NULL, NULL);

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -45,7 +48,7 @@ struct ompi_osc_portals4_component_t {
ptl_size_t matching_fetch_atomic_max;
ptl_size_t matching_atomic_ordered_size;
ompi_free_list_t requests; /* request free list for the r* communication variants */
opal_free_list_t requests; /* request free list for the r* communication variants */
};
typedef struct ompi_osc_portals4_component_t ompi_osc_portals4_component_t;
OMPI_DECLSPEC extern ompi_osc_portals4_component_t mca_osc_portals4_component;

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -314,17 +317,14 @@ component_init(bool enable_progress_threads, bool enable_mpi_threads)
return ret;
}
OBJ_CONSTRUCT(&mca_osc_portals4_component.requests, ompi_free_list_t);
ret = ompi_free_list_init(&mca_osc_portals4_component.requests,
OBJ_CONSTRUCT(&mca_osc_portals4_component.requests, opal_free_list_t);
ret = opal_free_list_init (&mca_osc_portals4_component.requests,
sizeof(ompi_osc_portals4_request_t),
OBJ_CLASS(ompi_osc_portals4_request_t),
8,
0,
8,
NULL);
0, 0, 8, 0, 8, NULL, 0, NULL, NULL, NULL);
if (OMPI_SUCCESS != ret) {
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
"%s:%d: ompi_free_list_init failed: %d\n",
"%s:%d: opal_free_list_init failed: %d\n",
__FILE__, __LINE__, ret);
return ret;
}

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -23,9 +26,8 @@ OBJ_CLASS_DECLARATION(ompi_osc_portals4_request_t);
#define OMPI_OSC_PORTALS4_REQUEST_ALLOC(win, req) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT_MT(&mca_osc_portals4_component.requests, \
item); \
opal_free_list_item_t *item; \
item = opal_free_list_wait(&mca_osc_portals4_component.requests); \
req = (ompi_osc_portals4_request_t*) item; \
OMPI_REQUEST_INIT(&req->super, false); \
req->super.req_mpi_object.win = win; \
@ -38,8 +40,8 @@ OBJ_CLASS_DECLARATION(ompi_osc_portals4_request_t);
#define OMPI_OSC_PORTALS4_REQUEST_RETURN(req) \
do { \
OMPI_REQUEST_FINI(&request->super); \
OMPI_FREE_LIST_RETURN_MT(&mca_osc_portals4_component.requests, \
(ompi_free_list_item_t*) req); \
opal_free_list_return (&mca_osc_portals4_component.requests, \
(opal_free_list_item_t*) req); \
} while (0)

Просмотреть файл

@ -8,7 +8,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
@ -59,10 +59,10 @@ struct ompi_osc_pt2pt_component_t {
int module_count;
/** free list of ompi_osc_pt2pt_frag_t structures */
ompi_free_list_t frags;
opal_free_list_t frags;
/** Free list of requests */
ompi_free_list_t requests;
opal_free_list_t requests;
/** PT2PT component buffer size */
unsigned int buffer_size;

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
@ -254,28 +254,28 @@ component_init(bool enable_progress_threads,
mca_osc_pt2pt_component.progress_enable = false;
mca_osc_pt2pt_component.module_count = 0;
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.frags, ompi_free_list_t);
ret = ompi_free_list_init_new (&mca_osc_pt2pt_component.frags,
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.frags, opal_free_list_t);
ret = opal_free_list_init (&mca_osc_pt2pt_component.frags,
sizeof(ompi_osc_pt2pt_frag_t), 8,
OBJ_CLASS(ompi_osc_pt2pt_frag_t),
mca_osc_pt2pt_component.buffer_size +
sizeof (ompi_osc_pt2pt_frag_header_t),
8, 1, -1, 1, 0);
8, 1, -1, 1, NULL, 0, NULL, NULL, NULL);
if (OMPI_SUCCESS != ret) {
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
"%s:%d: ompi_free_list_init failed: %d",
"%s:%d: opal_free_list_init failed: %d",
__FILE__, __LINE__, ret);
return ret;
}
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.requests, ompi_free_list_t);
ret = ompi_free_list_init(&mca_osc_pt2pt_component.requests,
sizeof(ompi_osc_pt2pt_request_t),
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.requests, opal_free_list_t);
ret = opal_free_list_init (&mca_osc_pt2pt_component.requests,
sizeof(ompi_osc_pt2pt_request_t), 8,
OBJ_CLASS(ompi_osc_pt2pt_request_t),
0, -1, 32, NULL);
0, 0, 0, -1, 32, NULL, 0, NULL, NULL, NULL);
if (OMPI_SUCCESS != ret) {
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
"%s:%d: ompi_free_list_init failed: %d\n",
"%s:%d: opal_free_list_init failed: %d\n",
__FILE__, __LINE__, ret);
return ret;
}

Просмотреть файл

@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -26,7 +26,7 @@ static void ompi_osc_pt2pt_frag_constructor (ompi_osc_pt2pt_frag_t *frag){
frag->buffer = frag->super.ptr;
}
OBJ_CLASS_INSTANCE(ompi_osc_pt2pt_frag_t, ompi_free_list_item_t,
OBJ_CLASS_INSTANCE(ompi_osc_pt2pt_frag_t, opal_free_list_item_t,
ompi_osc_pt2pt_frag_constructor, NULL);
static int frag_send_cb (ompi_request_t *request)
@ -40,7 +40,7 @@ static int frag_send_cb (ompi_request_t *request)
frag->target, (void *) frag, (void *) request));
mark_outgoing_completion(module);
OMPI_FREE_LIST_RETURN_MT(&mca_osc_pt2pt_component.frags, &frag->super);
opal_free_list_return (&mca_osc_pt2pt_component.frags, &frag->super);
/* put this request on the garbage colletion list */

Просмотреть файл

@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -21,7 +21,7 @@
/** Communication buffer for packing messages */
struct ompi_osc_pt2pt_frag_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
/* target rank of buffer */
int target;
unsigned char *buffer;
@ -66,7 +66,7 @@ static inline int ompi_osc_pt2pt_frag_alloc(ompi_osc_pt2pt_module_t *module, int
OPAL_THREAD_LOCK(&module->lock);
if (NULL == curr || curr->remain_len < request_len) {
ompi_free_list_item_t *item = NULL;
opal_free_list_item_t *item = NULL;
if (NULL != curr) {
curr->remain_len = 0;
@ -83,7 +83,7 @@ static inline int ompi_osc_pt2pt_frag_alloc(ompi_osc_pt2pt_module_t *module, int
}
}
OMPI_FREE_LIST_GET_MT(&mca_osc_pt2pt_component.frags, item);
item = opal_free_list_get (&mca_osc_pt2pt_component.frags);
if (OPAL_UNLIKELY(NULL == item)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}

Просмотреть файл

@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -36,9 +36,9 @@ OBJ_CLASS_DECLARATION(ompi_osc_pt2pt_request_t);
pt2pt_rget, etc.), so it's ok to spin here... */
#define OMPI_OSC_PT2PT_REQUEST_ALLOC(win, req) \
do { \
ompi_free_list_item_t *item; \
opal_free_list_item_t *item; \
do { \
OMPI_FREE_LIST_GET_MT(&mca_osc_pt2pt_component.requests, item); \
item = opal_free_list_get (&mca_osc_pt2pt_component.requests); \
if (NULL == item) { \
opal_progress(); \
} \
@ -55,8 +55,8 @@ OBJ_CLASS_DECLARATION(ompi_osc_pt2pt_request_t);
#define OMPI_OSC_PT2PT_REQUEST_RETURN(req) \
do { \
OMPI_REQUEST_FINI(&(req)->super); \
OMPI_FREE_LIST_RETURN_MT(&mca_osc_pt2pt_component.requests, \
(ompi_free_list_item_t *) (req)); \
opal_free_list_return (&mca_osc_pt2pt_component.requests, \
(opal_free_list_item_t *) (req)); \
} while (0)
static inline void ompi_osc_pt2pt_request_complete (ompi_osc_pt2pt_request_t *request, int mpi_error)

Просмотреть файл

@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -15,7 +15,6 @@
#ifndef OSC_SM_SM_H
#define OSC_SM_SM_H
#include "opal/class/ompi_free_list.h"
#include "opal/mca/shmem/base/base.h"
/* data shared across all peers */

Просмотреть файл

@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
@ -18,7 +18,6 @@
#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/osc/base/osc_base_obj_convert.h"
#include "ompi/request/request.h"
#include "opal/class/ompi_free_list.h"
#include "opal/util/sys_limits.h"
#include "osc_sm.h"

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -11,7 +11,8 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -137,7 +138,7 @@ static int mca_pml_base_close(void)
anymore) */
/**
* Destruct the send and receive queues. The ompi_free_list_t destructor
* Destruct the send and receive queues. The opal_free_list_t destructor
* will return the memory to the mpool, so this has to be done before the
* mpool get released by the PML close function.
*/
@ -172,8 +173,8 @@ static int mca_pml_base_open(mca_base_open_flag_t flags)
* their content, they should get constructed as soon as possible once the MPI
* process is started.
*/
OBJ_CONSTRUCT(&mca_pml_base_send_requests, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_pml_base_recv_requests, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_pml_base_send_requests, opal_free_list_t);
OBJ_CONSTRUCT(&mca_pml_base_recv_requests, opal_free_list_t);
OBJ_CONSTRUCT(&mca_pml_base_pml, opal_pointer_array_t);

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -24,8 +27,8 @@
* If you wonder why these 2 freelists are declared here read the comment
* in the pml_base_request.h file.
*/
ompi_free_list_t mca_pml_base_send_requests = {{{0}}};
ompi_free_list_t mca_pml_base_recv_requests = {{{0}}};
opal_free_list_t mca_pml_base_send_requests = {{{0}}};
opal_free_list_t mca_pml_base_recv_requests = {{{0}}};
static void mca_pml_base_request_construct(mca_pml_base_request_t* req)
{

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -11,6 +11,8 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -24,7 +26,7 @@
#define MCA_PML_BASE_REQUEST_H
#include "ompi_config.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "ompi/communicator/communicator.h"
#include "ompi/request/request.h"
#include "opal/datatype/opal_convertor.h"
@ -37,8 +39,8 @@ BEGIN_C_DECLS
* the list. Beware these free lists have to be initialized
* directly by the PML who win the PML election.
*/
OMPI_DECLSPEC extern ompi_free_list_t mca_pml_base_send_requests;
OMPI_DECLSPEC extern ompi_free_list_t mca_pml_base_recv_requests;
OMPI_DECLSPEC extern opal_free_list_t mca_pml_base_send_requests;
OMPI_DECLSPEC extern opal_free_list_t mca_pml_base_recv_requests;
/**
* Type of request.

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2006-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -8,6 +9,8 @@
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -60,7 +63,7 @@ mca_pml_cm_enable(bool enable)
{
/* BWB - FIX ME - need to have this actually do something,
maybe? */
ompi_free_list_init_new(&mca_pml_base_send_requests,
opal_free_list_init (&mca_pml_base_send_requests,
sizeof(mca_pml_cm_hvy_send_request_t) + ompi_mtl->mtl_request_size,
opal_cache_line_size,
OBJ_CLASS(mca_pml_cm_hvy_send_request_t),
@ -68,9 +71,9 @@ mca_pml_cm_enable(bool enable)
ompi_pml_cm.free_list_num,
ompi_pml_cm.free_list_max,
ompi_pml_cm.free_list_inc,
NULL);
NULL, 0, NULL, NULL, NULL);
ompi_free_list_init_new(&mca_pml_base_recv_requests,
opal_free_list_init (&mca_pml_base_recv_requests,
sizeof(mca_pml_cm_hvy_recv_request_t) + ompi_mtl->mtl_request_size,
opal_cache_line_size,
OBJ_CLASS(mca_pml_cm_hvy_recv_request_t),
@ -78,7 +81,7 @@ mca_pml_cm_enable(bool enable)
ompi_pml_cm.free_list_num,
ompi_pml_cm.free_list_max,
ompi_pml_cm.free_list_inc,
NULL);
NULL, 0, NULL, NULL, NULL);
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,6 +11,8 @@
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -53,10 +56,9 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_recv_request_t);
* @return Receive request.
*/
#define MCA_PML_CM_THIN_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t*item; \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_cm_thin_recv_request_t*) item; \
do { \
recvreq = (mca_pml_cm_thin_recv_request_t*) \
opal_free_list_get (&mca_pml_base_recv_requests); \
recvreq->req_base.req_pml_type = MCA_PML_CM_REQUEST_RECV_THIN; \
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq; \
recvreq->req_mtl.completion_callback = mca_pml_cm_recv_request_completion; \
@ -64,9 +66,8 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_recv_request_t);
#define MCA_PML_CM_HVY_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t*item; \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_cm_hvy_recv_request_t*) item; \
recvreq = (mca_pml_cm_hvy_recv_request_t*) \
opal_free_list_get (&mca_pml_base_recv_requests); \
recvreq->req_base.req_pml_type = MCA_PML_CM_REQUEST_RECV_HEAVY; \
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq; \
recvreq->req_mtl.completion_callback = mca_pml_cm_recv_request_completion; \
@ -296,8 +297,8 @@ do { \
OBJ_RELEASE((recvreq)->req_base.req_datatype); \
OMPI_REQUEST_FINI(&(recvreq)->req_base.req_ompi); \
opal_convertor_cleanup( &((recvreq)->req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
opal_free_list_return ( &mca_pml_base_recv_requests, \
(opal_free_list_item_t*)(recvreq)); \
}
/**
@ -309,8 +310,8 @@ do { \
OBJ_RELEASE((recvreq)->req_base.req_datatype); \
OMPI_REQUEST_FINI(&(recvreq)->req_base.req_ompi); \
opal_convertor_cleanup( &((recvreq)->req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
opal_free_list_return ( &mca_pml_base_recv_requests, \
(opal_free_list_item_t*)(recvreq)); \
}
extern void mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request);

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -59,14 +62,13 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_send_request_t);
#define MCA_PML_CM_THIN_SEND_REQUEST_ALLOC(sendreq, comm, dst, \
ompi_proc) \
do { \
ompi_free_list_item_t* item; \
ompi_proc = ompi_comm_peer_lookup( comm, dst ); \
\
if(OPAL_UNLIKELY(NULL == ompi_proc)) { \
sendreq = NULL; \
} else { \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_cm_thin_send_request_t*)item; \
sendreq = (mca_pml_cm_thin_send_request_t*) \
opal_free_list_wait (&mca_pml_base_send_requests); \
sendreq->req_send.req_base.req_pml_type = MCA_PML_CM_REQUEST_SEND_THIN; \
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq; \
sendreq->req_mtl.completion_callback = mca_pml_cm_send_request_completion; \
@ -77,13 +79,12 @@ do { \
#define MCA_PML_CM_HVY_SEND_REQUEST_ALLOC(sendreq, comm, dst, \
ompi_proc) \
{ \
ompi_free_list_item_t* item; \
ompi_proc = ompi_comm_peer_lookup( comm, dst ); \
if(OPAL_UNLIKELY(NULL == ompi_proc)) { \
sendreq = NULL; \
} else { \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_cm_hvy_send_request_t*)item; \
sendreq = (mca_pml_cm_hvy_send_request_t*) \
opal_free_list_wait (&mca_pml_base_send_requests); \
sendreq->req_send.req_base.req_pml_type = MCA_PML_CM_REQUEST_SEND_HEAVY; \
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq; \
sendreq->req_mtl.completion_callback = mca_pml_cm_send_request_completion; \
@ -307,8 +308,8 @@ do {
OBJ_RELEASE(sendreq->req_send.req_base.req_comm); \
OMPI_REQUEST_FINI(&sendreq->req_send.req_base.req_ompi); \
opal_convertor_cleanup( &(sendreq->req_send.req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
opal_free_list_return ( &mca_pml_base_send_requests, \
(opal_free_list_item_t*)sendreq); \
}
/*
@ -346,8 +347,8 @@ do { \
OBJ_RELEASE(sendreq->req_send.req_base.req_comm); \
OMPI_REQUEST_FINI(&sendreq->req_send.req_base.req_ompi); \
opal_convertor_cleanup( &(sendreq->req_send.req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
opal_free_list_return ( &mca_pml_base_send_requests, \
(opal_free_list_item_t*)sendreq); \
}
extern void

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -25,7 +27,7 @@
#include "ompi_config.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "ompi/request/request.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/mca/pml/base/pml_base_request.h"
@ -59,7 +61,7 @@ BEGIN_C_DECLS
extern mca_pml_crcpw_module_t mca_pml_crcpw_module;
/* Free list of PML states */
OMPI_MODULE_DECLSPEC extern ompi_free_list_t pml_state_list;
OMPI_MODULE_DECLSPEC extern opal_free_list_t pml_state_list;
OMPI_MODULE_DECLSPEC extern bool pml_crcpw_is_finalized;
/*

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,6 +11,8 @@
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -64,7 +67,7 @@ mca_pml_crcpw_component_t mca_pml_crcpw_component = {
false
};
ompi_free_list_t pml_state_list;
opal_free_list_t pml_state_list;
bool pml_crcpw_is_finalized = false;
static int mca_pml_crcpw_component_register(void)
@ -148,8 +151,8 @@ mca_pml_base_module_t* mca_pml_crcpw_component_init(int* priority,
opal_output_verbose( 20, mca_pml_crcpw_component.output_handle,
"pml:crcpw: component_init: Initalize Wrapper");
OBJ_CONSTRUCT(&pml_state_list, ompi_free_list_t);
ompi_free_list_init_new( &pml_state_list,
OBJ_CONSTRUCT(&pml_state_list, opal_free_list_t);
opal_free_list_init (&pml_state_list,
sizeof(ompi_crcp_base_pml_state_t),
opal_cache_line_size,
OBJ_CLASS(ompi_crcp_base_pml_state_t),
@ -157,7 +160,7 @@ mca_pml_base_module_t* mca_pml_crcpw_component_init(int* priority,
5, /* Initial number */
-1, /* Max = Unlimited */
64, /* Increment by */
NULL);
NULL, 0, NULL, NULL, NULL);
}
else {
opal_output_verbose( 20, mca_pml_crcpw_component.output_handle,

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,6 +11,8 @@
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -27,7 +30,7 @@
#include "ompi/mca/pml/crcpw/pml_crcpw.h"
#include "ompi/mca/bml/base/base.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
mca_pml_crcpw_module_t mca_pml_crcpw_module = {
{
@ -61,17 +64,16 @@ mca_pml_crcpw_module_t mca_pml_crcpw_module = {
#define PML_CRCP_STATE_ALLOC(pml_state) \
do { \
if( !pml_crcpw_is_finalized ) { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&pml_state_list, item); \
pml_state = (ompi_crcp_base_pml_state_t*)item; \
pml_state = (ompi_crcp_base_pml_state_t*) \
opal_free_list_wait (&pml_state_list); \
} \
} while(0);
#define PML_CRCP_STATE_RETURN(pml_state) \
do { \
if( !pml_crcpw_is_finalized ) { \
OMPI_FREE_LIST_RETURN_MT(&pml_state_list, \
(ompi_free_list_item_t*)pml_state); \
opal_free_list_return (&pml_state_list, \
(opal_free_list_item_t*)pml_state); \
} \
} while(0);

Просмотреть файл

@ -98,8 +98,8 @@ int mca_pml_ob1_enable(bool enable)
OBJ_CONSTRUCT(&mca_pml_ob1.lock, opal_mutex_t);
/* fragments */
OBJ_CONSTRUCT(&mca_pml_ob1.rdma_frags, ompi_free_list_t);
ompi_free_list_init_new( &mca_pml_ob1.rdma_frags,
OBJ_CONSTRUCT(&mca_pml_ob1.rdma_frags, opal_free_list_t);
opal_free_list_init ( &mca_pml_ob1.rdma_frags,
sizeof(mca_pml_ob1_rdma_frag_t),
opal_cache_line_size,
OBJ_CLASS(mca_pml_ob1_rdma_frag_t),
@ -107,11 +107,11 @@ int mca_pml_ob1_enable(bool enable)
mca_pml_ob1.free_list_num,
mca_pml_ob1.free_list_max,
mca_pml_ob1.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&mca_pml_ob1.recv_frags, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_pml_ob1.recv_frags, opal_free_list_t);
ompi_free_list_init_new( &mca_pml_ob1.recv_frags,
opal_free_list_init ( &mca_pml_ob1.recv_frags,
sizeof(mca_pml_ob1_recv_frag_t) + mca_pml_ob1.unexpected_limit,
opal_cache_line_size,
OBJ_CLASS(mca_pml_ob1_recv_frag_t),
@ -119,10 +119,10 @@ int mca_pml_ob1_enable(bool enable)
mca_pml_ob1.free_list_num,
mca_pml_ob1.free_list_max,
mca_pml_ob1.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&mca_pml_ob1.pending_pckts, ompi_free_list_t);
ompi_free_list_init_new( &mca_pml_ob1.pending_pckts,
OBJ_CONSTRUCT(&mca_pml_ob1.pending_pckts, opal_free_list_t);
opal_free_list_init ( &mca_pml_ob1.pending_pckts,
sizeof(mca_pml_ob1_pckt_pending_t),
opal_cache_line_size,
OBJ_CLASS(mca_pml_ob1_pckt_pending_t),
@ -130,12 +130,12 @@ int mca_pml_ob1_enable(bool enable)
mca_pml_ob1.free_list_num,
mca_pml_ob1.free_list_max,
mca_pml_ob1.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
OBJ_CONSTRUCT(&mca_pml_ob1.buffers, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_pml_ob1.send_ranges, ompi_free_list_t);
ompi_free_list_init_new( &mca_pml_ob1.send_ranges,
OBJ_CONSTRUCT(&mca_pml_ob1.buffers, opal_free_list_t);
OBJ_CONSTRUCT(&mca_pml_ob1.send_ranges, opal_free_list_t);
opal_free_list_init ( &mca_pml_ob1.send_ranges,
sizeof(mca_pml_ob1_send_range_t) +
(mca_pml_ob1.max_send_per_range - 1) * sizeof(mca_pml_ob1_com_btl_t),
opal_cache_line_size,
@ -144,7 +144,7 @@ int mca_pml_ob1_enable(bool enable)
mca_pml_ob1.free_list_num,
mca_pml_ob1.free_list_max,
mca_pml_ob1.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
/* pending operations */
OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, opal_list_t);
@ -160,7 +160,7 @@ int mca_pml_ob1_enable(bool enable)
* should get ownership for the send and receive requests list, and
* initialize them with the size of our own requests.
*/
ompi_free_list_init_new( &mca_pml_base_send_requests,
opal_free_list_init ( &mca_pml_base_send_requests,
sizeof(mca_pml_ob1_send_request_t) +
(mca_pml_ob1.max_rdma_per_request - 1) *
sizeof(mca_pml_ob1_com_btl_t),
@ -170,9 +170,9 @@ int mca_pml_ob1_enable(bool enable)
mca_pml_ob1.free_list_num,
mca_pml_ob1.free_list_max,
mca_pml_ob1.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
ompi_free_list_init_new( &mca_pml_base_recv_requests,
opal_free_list_init ( &mca_pml_base_recv_requests,
sizeof(mca_pml_ob1_recv_request_t) +
(mca_pml_ob1.max_rdma_per_request - 1) *
sizeof(mca_pml_ob1_com_btl_t),
@ -182,7 +182,7 @@ int mca_pml_ob1_enable(bool enable)
mca_pml_ob1.free_list_num,
mca_pml_ob1.free_list_max,
mca_pml_ob1.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
mca_pml_ob1.enabled = true;
return OMPI_SUCCESS;

Просмотреть файл

@ -28,7 +28,7 @@
#define MCA_PML_OB1_H
#include "ompi_config.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "ompi/request/request.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/mca/pml/base/pml_base_request.h"
@ -65,11 +65,11 @@ struct mca_pml_ob1_t {
opal_mutex_t lock;
/* free lists */
ompi_free_list_t rdma_frags;
ompi_free_list_t recv_frags;
ompi_free_list_t pending_pckts;
ompi_free_list_t buffers;
ompi_free_list_t send_ranges;
opal_free_list_t rdma_frags;
opal_free_list_t recv_frags;
opal_free_list_t pending_pckts;
opal_free_list_t buffers;
opal_free_list_t send_ranges;
/* list of pending operations */
opal_list_t pckt_pending;
@ -211,7 +211,7 @@ extern int mca_pml_ob1_ft_event( int state );
END_C_DECLS
struct mca_pml_ob1_pckt_pending_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
ompi_proc_t* proc;
mca_pml_ob1_hdr_t hdr;
struct mca_bml_base_btl_t *bml_btl;
@ -223,16 +223,15 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_pckt_pending_t);
#define MCA_PML_OB1_PCKT_PENDING_ALLOC(pckt) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.pending_pckts, item); \
pckt = (mca_pml_ob1_pckt_pending_t*)item; \
pckt = (mca_pml_ob1_pckt_pending_t *) \
opal_free_list_get (&mca_pml_ob1.pending_pckts); \
} while (0)
#define MCA_PML_OB1_PCKT_PENDING_RETURN(pckt) \
do { \
/* return packet */ \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.pending_pckts, \
(ompi_free_list_item_t*)pckt); \
opal_free_list_return (&mca_pml_ob1.pending_pckts, \
(opal_free_list_item_t*)pckt); \
} while(0)
#define MCA_PML_OB1_ADD_FIN_TO_PENDING(P, D, Sz, B, O, S) \

Просмотреть файл

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -40,7 +40,7 @@
#include "opal/runtime/opal_params.h"
OBJ_CLASS_INSTANCE( mca_pml_ob1_pckt_pending_t,
ompi_free_list_item_t,
opal_free_list_item_t,
NULL,
NULL );

Просмотреть файл

@ -31,6 +31,6 @@ static void mca_pml_ob1_rdma_frag_constructor (mca_pml_ob1_rdma_frag_t *frag)
OBJ_CLASS_INSTANCE(
mca_pml_ob1_rdma_frag_t,
ompi_free_list_item_t,
opal_free_list_item_t,
mca_pml_ob1_rdma_frag_constructor,
NULL);

Просмотреть файл

@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -42,7 +42,7 @@ typedef void (*mca_pml_ob1_rdma_frag_callback_t)(struct mca_pml_ob1_rdma_frag_t
* Used to keep track of local and remote RDMA operations.
*/
struct mca_pml_ob1_rdma_frag_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
mca_bml_base_btl_t *rdma_bml;
mca_pml_ob1_hdr_t rdma_hdr;
mca_pml_ob1_rdma_state_t rdma_state;
@ -65,10 +65,9 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_rdma_frag_t);
#define MCA_PML_OB1_RDMA_FRAG_ALLOC(frag) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.rdma_frags, item); \
frag = (mca_pml_ob1_rdma_frag_t*)item; \
} while(0)
frag = (mca_pml_ob1_rdma_frag_t *) \
opal_free_list_wait (&mca_pml_ob1.rdma_frags); \
} while(0)
#define MCA_PML_OB1_RDMA_FRAG_RETURN(frag) \
do { \
@ -77,8 +76,8 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_rdma_frag_t);
mca_bml_base_deregister_mem (frag->rdma_bml, frag->local_handle); \
frag->local_handle = NULL; \
} \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.rdma_frags, \
(ompi_free_list_item_t*)frag); \
opal_free_list_return (&mca_pml_ob1.rdma_frags, \
(opal_free_list_item_t*)frag); \
} while (0)
END_C_DECLS

Просмотреть файл

@ -50,7 +50,7 @@
#endif /* OPAL_CUDA_SUPPORT */
OBJ_CLASS_INSTANCE( mca_pml_ob1_buffer_t,
ompi_free_list_item_t,
opal_free_list_item_t,
NULL,
NULL );

Просмотреть файл

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -39,7 +39,7 @@ typedef struct mca_pml_ob1_buffer_t mca_pml_ob1_buffer_t;
struct mca_pml_ob1_recv_frag_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
mca_pml_ob1_hdr_t hdr;
size_t num_segments;
mca_btl_base_module_t* btl;
@ -54,9 +54,8 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_frag_t);
#define MCA_PML_OB1_RECV_FRAG_ALLOC(frag) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.recv_frags, item); \
frag = (mca_pml_ob1_recv_frag_t*)item; \
frag = (mca_pml_ob1_recv_frag_t *) \
opal_free_list_wait (&mca_pml_ob1.recv_frags); \
} while(0)
@ -104,8 +103,8 @@ do { \
frag->num_segments = 0; \
\
/* return recv_frag */ \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.recv_frags, \
(ompi_free_list_item_t*)frag); \
opal_free_list_return (&mca_pml_ob1.recv_frags, \
(opal_free_list_item_t*)frag); \
} while(0)

Просмотреть файл

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -79,9 +79,8 @@ static inline bool unlock_recv_request(mca_pml_ob1_recv_request_t *recvreq)
*/
#define MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_ob1_recv_request_t*)item; \
recvreq = (mca_pml_ob1_recv_request_t *) \
opal_free_list_get (&mca_pml_base_recv_requests); \
} while(0)
@ -138,8 +137,8 @@ do { \
mca_bml_base_deregister_mem ((recvreq)->rdma_bml, (recvreq)->local_handle); \
(recvreq)->local_handle = NULL; \
} \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
opal_free_list_return (&mca_pml_base_recv_requests, \
(opal_free_list_item_t*)(recvreq)); \
}
/**

Просмотреть файл

@ -36,7 +36,7 @@
#include "ompi/mca/bml/base/base.h"
#include "ompi/memchecker.h"
OBJ_CLASS_INSTANCE(mca_pml_ob1_send_range_t, ompi_free_list_item_t,
OBJ_CLASS_INSTANCE(mca_pml_ob1_send_range_t, opal_free_list_item_t,
NULL, NULL);
void mca_pml_ob1_send_request_process_pending(mca_bml_base_btl_t *bml_btl)
@ -830,7 +830,7 @@ void mca_pml_ob1_send_request_copy_in_out( mca_pml_ob1_send_request_t *sendreq,
uint64_t send_length )
{
mca_pml_ob1_send_range_t *sr;
ompi_free_list_item_t *i;
opal_free_list_item_t *i;
mca_bml_base_endpoint_t* bml_endpoint = sendreq->req_endpoint;
int num_btls = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_send);
int n;
@ -839,7 +839,7 @@ void mca_pml_ob1_send_request_copy_in_out( mca_pml_ob1_send_request_t *sendreq,
if( OPAL_UNLIKELY(0 == send_length) )
return;
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.send_ranges, i);
i = opal_free_list_wait (&mca_pml_ob1.send_ranges);
sr = (mca_pml_ob1_send_range_t*)i;
@ -893,7 +893,7 @@ get_next_send_range(mca_pml_ob1_send_request_t* sendreq,
{
OPAL_THREAD_LOCK(&sendreq->req_send_range_lock);
opal_list_remove_item(&sendreq->req_send_ranges, (opal_list_item_t *)range);
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.send_ranges, &range->base);
opal_free_list_return (&mca_pml_ob1.send_ranges, &range->base);
range = get_send_range_nolock(sendreq);
OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock);

Просмотреть файл

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2011-2012 NVIDIA Corporation. All rights reserved.
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -62,7 +62,7 @@ typedef struct mca_pml_ob1_send_request_t mca_pml_ob1_send_request_t;
OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
struct mca_pml_ob1_send_range_t {
ompi_free_list_item_t base;
opal_free_list_item_t base;
uint64_t range_send_offset;
uint64_t range_send_length;
int range_btl_idx;
@ -121,11 +121,10 @@ get_request_from_send_pending(mca_pml_ob1_send_pending_t *type)
sendreq) \
{ \
ompi_proc_t *proc = ompi_comm_peer_lookup( comm, dst ); \
ompi_free_list_item_t* item; \
\
if( OPAL_LIKELY(NULL != proc) ) { \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_ob1_send_request_t*)item; \
sendreq = (mca_pml_ob1_send_request_t*) \
opal_free_list_wait (&mca_pml_base_send_requests); \
sendreq->req_send.req_base.req_proc = proc; \
} \
}
@ -226,8 +225,8 @@ do {
MCA_PML_OB1_RDMA_FRAG_RETURN (sendreq->rdma_frag); \
sendreq->rdma_frag = NULL; \
} \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
opal_free_list_return ( &mca_pml_base_send_requests, \
(opal_free_list_item_t*)sendreq); \
} while(0)

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -157,7 +160,7 @@ void mca_pml_yalla_init_datatype(void)
}
OBJ_CLASS_INSTANCE(mca_pml_yalla_convertor_t,
ompi_free_list_item_t,
opal_free_list_item_t,
mca_pml_yalla_convertor_construct,
mca_pml_yalla_convertor_destruct);

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -13,7 +16,7 @@
#include "pml_yalla.h"
struct pml_yalla_convertor {
ompi_free_list_item_t super;
opal_free_list_item_t super;
ompi_datatype_t *datatype;
opal_convertor_t convertor;
};

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -272,7 +275,7 @@ OBJ_CLASS_INSTANCE(mca_pml_yalla_send_request_t,
mca_pml_yalla_send_request_destruct);
OBJ_CLASS_INSTANCE(mca_pml_yalla_bsend_request_t,
ompi_free_list_item_t,
opal_free_list_item_t,
mca_pml_yalla_bsend_request_construct,
NULL);

Просмотреть файл

@ -1,5 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -31,7 +34,7 @@ struct pml_yalla_send_request {
};
struct pml_yalla_bsend_request {
ompi_free_list_item_t super;
opal_free_list_item_t super;
mxm_send_req_t mxm;
};

Просмотреть файл

@ -1,6 +1,9 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -18,7 +21,7 @@ int mca_vprotocol_base_request_parasite(void)
if(mca_vprotocol.req_recv_class)
{
ompi_free_list_t pml_fl_save = mca_pml_base_recv_requests;
opal_free_list_t pml_fl_save = mca_pml_base_recv_requests;
mca_pml_v.host_pml_req_recv_size =
pml_fl_save.fl_frag_class->cls_sizeof;
V_OUTPUT_VERBOSE(300, "req_rebuild: recv\tsize %lu+%lu\talignment=%lu", (unsigned long) mca_pml_v.host_pml_req_recv_size, (unsigned long) mca_vprotocol.req_recv_class->cls_sizeof, (unsigned long) pml_fl_save.fl_frag_alignment);
@ -28,8 +31,8 @@ int mca_vprotocol_base_request_parasite(void)
pml_fl_save.fl_frag_class->cls_sizeof;
/* rebuild the requests free list with the right size */
OBJ_DESTRUCT(&mca_pml_base_recv_requests);
OBJ_CONSTRUCT(&mca_pml_base_recv_requests, ompi_free_list_t);
ret = ompi_free_list_init_ex_new(&mca_pml_base_recv_requests,
OBJ_CONSTRUCT(&mca_pml_base_recv_requests, opal_free_list_t);
ret = opal_free_list_init (&mca_pml_base_recv_requests,
mca_vprotocol.req_recv_class->cls_sizeof,
pml_fl_save.fl_frag_alignment,
mca_vprotocol.req_recv_class,
@ -39,13 +42,15 @@ int mca_vprotocol_base_request_parasite(void)
pml_fl_save.fl_max_to_alloc,
pml_fl_save.fl_num_per_alloc,
pml_fl_save.fl_mpool,
pml_fl_save.fl_mpool_reg_flags,
0,
pml_fl_save.item_init,
pml_fl_save.ctx);
if(OMPI_SUCCESS != ret) return ret;
}
if(mca_vprotocol.req_send_class)
{
ompi_free_list_t pml_fl_save = mca_pml_base_send_requests;
opal_free_list_t pml_fl_save = mca_pml_base_send_requests;
mca_pml_v.host_pml_req_send_size =
pml_fl_save.fl_frag_class->cls_sizeof;
V_OUTPUT_VERBOSE(300, "req_rebuild: send\tsize %lu+%lu\talignment=%lu", (unsigned long) mca_pml_v.host_pml_req_send_size, (unsigned long) mca_vprotocol.req_send_class->cls_sizeof, (unsigned long) pml_fl_save.fl_frag_alignment);
@ -55,8 +60,8 @@ int mca_vprotocol_base_request_parasite(void)
pml_fl_save.fl_frag_class->cls_sizeof;
/* rebuild the requests free list with the right size */
OBJ_DESTRUCT(&mca_pml_base_send_requests);
OBJ_CONSTRUCT(&mca_pml_base_send_requests, ompi_free_list_t);
ret = ompi_free_list_init_ex_new(&mca_pml_base_send_requests,
OBJ_CONSTRUCT(&mca_pml_base_send_requests, opal_free_list_t);
ret = opal_free_list_init (&mca_pml_base_send_requests,
mca_vprotocol.req_send_class->cls_sizeof,
pml_fl_save.fl_frag_alignment,
mca_vprotocol.req_send_class,
@ -66,6 +71,8 @@ int mca_vprotocol_base_request_parasite(void)
pml_fl_save.fl_max_to_alloc,
pml_fl_save.fl_num_per_alloc,
pml_fl_save.fl_mpool,
pml_fl_save.fl_mpool_reg_flags,
0,
pml_fl_save.item_init,
pml_fl_save.ctx);
if(OMPI_SUCCESS != ret) return ret;

Просмотреть файл

@ -1,6 +1,9 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -37,7 +40,7 @@ typedef struct mca_vprotocol_pessimist_module_t {
size_t event_buffer_max_length;
/* space for allocating events */
ompi_free_list_t events_pool;
opal_free_list_t events_pool;
/* Sender Based repository */
vprotocol_pessimist_sender_based_t sender_based;

Просмотреть файл

@ -1,6 +1,9 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -127,8 +130,8 @@ static mca_vprotocol_base_module_t *mca_vprotocol_pessimist_component_init( int*
mca_vprotocol_pessimist.replay = false;
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.replay_events, opal_list_t);
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.pending_events, opal_list_t);
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.events_pool, ompi_free_list_t);
ompi_free_list_init_new(&mca_vprotocol_pessimist.events_pool,
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.events_pool, opal_free_list_t);
opal_free_list_init (&mca_vprotocol_pessimist.events_pool,
sizeof(mca_vprotocol_pessimist_event_t),
opal_cache_line_size,
OBJ_CLASS(mca_vprotocol_pessimist_event_t),
@ -136,7 +139,7 @@ static mca_vprotocol_base_module_t *mca_vprotocol_pessimist_component_init( int*
_free_list_num,
_free_list_max,
_free_list_inc,
NULL);
NULL, 0, NULL, NULL, NULL);
mca_vprotocol_pessimist.event_buffer_max_length =
_event_buffer_size / sizeof(vprotocol_pessimist_mem_event_t);
mca_vprotocol_pessimist.event_buffer_length = 0;

Просмотреть файл

@ -1,6 +1,9 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2013 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -42,7 +45,7 @@ typedef union vprotocol_pessimist_mem_event_t {
} vprotocol_pessimist_mem_event_t;
typedef struct mca_vprotocol_pessimist_event_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
vprotocol_pessimist_event_type_t type;
mca_pml_base_request_t *req;
vprotocol_pessimist_mem_event_t u_event;
@ -53,8 +56,8 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_vprotocol_pessimist_event_t);
#define VPESSIMIST_MATCHING_EVENT_NEW(event) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT_MT(&mca_vprotocol_pessimist.events_pool, item); \
opal_free_list_item_t *item; \
item = opal_free_list_wait (&mca_vprotocol_pessimist.events_pool); \
event = (mca_vprotocol_pessimist_event_t *) item; \
event->type = VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING; \
event->u_event.e_matching.src = -1; \
@ -62,15 +65,15 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_vprotocol_pessimist_event_t);
#define VPESSIMIST_DELIVERY_EVENT_NEW(event) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT_MT(&mca_vprotocol_pessimist.events_pool, item); \
opal_free_list_item_t *item; \
item = opal_free_list_wait (&mca_vprotocol_pessimist.events_pool); \
event = (mca_vprotocol_pessimist_event_t *) item; \
event->type = VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY; \
} while(0)
#define VPESSIMIST_EVENT_RETURN(event) \
OMPI_FREE_LIST_RETURN_MT(&mca_vprotocol_pessimist.events_pool, \
(ompi_free_list_item_t *) event)
opal_free_list_return (&mca_vprotocol_pessimist.events_pool, \
(opal_free_list_item_t *) event)
END_C_DECLS

Просмотреть файл

@ -46,7 +46,7 @@ ompi_message_init(void)
OBJ_CONSTRUCT(&ompi_message_free_list, opal_free_list_t);
rc = opal_free_list_init(&ompi_message_free_list,
sizeof(ompi_message_t),
sizeof(ompi_message_t), 8,
OBJ_CLASS(ompi_message_t),
0, 0, 8, -1, 8, NULL, 0, NULL, NULL, NULL);

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -13,6 +13,8 @@
* Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -98,7 +100,7 @@ int ompi_request_persistent_proc_null_free(ompi_request_t** request)
OBJ_CLASS_INSTANCE(
ompi_request_t,
ompi_free_list_item_t,
opal_free_list_item_t,
ompi_request_construct,
ompi_request_destruct);

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -13,6 +13,8 @@
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -30,7 +32,7 @@
#include "ompi_config.h"
#include "mpi.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "opal/class/opal_pointer_array.h"
#include "opal/threads/condition.h"
#include "ompi/constants.h"
@ -97,7 +99,7 @@ typedef union ompi_mpi_object_t {
* Main top-level request struct definition
*/
struct ompi_request_t {
ompi_free_list_item_t super; /**< Base type */
opal_free_list_item_t super; /**< Base type */
ompi_request_type_t req_type; /**< Enum indicating the type of the request */
ompi_status_public_t req_status; /**< Completion status */
volatile bool req_complete; /**< Flag indicating wether request has completed */

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -49,11 +52,10 @@ static void opal_rb_tree_construct(opal_object_t * object)
{
opal_rb_tree_t * tree = (opal_rb_tree_t *) object;
tree->root_ptr = NULL;
OBJ_CONSTRUCT(&(tree->free_list), ompi_free_list_t);
ompi_free_list_init_new(&(tree->free_list), sizeof(opal_rb_tree_node_t),
OBJ_CONSTRUCT(&(tree->free_list), opal_free_list_t);
opal_free_list_init (&(tree->free_list), sizeof(opal_rb_tree_node_t),
opal_cache_line_size, OBJ_CLASS(opal_rb_tree_node_t),
0,opal_cache_line_size,
0, -1 , 128, NULL);
0,opal_cache_line_size, 0, -1 , 128, NULL, 0, NULL, NULL, NULL);
}
/**
@ -71,7 +73,7 @@ static void opal_rb_tree_destruct(opal_object_t * object)
}
/* declare the instance of the classes */
OBJ_CLASS_INSTANCE(opal_rb_tree_node_t, ompi_free_list_item_t, NULL, NULL);
OBJ_CLASS_INSTANCE(opal_rb_tree_node_t, opal_free_list_item_t, NULL, NULL);
OBJ_CLASS_INSTANCE(opal_rb_tree_t, opal_object_t, opal_rb_tree_construct,
opal_rb_tree_destruct);
@ -79,17 +81,17 @@ OBJ_CLASS_INSTANCE(opal_rb_tree_t, opal_object_t, opal_rb_tree_construct,
int opal_rb_tree_init(opal_rb_tree_t * tree,
opal_rb_tree_comp_fn_t comp)
{
ompi_free_list_item_t * node;
opal_free_list_item_t * node;
/* we need to get memory for the root pointer from the free list */
OMPI_FREE_LIST_GET_MT(&(tree->free_list), node);
node = opal_free_list_get (&(tree->free_list));
tree->root_ptr = (opal_rb_tree_node_t *) node;
if (NULL == node) {
return OPAL_ERR_OUT_OF_RESOURCE;
}
OMPI_FREE_LIST_GET_MT(&(tree->free_list), node);
node = opal_free_list_get (&(tree->free_list));
if (NULL == node) {
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), (ompi_free_list_item_t*)tree->root_ptr);
opal_free_list_return (&tree->free_list, (opal_free_list_item_t*)tree->root_ptr);
return OPAL_ERR_OUT_OF_RESOURCE;
}
tree->nill = (opal_rb_tree_node_t *) node;
@ -119,10 +121,10 @@ int opal_rb_tree_insert(opal_rb_tree_t *tree, void * key, void * value)
{
opal_rb_tree_node_t * y;
opal_rb_tree_node_t * node;
ompi_free_list_item_t * item;
opal_free_list_item_t * item;
/* get the memory for a node */
OMPI_FREE_LIST_GET_MT(&(tree->free_list), item);
item = opal_free_list_get (&tree->free_list);
if (NULL == item) {
return OPAL_ERR_OUT_OF_RESOURCE;
}
@ -226,7 +228,7 @@ int opal_rb_tree_delete(opal_rb_tree_t *tree, void *key)
opal_rb_tree_node_t * p;
opal_rb_tree_node_t * todelete;
opal_rb_tree_node_t * y;
ompi_free_list_item_t * item;
opal_free_list_item_t * item;
p = opal_rb_tree_find_node(tree, key);
if (NULL == p) {
@ -264,8 +266,8 @@ int opal_rb_tree_delete(opal_rb_tree_t *tree, void *key)
if (todelete->color == BLACK) {
btree_delete_fixup(tree, y);
}
item = (ompi_free_list_item_t *) todelete;
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
item = (opal_free_list_item_t *) todelete;
opal_free_list_return (&(tree->free_list), item);
--tree->tree_size;
return OPAL_SUCCESS;
}
@ -274,18 +276,18 @@ int opal_rb_tree_delete(opal_rb_tree_t *tree, void *key)
/* Destroy the hashmap */
int opal_rb_tree_destroy(opal_rb_tree_t *tree)
{
ompi_free_list_item_t * item;
opal_free_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_free_list_item_t *) tree->root_ptr;
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
item = (opal_free_list_item_t *) tree->root_ptr;
opal_free_list_return(&(tree->free_list), item);
/* free the tree->nill node */
item = (ompi_free_list_item_t *) tree->nill;
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
item = (opal_free_list_item_t *) tree->nill;
opal_free_list_return (&(tree->free_list), item);
return OPAL_SUCCESS;
}
@ -419,7 +421,7 @@ static void btree_delete_fixup(opal_rb_tree_t *tree, opal_rb_tree_node_t * x)
static void
inorder_destroy(opal_rb_tree_t *tree, opal_rb_tree_node_t * node)
{
ompi_free_list_item_t * item;
opal_free_list_item_t * item;
if (node == tree->nill) {
return;
@ -428,16 +430,16 @@ inorder_destroy(opal_rb_tree_t *tree, opal_rb_tree_node_t * node)
inorder_destroy(tree, node->left);
if (node->left != tree->nill) {
item = (ompi_free_list_item_t *) node->left;
item = (opal_free_list_item_t *) node->left;
--tree->tree_size;
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
opal_free_list_return (&tree->free_list, item);
}
inorder_destroy(tree, node->right);
if (node->right != tree->nill) {
item = (ompi_free_list_item_t *) node->right;
item = (opal_free_list_item_t *) node->right;
--tree->tree_size;
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
opal_free_list_return (&tree->free_list, item);
}
}

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -29,7 +32,7 @@
#include <stdlib.h>
#include "opal/constants.h"
#include "opal/class/opal_object.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
BEGIN_C_DECLS
/*
@ -46,7 +49,7 @@ typedef enum {RED, BLACK} opal_rb_tree_nodecolor_t;
*/
struct opal_rb_tree_node_t
{
ompi_free_list_item_t super; /**< the parent class */
opal_free_list_item_t super; /**< the parent class */
opal_rb_tree_nodecolor_t color; /**< the node color */
struct opal_rb_tree_node_t * parent;/**< the parent node, can be NULL */
struct opal_rb_tree_node_t * left; /**< the left child - can be nill */
@ -72,7 +75,7 @@ struct opal_rb_tree_t {
opal_rb_tree_node_t * root_ptr; /**< a pointer to the root of the tree */
opal_rb_tree_node_t * nill; /**< the nill sentinal node */
opal_rb_tree_comp_fn_t comp; /**< the compare function */
ompi_free_list_t free_list; /**< the free list to get the memory from */
opal_free_list_t free_list; /**< the free list to get the memory from */
size_t tree_size; /**< the size of the tree */
};
typedef struct opal_rb_tree_t opal_rb_tree_t;

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -12,6 +13,8 @@
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -50,7 +53,7 @@ mca_allocator_base_component_t mca_allocator_basic_component = {
OBJ_CLASS_INSTANCE(
mca_allocator_basic_segment_t,
ompi_free_list_item_t,
opal_free_list_item_t,
NULL,
NULL);
@ -93,9 +96,9 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init(
module->seg_free = segment_free;
OBJ_CONSTRUCT(&module->seg_list, opal_list_t);
OBJ_CONSTRUCT(&module->seg_lock, opal_mutex_t);
OBJ_CONSTRUCT(&module->seg_descriptors, ompi_free_list_t);
OBJ_CONSTRUCT(&module->seg_descriptors, opal_free_list_t);
ompi_free_list_init_new(&module->seg_descriptors,
opal_free_list_init (&module->seg_descriptors,
sizeof(mca_allocator_basic_segment_t),
opal_cache_line_size,
OBJ_CLASS(mca_allocator_basic_segment_t),
@ -103,7 +106,7 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init(
0, /* initial size */
-1, /* maximum size */
16, /* increment to grow by */
NULL);
NULL, 0, NULL, NULL, NULL);
return &module->super;
}
@ -122,7 +125,7 @@ static void mca_allocator_basic_combine_prev(
if(prev->seg_addr + prev->seg_size == seg->seg_addr) {
prev->seg_size += seg->seg_size;
opal_list_remove_item(&module->seg_list, &seg->seg_item.super);
OMPI_FREE_LIST_RETURN_MT(&module->seg_descriptors, &seg->seg_item);
opal_free_list_return (&module->seg_descriptors, &seg->seg_item);
return;
}
}
@ -139,7 +142,7 @@ static void mca_allocator_basic_combine_next(
next->seg_addr = seg->seg_addr;
next->seg_size += seg->seg_size;
opal_list_remove_item(&module->seg_list, &seg->seg_item.super);
OMPI_FREE_LIST_RETURN_MT(&module->seg_descriptors, &seg->seg_item);
opal_free_list_return (&module->seg_descriptors, &seg->seg_item);
return;
}
}
@ -165,7 +168,6 @@ void *mca_allocator_basic_alloc(
{
mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base;
mca_allocator_basic_segment_t* seg;
ompi_free_list_item_t* item;
unsigned char* addr;
size_t allocated_size;
OPAL_THREAD_LOCK(&module->seg_lock);
@ -175,11 +177,7 @@ void *mca_allocator_basic_alloc(
/* normalize size so we don't end up with seg_addr on an odd boundary */
size += sizeof(size_t) - (size & (sizeof(size_t) - 1));
/* search the list for a segment of the required size */
for(item = (ompi_free_list_item_t*) opal_list_get_first(&module->seg_list);
item != (ompi_free_list_item_t*) opal_list_get_end(&module->seg_list);
item = (ompi_free_list_item_t*) opal_list_get_next(&item->super)) {
seg = (mca_allocator_basic_segment_t*)item;
OPAL_LIST_FOREACH(seg, &module->seg_list, mca_allocator_basic_segment_t) {
/* split the segment */
if(seg->seg_size > size) {
addr = seg->seg_addr;
@ -190,8 +188,8 @@ void *mca_allocator_basic_alloc(
return addr+sizeof(size_t);
} else if (seg->seg_size == size) {
addr = seg->seg_addr;
opal_list_remove_item(&module->seg_list, &item->super);
OMPI_FREE_LIST_RETURN_MT(&module->seg_descriptors, item);
opal_list_remove_item(&module->seg_list, (opal_list_item_t *) seg);
opal_free_list_return (&module->seg_descriptors, (opal_free_list_item_t *) seg);
OPAL_THREAD_UNLOCK(&module->seg_lock);
*(size_t*)addr = size;
return addr+sizeof(size_t);
@ -207,15 +205,14 @@ void *mca_allocator_basic_alloc(
/* create a segment for any extra allocation */
if(allocated_size > size) {
OMPI_FREE_LIST_GET_MT(&module->seg_descriptors, item);
if(NULL == item) {
seg = (mca_allocator_basic_segment_t *) opal_free_list_get (&module->seg_descriptors);
if (NULL == seg) {
OPAL_THREAD_UNLOCK(&module->seg_lock);
return NULL;
}
seg = (mca_allocator_basic_segment_t*)item;
seg->seg_addr = addr + size;
seg->seg_size = allocated_size - size;
opal_list_append(&module->seg_list, &item->super);
opal_list_append (&module->seg_list, (opal_list_item_t *) seg);
}
*(size_t*)addr = size;
@ -274,17 +271,12 @@ void mca_allocator_basic_free(
{
mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base;
mca_allocator_basic_segment_t* seg;
ompi_free_list_item_t *item;
unsigned char* addr = (unsigned char*)ptr - sizeof(size_t);
size_t size = *(size_t*)addr;
OPAL_THREAD_LOCK(&module->seg_lock);
/* maintain the free list in sorted order by address */
for(item = (ompi_free_list_item_t*) opal_list_get_first(&module->seg_list);
item != (ompi_free_list_item_t*) opal_list_get_end(&module->seg_list);
item = (ompi_free_list_item_t*) opal_list_get_next((&item->super))) {
seg = (mca_allocator_basic_segment_t*)item;
OPAL_LIST_FOREACH(seg, &module->seg_list, mca_allocator_basic_segment_t) {
if (seg->seg_addr < addr) {
/* can we grow the current entry */
@ -309,15 +301,15 @@ void mca_allocator_basic_free(
/* insert before larger entry */
} else {
mca_allocator_basic_segment_t* new_seg;
OMPI_FREE_LIST_GET_MT(&module->seg_descriptors, item);
if(NULL == item) {
new_seg = (mca_allocator_basic_segment_t *)
opal_free_list_get (&module->seg_descriptors);
if(NULL == new_seg) {
OPAL_THREAD_UNLOCK(&module->seg_lock);
return;
}
new_seg = (mca_allocator_basic_segment_t*)item;
new_seg->seg_addr = addr;
new_seg->seg_size = size;
opal_list_insert_pos(&module->seg_list, &seg->seg_item.super, &item->super);
opal_list_insert_pos(&module->seg_list, &seg->seg_item.super, (opal_list_item_t *) new_seg);
OPAL_THREAD_UNLOCK(&module->seg_lock);
return;
}
@ -325,15 +317,14 @@ void mca_allocator_basic_free(
}
/* append to the end of the list */
OMPI_FREE_LIST_GET_MT(&module->seg_descriptors, item);
if(NULL == item) {
seg = (mca_allocator_basic_segment_t *) opal_free_list_get (&module->seg_descriptors);
if(NULL == seg) {
OPAL_THREAD_UNLOCK(&module->seg_lock);
return;
}
seg = (mca_allocator_basic_segment_t*)item;
seg->seg_addr = addr;
seg->seg_size = size;
opal_list_append(&module->seg_list, &item->super);
opal_list_append(&module->seg_list, (opal_list_item_t *) seg);
OPAL_THREAD_UNLOCK(&module->seg_lock);
}

Просмотреть файл

@ -1,4 +1,5 @@
/**
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -27,7 +30,7 @@
#include <stdlib.h>
#include <string.h>
#include "opal/threads/mutex.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "opal/mca/allocator/allocator.h"
@ -36,7 +39,7 @@
*/
struct mca_allocator_basic_segment_t {
ompi_free_list_item_t seg_item;
opal_free_list_item_t seg_item;
unsigned char* seg_addr;
size_t seg_size;
};
@ -53,7 +56,7 @@ struct mca_allocator_basic_module_t {
mca_allocator_base_component_segment_free_fn_t seg_free;
opal_list_t seg_list;
opal_mutex_t seg_lock;
ompi_free_list_t seg_descriptors;
opal_free_list_t seg_descriptors;
};
typedef struct mca_allocator_basic_module_t mca_allocator_basic_module_t;

Просмотреть файл

@ -380,7 +380,7 @@ typedef struct mca_btl_base_segment_t mca_btl_base_segment_t;
*/
struct mca_btl_base_descriptor_t {
ompi_free_list_item_t super;
opal_free_list_item_t super;
mca_btl_base_segment_t *des_segments; /**< local segments */
size_t des_segment_count; /**< number of local segments */
mca_btl_base_completion_fn_t des_cbfunc; /**< local callback function */

Просмотреть файл

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
@ -636,8 +636,8 @@ static int prepare_device_for_use (mca_btl_openib_device_t *device)
}
for (int qp_index = 0 ; qp_index < mca_btl_openib_component.num_qps ; qp_index++) {
OBJ_CONSTRUCT(&device->qps[qp_index].send_free, ompi_free_list_t);
OBJ_CONSTRUCT(&device->qps[qp_index].recv_free, ompi_free_list_t);
OBJ_CONSTRUCT(&device->qps[qp_index].send_free, opal_free_list_t);
OBJ_CONSTRUCT(&device->qps[qp_index].recv_free, opal_free_list_t);
}
if(mca_btl_openib_component.use_async_event_thread) {
@ -726,13 +726,13 @@ static int prepare_device_for_use (mca_btl_openib_device_t *device)
init_data->order = MCA_BTL_NO_ORDER;
init_data->list = &device->send_free_control;
rc = ompi_free_list_init_ex_new(&device->send_free_control,
rc = opal_free_list_init(&device->send_free_control,
sizeof(mca_btl_openib_send_control_frag_t), opal_cache_line_size,
OBJ_CLASS(mca_btl_openib_send_control_frag_t), length,
mca_btl_openib_component.buffer_alignment,
mca_btl_openib_component.ib_free_list_num, -1,
mca_btl_openib_component.ib_free_list_inc,
device->mpool, mca_btl_openib_frag_init,
device->mpool, 0, NULL, mca_btl_openib_frag_init,
init_data);
if (OPAL_SUCCESS != rc) {
/* If we're "out of memory", this usually means that we ran
@ -741,7 +741,7 @@ static int prepare_device_for_use (mca_btl_openib_device_t *device)
OPAL_ERR_TEMP_OUT_OF_RESOURCE == rc) {
errno = ENOMEM;
mca_btl_openib_show_init_error(__FILE__, __LINE__,
"ompi_free_list_init_ex_new",
"opal_free_list_init",
ibv_get_device_name(device->ib_dev));
}
return rc;
@ -765,14 +765,14 @@ static int prepare_device_for_use (mca_btl_openib_device_t *device)
init_data->order = qp;
init_data->list = &device->qps[qp].send_free;
rc = ompi_free_list_init_ex_new(init_data->list,
rc = opal_free_list_init (init_data->list,
sizeof(mca_btl_openib_send_frag_t), opal_cache_line_size,
OBJ_CLASS(mca_btl_openib_send_frag_t), length,
mca_btl_openib_component.buffer_alignment,
mca_btl_openib_component.ib_free_list_num,
mca_btl_openib_component.ib_free_list_max,
mca_btl_openib_component.ib_free_list_inc,
device->mpool, mca_btl_openib_frag_init,
device->mpool, 0, NULL, mca_btl_openib_frag_init,
init_data);
if (OPAL_SUCCESS != rc) {
/* If we're "out of memory", this usually means that we
@ -782,7 +782,7 @@ static int prepare_device_for_use (mca_btl_openib_device_t *device)
OPAL_ERR_TEMP_OUT_OF_RESOURCE == rc) {
errno = ENOMEM;
mca_btl_openib_show_init_error(__FILE__, __LINE__,
"ompi_free_list_init_ex_new",
"opal_free_list_init",
ibv_get_device_name(device->ib_dev));
}
return OPAL_ERROR;
@ -798,14 +798,14 @@ static int prepare_device_for_use (mca_btl_openib_device_t *device)
init_data->order = qp;
init_data->list = &device->qps[qp].recv_free;
if(OPAL_SUCCESS != ompi_free_list_init_ex_new(init_data->list,
if(OPAL_SUCCESS != opal_free_list_init (init_data->list,
sizeof(mca_btl_openib_recv_frag_t), opal_cache_line_size,
OBJ_CLASS(mca_btl_openib_recv_frag_t),
length, mca_btl_openib_component.buffer_alignment,
mca_btl_openib_component.ib_free_list_num,
mca_btl_openib_component.ib_free_list_max,
mca_btl_openib_component.ib_free_list_inc,
device->mpool, mca_btl_openib_frag_init,
device->mpool, 0, NULL, mca_btl_openib_frag_init,
init_data)) {
return OPAL_ERROR;
}
@ -1117,11 +1117,11 @@ ib_frag_alloc(mca_btl_openib_module_t *btl, size_t size, uint8_t order,
uint32_t flags)
{
int qp;
ompi_free_list_item_t* item = NULL;
opal_free_list_item_t* item = NULL;
for(qp = 0; qp < mca_btl_openib_component.num_qps; qp++) {
if(mca_btl_openib_component.qp_infos[qp].size >= size) {
OMPI_FREE_LIST_GET_MT(&btl->device->qps[qp].send_free, item);
item = opal_free_list_get (&btl->device->qps[qp].send_free);
if(item)
break;
}
@ -1547,7 +1547,7 @@ int mca_btl_openib_sendi( struct mca_btl_base_module_t* btl,
prio = flags & MCA_BTL_DES_FLAGS_PRIORITY,
ib_rc;
bool do_rdma = false;
ompi_free_list_item_t* item = NULL;
opal_free_list_item_t* item = NULL;
mca_btl_openib_frag_t *frag;
mca_btl_openib_header_t *hdr;
int send_signaled;
@ -1577,7 +1577,7 @@ int mca_btl_openib_sendi( struct mca_btl_base_module_t* btl,
}
/* Allocate fragment */
OMPI_FREE_LIST_GET_MT(&obtl->device->qps[qp].send_free, item);
item = opal_free_list_get (&obtl->device->qps[qp].send_free);
if(OPAL_UNLIKELY(NULL == item)) {
/* we don't return NULL because maybe later we will try to coalesce */
goto cant_send_wqe;

Просмотреть файл

@ -38,7 +38,6 @@
#include <infiniband/verbs.h>
/* Open MPI includes */
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_pointer_array.h"
#include "opal/class/opal_hash_table.h"
#include "opal/util/output.h"
@ -285,11 +284,11 @@ struct mca_btl_openib_component_t {
int credits_qp; /* qp used for software flow control */
bool cpc_explicitly_defined;
/**< free list of frags only; used for pining user memory */
ompi_free_list_t send_user_free;
opal_free_list_t send_user_free;
/**< free list of frags only; used for pining user memory */
ompi_free_list_t recv_user_free;
opal_free_list_t recv_user_free;
/**< frags for coalesced massages */
ompi_free_list_t send_free_coalesced;
opal_free_list_t send_free_coalesced;
/** Default receive queues */
char* default_recv_qps;
/** GID index to use */
@ -358,8 +357,8 @@ typedef struct mca_btl_openib_modex_message_t {
} while (0)
typedef struct mca_btl_openib_device_qp_t {
ompi_free_list_t send_free; /**< free lists of send buffer descriptors */
ompi_free_list_t recv_free; /**< free lists of receive buffer descriptors */
opal_free_list_t send_free; /**< free lists of send buffer descriptors */
opal_free_list_t recv_free; /**< free lists of receive buffer descriptors */
} mca_btl_openib_device_qp_t;
struct mca_btl_base_endpoint_t;
@ -403,7 +402,7 @@ typedef struct mca_btl_openib_device_t {
int32_t eager_rdma_buffers_count;
struct mca_btl_base_endpoint_t **eager_rdma_buffers;
/**< frags for control massages */
ompi_free_list_t send_free_control;
opal_free_list_t send_free_control;
/* QP types and attributes that will be used on this device */
mca_btl_openib_device_qp_t *qps;
/* Maximum value supported by this device for max_inline_data */

Просмотреть файл

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
@ -919,7 +919,7 @@ static void device_construct(mca_btl_openib_device_t *device)
mca_btl_openib_component.async_comp_pipe[0] =
mca_btl_openib_component.async_comp_pipe[1] = -1;
OBJ_CONSTRUCT(&device->device_lock, opal_mutex_t);
OBJ_CONSTRUCT(&device->send_free_control, ompi_free_list_t);
OBJ_CONSTRUCT(&device->send_free_control, opal_free_list_t);
device->max_inline_data = 0;
device->ready_for_use = false;
}
@ -2566,9 +2566,9 @@ btl_openib_component_init(int *num_btl_modules,
}
}
OBJ_CONSTRUCT(&mca_btl_openib_component.send_free_coalesced, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_openib_component.send_user_free, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_openib_component.recv_user_free, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_openib_component.send_free_coalesced, opal_free_list_t);
OBJ_CONSTRUCT(&mca_btl_openib_component.send_user_free, opal_free_list_t);
OBJ_CONSTRUCT(&mca_btl_openib_component.recv_user_free, opal_free_list_t);
init_data = (mca_btl_openib_frag_init_data_t *) malloc(sizeof(mca_btl_openib_frag_init_data_t));
if (NULL == init_data) {
@ -2583,7 +2583,7 @@ btl_openib_component_init(int *num_btl_modules,
occur on some 32-bit platforms. Depending on the size of the fragment this
will waste 2-6 bytes of space per frag. In most cases this shouldn't waste
any space. */
if (OPAL_SUCCESS != ompi_free_list_init_ex_new(
if (OPAL_SUCCESS != opal_free_list_init (
&mca_btl_openib_component.send_user_free,
sizeof(mca_btl_openib_put_frag_t), 8,
OBJ_CLASS(mca_btl_openib_put_frag_t),
@ -2591,7 +2591,7 @@ btl_openib_component_init(int *num_btl_modules,
mca_btl_openib_component.ib_free_list_num,
mca_btl_openib_component.ib_free_list_max,
mca_btl_openib_component.ib_free_list_inc,
NULL, mca_btl_openib_frag_init, init_data)) {
NULL, 0, NULL, mca_btl_openib_frag_init, init_data)) {
goto no_btls;
}
@ -2604,7 +2604,7 @@ btl_openib_component_init(int *num_btl_modules,
init_data->order = mca_btl_openib_component.rdma_qp;
init_data->list = &mca_btl_openib_component.recv_user_free;
if(OPAL_SUCCESS != ompi_free_list_init_ex_new(
if(OPAL_SUCCESS != opal_free_list_init (
&mca_btl_openib_component.recv_user_free,
sizeof(mca_btl_openib_get_frag_t), 8,
OBJ_CLASS(mca_btl_openib_get_frag_t),
@ -2612,7 +2612,7 @@ btl_openib_component_init(int *num_btl_modules,
mca_btl_openib_component.ib_free_list_num,
mca_btl_openib_component.ib_free_list_max,
mca_btl_openib_component.ib_free_list_inc,
NULL, mca_btl_openib_frag_init, init_data)) {
NULL, 0, NULL, mca_btl_openib_frag_init, init_data)) {
goto no_btls;
}
@ -2625,13 +2625,13 @@ btl_openib_component_init(int *num_btl_modules,
init_data->list = &mca_btl_openib_component.send_free_coalesced;
if(OPAL_SUCCESS != ompi_free_list_init_ex(
if(OPAL_SUCCESS != opal_free_list_init (
&mca_btl_openib_component.send_free_coalesced,
length, 8, OBJ_CLASS(mca_btl_openib_coalesced_frag_t),
mca_btl_openib_component.ib_free_list_num,
0, 0, mca_btl_openib_component.ib_free_list_num,
mca_btl_openib_component.ib_free_list_max,
mca_btl_openib_component.ib_free_list_inc,
NULL, mca_btl_openib_frag_init, init_data)) {
NULL, 0, NULL, mca_btl_openib_frag_init, init_data)) {
goto no_btls;
}
@ -3819,8 +3819,8 @@ int mca_btl_openib_post_srr(mca_btl_openib_module_t* openib_btl, const int qp)
}
for(i = 0; i < num_post; i++) {
ompi_free_list_item_t* item;
OMPI_FREE_LIST_WAIT_MT(&openib_btl->device->qps[qp].recv_free, item);
opal_free_list_item_t* item;
item = opal_free_list_wait (&openib_btl->device->qps[qp].recv_free);
to_base_frag(item)->base.order = qp;
to_com_frag(item)->endpoint = NULL;
if(NULL == wr)

Просмотреть файл

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies, Inc. All rights reserved.
@ -43,7 +43,7 @@
#include "opal/util/output.h"
#include "opal/util/proc.h"
#include "opal/util/show_help.h"
#include "opal/class/ompi_free_list.h"
#include "opal/class/opal_free_list.h"
#include "btl_openib_endpoint.h"
#include "btl_openib_proc.h"
@ -908,11 +908,11 @@ void mca_btl_openib_endpoint_connect_eager_rdma(
sizeof(mca_btl_openib_header_t);
for(i = 0; i < mca_btl_openib_component.eager_rdma_num; i++) {
ompi_free_list_item_t *item;
opal_free_list_item_t *item;
mca_btl_openib_recv_frag_t * frag;
mca_btl_openib_frag_init_data_t init_data;
item = (ompi_free_list_item_t*)&headers_buf[i];
item = (opal_free_list_item_t*)&headers_buf[i];
item->registration = (mca_mpool_base_registration_t *)endpoint->eager_rdma_local.reg;
item->ptr = buf + i * openib_btl->eager_rdma_frag_size;
OBJ_CONSTRUCT(item, mca_btl_openib_recv_frag_t);

Просмотреть файл

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2007-2009 Mellanox Technologies. All rights reserved.
@ -369,8 +369,8 @@ static inline int post_recvs(mca_btl_base_endpoint_t *ep, const int qp,
return OPAL_SUCCESS;
for(i = 0; i < num_post; i++) {
ompi_free_list_item_t* item;
OMPI_FREE_LIST_WAIT_MT(&openib_btl->device->qps[qp].recv_free, item);
opal_free_list_item_t* item;
item = opal_free_list_wait (&openib_btl->device->qps[qp].recv_free);
to_base_frag(item)->base.order = qp;
to_com_frag(item)->endpoint = ep;
if(NULL == wr)

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
@ -24,7 +25,7 @@
#include "btl_openib_frag.h"
#include "btl_openib_eager_rdma.h"
void mca_btl_openib_frag_init(ompi_free_list_item_t* item, void* ctx)
int mca_btl_openib_frag_init(opal_free_list_item_t* item, void* ctx)
{
mca_btl_openib_frag_init_data_t* init_data = (mca_btl_openib_frag_init_data_t *) ctx;
mca_btl_openib_frag_t *frag = to_base_frag(item);
@ -42,6 +43,8 @@ void mca_btl_openib_frag_init(ompi_free_list_item_t* item, void* ctx)
to_send_frag(frag)->qp_idx = init_data->order;
frag->list = init_data->list;
return OPAL_SUCCESS;
}
static void base_constructor(mca_btl_openib_frag_t *frag)

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -10,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 IBM Corporation. All rights reserved.
* Copyright (c) 2006-2009 Los Alamos National Security, LLC. All rights
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
@ -294,7 +295,7 @@ typedef struct mca_btl_openib_frag_t {
mca_btl_base_descriptor_t base;
mca_btl_openib_segment_t segment;
mca_btl_openib_frag_type_t type;
ompi_free_list_t* list;
opal_free_list_t* list;
} mca_btl_openib_frag_t;
OBJ_CLASS_DECLARATION(mca_btl_openib_frag_t);
@ -399,11 +400,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_coalesced_frag_t);
static inline mca_btl_openib_send_control_frag_t *
alloc_control_frag(mca_btl_openib_module_t *btl)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_WAIT_MT(&btl->device->send_free_control, item);
return to_send_control_frag(item);
return to_send_control_frag(opal_free_list_wait (&btl->device->send_free_control));
}
static inline uint8_t frag_size_to_order(mca_btl_openib_module_t* btl,
@ -419,35 +416,23 @@ static inline uint8_t frag_size_to_order(mca_btl_openib_module_t* btl,
static inline mca_btl_openib_com_frag_t *alloc_send_user_frag(void)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET_MT(&mca_btl_openib_component.send_user_free, item);
return to_com_frag(item);
return to_com_frag(opal_free_list_get (&mca_btl_openib_component.send_user_free));
}
static inline mca_btl_openib_com_frag_t *alloc_recv_user_frag(void)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET_MT(&mca_btl_openib_component.recv_user_free, item);
return to_com_frag(item);
return to_com_frag(opal_free_list_get (&mca_btl_openib_component.recv_user_free));
}
static inline mca_btl_openib_coalesced_frag_t *alloc_coalesced_frag(void)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET_MT(&mca_btl_openib_component.send_free_coalesced, item);
return to_coalesced_frag(item);
return to_coalesced_frag(opal_free_list_get (&mca_btl_openib_component.send_free_coalesced));
}
#define MCA_BTL_IB_FRAG_RETURN(frag) \
do { \
OMPI_FREE_LIST_RETURN_MT(to_base_frag(frag)->list, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (to_base_frag(frag)->list, \
(opal_free_list_item_t*)(frag)); \
} while(0);
#define MCA_BTL_OPENIB_CLEAN_PENDING_FRAGS(list) \
@ -461,11 +446,11 @@ struct mca_btl_openib_module_t;
struct mca_btl_openib_frag_init_data_t {
uint8_t order;
ompi_free_list_t* list;
opal_free_list_t* list;
};
typedef struct mca_btl_openib_frag_init_data_t mca_btl_openib_frag_init_data_t;
void mca_btl_openib_frag_init(ompi_free_list_item_t* item, void* ctx);
int mca_btl_openib_frag_init(opal_free_list_item_t* item, void* ctx);
END_C_DECLS

Просмотреть файл

@ -2,7 +2,7 @@
/*
* Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007 Mellanox Technologies, Inc. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
* Copyright (c) 2015 Research Organization for Information Science
@ -413,7 +413,7 @@ opal_btl_openib_connect_base_get_cpc_byindex(uint8_t index)
int opal_btl_openib_connect_base_alloc_cts(mca_btl_base_endpoint_t *endpoint)
{
ompi_free_list_item_t *fli;
opal_free_list_item_t *fli;
int length = sizeof(mca_btl_openib_header_t) +
sizeof(mca_btl_openib_header_coalesced_t) +
sizeof(mca_btl_openib_control_header_t) +

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -11,6 +12,8 @@
* All rights reserved.
* Copyright (c) 2010-2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Bull SAS. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -89,9 +92,9 @@ struct mca_btl_portals4_module_t {
uint32_t interface_num;
/* fragment free lists */
ompi_free_list_t portals_frag_eager;
ompi_free_list_t portals_frag_max;
ompi_free_list_t portals_frag_user;
opal_free_list_t portals_frag_eager;
opal_free_list_t portals_frag_max;
opal_free_list_t portals_frag_user;
opal_list_t portals_recv_blocks;

Просмотреть файл

@ -13,6 +13,8 @@
* Copyright (c) 2010-2012 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2014 Bull SAS. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -353,12 +355,12 @@ static mca_btl_base_module_t** mca_btl_portals4_component_init(int *num_btls,
portals4_btl->portals_ni_h = portals4_nis_h[interface];
portals4_btl->portals_max_outstanding_ops = mca_btl_portals4_component.portals_max_outstanding_ops;
OBJ_CONSTRUCT(&(portals4_btl->portals_frag_eager), ompi_free_list_t);
OBJ_CONSTRUCT(&(portals4_btl->portals_frag_max), ompi_free_list_t);
OBJ_CONSTRUCT(&(portals4_btl->portals_frag_user), ompi_free_list_t);
OBJ_CONSTRUCT(&(portals4_btl->portals_frag_eager), opal_free_list_t);
OBJ_CONSTRUCT(&(portals4_btl->portals_frag_max), opal_free_list_t);
OBJ_CONSTRUCT(&(portals4_btl->portals_frag_user), opal_free_list_t);
/* eager frags */
ompi_free_list_init_new(&(portals4_btl->portals_frag_eager),
opal_free_list_init (&(portals4_btl->portals_frag_eager),
sizeof(mca_btl_portals4_frag_eager_t) +
portals4_btl->super.btl_eager_limit,
opal_cache_line_size,
@ -367,10 +369,10 @@ static mca_btl_base_module_t** mca_btl_portals4_component_init(int *num_btls,
mca_btl_portals4_component.portals_free_list_init_num,
mca_btl_portals4_component.portals_free_list_eager_max_num,
mca_btl_portals4_component.portals_free_list_inc_num,
NULL);
NULL, 0, NULL, NULL, NULL);
/* send frags */
ompi_free_list_init_new(&(portals4_btl->portals_frag_max),
opal_free_list_init (&(portals4_btl->portals_frag_max),
sizeof(mca_btl_portals4_frag_max_t) +
portals4_btl->super.btl_max_send_size,
opal_cache_line_size,
@ -379,10 +381,10 @@ static mca_btl_base_module_t** mca_btl_portals4_component_init(int *num_btls,
mca_btl_portals4_component.portals_free_list_init_num,
mca_btl_portals4_component.portals_free_list_max_num,
mca_btl_portals4_component.portals_free_list_inc_num,
NULL);
NULL, 0, NULL, NULL, NULL);
/* user frags */
ompi_free_list_init_new(&(portals4_btl->portals_frag_user),
opal_free_list_init (&(portals4_btl->portals_frag_user),
sizeof(mca_btl_portals4_frag_user_t),
opal_cache_line_size,
OBJ_CLASS(mca_btl_portals4_frag_user_t),
@ -390,7 +392,7 @@ static mca_btl_base_module_t** mca_btl_portals4_component_init(int *num_btls,
mca_btl_portals4_component.portals_free_list_init_num,
mca_btl_portals4_component.portals_free_list_max_num,
mca_btl_portals4_component.portals_free_list_inc_num,
NULL);
NULL, 0, NULL, NULL, NULL);
/* receive block list */
OBJ_CONSTRUCT(&(portals4_btl->portals_recv_blocks), opal_list_t);

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Bull SAS. All rights reserved.
* $COPYRIGHT$
@ -79,10 +80,8 @@ OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_user_t);
*/
#define OPAL_BTL_PORTALS4_FRAG_ALLOC_EAGER(btl_macro, frag) \
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET_MT(&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_eager, item); \
frag = (mca_btl_portals4_frag_t*) item; \
frag = (mca_btl_portals4_frag_t *) \
opal_free_list_get (&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_eager); \
if (NULL == frag) { \
OPAL_BTL_PORTALS4_FRAG_ALLOC_MAX(btl_macro, frag); \
} \
@ -92,33 +91,30 @@ OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_user_t);
#define OPAL_BTL_PORTALS4_FRAG_RETURN_EAGER(btl_macro, frag) \
{ \
assert(BTL_PORTALS4_FRAG_TYPE_EAGER == frag->type); \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_eager, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_eager, \
(opal_free_list_item_t*)(frag)); \
}
#define OPAL_BTL_PORTALS4_FRAG_ALLOC_MAX(btl_macro, frag) \
{ \
\
ompi_free_list_item_t *item_macro; \
OMPI_FREE_LIST_GET_MT(&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_max, item_macro); \
frag = (mca_btl_portals4_frag_t*) item_macro; \
frag = (mca_btl_portals4_frag_t*) \
opal_free_list_get (&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_max); \
}
#define OPAL_BTL_PORTALS4_FRAG_RETURN_MAX(btl_macro, frag) \
{ \
assert(BTL_PORTALS4_FRAG_TYPE_MAX == frag->type); \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_max, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_max, \
(opal_free_list_item_t*)(frag)); \
}
#define OPAL_BTL_PORTALS4_FRAG_ALLOC_USER(btl_macro, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET_MT(&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_user, item); \
frag = (mca_btl_portals4_frag_t*) item; \
frag = (mca_btl_portals4_frag_t*) \
opal_free_list_get (&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_user); \
frag->base.des_cbfunc = NULL; \
}
@ -126,8 +122,8 @@ OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_user_t);
#define OPAL_BTL_PORTALS4_FRAG_RETURN_USER(btl_macro, frag) \
{ \
assert(BTL_PORTALS4_FRAG_TYPE_USER == frag->type); \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_user, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (&((mca_btl_portals4_module_t*)btl_macro)->portals_frag_user, \
(opal_free_list_item_t*)(frag)); \
}

Просмотреть файл

@ -26,7 +26,6 @@
#include "opal/mca/btl/btl.h"
#include "opal/mca/btl/base/base.h"
#include "opal/mca/btl/base/btl_base_error.h"
#include "opal/class/ompi_free_list.h"
#include <scif.h>
#include <errno.h>
@ -85,10 +84,10 @@ typedef struct mca_btl_scif_module_t {
opal_list_t failed_frags;
/* fragments for DMA */
ompi_free_list_t dma_frags;
opal_free_list_t dma_frags;
/* fragments for eager send */
ompi_free_list_t eager_frags;
opal_free_list_t eager_frags;
pthread_t listen_thread;

Просмотреть файл

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -233,26 +233,26 @@ mca_btl_scif_setup_mpools (mca_btl_scif_module_t *scif_module)
/* setup free lists for fragments. dma fragments will be used for
* rma operations and in-place sends. eager frags will be used for
* buffered sends. */
rc = ompi_free_list_init_new (&scif_module->dma_frags,
rc = opal_free_list_init (&scif_module->dma_frags,
sizeof (mca_btl_scif_dma_frag_t), 64,
OBJ_CLASS(mca_btl_scif_dma_frag_t),
128, opal_getpagesize (),
mca_btl_scif_component.scif_free_list_num,
mca_btl_scif_component.scif_free_list_max,
mca_btl_scif_component.scif_free_list_inc,
NULL);
NULL, 0, NULL, NULL, NULL);
if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
return rc;
}
rc = ompi_free_list_init_new (&scif_module->eager_frags,
rc = opal_free_list_init (&scif_module->eager_frags,
sizeof (mca_btl_scif_eager_frag_t), 8,
OBJ_CLASS(mca_btl_scif_eager_frag_t),
128 + scif_module->super.btl_eager_limit, 64,
mca_btl_scif_component.scif_free_list_num,
mca_btl_scif_component.scif_free_list_max,
mca_btl_scif_component.scif_free_list_inc,
NULL);
NULL, 0, NULL, NULL);
if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
BTL_ERROR(("error creating eager receive fragment free list"));
return rc;

Просмотреть файл

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -34,7 +34,7 @@ typedef struct mca_btl_scif_base_frag_t {
mca_btl_base_segment_t segments[2];
mca_btl_base_endpoint_t *endpoint;
mca_btl_scif_reg_t *registration;
ompi_free_list_t *my_list;
opal_free_list_t *my_list;
} mca_btl_scif_base_frag_t;
typedef mca_btl_scif_base_frag_t mca_btl_scif_dma_frag_t;
@ -44,14 +44,11 @@ OBJ_CLASS_DECLARATION(mca_btl_scif_dma_frag_t);
OBJ_CLASS_DECLARATION(mca_btl_scif_eager_frag_t);
static inline int mca_btl_scif_frag_alloc (mca_btl_base_endpoint_t *ep,
ompi_free_list_t *list,
opal_free_list_t *list,
mca_btl_scif_base_frag_t **frag)
{
ompi_free_list_item_t *item = NULL;
OMPI_FREE_LIST_GET_MT(list, item);
*frag = (mca_btl_scif_base_frag_t *) item;
if (OPAL_LIKELY(NULL != item)) {
*frag = (mca_btl_scif_base_frag_t *) opal_free_list_get (list);
if (OPAL_LIKELY(NULL != *frag)) {
(*frag)->my_list = list;
(*frag)->endpoint = ep;
return OPAL_SUCCESS;
@ -72,7 +69,7 @@ static inline int mca_btl_scif_frag_return (mca_btl_scif_base_frag_t *frag)
frag->segments[0].seg_len = 0;
frag->segments[1].seg_len = 0;
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t *) frag);
opal_free_list_return (frag->my_list, (opal_free_list_item_t *) frag);
return OPAL_SUCCESS;
}

Просмотреть файл

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
@ -94,8 +94,8 @@ int mca_btl_scif_module_init (void)
BTL_VERBOSE(("btl/scif: listening @ port %u on node %u\n",
mca_btl_scif_module.port_id.port, mca_btl_scif_module.port_id.node));
OBJ_CONSTRUCT(&mca_btl_scif_module.dma_frags, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_scif_module.eager_frags, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_scif_module.dma_frags, opal_free_list_t);
OBJ_CONSTRUCT(&mca_btl_scif_module.eager_frags, opal_free_list_t);
return OPAL_SUCCESS;
}

Просмотреть файл

@ -33,7 +33,6 @@
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#include "opal/mca/event/event.h"
#include "opal/class/ompi_free_list.h"
#include "opal/mca/btl/btl.h"
#include "opal/mca/btl/base/base.h"
@ -48,9 +47,9 @@ struct mca_btl_self_component_t {
int free_list_max; /**< maximum size of free lists */
int free_list_inc; /**< number of elements to alloc when growing free lists */
opal_mutex_t self_lock;
ompi_free_list_t self_frags_eager; /**< free list of self first */
ompi_free_list_t self_frags_send; /**< free list of self second */
ompi_free_list_t self_frags_rdma; /**< free list of self second */
opal_free_list_t self_frags_eager; /**< free list of self first */
opal_free_list_t self_frags_send; /**< free list of self second */
opal_free_list_t self_frags_rdma; /**< free list of self second */
};
typedef struct mca_btl_self_component_t mca_btl_self_component_t;
OPAL_MODULE_DECLSPEC extern mca_btl_self_component_t mca_btl_self_component;

Просмотреть файл

@ -11,6 +11,8 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -111,9 +113,9 @@ int mca_btl_self_component_open(void)
{
/* initialize objects */
OBJ_CONSTRUCT(&mca_btl_self_component.self_lock, opal_mutex_t);
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_eager, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_send, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_rdma, ompi_free_list_t);
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_eager, opal_free_list_t);
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_send, opal_free_list_t);
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_rdma, opal_free_list_t);
return OPAL_SUCCESS;
}
@ -151,7 +153,7 @@ mca_btl_base_module_t** mca_btl_self_component_init( int *num_btls,
}
/* initialize free lists */
ompi_free_list_init_new( &mca_btl_self_component.self_frags_eager,
opal_free_list_init (&mca_btl_self_component.self_frags_eager,
sizeof(mca_btl_self_frag_eager_t) + mca_btl_self.btl_eager_limit,
opal_cache_line_size,
OBJ_CLASS(mca_btl_self_frag_eager_t),
@ -159,8 +161,8 @@ mca_btl_base_module_t** mca_btl_self_component_init( int *num_btls,
mca_btl_self_component.free_list_num,
mca_btl_self_component.free_list_max,
mca_btl_self_component.free_list_inc,
NULL );
ompi_free_list_init_new( &mca_btl_self_component.self_frags_send,
NULL, 0, NULL, NULL, NULL);
opal_free_list_init (&mca_btl_self_component.self_frags_send,
sizeof(mca_btl_self_frag_send_t) + mca_btl_self.btl_max_send_size,
opal_cache_line_size,
OBJ_CLASS(mca_btl_self_frag_send_t),
@ -168,8 +170,8 @@ mca_btl_base_module_t** mca_btl_self_component_init( int *num_btls,
mca_btl_self_component.free_list_num,
mca_btl_self_component.free_list_max,
mca_btl_self_component.free_list_inc,
NULL );
ompi_free_list_init_new( &mca_btl_self_component.self_frags_rdma,
NULL, 0, NULL, NULL, NULL);
opal_free_list_init (&mca_btl_self_component.self_frags_rdma,
sizeof(mca_btl_self_frag_rdma_t),
opal_cache_line_size,
OBJ_CLASS(mca_btl_self_frag_rdma_t),
@ -177,7 +179,7 @@ mca_btl_base_module_t** mca_btl_self_component_init( int *num_btls,
mca_btl_self_component.free_list_num,
mca_btl_self_component.free_list_max,
mca_btl_self_component.free_list_inc,
NULL );
NULL, 0, NULL, NULL, NULL);
/* get pointer to the btls */
btls[0] = (mca_btl_base_module_t *)(&mca_btl_self);

Просмотреть файл

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -9,6 +10,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -22,7 +25,6 @@
#define MCA_BTL_SELF_SEND_FRAG_H
#include <sys/types.h>
#include "opal/class/ompi_free_list.h"
#include "btl_self.h"
@ -46,43 +48,40 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
#define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET_MT(&mca_btl_self_component.self_frags_eager, item); \
frag = (mca_btl_self_frag_t*)item; \
frag = (mca_btl_self_frag_t *) \
opal_free_list_get (&mca_btl_self_component.self_frags_eager); \
}
#define MCA_BTL_SELF_FRAG_RETURN_EAGER(frag) \
{ \
OMPI_FREE_LIST_RETURN_MT(&mca_btl_self_component.self_frags_eager, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (&mca_btl_self_component.self_frags_eager, \
(opal_free_list_item_t*)(frag)); \
frag->segment.seg_addr.pval = frag+1; \
}
#define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET_MT(&mca_btl_self_component.self_frags_send, item); \
frag = (mca_btl_self_frag_t*)item; \
frag = (mca_btl_self_frag_t *) \
opal_free_list_get (&mca_btl_self_component.self_frags_send); \
}
#define MCA_BTL_SELF_FRAG_RETURN_SEND(frag) \
{ \
OMPI_FREE_LIST_RETURN_MT( &mca_btl_self_component.self_frags_send, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (&mca_btl_self_component.self_frags_send, \
(opal_free_list_item_t*)(frag)); \
frag->segment.seg_addr.pval = frag+1; \
}
#define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET_MT(&mca_btl_self_component.self_frags_rdma, item); \
frag = (mca_btl_self_frag_t*)item; \
frag = (mca_btl_self_frag_t *) \
opal_free_list_get (&mca_btl_self_component.self_frags_rdma); \
}
#define MCA_BTL_SELF_FRAG_RETURN_RDMA(frag) \
{ \
OMPI_FREE_LIST_RETURN_MT(&mca_btl_self_component.self_frags_rdma, \
(ompi_free_list_item_t*)(frag)); \
opal_free_list_return (&mca_btl_self_component.self_frags_rdma, \
(opal_free_list_item_t*)(frag)); \
frag->segment.seg_addr.pval = frag+1; \
}

Просмотреть файл

@ -52,7 +52,6 @@
#include "opal/mca/shmem/shmem.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/class/ompi_free_list.h"
#include "opal/mca/btl/btl.h"
#include "opal/mca/mpool/base/base.h"
#include "opal/mca/mpool/sm/mpool_sm.h"
@ -373,37 +372,37 @@ sm_btl_first_time_init(mca_btl_sm_t *sm_btl,
length = sizeof(mca_btl_sm_frag1_t);
length_payload =
sizeof(mca_btl_sm_hdr_t) + mca_btl_sm_component.eager_limit;
i = ompi_free_list_init_new(&mca_btl_sm_component.sm_frags_eager, length,
i = opal_free_list_init (&mca_btl_sm_component.sm_frags_eager, length,
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag1_t),
length_payload, opal_cache_line_size,
mca_btl_sm_component.sm_free_list_num,
mca_btl_sm_component.sm_free_list_max,
mca_btl_sm_component.sm_free_list_inc,
mca_btl_sm_component.sm_mpool);
mca_btl_sm_component.sm_mpool, 0, NULL, NULL, NULL);
if ( OPAL_SUCCESS != i )
return i;
length = sizeof(mca_btl_sm_frag2_t);
length_payload =
sizeof(mca_btl_sm_hdr_t) + mca_btl_sm_component.max_frag_size;
i = ompi_free_list_init_new(&mca_btl_sm_component.sm_frags_max, length,
i = opal_free_list_init (&mca_btl_sm_component.sm_frags_max, length,
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag2_t),
length_payload, opal_cache_line_size,
mca_btl_sm_component.sm_free_list_num,
mca_btl_sm_component.sm_free_list_max,
mca_btl_sm_component.sm_free_list_inc,
mca_btl_sm_component.sm_mpool);
mca_btl_sm_component.sm_mpool, 0, NULL, NULL, NULL);
if ( OPAL_SUCCESS != i )
return i;
i = ompi_free_list_init_new(&mca_btl_sm_component.sm_frags_user,
i = opal_free_list_init (&mca_btl_sm_component.sm_frags_user,
sizeof(mca_btl_sm_user_t),
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_user_t),
sizeof(mca_btl_sm_hdr_t), opal_cache_line_size,
mca_btl_sm_component.sm_free_list_num,
mca_btl_sm_component.sm_free_list_max,
mca_btl_sm_component.sm_free_list_inc,
mca_btl_sm_component.sm_mpool);
mca_btl_sm_component.sm_mpool, 0, NULL, NULL, NULL);
if ( OPAL_SUCCESS != i )
return i;
@ -411,9 +410,9 @@ sm_btl_first_time_init(mca_btl_sm_t *sm_btl,
mca_btl_sm_component.num_pending_sends = 0;
i = opal_free_list_init(&mca_btl_sm_component.pending_send_fl,
sizeof(btl_sm_pending_send_item_t),
sizeof(btl_sm_pending_send_item_t), 8,
OBJ_CLASS(opal_free_list_item_t),
0, 0, 16, -1, 32, NULL, 0, NULL, NULL
0, 0, 16, -1, 32, NULL, 0, NULL, NULL,
NULL);
if ( OPAL_SUCCESS != i )
return i;
@ -642,7 +641,7 @@ int mca_btl_sm_add_procs(
mca_btl_sm_component.num_smp_procs += n_local_procs;
/* make sure we have enough eager fragmnents for each process */
return_code = ompi_free_list_resize_mt(&mca_btl_sm_component.sm_frags_eager,
return_code = opal_free_list_resize_mt (&mca_btl_sm_component.sm_frags_eager,
mca_btl_sm_component.num_smp_procs * 2);
if (OPAL_SUCCESS != return_code)
goto CLEANUP;
@ -1007,9 +1006,9 @@ mca_btl_base_registration_handle_t *mca_btl_sm_register_mem (struct mca_btl_base
void *base, size_t size, uint32_t flags)
{
mca_btl_sm_registration_handle_t *handle;
ompi_free_list_item_t *item = NULL;
opal_free_list_item_t *item = NULL;
OMPI_FREE_LIST_GET_MT(&mca_btl_sm_component.registration_handles, item);
item = opal_free_list_get (&mca_btl_sm_component.registration_handles);
if (OPAL_UNLIKELY(NULL == item)) {
return NULL;
}
@ -1036,7 +1035,7 @@ mca_btl_base_registration_handle_t *mca_btl_sm_register_mem (struct mca_btl_base
}
if (OPAL_UNLIKELY(ioctl(((mca_btl_sm_t*)btl)->knem_fd, KNEM_CMD_CREATE_REGION, &knem_cr) < 0)) {
OMPI_FREE_LIST_RETURN_MT(&mca_btl_sm_component.registration_handles, item);
opal_free_list_return (&mca_btl_sm_component.registration_handles, item);
return NULL;
}
@ -1065,7 +1064,7 @@ int mca_btl_sm_deregister_mem (struct mca_btl_base_module_t* btl, mca_btl_base_r
}
#endif
OMPI_FREE_LIST_RETURN_MT(&mca_btl_sm_component.registration_handles, &sm_handle->super);
opal_free_list_return (&mca_btl_sm_component.registration_handles, &sm_handle->super);
return OPAL_SUCCESS;
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше