1
1

Fix the routed components. All had errors, some completely broken. You cannot test

0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)

when epoch is not configured as this will always return true. This caused get_route to return an error in all non-binomial routed modules, and caused all components to return an error when delete_route was called.

So protect the checks with ORTE_ENABLE_EPOCH so we get the correct behavior.

This commit was SVN r25274.
Этот коммит содержится в:
Ralph Castain 2011-10-12 20:18:57 +00:00
родитель d8b5b544ad
Коммит 634f83fc52
6 изменённых файлов: 111 добавлений и 15 удалений

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

@ -147,12 +147,17 @@ static int delete_route(orte_process_name_t *proc)
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(proc->epoch,ORTE_EPOCH_INVALID)) {
#else
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
/* if I am an application process, I don't have any routes
* so there is nothing for me to do
*/
@ -216,9 +221,14 @@ static int update_route(orte_process_name_t *target,
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
@ -322,7 +332,7 @@ static orte_process_name_t get_route(orte_process_name_t *target)
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
target->epoch == ORTE_EPOCH_INVALID) {
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {

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

@ -138,12 +138,17 @@ static int delete_route(orte_process_name_t *proc)
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(proc->epoch,ORTE_EPOCH_INVALID)) {
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
/* if I am anything other than the HNP, I don't have any routes
* so there is nothing for me to do
*/
@ -199,9 +204,14 @@ static int update_route(orte_process_name_t *target,
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
@ -296,13 +306,23 @@ static orte_process_name_t get_route(orte_process_name_t *target)
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
0 == ORTE_EPOCH_CMP(proc->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
ret = ORTE_NAME_INVALID;
goto found;
}
if (0 > ORTE_EPOCH_CMP(target->epoch, orte_ess.proc_get_epoch(target))) {
ret = ORTE_NAME_INVALID;
goto found;
}
/* if it is me, then the route is just direct */
if (OPAL_EQUAL == opal_dss.compare(ORTE_PROC_MY_NAME, target, ORTE_NAME)) {
ret = target;

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

@ -134,15 +134,27 @@ static orte_process_name_t get_route(orte_process_name_t *target)
{
orte_process_name_t *ret;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
ret = ORTE_NAME_INVALID;
} else {
/* all routes are direct */
ret = target;
goto found;
}
if (0 > ORTE_EPOCH_CMP(target->epoch, orte_ess.proc_get_epoch(target))) {
ret = ORTE_NAME_INVALID;
goto found;
}
/* all routes go direct */
ret = target;
found:
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_output,
"%s routed_direct_get(%s) --> %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),

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

@ -131,12 +131,17 @@ static int delete_route(orte_process_name_t *proc)
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(proc->epoch,ORTE_EPOCH_INVALID)) {
#else
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
/* if I am an application process, I don't have any routes
* so there is nothing for me to do
*/
@ -200,9 +205,14 @@ static int update_route(orte_process_name_t *target,
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
@ -294,6 +304,23 @@ static orte_process_name_t get_route(orte_process_name_t *target)
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
ret = ORTE_NAME_INVALID;
goto found;
}
if (0 > ORTE_EPOCH_CMP(target->epoch, orte_ess.proc_get_epoch(target))) {
ret = ORTE_NAME_INVALID;
goto found;
}
/* if it is me, then the route is just direct */
if (OPAL_EQUAL == opal_dss.compare(ORTE_PROC_MY_NAME, target, ORTE_NAME)) {
ret = target;

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

@ -144,12 +144,17 @@ static int delete_route(orte_process_name_t *proc)
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(proc->epoch,ORTE_EPOCH_INVALID)) {
#else
if (proc->jobid == ORTE_JOBID_INVALID ||
proc->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
/* if I am an application process, I don't have any routes
* so there is nothing for me to do
*/
@ -213,9 +218,14 @@ static int update_route(orte_process_name_t *target,
orte_routed_jobfam_t *jfam;
uint16_t jfamily;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
return ORTE_ERR_BAD_PARAM;
}
@ -314,9 +324,14 @@ static orte_process_name_t get_route(orte_process_name_t *target)
daemon.vpid = ORTE_PROC_MY_DAEMON->vpid;
ORTE_EPOCH_SET(daemon.epoch,ORTE_PROC_MY_DAEMON->epoch);
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID) ) {
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
ret = ORTE_NAME_INVALID;
goto found;
}

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

@ -133,15 +133,27 @@ static orte_process_name_t get_route(orte_process_name_t *target)
{
orte_process_name_t *ret;
#if ORTE_ENABLE_EPOCH
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID ||
0 == ORTE_EPOCH_CMP(target->epoch,ORTE_EPOCH_INVALID)) {
#else
if (target->jobid == ORTE_JOBID_INVALID ||
target->vpid == ORTE_VPID_INVALID) {
#endif
ret = ORTE_NAME_INVALID;
} else {
/* a slave must always route via its parent daemon */
ret = ORTE_PROC_MY_DAEMON;
goto found;
}
if (0 > ORTE_EPOCH_CMP(target->epoch, orte_ess.proc_get_epoch(target))) {
ret = ORTE_NAME_INVALID;
goto found;
}
/* a slave must always route via its parent daemon */
ret = ORTE_PROC_MY_DAEMON;
found:
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_output,
"%s routed_slave_get(%s) --> %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),