1
1

* rename a bunch of constants to properly follow prefix rule

* change poll time from 10ms to 0ms.  bad brian
* change eager / min send limits to make ob1 a bit happier

This commit was SVN r6573.
Этот коммит содержится в:
Brian Barrett 2005-07-21 13:31:52 +00:00
родитель ee3530b4bf
Коммит 2faa0d179e
11 изменённых файлов: 109 добавлений и 93 удалений

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

@ -46,50 +46,57 @@ AC_DEFUN([MCA_btl_portals_CONFIG_VAL], [
AC_DEFUN([MCA_btl_portals_CONFIG_VALS], [
# User configuration options
MCA_btl_portals_CONFIG_VAL([send-table-id],
[BTL_PORTALS_SEND_TABLE_ID], [3],
[OMPI_BTL_PORTALS_SEND_TABLE_ID], [3],
[Portals table id to use for send/recv ])
MCA_btl_portals_CONFIG_VAL([rdma-table-id],
[BTL_PORTALS_RDMA_TABLE_ID], [4],
[OMPI_BTL_PORTALS_RDMA_TABLE_ID], [4],
[Portals table id to use for RDMA request])
MCA_btl_portals_CONFIG_VAL([debug-level],
[BTL_PORTALS_DEFAULT_DEBUG_LEVEL], [100],
[OMPI_BTL_PORTALS_DEFAULT_DEBUG_LEVEL], [0],
[debugging level for portals btl])
MCA_btl_portals_CONFIG_VAL([eager-limit],
[BTL_PORTALS_DEFAULT_EAGER_LIMIT], [16384],
[OMPI_BTL_PORTALS_DEFAULT_EAGER_LIMIT], [32768],
[max size for eager sends])
MCA_btl_portals_CONFIG_VAL([min-send-size],
[BTL_PORTALS_DEFAULT_MIN_SEND_SIZE], [0],
[OMPI_BTL_PORTALS_DEFAULT_MIN_SEND_SIZE], [32768],
[min size for send fragments])
MCA_btl_portals_CONFIG_VAL([max-send-size],
[BTL_PORTALS_DEFAULT_MAX_SEND_SIZE], [32768],
[OMPI_BTL_PORTALS_DEFAULT_MAX_SEND_SIZE], [65536],
[max size for send fragments])
MCA_btl_portals_CONFIG_VAL([md-size],
[OMPI_BTL_PORTALS_DEFAULT_RECV_MD_SIZE], [1048576],
[Size of receive memory descriptors])
MCA_btl_portals_CONFIG_VAL([md-size],
[OMPI_BTL_PORTALS_DEFAULT_RECV_MD_NUM], [3],
[Number of receive memory descriptors])
MCA_btl_portals_CONFIG_VAL([min-rdma-size],
[BTL_PORTALS_DEFAULT_MIN_RDMA_SIZE], [0],
[OMPI_BTL_PORTALS_DEFAULT_MIN_RDMA_SIZE], [0],
[min size for rdma fragments])
MCA_btl_portals_CONFIG_VAL([max-rdma-size],
[BTL_PORTALS_DEFAULT_MAX_RDMA_SIZE], [2147483647],
[OMPI_BTL_PORTALS_DEFAULT_MAX_RDMA_SIZE], [2147483647],
[max size for rdma fragments])
MCA_btl_portals_CONFIG_VAL([max-sends-pending],
[BTL_PORTALS_MAX_SENDS_PENDING], [128],
[OMPI_BTL_PORTALS_MAX_SENDS_PENDING], [128],
[max number of sends pending at any time])
MCA_btl_portals_CONFIG_VAL([recv-queue-size],
[BTL_PORTALS_DEFAULT_RECV_QUEUE_SIZE], [512],
[OMPI_BTL_PORTALS_DEFAULT_RECV_QUEUE_SIZE], [512],
[size of event queue for receiving frags])
MCA_btl_portals_CONFIG_VAL([free-list-init-num],
[BTL_PORTALS_DEFAULT_FREE_LIST_INIT_NUM], [8],
[OMPI_BTL_PORTALS_DEFAULT_FREE_LIST_INIT_NUM], [8],
[starting size of free lists])
MCA_btl_portals_CONFIG_VAL([free-list-max-num],
[BTL_PORTALS_DEFAULT_FREE_LIST_MAX_NUM], [1024],
[OMPI_BTL_PORTALS_DEFAULT_FREE_LIST_MAX_NUM], [1024],
[maximum size of free lists])
MCA_btl_portals_CONFIG_VAL([free-list-inc-num],
[BTL_PORTALS_DEFAULT_FREE_LIST_INC_NUM], [32],
[OMPI_BTL_PORTALS_DEFAULT_FREE_LIST_INC_NUM], [32],
[grow size for freelists])
])
@ -147,13 +154,13 @@ AC_DEFUN([MCA_btl_portals_CONFIG_PLATFORM], [
done
fi
AC_DEFINE_UNQUOTED([BTL_PORTALS_HAVE_EVENT_UNLINK],
AC_DEFINE_UNQUOTED([OMPI_BTL_PORTALS_HAVE_EVENT_UNLINK],
[$BTL_PORTALS_HAVE_EVENT_UNLINK],
[Does Portals send a BTL_EVENT_UNLINK event])
AC_DEFINE_UNQUOTED([BTL_PORTALS_UTCP], [$BTL_PORTALS_UTCP],
AC_DEFINE_UNQUOTED([OMPI_BTL_PORTALS_UTCP], [$BTL_PORTALS_UTCP],
[Use the UTCP reference implementation or Portals])
AC_DEFINE_UNQUOTED([BTL_PORTALS_REDSTORM], [$BTL_PORTALS_REDSTORM],
AC_DEFINE_UNQUOTED([OMPI_BTL_PORTALS_REDSTORM], [$BTL_PORTALS_REDSTORM],
[Use the Red Storm implementation or Portals])
AC_CONFIG_LINKS([ompi/mca/btl/portals/src/btl_portals_compat.c:ompi/mca/btl/portals/src/btl_portals_compat_${btl_portals_compat}.c])

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

@ -128,7 +128,7 @@ mca_btl_portals_add_procs(struct mca_btl_base_module_t* btl_base,
if (need_recv_setup) {
/* create eqs */
int i;
for (i = 0 ; i < MCA_BTL_PORTALS_EQ_SIZE ; ++i) {
for (i = 0 ; i < OMPI_BTL_PORTALS_EQ_SIZE ; ++i) {
int ptl_ret = PtlEQAlloc(btl->portals_ni_h,
btl->portals_eq_sizes[i],
PTL_EQ_HANDLER_NONE,
@ -186,7 +186,7 @@ mca_btl_portals_del_procs(struct mca_btl_base_module_t *btl_base,
ret = mca_btl_portals_recv_disable(btl);
/* destroy eqs */
for (i = 0 ; i < MCA_BTL_PORTALS_EQ_SIZE ; ++i) {
for (i = 0 ; i < OMPI_BTL_PORTALS_EQ_SIZE ; ++i) {
int ptl_ret = PtlEQFree(btl->portals_eq_handles[i]);
if (PTL_OK != ptl_ret) {
opal_output(mca_btl_portals_component.portals_output,
@ -227,12 +227,12 @@ mca_btl_portals_alloc(struct mca_btl_base_module_t* btl,
int rc;
if (size <= btl->btl_eager_limit) {
MCA_BTL_PORTALS_FRAG_ALLOC_EAGER(portals_btl, frag, rc);
OMPI_BTL_PORTALS_FRAG_ALLOC_EAGER(portals_btl, frag, rc);
frag->segment.seg_len =
size <= btl->btl_eager_limit ?
size : btl->btl_eager_limit ;
} else {
MCA_BTL_PORTALS_FRAG_ALLOC_MAX(portals_btl, frag, rc);
OMPI_BTL_PORTALS_FRAG_ALLOC_MAX(portals_btl, frag, rc);
frag->segment.seg_len =
size <= btl->btl_max_send_size ?
size : btl->btl_max_send_size ;
@ -252,11 +252,11 @@ mca_btl_portals_free(struct mca_btl_base_module_t* btl_base,
mca_btl_portals_frag_t* frag = (mca_btl_portals_frag_t*) des;
if (frag->size == 0) {
MCA_BTL_PORTALS_FRAG_RETURN_USER(&btl->super, frag);
OMPI_BTL_PORTALS_FRAG_RETURN_USER(&btl->super, frag);
} else if (frag->size == btl->super.btl_eager_limit){
MCA_BTL_PORTALS_FRAG_RETURN_EAGER(&btl->super, frag);
OMPI_BTL_PORTALS_FRAG_RETURN_EAGER(&btl->super, frag);
} else if (frag->size == btl->super.btl_max_send_size) {
MCA_BTL_PORTALS_FRAG_RETURN_MAX(&btl->super, frag);
OMPI_BTL_PORTALS_FRAG_RETURN_MAX(&btl->super, frag);
} else {
return OMPI_ERR_BAD_PARAM;
}
@ -286,7 +286,7 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl,
* if we aren't pinning the data and the requested size is less
* than the eager limit pack into a fragment from the eager pool
*/
MCA_BTL_PORTALS_FRAG_ALLOC_EAGER(btl, frag, rc);
OMPI_BTL_PORTALS_FRAG_ALLOC_EAGER(btl, frag, rc);
if (NULL == frag) {
return NULL;
}
@ -297,7 +297,7 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl,
&max_data, &free_after);
*size = max_data;
if (rc < 0) {
MCA_BTL_PORTALS_FRAG_RETURN_EAGER(btl, frag);
OMPI_BTL_PORTALS_FRAG_RETURN_EAGER(btl, frag);
return NULL;
}
frag->segment.seg_len = max_data + reserve;
@ -306,7 +306,7 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl,
* otherwise pack as much data as we can into a fragment
* that is the max send size.
*/
MCA_BTL_PORTALS_FRAG_ALLOC_MAX(btl, frag, rc);
OMPI_BTL_PORTALS_FRAG_ALLOC_MAX(btl, frag, rc);
if (NULL == frag) {
return NULL;
}
@ -319,7 +319,7 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl,
&max_data, &free_after);
*size = max_data;
if ( rc < 0 ) {
MCA_BTL_PORTALS_FRAG_RETURN_MAX(btl, frag);
OMPI_BTL_PORTALS_FRAG_RETURN_MAX(btl, frag);
return NULL;
}
frag->segment.seg_len = max_data + reserve;
@ -386,7 +386,7 @@ mca_btl_portals_finalize(struct mca_btl_base_module_t *btl_base)
ret = mca_btl_portals_recv_disable(btl);
/* destroy eqs */
for (i = 0 ; i < MCA_BTL_PORTALS_EQ_SIZE ; ++i) {
for (i = 0 ; i < OMPI_BTL_PORTALS_EQ_SIZE ; ++i) {
int ptl_ret = PtlEQFree(btl->portals_eq_handles[i]);
if (PTL_OK != ptl_ret) {
opal_output(mca_btl_portals_component.portals_output,

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

@ -16,8 +16,8 @@
/*
* @file
*/
#ifndef MCA_BTL_PORTALS_H
#define MCA_BTL_PORTALS_H
#ifndef OMPI_BTL_PORTALS_H
#define OMPI_BTL_PORTALS_H
#include "btl_portals_compat.h"
@ -50,7 +50,7 @@ struct mca_btl_portals_component_t {
*/
int portals_output;
#if BTL_PORTALS_UTCP
#if OMPI_BTL_PORTALS_UTCP
/* ethernet interface to use - only has meaning with utcp
reference */
char *portals_ifname;
@ -76,10 +76,10 @@ struct mca_btl_portals_component_t {
typedef struct mca_btl_portals_component_t mca_btl_portals_component_t;
#define MCA_BTL_PORTALS_EQ_RECV 0
#define MCA_BTL_PORTALS_EQ_SEND 1
#define MCA_BTL_PORTALS_EQ_RDMA 2
#define MCA_BTL_PORTALS_EQ_SIZE 3
#define OMPI_BTL_PORTALS_EQ_RECV 0
#define OMPI_BTL_PORTALS_EQ_SEND 1
#define OMPI_BTL_PORTALS_EQ_RDMA 2
#define OMPI_BTL_PORTALS_EQ_SIZE 3
struct mca_btl_portals_module_t {
/* base BTL module interface */
@ -103,9 +103,9 @@ struct mca_btl_portals_module_t {
opal_list_t portals_recv_chunks;
/* size for event queue */
int portals_eq_sizes[MCA_BTL_PORTALS_EQ_SIZE];
int portals_eq_sizes[OMPI_BTL_PORTALS_EQ_SIZE];
/* frag receive event queue */
ptl_handle_eq_t portals_eq_handles[MCA_BTL_PORTALS_EQ_SIZE];
ptl_handle_eq_t portals_eq_handles[OMPI_BTL_PORTALS_EQ_SIZE];
/* "reject" entry for recv match list */
ptl_handle_me_t portals_recv_reject_me_h;

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

@ -15,10 +15,10 @@
*/
#ifndef BTL_PORTALS_COMPAT_H
#define BTL_PORTALS_COMPAT_H
#ifndef OMPI_BTL_PORTALS_COMPAT_H
#define OMPI_BTL_PORTALS_COMPAT_H
#if BTL_PORTALS_UTCP
#if OMPI_BTL_PORTALS_UTCP
#include <portals3.h>
@ -27,7 +27,7 @@
#include <p3rt/p3rt.h>
#include <p3api/debug.h>
#elif BTL_PORTALS_REDSTORM
#elif OMPI_BTL_PORTALS_REDSTORM
#include <portals/portals3.h>
@ -39,4 +39,4 @@
#endif
#endif /* BTL_PORTALS_NAL_H */
#endif /* OMPI_BTL_PORTALS_NAL_H */

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

@ -119,24 +119,24 @@ mca_btl_portals_component_open(void)
opal_mutex_t);
/* get configured state for component */
#if BTL_PORTALS_UTCP
#if OMPI_BTL_PORTALS_UTCP
mca_btl_portals_component.portals_ifname =
param_register_string("ifname", "eth0");
#endif
mca_btl_portals_component.portals_free_list_init_num =
param_register_int("free_list_init_num",
BTL_PORTALS_DEFAULT_FREE_LIST_INIT_NUM);
OMPI_BTL_PORTALS_DEFAULT_FREE_LIST_INIT_NUM);
mca_btl_portals_component.portals_free_list_max_num =
param_register_int("free_list_max_num",
BTL_PORTALS_DEFAULT_FREE_LIST_MAX_NUM);
OMPI_BTL_PORTALS_DEFAULT_FREE_LIST_MAX_NUM);
mca_btl_portals_component.portals_free_list_inc_num =
param_register_int("free_list_inc_num",
BTL_PORTALS_DEFAULT_FREE_LIST_INC_NUM);
OMPI_BTL_PORTALS_DEFAULT_FREE_LIST_INC_NUM);
/* start up debugging output */
portals_output_stream.lds_verbose_level =
param_register_int("debug_level",
BTL_PORTALS_DEFAULT_DEBUG_LEVEL);
OMPI_BTL_PORTALS_DEFAULT_DEBUG_LEVEL);
asprintf(&(portals_output_stream.lds_prefix),
"btl: portals (%5d): ", getpid());
mca_btl_portals_component.portals_output =
@ -145,19 +145,19 @@ mca_btl_portals_component_open(void)
/* fill default module state */
mca_btl_portals_module.super.btl_eager_limit =
param_register_int("eager_limit",
BTL_PORTALS_DEFAULT_EAGER_LIMIT);
OMPI_BTL_PORTALS_DEFAULT_EAGER_LIMIT);
mca_btl_portals_module.super.btl_min_send_size =
param_register_int("min_send_size",
BTL_PORTALS_DEFAULT_MIN_SEND_SIZE);
OMPI_BTL_PORTALS_DEFAULT_MIN_SEND_SIZE);
mca_btl_portals_module.super.btl_max_send_size =
param_register_int("max_send_size",
BTL_PORTALS_DEFAULT_MAX_SEND_SIZE);
OMPI_BTL_PORTALS_DEFAULT_MAX_SEND_SIZE);
mca_btl_portals_module.super.btl_min_rdma_size =
param_register_int("min_rdma_size",
BTL_PORTALS_DEFAULT_MIN_RDMA_SIZE);
OMPI_BTL_PORTALS_DEFAULT_MIN_RDMA_SIZE);
mca_btl_portals_module.super.btl_max_rdma_size =
param_register_int("max_rdma_size",
BTL_PORTALS_DEFAULT_MAX_RDMA_SIZE);
OMPI_BTL_PORTALS_DEFAULT_MAX_RDMA_SIZE);
mca_btl_portals_module.super.btl_exclusivity =
param_register_int("exclusivity", 60);
mca_btl_portals_module.super.btl_latency =
@ -170,30 +170,34 @@ mca_btl_portals_component_open(void)
bzero(&(mca_btl_portals_module.portals_reg),
sizeof(mca_btl_portals_module.portals_reg));
for (i = 0 ; i < MCA_BTL_PORTALS_EQ_SIZE ; ++i) {
for (i = 0 ; i < OMPI_BTL_PORTALS_EQ_SIZE ; ++i) {
mca_btl_portals_module.portals_eq_sizes[i] = 0;
mca_btl_portals_module.portals_eq_handles[i] = PTL_EQ_NONE;
}
/* eq handles will be created when the module is instantiated.
Set sizes here */
mca_btl_portals_module.portals_eq_sizes[MCA_BTL_PORTALS_EQ_RECV] =
param_register_int("eq_recv_size", BTL_PORTALS_DEFAULT_RECV_QUEUE_SIZE);
mca_btl_portals_module.portals_eq_sizes[OMPI_BTL_PORTALS_EQ_RECV] =
param_register_int("eq_recv_size",
OMPI_BTL_PORTALS_DEFAULT_RECV_QUEUE_SIZE);
mca_btl_portals_module.portals_max_outstanding_sends =
param_register_int("eq_send_max_pending", BTL_PORTALS_MAX_SENDS_PENDING) * 3;
param_register_int("eq_send_max_pending",
OMPI_BTL_PORTALS_MAX_SENDS_PENDING) * 3;
/* sends_pending * 3 for start, end, ack */
mca_btl_portals_module.portals_eq_sizes[MCA_BTL_PORTALS_EQ_SEND] =
mca_btl_portals_module.portals_eq_sizes[OMPI_BTL_PORTALS_EQ_SEND] =
mca_btl_portals_module.portals_max_outstanding_sends * 3;
mca_btl_portals_module.portals_eq_sizes[MCA_BTL_PORTALS_EQ_RDMA] =
mca_btl_portals_module.portals_eq_sizes[OMPI_BTL_PORTALS_EQ_RDMA] =
param_register_int("eq_rdma_size", 512); /* BWB - FIXME - make param */
mca_btl_portals_module.portals_recv_reject_me_h = PTL_INVALID_HANDLE;
mca_btl_portals_module.portals_recv_mds_num =
param_register_int("recv_md_num", 3); /* BWB - FIXME - make param */
param_register_int("recv_md_num",
OMPI_BTL_PORTALS_DEFAULT_RECV_MD_NUM);
mca_btl_portals_module.portals_recv_mds_size =
param_register_int("recv_md_size", 524288); /* BWB - FIXME - make param */
param_register_int("recv_md_size",
OMPI_BTL_PORTALS_DEFAULT_RECV_MD_SIZE);
mca_btl_portals_module.portals_ni_h = PTL_INVALID_HANDLE;
mca_btl_portals_module.portals_sr_dropped = 0;
@ -213,7 +217,7 @@ mca_btl_portals_component_close(void)
free(mca_btl_portals_component.portals_modules);
}
#if BTL_PORTALS_UTCP
#if OMPI_BTL_PORTALS_UTCP
if (NULL != mca_btl_portals_component.portals_ifname) {
free(mca_btl_portals_component.portals_ifname);
}
@ -336,7 +340,7 @@ mca_btl_portals_component_progress(void)
int which;
int ret;
if (module->portals_eq_handles[MCA_BTL_PORTALS_EQ_SIZE - 1] ==
if (module->portals_eq_handles[OMPI_BTL_PORTALS_EQ_SIZE - 1] ==
PTL_EQ_NONE) continue; /* they are all initialized at once */
#if OMPI_ENABLE_DEBUG
@ -354,8 +358,8 @@ mca_btl_portals_component_progress(void)
#endif
ret = PtlEQPoll(module->portals_eq_handles,
MCA_BTL_PORTALS_EQ_SIZE, /* number of eq handles */
10, /* poll time */
OMPI_BTL_PORTALS_EQ_SIZE, /* number of eq handles */
0, /* poll time */
&ev,
&which);
if (PTL_EQ_EMPTY == ret) {
@ -365,7 +369,7 @@ mca_btl_portals_component_progress(void)
} else if (!(PTL_OK == ret || PTL_EQ_DROPPED == ret)) {
/* BWB - how can we report errors? */
opal_output(mca_btl_portals_component.portals_output,
"Error calling PtlEQGet: %d", ret);
"*** Error calling PtlEQGet: %d ***", ret);
continue;
} else if (PTL_EQ_DROPPED == ret) {
opal_output_verbose(10, mca_btl_portals_component.portals_output,
@ -373,14 +377,14 @@ mca_btl_portals_component_progress(void)
}
switch (which) {
case MCA_BTL_PORTALS_EQ_RECV:
case OMPI_BTL_PORTALS_EQ_RECV:
mca_btl_portals_progress_queued_sends(module);
mca_btl_portals_process_recv(module, &ev);
break;
case MCA_BTL_PORTALS_EQ_SEND:
case OMPI_BTL_PORTALS_EQ_SEND:
mca_btl_portals_process_send(module, &ev);
break;
case MCA_BTL_PORTALS_EQ_RDMA:
case OMPI_BTL_PORTALS_EQ_RDMA:
mca_btl_portals_process_rdma(module, &ev);
break;
default:

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

@ -32,7 +32,7 @@ mca_btl_portals_frag_common_send_constructor(mca_btl_portals_frag_t* frag)
frag->segment.seg_len = frag->size;
frag->segment.seg_key.key64 = 0;
frag->type = MCA_BTL_PORTALS_FRAG_SEND;
frag->type = OMPI_BTL_PORTALS_FRAG_SEND;
}
@ -62,7 +62,7 @@ mca_btl_portals_frag_user_constructor(mca_btl_portals_frag_t* frag)
frag->base.des_src_cnt = 0;
frag->size = 0;
frag->type = MCA_BTL_PORTALS_FRAG_SEND;
frag->type = OMPI_BTL_PORTALS_FRAG_SEND;
}

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

@ -14,8 +14,8 @@
* $HEADER$
*/
#ifndef MCA_BTL_PORTALS_FRAG_H
#define MCA_BTL_PORTALS_FRAG_H
#ifndef OMPI_BTL_PORTALS_FRAG_H
#define OMPI_BTL_PORTALS_FRAG_H
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
@ -23,8 +23,8 @@ extern "C" {
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_btl_portals_frag_t);
typedef enum {
MCA_BTL_PORTALS_FRAG_SEND,
MCA_BTL_PORTALS_FRAG_RECV
OMPI_BTL_PORTALS_FRAG_SEND,
OMPI_BTL_PORTALS_FRAG_RECV
} mca_btl_portals_frag_type_t;
struct mca_btl_portals_send_frag_t {
@ -76,7 +76,7 @@ OBJ_CLASS_DECLARATION(mca_btl_portals_frag_user_t);
* free list(s).
*/
#define MCA_BTL_PORTALS_FRAG_ALLOC_EAGER(btl, frag, rc) \
#define OMPI_BTL_PORTALS_FRAG_ALLOC_EAGER(btl, frag, rc) \
{ \
\
opal_list_item_t *item; \
@ -84,13 +84,13 @@ OBJ_CLASS_DECLARATION(mca_btl_portals_frag_user_t);
frag = (mca_btl_portals_frag_t*) item; \
}
#define MCA_BTL_PORTALS_FRAG_RETURN_EAGER(btl, frag) \
#define OMPI_BTL_PORTALS_FRAG_RETURN_EAGER(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_portals_module_t*)btl)->portals_frag_eager, \
(opal_list_item_t*)(frag)); \
}
#define MCA_BTL_PORTALS_FRAG_ALLOC_MAX(btl, frag, rc) \
#define OMPI_BTL_PORTALS_FRAG_ALLOC_MAX(btl, frag, rc) \
{ \
\
opal_list_item_t *item; \
@ -98,21 +98,21 @@ OBJ_CLASS_DECLARATION(mca_btl_portals_frag_user_t);
frag = (mca_btl_portals_frag_t*) item; \
}
#define MCA_BTL_PORTALS_FRAG_RETURN_MAX(btl, frag) \
#define OMPI_BTL_PORTALS_FRAG_RETURN_MAX(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_portals_module_t*)btl)->portals_frag_max, \
(opal_list_item_t*)(frag)); \
}
#define MCA_BTL_PORTALS_FRAG_ALLOC_USER(btl, frag, rc) \
#define OMPI_BTL_PORTALS_FRAG_ALLOC_USER(btl, frag, rc) \
{ \
opal_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&((mca_btl_portals_module_t*)btl)->portals_frag_user, item, rc); \
frag = (mca_btl_portals_frag_t*) item; \
}
#define MCA_BTL_PORTALS_FRAG_RETURN_USER(btl, frag) \
#define OMPI_BTL_PORTALS_FRAG_RETURN_USER(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_portals_module_t*)btl)->portals_frag_user, \
(opal_list_item_t*)(frag)); \

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

@ -47,7 +47,7 @@ mca_btl_portals_recv_enable(mca_btl_portals_module_t *btl)
md.eq_handle = PTL_EQ_NONE;
ret = PtlMEAttach(btl->portals_ni_h,
BTL_PORTALS_SEND_TABLE_ID,
OMPI_BTL_PORTALS_SEND_TABLE_ID,
any_proc,
0, /* match */
0, /* ignore */
@ -197,8 +197,8 @@ mca_btl_portals_process_recv(mca_btl_portals_module_t *btl,
"received data for tag %d\n", tag));
/* it's a user, so we have to manually setup the segment */
MCA_BTL_PORTALS_FRAG_ALLOC_USER(btl, frag, ret);
frag->type = MCA_BTL_PORTALS_FRAG_RECV;
OMPI_BTL_PORTALS_FRAG_ALLOC_USER(btl, frag, ret);
frag->type = OMPI_BTL_PORTALS_FRAG_RECV;
frag->size = ev->mlength;
frag->base.des_dst = &frag->segment;
frag->base.des_dst_cnt = 1;
@ -225,7 +225,7 @@ mca_btl_portals_process_recv(mca_btl_portals_module_t *btl,
&frag->base,
btl->portals_reg[tag].cbdata);
mca_btl_portals_return_chunk_part(btl, frag);
MCA_BTL_PORTALS_FRAG_RETURN_USER(&btl->super, frag);
OMPI_BTL_PORTALS_FRAG_RETURN_USER(&btl->super, frag);
break;
default:
break;

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

@ -14,8 +14,8 @@
* $HEADER$
*/
#ifndef MCA_BTL_PORTALS_RECV_H
#define MCA_BTL_PORTALS_RECV_H
#ifndef OMPI_BTL_PORTALS_RECV_H
#define OMPI_BTL_PORTALS_RECV_H
#include "btl_portals_frag.h"
@ -99,7 +99,7 @@ mca_btl_portals_activate_chunk(mca_btl_portals_recv_chunk_t *chunk)
md.max_size = chunk->btl->super.btl_max_send_size;
md.options = PTL_MD_OP_PUT | PTL_MD_MAX_SIZE;
md.user_ptr = chunk;
md.eq_handle = chunk->btl->portals_eq_handles[MCA_BTL_PORTALS_EQ_RECV];
md.eq_handle = chunk->btl->portals_eq_handles[OMPI_BTL_PORTALS_EQ_RECV];
chunk->pending = 0;
chunk->full = false;
@ -143,4 +143,4 @@ mca_btl_portals_return_chunk_part(mca_btl_portals_module_t *btl,
}
}
#endif /* MCA_BTL_PORTALS_RECV_H */
#endif /* OMPI_BTL_PORTALS_RECV_H */

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

@ -17,6 +17,8 @@
#include "ompi_config.h"
#include <assert.h>
#include "include/constants.h"
#include "btl_portals.h"
@ -91,6 +93,9 @@ mca_btl_portals_process_send(mca_btl_portals_module_t *btl,
gets more resources (ie, what's currently in this
md) */
PtlMDUnlink(ev->md_handle);
assert(ev->mlength == frag->segment.seg_len);
/* let the PML know we're done... */
frag->base.des_cbfunc(&btl->super,
frag->u.send_frag.endpoint,

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

@ -14,8 +14,8 @@
* $HEADER$
*/
#ifndef MCA_BTL_PORTALS_SEND_H
#define MCA_BTL_PORTALS_SEND_H
#ifndef OMPI_BTL_PORTALS_SEND_H
#define OMPI_BTL_PORTALS_SEND_H
#include "btl_portals_frag.h"
@ -37,7 +37,7 @@ mca_btl_portals_send_frag(mca_btl_portals_frag_t *frag)
md.max_size = 0;
md.options = 0; /* BWB - can we optimize? */
md.user_ptr = frag; /* keep a pointer to ourselves */
md.eq_handle = frag->u.send_frag.btl->portals_eq_handles[MCA_BTL_PORTALS_EQ_SEND];
md.eq_handle = frag->u.send_frag.btl->portals_eq_handles[OMPI_BTL_PORTALS_EQ_SEND];
/* make a free-floater */
ret = PtlMDBind(frag->u.send_frag.btl->portals_ni_h,
@ -53,7 +53,7 @@ mca_btl_portals_send_frag(mca_btl_portals_frag_t *frag)
ret = PtlPut(md_h,
PTL_ACK_REQ,
frag->u.send_frag.endpoint->endpoint_ptl_id,
BTL_PORTALS_SEND_TABLE_ID,
OMPI_BTL_PORTALS_SEND_TABLE_ID,
0, /* ac_index - not used*/
frag->segment.seg_key.key64, /* match bits */
0, /* remote offset - not used */
@ -89,4 +89,4 @@ mca_btl_portals_progress_queued_sends(struct mca_btl_portals_module_t *btl)
}
#endif /* MCA_BTL_PORTALS_SEND_H */
#endif /* OMPI_BTL_PORTALS_SEND_H */