1
1

btl/uct: fix compile warnings/errors

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2018-07-23 12:55:03 -06:00 коммит произвёл Nathan Hjelm
родитель 7d6fd346cb
Коммит 47ed8e8830
8 изменённых файлов: 36 добавлений и 17 удалений

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

@ -38,7 +38,6 @@
#include "opal/class/opal_hash_table.h"
#include "opal/mca/pmix/pmix.h"
#include "opal/threads/tsd.h"
#include <ucp/api/ucp.h>
#include <uct/api/uct.h>
#include "btl_uct_types.h"

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

@ -14,6 +14,12 @@
#include "btl_uct_frag.h"
struct mca_btl_base_descriptor_t *mca_btl_uct_prepare_src (mca_btl_base_module_t *btl,
mca_btl_base_endpoint_t *endpoint,
opal_convertor_t *convertor,
uint8_t order, size_t reserve,
size_t *size, uint32_t flags);
int mca_btl_uct_sendi (mca_btl_base_module_t *btl, mca_btl_base_endpoint_t *endpoint, opal_convertor_t *convertor,
void *header, size_t header_size, size_t payload_size, uint8_t order, uint32_t flags,
mca_btl_base_tag_t tag, mca_btl_base_descriptor_t **descriptor);

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

@ -190,7 +190,7 @@ static int mca_btl_uct_modex_send (void)
uint8_t *modex_data;
int rc;
for (unsigned i = 0 ; i < mca_btl_uct_component.module_count ; ++i) {
for (int i = 0 ; i < mca_btl_uct_component.module_count ; ++i) {
modex_size += mca_btl_uct_module_modex_size (mca_btl_uct_component.modules[i]);
}
@ -199,7 +199,7 @@ static int mca_btl_uct_modex_send (void)
modex->module_count = mca_btl_uct_component.module_count;
for (unsigned i = 0 ; i < mca_btl_uct_component.module_count ; ++i) {
for (int i = 0 ; i < mca_btl_uct_component.module_count ; ++i) {
mca_btl_uct_module_t *module = mca_btl_uct_component.modules[i];
size_t name_len = strlen (module->md_name);
@ -434,7 +434,7 @@ static mca_btl_base_module_t **mca_btl_uct_component_init (int *num_btl_modules,
return base_modules;
}
int mca_btl_uct_tl_progress (mca_btl_uct_tl_t *tl, int starting_index)
static int mca_btl_uct_tl_progress (mca_btl_uct_tl_t *tl, int starting_index)
{
unsigned int ret = 0;
@ -488,7 +488,7 @@ static int mca_btl_uct_component_progress (void)
int starting_index = mca_btl_uct_get_context_index ();
unsigned ret = 0;
for (unsigned i = 0 ; i < mca_btl_uct_component.module_count ; ++i) {
for (int i = 0 ; i < mca_btl_uct_component.module_count ; ++i) {
mca_btl_uct_module_t *module = mca_btl_uct_component.modules[i];
/* unlike ucp, uct actually tells us something useful! its almost like it was "inspired"

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

@ -312,8 +312,8 @@ int mca_btl_uct_endpoint_connect (mca_btl_uct_module_t *uct_btl, mca_btl_uct_end
return OPAL_ERR_UNREACH;
}
BTL_VERBOSE(("checking endpoint %p with context id %d. cached uct ep: %p, ready: %d", endpoint, context_id,
tl_endpoint->uct_ep, !!(MCA_BTL_UCT_ENDPOINT_FLAG_CONN_READY & tl_endpoint->flags)));
BTL_VERBOSE(("checking endpoint %p with context id %d. cached uct ep: %p, ready: %d", (void *) endpoint, context_id,
(void *) tl_endpoint->uct_ep, !!(MCA_BTL_UCT_ENDPOINT_FLAG_CONN_READY & tl_endpoint->flags)));
opal_mutex_lock (&endpoint->ep_lock);
if (MCA_BTL_UCT_ENDPOINT_FLAG_CONN_READY & tl_endpoint->flags) {

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

@ -31,8 +31,8 @@ BEGIN_C_DECLS
mca_btl_base_endpoint_t *mca_btl_uct_endpoint_create (opal_proc_t *proc);
int mca_btl_uct_endpoint_connect (mca_btl_uct_module_t *module, mca_btl_uct_endpoint_t *endpoint, int ep_index, void *ep_addr, int tl_index);
static int mca_btl_uct_endpoint_test_am (mca_btl_uct_module_t *module, mca_btl_uct_endpoint_t *endpoint,
mca_btl_uct_device_context_t *context, uct_ep_h *ep_handle)
static inline int mca_btl_uct_endpoint_test_am (mca_btl_uct_module_t *module, mca_btl_uct_endpoint_t *endpoint,
mca_btl_uct_device_context_t *context, uct_ep_h *ep_handle)
{
int tl_index = module->am_tl->tl_index;
int ep_index = context->context_id;

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

@ -62,7 +62,7 @@ struct mca_btl_base_endpoint_t *mca_btl_uct_get_ep (struct mca_btl_base_module_t
break;
}
BTL_VERBOSE(("endpoint initialized. new endpoint: %p", ep));
BTL_VERBOSE(("endpoint initialized. new endpoint: %p", (void *) ep));
/* add this endpoint to the connection lookup table */
(void) opal_hash_table_set_value_uint64 (&uct_module->id_to_endpoint, (intptr_t) proc, ep);
@ -344,6 +344,7 @@ mca_btl_uct_module_t mca_btl_uct_module_template = {
.btl_flush = mca_btl_uct_flush,
.btl_sendi = mca_btl_uct_sendi,
.btl_prepare_src = mca_btl_uct_prepare_src,
.btl_send = mca_btl_uct_send,
.btl_alloc = mca_btl_uct_alloc,
.btl_free = mca_btl_uct_free,
@ -370,12 +371,12 @@ mca_btl_uct_module_t mca_btl_uct_module_template = {
OBJ_CLASS_INSTANCE(mca_btl_uct_reg_t, opal_free_list_item_t, NULL, NULL);
void mca_btl_uct_md_construct (mca_btl_uct_md_t *md)
static void mca_btl_uct_md_construct (mca_btl_uct_md_t *md)
{
md->uct_md = NULL;
}
void mca_btl_uct_md_destruct (mca_btl_uct_md_t *md)
static void mca_btl_uct_md_destruct (mca_btl_uct_md_t *md)
{
if (md->uct_md) {
uct_md_close (md->uct_md);

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

@ -111,7 +111,6 @@ static uint64_t mca_btl_uct_cap_to_btl_atomic_flag[][2] = {
static void mca_btl_uct_module_set_atomic_flags (mca_btl_uct_module_t *module, mca_btl_uct_tl_t *tl)
{
uint64_t cap_flags = tl->uct_iface_attr.cap.flags;
uint32_t flags = 0;
module->super.btl_atomic_flags = 0;
@ -173,7 +172,7 @@ static ucs_status_t mca_btl_uct_conn_req_cb (void *arg, void *data, size_t lengt
int32_t ep_flags;
int rc;
BTL_VERBOSE(("got connection request for endpoint %p. length = %lu", endpoint, length));
BTL_VERBOSE(("got connection request for endpoint %p. length = %lu", (void *) endpoint, length));
if (NULL == endpoint) {
BTL_ERROR(("could not create endpoint for connection request"));
@ -200,7 +199,6 @@ static ucs_status_t mca_btl_uct_conn_req_cb (void *arg, void *data, size_t lengt
* an endpoint can be used. */
if ((ep_flags & (MCA_BTL_UCT_ENDPOINT_FLAG_CONN_REM_READY | MCA_BTL_UCT_ENDPOINT_FLAG_CONN_REC)) ==
(MCA_BTL_UCT_ENDPOINT_FLAG_CONN_REM_READY | MCA_BTL_UCT_ENDPOINT_FLAG_CONN_REC)) {
mca_btl_uct_device_context_t *tl_context = mca_btl_uct_module_get_tl_context_specific (module, module->comm_tls[req->tl_index], req->context_id);
mca_btl_uct_base_frag_t *frag;
/* to avoid a race with send adding pending frags grab the lock here */
@ -280,13 +278,17 @@ mca_btl_uct_device_context_t *mca_btl_uct_context_create (mca_btl_uct_module_t *
break;
}
BTL_VERBOSE(("enabling progress for tl %p context id %d", tl, context_id));
BTL_VERBOSE(("enabling progress for tl %p context id %d", (void *) tl, context_id));
#if HAVE_DECL_UCT_PROGRESS_THREAD_SAFE
uct_iface_progress_enable (context->uct_iface, UCT_PROGRESS_THREAD_SAFE | UCT_PROGRESS_SEND |
UCT_PROGRESS_RECV);
#else
uct_iface_progress_enable (context->uct_iface, UCT_PROGRESS_SEND | UCT_PROGRESS_RECV);
#endif
if (context_id > 0 && tl == module->am_tl) {
BTL_VERBOSE(("installing AM handler for tl %p context id %d", tl, context_id));
BTL_VERBOSE(("installing AM handler for tl %p context id %d", (void *) tl, context_id));
uct_iface_set_am_handler (context->uct_iface, MCA_BTL_UCT_FRAG, mca_btl_uct_am_handler,
context, UCT_CB_FLAG_SYNC);
}

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

@ -33,6 +33,17 @@ AC_DEFUN([MCA_opal_btl_uct_CONFIG],[
OMPI_CHECK_UCX([btl_uct],
[btl_uct_happy="yes"],
[btl_uct_happy="no"])
if test "$btl_uct_happy" = "yes" ; then
OPAL_VAR_SCOPE_PUSH([CPPFLAGS_save])
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $btl_uct_CPPFLAGS"
AC_CHECK_DECLS([UCT_PROGRESS_THREAD_SAFE], [], [], [[#include <uct/api/uct.h>]])
CPPFLAGS="$CPPFLAGS_save"
OPAL_VAR_SCOPE_POP
fi
AS_IF([test "$btl_uct_happy" = "yes"],
[$1