Rollback the 8682 commit until we figure out the correct way to do it. It break several things
inside (like MPI_Wait* functions). This commit was SVN r8686.
Этот коммит содержится в:
родитель
92aaaad611
Коммит
bf266c6109
@ -126,23 +126,22 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen
|
||||
*/
|
||||
|
||||
|
||||
#define OMPI_FREE_LIST_WAIT(fl, item, rc) \
|
||||
{ \
|
||||
OPAL_THREAD_LOCK(&((fl)->fl_lock)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
while(NULL == item) { \
|
||||
if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \
|
||||
(fl)->fl_num_waiting++; \
|
||||
while ((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) \
|
||||
opal_condition_wait(&((fl)->fl_condition), &((fl)->fl_lock)); \
|
||||
(fl)->fl_num_waiting--; \
|
||||
} else { \
|
||||
ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
} \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
OPAL_THREAD_UNLOCK(&((fl)->fl_lock)); \
|
||||
rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \
|
||||
#define OMPI_FREE_LIST_WAIT(fl, item, rc) \
|
||||
{ \
|
||||
OPAL_THREAD_LOCK(&((fl)->fl_lock)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
while(NULL == item) { \
|
||||
if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \
|
||||
(fl)->fl_num_waiting++; \
|
||||
opal_condition_wait(&((fl)->fl_condition), &((fl)->fl_lock)); \
|
||||
(fl)->fl_num_waiting--; \
|
||||
} else { \
|
||||
ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
} \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
OPAL_THREAD_UNLOCK(&((fl)->fl_lock)); \
|
||||
rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,10 +66,7 @@ int ompi_request_wait_any(
|
||||
/* give up and sleep until completion */
|
||||
OPAL_THREAD_LOCK(&ompi_request_lock);
|
||||
ompi_request_waiting++;
|
||||
/*
|
||||
* We will break out of while{} as soon as all requests have completed.
|
||||
*/
|
||||
while (1) {
|
||||
do {
|
||||
rptr = requests;
|
||||
num_requests_null_inactive = 0;
|
||||
for (i = 0; i < count; i++, rptr++) {
|
||||
@ -90,10 +87,10 @@ int ompi_request_wait_any(
|
||||
}
|
||||
if(num_requests_null_inactive == count)
|
||||
break;
|
||||
while (completed < 0) {
|
||||
if (completed < 0) {
|
||||
opal_condition_wait(&ompi_request_cond, &ompi_request_lock);
|
||||
}
|
||||
}
|
||||
} while (completed < 0);
|
||||
ompi_request_waiting--;
|
||||
OPAL_THREAD_UNLOCK(&ompi_request_lock);
|
||||
|
||||
|
@ -122,23 +122,22 @@ OMPI_DECLSPEC int opal_free_list_grow(opal_free_list_t* flist, size_t num_elemen
|
||||
*/
|
||||
|
||||
|
||||
#define OPAL_FREE_LIST_WAIT(fl, item, rc) \
|
||||
{ \
|
||||
OPAL_THREAD_LOCK(&((fl)->fl_lock)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
while(NULL == item) { \
|
||||
if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \
|
||||
(fl)->fl_num_waiting++; \
|
||||
while ((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) \
|
||||
opal_condition_wait(&((fl)->fl_condition), &((fl)->fl_lock)); \
|
||||
(fl)->fl_num_waiting--; \
|
||||
} else { \
|
||||
opal_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
} \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
OPAL_THREAD_UNLOCK(&((fl)->fl_lock)); \
|
||||
rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \
|
||||
#define OPAL_FREE_LIST_WAIT(fl, item, rc) \
|
||||
{ \
|
||||
OPAL_THREAD_LOCK(&((fl)->fl_lock)); \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
while(NULL == item) { \
|
||||
if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \
|
||||
(fl)->fl_num_waiting++; \
|
||||
opal_condition_wait(&((fl)->fl_condition), &((fl)->fl_lock)); \
|
||||
(fl)->fl_num_waiting--; \
|
||||
} else { \
|
||||
opal_free_list_grow((fl), (fl)->fl_num_per_alloc); \
|
||||
} \
|
||||
item = opal_list_remove_first(&((fl)->super)); \
|
||||
} \
|
||||
OPAL_THREAD_UNLOCK(&((fl)->fl_lock)); \
|
||||
rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,12 +51,9 @@ int orte_gpr_proxy_begin_compound_cmd(void)
|
||||
OPAL_THREAD_LOCK(&orte_gpr_proxy_globals.wait_for_compound_mutex);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
orte_gpr_proxy_globals.compound_cmd_waiting++;
|
||||
while (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
opal_condition_wait(&orte_gpr_proxy_globals.compound_cmd_condition,
|
||||
&orte_gpr_proxy_globals.wait_for_compound_mutex);
|
||||
}
|
||||
orte_gpr_proxy_globals.compound_cmd_waiting--;
|
||||
orte_gpr_proxy_globals.compound_cmd_waiting++;
|
||||
opal_condition_wait(&orte_gpr_proxy_globals.compound_cmd_condition, &orte_gpr_proxy_globals.wait_for_compound_mutex);
|
||||
orte_gpr_proxy_globals.compound_cmd_waiting--;
|
||||
}
|
||||
|
||||
orte_gpr_proxy_globals.compound_cmd_mode = true;
|
||||
|
@ -105,10 +105,7 @@ int orte_iof_base_flush(void)
|
||||
}
|
||||
if(pending != 0) {
|
||||
if(opal_event_progress_thread() == false) {
|
||||
while (opal_event_progress_thread() == false) {
|
||||
opal_condition_wait(&orte_iof_base.iof_condition,
|
||||
&orte_iof_base.iof_lock);
|
||||
}
|
||||
opal_condition_wait(&orte_iof_base.iof_condition, &orte_iof_base.iof_lock);
|
||||
} else {
|
||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||
opal_event_loop(OPAL_EVLOOP_ONCE);
|
||||
|
@ -889,10 +889,9 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
||||
rsh_daemon_info_t *daemon_info;
|
||||
|
||||
OPAL_THREAD_LOCK(&mca_pls_rsh_component.lock);
|
||||
while (mca_pls_rsh_component.num_children++ >=
|
||||
if (mca_pls_rsh_component.num_children++ >=
|
||||
mca_pls_rsh_component.num_concurrent) {
|
||||
opal_condition_wait(&mca_pls_rsh_component.cond,
|
||||
&mca_pls_rsh_component.lock);
|
||||
opal_condition_wait(&mca_pls_rsh_component.cond, &mca_pls_rsh_component.lock);
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&mca_pls_rsh_component.lock);
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user