1
1

fix buffer management for nb-barrier.

This commit was SVN r18081.
Этот коммит содержится в:
Rich Graham 2008-04-05 21:59:04 +00:00
родитель 5e6dc24e62
Коммит 1b54e8b76e
3 изменённых файлов: 7 добавлений и 3 удалений

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

@ -28,6 +28,7 @@ sources = \
coll_sm2_barrier.c \
coll_sm2_service.c
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).

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

@ -21,8 +21,6 @@
extern uint64_t timers[7];
end debug */
/**
* Shared memory blocking allreduce.
*/

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

@ -468,7 +468,6 @@ static int init_sm2_barrier(struct ompi_communicator_t *comm,
module->sm2_size_management_region_per_proc*
module->sm_buffer_mgmt_barrier_tree.tree_size;
/* set the pointer to the request that needs to be completed first */
module->current_request_index=0;
@ -967,6 +966,7 @@ sm_work_buffer_t *alloc_sm2_shared_buffer(mca_coll_sm2_module_t *module)
/* set request to inactive */
module->barrier_request[module->current_request_index].
sm2_barrier_phase=NB_BARRIER_INACTIVE;
module->barrier_request[module->current_request_index].sm_index^=1;
/* move pointer to next request that needs to be completed */
module->current_request_index++;
/* wrap around */
@ -1018,6 +1018,9 @@ sm_work_buffer_t *alloc_sm2_shared_buffer(mca_coll_sm2_module_t *module)
/* set request to inactive */
request->sm2_barrier_phase=NB_BARRIER_INACTIVE;
/* set barrier struct to be used next time */
request->sm_index^=1;
/* move pointer to next request that needs to be completed */
module->current_request_index++;
@ -1072,6 +1075,7 @@ int free_sm2_shared_buffer(mca_coll_sm2_module_t *module)
/* set request to inactive */
module->barrier_request[module->current_request_index].
sm2_barrier_phase=NB_BARRIER_INACTIVE;
module->barrier_request[module->current_request_index].sm_index^=1;
/* move pointer to next request that needs to be completed */
module->current_request_index++;
/* wrap around */
@ -1112,6 +1116,7 @@ int free_sm2_shared_buffer(mca_coll_sm2_module_t *module)
if( NB_BARRIER_DONE == request->sm2_barrier_phase ) {
/* set request to inactive */
request->sm2_barrier_phase=NB_BARRIER_INACTIVE;
request->sm_index^=1;
/* move pointer to next request that needs to be completed */
module->current_request_index++;
/* wrap around */