Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ompi/mca/topo/base/topo_base_dist_graph_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ typedef struct _dist_graph_elem {
} mca_topo_base_dist_graph_elem_t;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this all looks like whitespace changes in ompi even though this PR is suppose to be for orte. I'd prefer to see this type of change moved to a separate PR.


int mca_topo_base_dist_graph_distribute(mca_topo_base_module_t* module,
ompi_communicator_t *comm,
ompi_communicator_t *comm,
int n, int nodes[],
int degrees[], int targets[],
int degrees[], int targets[],
int weights[],
mca_topo_base_comm_dist_graph_2_2_0_t** ptopo)
{
Expand Down Expand Up @@ -279,11 +279,11 @@ int mca_topo_base_dist_graph_distribute(mca_topo_base_module_t* module,
}

int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module,
ompi_communicator_t *comm_old,
ompi_communicator_t *comm_old,
int n, int nodes[],
int degrees[], int targets[],
int weights[],
ompi_info_t *info, int reorder,
ompi_info_t *info, int reorder,
ompi_communicator_t **newcomm)
{
int err;
Expand All @@ -303,9 +303,9 @@ int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module,
return OMPI_ERR_OUT_OF_RESOURCE;
}
err = mca_topo_base_dist_graph_distribute(module,
comm_old,
comm_old,
n, nodes,
degrees, targets,
degrees, targets,
weights,
&topo);
if( OMPI_SUCCESS != err ) {
Expand All @@ -318,7 +318,7 @@ int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module,
must be set before invoking ompi_comm_enable */
rank = ompi_comm_rank(comm_old);
if(OMPI_GROUP_IS_DENSE(comm_old->c_local_group)) {
memcpy(topo_procs,
memcpy(topo_procs,
comm_old->c_local_group->grp_proc_pointers,
num_procs * sizeof(ompi_proc_t *));
} else {
Expand Down
58 changes: 54 additions & 4 deletions opal/class/opal_hotel.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
* Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -23,7 +24,7 @@
*
* One use case for this class is for ACK-based network retransmission
* schemes (NACK-based retransmission schemes probably can use
* opal_ring_buffer).
* opal_ring_buffer).
*
* For ACK-based retransmission schemes, a hotel might be used
* something like this:
Expand Down Expand Up @@ -61,7 +62,7 @@ BEGIN_C_DECLS
struct opal_hotel_t;

/* User-supplied function to be invoked when an occupant is evicted. */
typedef void (*opal_hotel_eviction_callback_fn_t)(struct opal_hotel_t *hotel,
typedef void (*opal_hotel_eviction_callback_fn_t)(struct opal_hotel_t *hotel,
int room_num,
void *occupant);

Expand Down Expand Up @@ -248,6 +249,55 @@ static inline void opal_hotel_checkout(opal_hotel_t *hotel, int room_num)
assume the upper layer knows what it's doing. */
}

/**
* Check the specified occupant out of the hotel and return the occupant.
*
* @param hotel Pointer to hotel (IN)
* @param room Room number to checkout (IN)
* @param void * occupant (OUT)
* If there is an occupant in the room, their timer is canceled and
* they are checked out.
*
* Use this checkout and when caller needs the occupant
*/
static inline void opal_hotel_checkout_and_return_occupant(opal_hotel_t *hotel, int room_num, void **occupant)
{
opal_hotel_room_t *room;

/* Bozo check */
assert(room_num < hotel->num_rooms);

/* If there's an occupant in the room, check them out */
room = &(hotel->rooms[room_num]);
if (OPAL_LIKELY(NULL != room->occupant)) {
opal_output (10, "checking out occupant %p from room num %d", room->occupant, room_num);
*occupant = room->occupant;
room->occupant = NULL;
opal_event_del(&(room->eviction_timer_event));
hotel->last_unoccupied_room++;
assert(hotel->last_unoccupied_room < hotel->num_rooms);
hotel->unoccupied_rooms[hotel->last_unoccupied_room] = room_num;
}
else {
opal_output( 0, " OOPS there is no occupant in room_num %d", room_num);
}

}

/**
* Returns true if the hotel is empty (no occupant)
* @param hotel Pointer to hotel (IN)
* @return bool true if empty false if there is a occupant(s)
*
*/
static inline bool opal_hotel_is_empty (opal_hotel_t *hotel)
{
if (hotel->last_unoccupied_room == hotel->num_rooms - 1)
return true;
else
return false;
}

/**
* Destroy a hotel.
*
Expand Down
16 changes: 8 additions & 8 deletions opal/class/opal_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2014 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/

Expand Down Expand Up @@ -46,13 +44,13 @@
* OBJ_CLASS_DECLARATION(sally_t);
* @endcode
* All classes must have a parent which is also class.
*
*
* In an implementation (.c) file, instantiate a class descriptor for
* the class like this:
* @code
* OBJ_CLASS_INSTANCE(sally_t, parent_t, sally_construct, sally_destruct);
* @endcode
* This macro actually expands to
* This macro actually expands to
* @code
* opal_class_t sally_t_class = {
* "sally_t",
Expand Down Expand Up @@ -240,7 +238,7 @@ struct opal_object_t {
* constructor.
*
* @param type Type (class) of the object
* @return Pointer to the object
* @return Pointer to the object
*/
static inline opal_object_t *opal_obj_new(opal_class_t * cls);
#if OPAL_ENABLE_DEBUG
Expand Down Expand Up @@ -304,12 +302,14 @@ static inline opal_object_t *opal_obj_new_debug(opal_class_t* type, const char*
* to NULL.
*
* @param object Pointer to the object
*
*
*/
#if OPAL_ENABLE_DEBUG
#define OBJ_RELEASE(object) \
do { \
assert(NULL != ((opal_object_t *) (object))->obj_class); \
assert(OPAL_OBJ_MAGIC_ID == ((opal_object_t *) (object))->obj_magic_id); \
assert(NULL != ((opal_object_t *) (object))->obj_class); \
if (0 == opal_obj_update((opal_object_t *) (object), -1)) { \
OBJ_SET_MAGIC_ID((object), 0); \
opal_obj_run_destructors((opal_object_t *) (object)); \
Expand Down Expand Up @@ -457,7 +457,7 @@ static inline void opal_obj_run_destructors(opal_object_t * object)
*
* @param size Size of the object
* @param cls Pointer to the class descriptor of this object
* @return Pointer to the object
* @return Pointer to the object
*/
static inline opal_object_t *opal_obj_new(opal_class_t * cls)
{
Expand Down
1 change: 1 addition & 0 deletions opal/mca/btl/sm/btl_sm_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ mca_btl_sm_component_init(int *num_btls,
}
#endif


return btls;

no_knem:
Expand Down
18 changes: 15 additions & 3 deletions orte/include/orte/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -62,7 +63,7 @@ enum {
ORTE_ERR_UNPACK_INADEQUATE_SPACE = OPAL_ERR_UNPACK_INADEQUATE_SPACE,
ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER = OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER,
ORTE_ERR_TYPE_MISMATCH = OPAL_ERR_TYPE_MISMATCH,
ORTE_ERR_OPERATION_UNSUPPORTED = OPAL_ERR_OPERATION_UNSUPPORTED,
ORTE_ERR_OPERATION_UNSUPPORTED = OPAL_ERR_OPERATION_UNSUPPORTED,
ORTE_ERR_UNKNOWN_DATA_TYPE = OPAL_ERR_UNKNOWN_DATA_TYPE,
ORTE_ERR_BUFFER = OPAL_ERR_BUFFER,
ORTE_ERR_DATA_TYPE_REDEF = OPAL_ERR_DATA_TYPE_REDEF,
Expand All @@ -85,7 +86,7 @@ enum {
ORTE_ERR_CONNECTION_FAILED = OPAL_ERR_CONNECTION_FAILED,
ORTE_ERR_AUTHENTICATION_FAILED = OPAL_ERR_AUTHENTICATION_FAILED,
ORTE_ERR_COMM_FAILURE = OPAL_ERR_COMM_FAILURE,

/* error codes specific to ORTE - don't forget to update
orte/util/error_strings.c when adding new error codes!!
Otherwise, the error reporting system will potentially crash,
Expand Down Expand Up @@ -133,7 +134,18 @@ enum {
ORTE_ERR_SENSOR_LIMIT_EXCEEDED = (ORTE_ERR_BASE - 42),
ORTE_ERR_ALLOCATION_PENDING = (ORTE_ERR_BASE - 43),
ORTE_ERR_NO_PATH_TO_TARGET = (ORTE_ERR_BASE - 44),
ORTE_ERR_OP_IN_PROGRESS = (ORTE_ERR_BASE - 45)
ORTE_ERR_OP_IN_PROGRESS = (ORTE_ERR_BASE - 45),
ORTE_ERR_OPEN_CHANNEL_PEER_FAIL = (ORTE_ERR_BASE - 46),
ORTE_ERR_OPEN_CHANNEL_PEER_REJECT = (ORTE_ERR_BASE - 47),
ORTE_ERR_QOS_TYPE_UNSUPPORTED = (ORTE_ERR_BASE - 48),
ORTE_ERR_QOS_ACK_WINDOW_FULL = (ORTE_ERR_BASE - 49),
ORTE_ERR_ACK_TIMEOUT_SENDER = (ORTE_ERR_BASE - 50),
ORTE_ERR_ACK_TIMEOUT_RECEIVER = (ORTE_ERR_BASE - 51),
ORTE_ERR_LOST_MSG_IN_WINDOW = (ORTE_ERR_BASE - 52),
ORTE_ERR_CHANNEL_BUSY = (ORTE_ERR_BASE - 53),
ORTE_ERR_DUPLICATE_MSG = (ORTE_ERR_BASE - 54),
ORTE_ERR_OUT_OF_ORDER_MSG = (ORTE_ERR_BASE - 55),
ORTE_ERR_OPEN_CHANNEL_DUPLICATE = (ORTE_ERR_BASE - 56),
};

#define ORTE_ERR_MAX (ORTE_ERR_BASE - 100)
Expand Down
Loading