Fixed: various warnings with printf(%x, uint64_t) on 32 bit architectures + some left (long) cast for size_t printf.
This commit was SVN r15706.
Этот коммит содержится в:
родитель
0f468f3668
Коммит
cec9ce8106
@ -39,6 +39,6 @@ mca_vprotocol_pessimist_module_t mca_vprotocol_pessimist =
|
|||||||
|
|
||||||
int mca_vprotocol_pessimist_dump(struct ompi_communicator_t* comm, int verbose)
|
int mca_vprotocol_pessimist_dump(struct ompi_communicator_t* comm, int verbose)
|
||||||
{
|
{
|
||||||
V_OUTPUT("vprotocol_example dump for comm %d", comm->c_contextid);
|
V_OUTPUT_VERBOSE(verbose, "vprotocol_pessimist: dump for comm %d", comm->c_contextid);
|
||||||
return mca_pml_v.host_pml.pml_dump(comm, verbose);
|
return mca_pml_v.host_pml.pml_dump(comm, verbose);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static inline int mca_param_register_int( const char* param_name, int default_value);
|
static inline int mca_param_register_int( const char* param_name, int default_value);
|
||||||
|
static inline char *mca_param_register_string(const char* param_name, char *default_value);
|
||||||
|
|
||||||
static int mca_vprotocol_pessimist_component_open(void);
|
static int mca_vprotocol_pessimist_component_open(void);
|
||||||
static int mca_vprotocol_pessimist_component_close(void);
|
static int mca_vprotocol_pessimist_component_close(void);
|
||||||
@ -35,49 +36,49 @@ static char *_mmap_file_name;
|
|||||||
|
|
||||||
mca_pml_v_protocol_base_component_1_0_0_t mca_vprotocol_pessimist_component =
|
mca_pml_v_protocol_base_component_1_0_0_t mca_vprotocol_pessimist_component =
|
||||||
{
|
{
|
||||||
/* First, the mca_base_component_t struct containing meta
|
/* First, the mca_base_component_t struct containing meta
|
||||||
* information about the component itself */
|
* information about the component itself */
|
||||||
{
|
{
|
||||||
/* Indicate that we are a pml v1.0.0 component (which also implies
|
/* Indicate that we are a pml v1.0.0 component (which also implies
|
||||||
a specific MCA version) */
|
a specific MCA version) */
|
||||||
MCA_VPROTOCOL_BASE_VERSION_1_0_0,
|
MCA_VPROTOCOL_BASE_VERSION_1_0_0,
|
||||||
"pessimist", /* MCA component name */
|
"pessimist", /* MCA component name */
|
||||||
1, /* MCA component major version */
|
1, /* MCA component major version */
|
||||||
0, /* MCA component minor version */
|
0, /* MCA component minor version */
|
||||||
0, /* MCA component release version */
|
0, /* MCA component release version */
|
||||||
mca_vprotocol_pessimist_component_open, /* component open */
|
mca_vprotocol_pessimist_component_open, /* component open */
|
||||||
mca_vprotocol_pessimist_component_close /* component close */
|
mca_vprotocol_pessimist_component_close /* component close */
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Next the MCA v1.0.0 component meta data */
|
/* Next the MCA v1.0.0 component meta data */
|
||||||
{
|
{
|
||||||
/* Whether the component is checkpointable or not */
|
/* Whether the component is checkpointable or not */
|
||||||
false
|
false
|
||||||
},
|
},
|
||||||
|
|
||||||
mca_vprotocol_pessimist_component_init, /* component init */
|
mca_vprotocol_pessimist_component_init, /* component init */
|
||||||
mca_vprotocol_pessimist_component_finalize /* component finalize */
|
mca_vprotocol_pessimist_component_finalize /* component finalize */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** MCA level functions
|
/** MCA level functions
|
||||||
*/
|
*/
|
||||||
static int mca_vprotocol_pessimist_component_open(void)
|
static int mca_vprotocol_pessimist_component_open(void)
|
||||||
{
|
{
|
||||||
_priority = mca_param_register_int("priority", -1);
|
_priority = mca_param_register_int("priority", -1);
|
||||||
_free_list_num = mca_param_register_int("free_list_num", 16);
|
_free_list_num = mca_param_register_int("free_list_num", 16);
|
||||||
_free_list_max = mca_param_register_int("free_list_max", -1);
|
_free_list_max = mca_param_register_int("free_list_max", -1);
|
||||||
_free_list_inc = mca_param_register_int("free_list_inc", 64);
|
_free_list_inc = mca_param_register_int("free_list_inc", 64);
|
||||||
_sender_based_size = mca_param_register_int("sender_based_chunk", 100 * 1024 * 1024);
|
_sender_based_size = mca_param_register_int("sender_based_chunk", 100 * 1024 * 1024);
|
||||||
_event_buffer_size = mca_param_register_int("event_buffer_size", 1024);
|
_event_buffer_size = mca_param_register_int("event_buffer_size", 1024);
|
||||||
_mmap_file_name = "vprotocol_pessimist-senderbased";
|
_mmap_file_name = mca_param_register_string("sender_based_file", "vprotocol_pessimist-senderbased");
|
||||||
V_OUTPUT_VERBOSE(10, "vprotocol_pessimist: open: read priority %d", _priority);
|
V_OUTPUT_VERBOSE(500, "vprotocol_pessimist: open: read priority %d", _priority);
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mca_vprotocol_pessimist_component_close(void)
|
static int mca_vprotocol_pessimist_component_close(void)
|
||||||
{
|
{
|
||||||
V_OUTPUT_VERBOSE(10, "vprotocol_pessimist: close");
|
V_OUTPUT_VERBOSE(500, "vprotocol_pessimist: close");
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** VPROTOCOL level functions (same as PML one)
|
/** VPROTOCOL level functions (same as PML one)
|
||||||
@ -86,47 +87,48 @@ static mca_pml_v_protocol_base_module_t *mca_vprotocol_pessimist_component_init(
|
|||||||
bool enable_progress_threads,
|
bool enable_progress_threads,
|
||||||
bool enable_mpi_threads)
|
bool enable_mpi_threads)
|
||||||
{
|
{
|
||||||
V_OUTPUT_VERBOSE(10, "vprotocol_pessimist: component_init");
|
V_OUTPUT_VERBOSE(500, "vprotocol_pessimist: component_init");
|
||||||
*priority = _priority;
|
*priority = _priority;
|
||||||
|
|
||||||
/* sanity check */
|
/* sanity check */
|
||||||
if(enable_mpi_threads)
|
if(enable_mpi_threads)
|
||||||
{
|
{
|
||||||
opal_output(0, "vprotocol_pessimist: component_init: threads are enabled, and not supported by vprotocol pessimist fault tolerant layer, will not load");
|
opal_output(0, "vprotocol_pessimist: component_init: threads are enabled, and not supported by vprotocol pessimist fault tolerant layer, will not load");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
mca_vprotocol_pessimist.clock = 1;
|
mca_vprotocol_pessimist.clock = 1;
|
||||||
mca_vprotocol_pessimist.replay = false;
|
mca_vprotocol_pessimist.replay = false;
|
||||||
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.replay_events, opal_list_t);
|
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.pending_events, opal_list_t);
|
||||||
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.events_pool, ompi_free_list_t);
|
OBJ_CONSTRUCT(&mca_vprotocol_pessimist.events_pool, ompi_free_list_t);
|
||||||
ompi_free_list_init(&mca_vprotocol_pessimist.events_pool,
|
ompi_free_list_init(&mca_vprotocol_pessimist.events_pool,
|
||||||
sizeof(mca_vprotocol_pessimist_event_t),
|
sizeof(mca_vprotocol_pessimist_event_t),
|
||||||
OBJ_CLASS(mca_vprotocol_pessimist_event_t),
|
OBJ_CLASS(mca_vprotocol_pessimist_event_t),
|
||||||
_free_list_num,
|
_free_list_num,
|
||||||
_free_list_max,
|
_free_list_max,
|
||||||
_free_list_inc,
|
_free_list_inc,
|
||||||
NULL);
|
NULL);
|
||||||
mca_vprotocol_pessimist.event_buffer_max_length =
|
mca_vprotocol_pessimist.event_buffer_max_length =
|
||||||
_event_buffer_size / sizeof(vprotocol_pessimist_mem_event_t);
|
_event_buffer_size / sizeof(vprotocol_pessimist_mem_event_t);
|
||||||
mca_vprotocol_pessimist.event_buffer_length = 0;
|
mca_vprotocol_pessimist.event_buffer_length = 0;
|
||||||
mca_vprotocol_pessimist.event_buffer =
|
mca_vprotocol_pessimist.event_buffer =
|
||||||
(vprotocol_pessimist_mem_event_t *) malloc(_event_buffer_size);
|
(vprotocol_pessimist_mem_event_t *) malloc(_event_buffer_size);
|
||||||
|
|
||||||
if(vprotocol_pessimist_sender_based_init(_mmap_file_name, _sender_based_size) == -1) return NULL;
|
if(vprotocol_pessimist_sender_based_init(_mmap_file_name,
|
||||||
|
_sender_based_size) == -1)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return &mca_vprotocol_pessimist.super;
|
return &mca_vprotocol_pessimist.super;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mca_vprotocol_pessimist_component_finalize(void)
|
static int mca_vprotocol_pessimist_component_finalize(void)
|
||||||
{
|
{
|
||||||
V_OUTPUT_VERBOSE(10, "vprotocol_pessimist_finalize");
|
V_OUTPUT_VERBOSE(500, "vprotocol_pessimist_finalize");
|
||||||
|
free(mca_vprotocol_pessimist.event_buffer);
|
||||||
/** TODO: fix memleak... */
|
vprotocol_pessimist_sender_based_finalize();
|
||||||
|
/** TODO: fix memleak... */
|
||||||
vprotocol_pessimist_sender_based_finalize();
|
return OMPI_SUCCESS;
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -134,9 +136,17 @@ static int mca_vprotocol_pessimist_component_finalize(void)
|
|||||||
static inline int mca_param_register_int( const char* param_name,
|
static inline int mca_param_register_int( const char* param_name,
|
||||||
int default_value )
|
int default_value )
|
||||||
{
|
{
|
||||||
int id = mca_base_param_register_int("vprotocol", "pessimist", param_name, NULL, default_value);
|
int id = mca_base_param_register_int("vprotocol", "pessimist", param_name, NULL, default_value);
|
||||||
int param_value = default_value;
|
int param_value = default_value;
|
||||||
mca_base_param_lookup_int(id, ¶m_value);
|
mca_base_param_lookup_int(id, ¶m_value);
|
||||||
return param_value;
|
return param_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline char *mca_param_register_string( const char* param_name,
|
||||||
|
char *default_value )
|
||||||
|
{
|
||||||
|
int id = mca_base_param_register_string("vprotocol", "pessimist", param_name, NULL, default_value);
|
||||||
|
char *param_value = default_value;
|
||||||
|
mca_base_param_lookup_string(id, ¶m_value);
|
||||||
|
return param_value;
|
||||||
|
}
|
||||||
|
@ -28,7 +28,7 @@ void vprotocol_pessimist_matching_replay(int *src) {
|
|||||||
if(mevent->reqid == mca_vprotocol_pessimist.clock)
|
if(mevent->reqid == mca_vprotocol_pessimist.clock)
|
||||||
{
|
{
|
||||||
/* this is the event to replay */
|
/* this is the event to replay */
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist: replay\tmatch\t%x\trecv is forced from %d", mevent->reqid, mevent->src);
|
V_OUTPUT_VERBOSE(70, "pessimist: replay\tmatch\t%"PRIpclock"\trecv is forced from %d", mevent->reqid, mevent->src);
|
||||||
(*src) = mevent->src;
|
(*src) = mevent->src;
|
||||||
opal_list_remove_item(&mca_vprotocol_pessimist.replay_events,
|
opal_list_remove_item(&mca_vprotocol_pessimist.replay_events,
|
||||||
(opal_list_item_t *) event);
|
(opal_list_item_t *) event);
|
||||||
@ -61,7 +61,7 @@ void vprotocol_pessimist_delivery_replay(size_t n, ompi_request_t **reqs,
|
|||||||
if(devent->probeid < mca_vprotocol_pessimist.clock)
|
if(devent->probeid < mca_vprotocol_pessimist.clock)
|
||||||
{
|
{
|
||||||
/* this particular test have to return no request completed yet */
|
/* this particular test have to return no request completed yet */
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\treplay\tdeliver\t%x\tnone", mca_vprotocol_pessimist.clock);
|
V_OUTPUT_VERBOSE(70, "pessimist:\treplay\tdeliver\t%"PRIpclock"\tnone", mca_vprotocol_pessimist.clock);
|
||||||
*index = MPI_UNDEFINED;
|
*index = MPI_UNDEFINED;
|
||||||
mca_vprotocol_pessimist.clock++;
|
mca_vprotocol_pessimist.clock++;
|
||||||
/* This request have to stay in the queue until probeid matches */
|
/* This request have to stay in the queue until probeid matches */
|
||||||
@ -74,7 +74,7 @@ void vprotocol_pessimist_delivery_replay(size_t n, ompi_request_t **reqs,
|
|||||||
{
|
{
|
||||||
if(VPESSIMIST_REQ(reqs[i])->reqid == devent->reqid)
|
if(VPESSIMIST_REQ(reqs[i])->reqid == devent->reqid)
|
||||||
{
|
{
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\treplay\tdeliver\t%x\t%x", devent->probeid, devent->reqid);
|
V_OUTPUT_VERBOSE(70, "pessimist:\treplay\tdeliver\t%"PRIpclock"\t%"PRIpclock, devent->probeid, devent->reqid);
|
||||||
opal_list_remove_item(&mca_vprotocol_pessimist.replay_events,
|
opal_list_remove_item(&mca_vprotocol_pessimist.replay_events,
|
||||||
(opal_list_item_t *) event);
|
(opal_list_item_t *) event);
|
||||||
VPESSIMIST_EVENT_RETURN(event);
|
VPESSIMIST_EVENT_RETURN(event);
|
||||||
@ -84,7 +84,7 @@ void vprotocol_pessimist_delivery_replay(size_t n, ompi_request_t **reqs,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\treplay\tdeliver\t%x\tnone", mca_vprotocol_pessimist.clock);
|
V_OUTPUT_VERBOSE(70, "pessimist:\treplay\tdeliver\t%"PRIpclock"\tnone", mca_vprotocol_pessimist.clock);
|
||||||
assert(devent->reqid == 0); /* make sure we don't missed a request */
|
assert(devent->reqid == 0); /* make sure we don't missed a request */
|
||||||
*index = MPI_UNDEFINED;
|
*index = MPI_UNDEFINED;
|
||||||
mca_vprotocol_pessimist.clock++;
|
mca_vprotocol_pessimist.clock++;
|
||||||
@ -94,5 +94,5 @@ void vprotocol_pessimist_delivery_replay(size_t n, ompi_request_t **reqs,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
V_OUTPUT_VERBOSE(50, "pessimist:\treplay\tdeliver\t%x\tnot forced", mca_vprotocol_pessimist.clock);
|
V_OUTPUT_VERBOSE(50, "pessimist:\treplay\tdeliver\t%"PRIpclock"\tnot forced", mca_vprotocol_pessimist.clock);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
mca_vprotocol_pessimist_event_t *event; \
|
mca_vprotocol_pessimist_event_t *event; \
|
||||||
vprotocol_pessimist_matching_event_t *mevent; \
|
vprotocol_pessimist_matching_event_t *mevent; \
|
||||||
\
|
\
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tmatch\t%x\tsrc %d\tseq %llu", VPESSIMIST_REQ(REQ)->reqid, (REQ)->req_ompi.req_status.MPI_SOURCE, (long long) (REQ)->req_sequence); \
|
V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tmatch\t%"PRIpclock"\tsrc %d\tseq %"PRIpclock, VPESSIMIST_REQ(REQ)->reqid, (REQ)->req_ompi.req_status.MPI_SOURCE, (REQ)->req_sequence); \
|
||||||
event = VPESSIMIST_RECV_REQ(REQ)->event; \
|
event = VPESSIMIST_RECV_REQ(REQ)->event; \
|
||||||
mevent = &(event->u_event.e_matching); \
|
mevent = &(event->u_event.e_matching); \
|
||||||
mevent->reqid = VPESSIMIST_RECV_REQ(REQ)->reqid; \
|
mevent->reqid = VPESSIMIST_RECV_REQ(REQ)->reqid; \
|
||||||
@ -91,14 +91,14 @@
|
|||||||
assert(event->type == VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING); \
|
assert(event->type == VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING); \
|
||||||
if(event->req->req_ompi.req_status.MPI_SOURCE == -1) \
|
if(event->req->req_ompi.req_status.MPI_SOURCE == -1) \
|
||||||
{ \
|
{ \
|
||||||
V_OUTPUT_VERBOSE(101, "pessimist:\tlog\tel\t%x\tfrom %d\tnot matched yet", event->u_event.e_matching.reqid, event->u_event.e_matching.src); \
|
V_OUTPUT_VERBOSE(101, "pessimist:\tlog\tel\t%"PRIpclock"\tnot matched yet (%d)", event->u_event.e_matching.reqid, event->u_event.e_matching.src); \
|
||||||
continue; \
|
continue; \
|
||||||
} \
|
} \
|
||||||
event->u_event.e_matching.src = \
|
event->u_event.e_matching.src = \
|
||||||
event->req->req_ompi.req_status.MPI_SOURCE; \
|
event->req->req_ompi.req_status.MPI_SOURCE; \
|
||||||
} \
|
} \
|
||||||
/* Send this event to EL */ \
|
/* Send this event to EL */ \
|
||||||
V_OUTPUT_VERBOSE(100, "pessimist:\tlog\tel\t%x\tfrom %d\tsent to EL", event->u_event.e_matching.reqid, event->u_event.e_matching.src); \
|
V_OUTPUT_VERBOSE(100, "pessimist:\tlog\tel\t%"PRIpclock"\tfrom %d\tsent to EL", event->u_event.e_matching.reqid, event->u_event.e_matching.src); \
|
||||||
mca_vprotocol_pessimist.event_buffer[mca_vprotocol_pessimist.event_buffer_length++] = \
|
mca_vprotocol_pessimist.event_buffer[mca_vprotocol_pessimist.event_buffer_length++] = \
|
||||||
event->u_event; \
|
event->u_event; \
|
||||||
if(mca_vprotocol_pessimist.event_buffer_length == \
|
if(mca_vprotocol_pessimist.event_buffer_length == \
|
||||||
@ -140,7 +140,7 @@ void vprotocol_pessimist_matching_replay(int *src);
|
|||||||
\
|
\
|
||||||
if(req == NULL) \
|
if(req == NULL) \
|
||||||
{ \
|
{ \
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tdeliver\t%x\tnone", mca_vprotocol_pessimist.clock); \
|
V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tdeliver\t%"PRIpclock"\tnone", mca_vprotocol_pessimist.clock); \
|
||||||
event = (mca_vprotocol_pessimist_event_t*)opal_list_get_last(&mca_vprotocol_pessimist.pending_events); \
|
event = (mca_vprotocol_pessimist_event_t*)opal_list_get_last(&mca_vprotocol_pessimist.pending_events); \
|
||||||
if(event->type == VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY && \
|
if(event->type == VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY && \
|
||||||
event->u_event.e_delivery.reqid == 0) \
|
event->u_event.e_delivery.reqid == 0) \
|
||||||
@ -160,7 +160,7 @@ void vprotocol_pessimist_matching_replay(int *src);
|
|||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tdeliver\t%x\treq %x", mca_vprotocol_pessimist.clock, VPESSIMIST_REQ(req)->reqid); \
|
V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tdeliver\t%"PRIpclock"\treq %"PRIpclock, mca_vprotocol_pessimist.clock, VPESSIMIST_REQ(req)->reqid); \
|
||||||
VPESSIMIST_DELIVERY_EVENT_NEW(event); \
|
VPESSIMIST_DELIVERY_EVENT_NEW(event); \
|
||||||
devent = &(event->u_event.e_delivery); \
|
devent = &(event->u_event.e_delivery); \
|
||||||
devent->probeid = mca_vprotocol_pessimist.clock++; \
|
devent->probeid = mca_vprotocol_pessimist.clock++; \
|
||||||
|
@ -28,7 +28,7 @@ int mca_vprotocol_pessimist_irecv(void *addr,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
V_OUTPUT_VERBOSE(50, "pessimist:\tirecv\trequest\t%x\tfrom %d\ttag %d\tsize %ld",
|
V_OUTPUT_VERBOSE(50, "pessimist:\tirecv\trequest\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu",
|
||||||
mca_vprotocol_pessimist.clock, src, tag, (long) count);
|
mca_vprotocol_pessimist.clock, src, tag, (long) count);
|
||||||
|
|
||||||
/* first, see if we have to enforce matching order */
|
/* first, see if we have to enforce matching order */
|
||||||
@ -55,7 +55,7 @@ int mca_vprotocol_pessimist_recv(void *addr,
|
|||||||
ompi_request_t *request = MPI_REQUEST_NULL;
|
ompi_request_t *request = MPI_REQUEST_NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
V_OUTPUT_VERBOSE(50, "pessimist:\trecv\tposted\t%x\tfrom %d\ttag %d\tsize %ld",
|
V_OUTPUT_VERBOSE(50, "pessimist:\trecv\tposted\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu",
|
||||||
mca_vprotocol_pessimist.clock, src, tag, (long) count);
|
mca_vprotocol_pessimist.clock, src, tag, (long) count);
|
||||||
/* first, see if we have to enforce matching order */
|
/* first, see if we have to enforce matching order */
|
||||||
VPROTOCOL_PESSIMIST_MATCHING_REPLAY(src);
|
VPROTOCOL_PESSIMIST_MATCHING_REPLAY(src);
|
||||||
|
@ -35,7 +35,7 @@ static void vprotocol_pessimist_request_construct(mca_pml_base_request_t *req)
|
|||||||
int mca_vprotocol_pessimist_request_free(ompi_request_t **req)
|
int mca_vprotocol_pessimist_request_free(ompi_request_t **req)
|
||||||
{
|
{
|
||||||
mca_pml_base_request_t *pml_req = (mca_pml_base_request_t *) *req;
|
mca_pml_base_request_t *pml_req = (mca_pml_base_request_t *) *req;
|
||||||
V_OUTPUT_VERBOSE(50, "pessimist:\treq\tfree\t%x\tpeer %d\ttag %d\tsize %ld", VPESSIMIST_REQ(pml_req)->reqid, pml_req->req_peer, pml_req->req_tag, (long) pml_req->req_count);
|
V_OUTPUT_VERBOSE(50, "pessimist:\treq\tfree\t%"PRIpclock"\tpeer %d\ttag %d\tsize %ld", VPESSIMIST_REQ(pml_req)->reqid, pml_req->req_peer, pml_req->req_tag, (long) pml_req->req_count);
|
||||||
VPROTOCOL_PESSIMIST_MATCHING_LOG_FINALIZE(pml_req);
|
VPROTOCOL_PESSIMIST_MATCHING_LOG_FINALIZE(pml_req);
|
||||||
pml_req->req_ompi.req_status.MPI_SOURCE = -1; /* no matching made flag */
|
pml_req->req_ompi.req_status.MPI_SOURCE = -1; /* no matching made flag */
|
||||||
VPROTOCOL_PESSIMIST_SENDER_BASED_FLUSH(pml_req);
|
VPROTOCOL_PESSIMIST_SENDER_BASED_FLUSH(pml_req);
|
||||||
|
@ -24,8 +24,8 @@ int mca_vprotocol_pessimist_isend(void *buf,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
V_OUTPUT_VERBOSE(50, "pessimist:\tisend\tposted\t%llx\tto %d\ttag %d\tsize %ld",
|
V_OUTPUT_VERBOSE(50, "pessimist:\tisend\tposted\t%"PRIpclock"\tto %d\ttag %d\tsize %lu",
|
||||||
(long long) mca_vprotocol_pessimist.clock, dst, tag, (long) count);
|
mca_vprotocol_pessimist.clock, dst, tag, (long) count);
|
||||||
|
|
||||||
VPROTOCOL_PESSIMIST_EVENT_FLUSH();
|
VPROTOCOL_PESSIMIST_EVENT_FLUSH();
|
||||||
ret = mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode,
|
ret = mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode,
|
||||||
@ -46,8 +46,8 @@ int mca_vprotocol_pessimist_send(void *buf,
|
|||||||
ompi_request_t *request = MPI_REQUEST_NULL;
|
ompi_request_t *request = MPI_REQUEST_NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
V_OUTPUT_VERBOSE(110, "pessimist:\tsend\tposted\t%"PRIx64"\tto %d\ttag %d\tsize %z",
|
V_OUTPUT_VERBOSE(50, "pessimist:\tsend\tposted\t%"PRIpclock"\tto %d\ttag %d\tsize %lu",
|
||||||
mca_vprotocol_pessimist.clock, dst, tag, count);
|
mca_vprotocol_pessimist.clock, dst, tag, (long) count);
|
||||||
|
|
||||||
VPROTOCOL_PESSIMIST_EVENT_FLUSH();
|
VPROTOCOL_PESSIMIST_EVENT_FLUSH();
|
||||||
mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode,
|
mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode,
|
||||||
|
@ -105,7 +105,7 @@ void vprotocol_pessimist_sender_based_alloc(size_t len)
|
|||||||
}
|
}
|
||||||
sb.sb_cursor += (intptr_t) sb.sb_addr; /* absolute addr of sender_based buffer */
|
sb.sb_cursor += (intptr_t) sb.sb_addr; /* absolute addr of sender_based buffer */
|
||||||
sb.sb_vacant = sb.sb_length - sizeof(vprotocol_pessimist_sender_based_header_t);
|
sb.sb_vacant = sb.sb_length - sizeof(vprotocol_pessimist_sender_based_header_t);
|
||||||
V_OUTPUT_VERBOSE(1, "pessimist:\tsb\tgrow\toffset %lld\tlength %lld\tbase %p\tcursor %p", (long long) sb.sb_offset, (long long) sb.sb_length, sb.sb_addr, sb.sb_cursor);
|
V_OUTPUT_VERBOSE(30, "pessimist:\tsb\tgrow\toffset %llu\tlength %llu\tbase %p\tcursor %p", (long long) sb.sb_offset, (long long) sb.sb_length, sb.sb_addr, sb.sb_cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef sb
|
#undef sb
|
||||||
|
@ -98,7 +98,7 @@ void vprotocol_pessimist_sender_based_alloc(size_t len);
|
|||||||
mca_vprotocol_pessimist.sender_based.sb_cursor += sbhdr->size; \
|
mca_vprotocol_pessimist.sender_based.sb_cursor += sbhdr->size; \
|
||||||
mca_vprotocol_pessimist.sender_based.sb_vacant -= (sbhdr->size + \
|
mca_vprotocol_pessimist.sender_based.sb_vacant -= (sbhdr->size + \
|
||||||
sizeof(vprotocol_pessimist_sender_based_header_t)); \
|
sizeof(vprotocol_pessimist_sender_based_header_t)); \
|
||||||
V_OUTPUT_VERBOSE(70, "pessimist:\tsb\twrite\t%"PRIpclock"\tsize %ld", VPESSIMIST_REQ(&req->req_base)->reqid, sbhdr->size); \
|
V_OUTPUT_VERBOSE(70, "pessimist:\tsb\twrite\t%"PRIpclock"\tsize %lu", VPESSIMIST_REQ(&req->req_base)->reqid, sbhdr->size); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/** Copy data associated to a pml_base_send_request_t to the sender based
|
/** Copy data associated to a pml_base_send_request_t to the sender based
|
||||||
|
@ -14,36 +14,32 @@
|
|||||||
OMPI_DECLSPEC int mca_vprotocol_pessimist_start(size_t count, ompi_request_t **requests)
|
OMPI_DECLSPEC int mca_vprotocol_pessimist_start(size_t count, ompi_request_t **requests)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
#if 0
|
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
|
||||||
for(i = 0; i < count; i++)
|
for(i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
mca_pml_base_request_t *pml_request = (mca_pml_base_request_t *) requests[i];
|
mca_pml_base_request_t *pml_request = (mca_pml_base_request_t *) requests[i];
|
||||||
if(NULL == pml_request) continue;
|
if(NULL == pml_request) continue;
|
||||||
|
|
||||||
switch(pml_request->req_type)
|
switch(pml_request->req_type)
|
||||||
{
|
{
|
||||||
case MCA_PML_REQUEST_RECV :
|
case MCA_PML_REQUEST_RECV :
|
||||||
V_OUTPUT_VERBOSE(90, "pessimist:\tstart\trecv\t%d:%llx\tfrom %d\ttag %d\tsize %d", pml_request->req_comm->c_contextid, mca_vprotocol_pessimist.rclock[pml_request->req_comm->c_contextid], pml_request->req_peer, pml_request->req_tag, pml_request->req_count);
|
V_OUTPUT_VERBOSE(50, "pessimist:\tstart\trecv\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu", mca_vprotocol_pessimist.clock, pml_request->req_peer, pml_request->req_tag, (long) pml_request->req_count);
|
||||||
/* It's a persistent recv request, first, see if we have to enforce matching order */
|
/* It's a persistent recv request, first, see if we have to enforce matching order */
|
||||||
VPROTOCOL_PESSIMIST_MATCHING_REPLAY(pml_request->req_peer, pml_request->req_comm);
|
VPROTOCOL_PESSIMIST_MATCHING_REPLAY(pml_request->req_peer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCA_PML_REQUEST_SEND :
|
case MCA_PML_REQUEST_SEND :
|
||||||
V_OUTPUT_VERBOSE(90, "pessimist:\tstart\tsend\t%d:%llx\tto %d\ttag %d\tsize %d", pml_request->req_comm->c_contextid, mca_vprotocol_pessimist.rclock[pml_request->req_comm->c_contextid], pml_request->req_peer, pml_request->req_tag, pml_request->req_count);
|
V_OUTPUT_VERBOSE(50, "pessimist:\tstart\tsend\t%"PRIpclock"\tto %d\ttag %d\tsize %lu", mca_vprotocol_pessimist.clock, pml_request->req_peer, pml_request->req_tag, (long) pml_request->req_count);
|
||||||
/* It's a persistent send request, first, check if we are waiting ack
|
/* It's a persistent send request, first, check if we are waiting ack
|
||||||
* for some older events */
|
* for some older events */
|
||||||
VPROTOCOL_PESSIMIST_POSTPONE(&request[i]);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
V_OUTPUT_VERBOSE(90, "pessimist:\tstart\trequest\t%d:%ld\tfrom/to %d\ttag %d\tsize %d", pml_request->req_comm->c_contextid, mca_vprotocol_pessimist.rclock[pml_request->req_comm->c_contextid], pml_request->req_peer, pml_request->req_tag, pml_request->req_count);
|
V_OUTPUT_VERBOSE(50, "pessimist:\tstart\twrong %d\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu", pml_request->req_type, mca_vprotocol_pessimist.clock, pml_request->req_peer, pml_request->req_tag, (long) pml_request->req_count);
|
||||||
return OMPI_ERR_REQUEST;
|
return OMPI_ERR_REQUEST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
ret = mca_pml_v.host_pml.pml_start(count, requests);
|
ret = mca_pml_v.host_pml.pml_start(count, requests);
|
||||||
|
|
||||||
/* restore requests status */
|
/* restore requests status */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user