1
1

Filter the set of data returned to the daemons during

startup using the new get_conditional command to improve
scalability during launch

This commit was SVN r8097.
Этот коммит содержится в:
Tim Woodall 2005-11-10 16:44:51 +00:00
родитель bacfb4fa2b
Коммит 7f20198d49
2 изменённых файлов: 30 добавлений и 1 удалений

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

@ -389,7 +389,14 @@ int orte_gpr_replica_recv_get_conditional_cmd(orte_buffer_t *input_buffer,
}
/* get conditions */
if (ORTE_SUCCESS != (ret = orte_dps.unpack(input_buffer, &conditions, &num_conditions, ORTE_KEYVAL))) {
if(NULL == (conditions = malloc(sizeof(orte_gpr_keyval_t*)*num_conditions))) {
ret = ORTE_ERR_OUT_OF_RESOURCE;
ORTE_ERROR_LOG(ret);
goto RETURN_ERROR;
}
memset(conditions, 0, sizeof(orte_gpr_keyval_t*)*num_conditions);
if (ORTE_SUCCESS != (ret = orte_dps.unpack(input_buffer, conditions, &num_conditions, ORTE_KEYVAL))) {
ORTE_ERROR_LOG(ret);
goto RETURN_ERROR;
}

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

@ -470,6 +470,8 @@ int orte_rmaps_base_get_node_map(
orte_app_context_t** app_context = NULL;
orte_rmaps_base_map_t** mapping = NULL;
orte_ras_node_t *ras_node = NULL;
orte_gpr_keyval_t keyval;
orte_gpr_keyval_t *condition;
size_t i, num_context = 0;
char* segment = NULL;
char* jobid_str = NULL;
@ -525,6 +527,26 @@ int orte_rmaps_base_get_node_map(
}
asprintf(&segment, "%s-%s", ORTE_JOB_SEGMENT, jobid_str);
/* setup condition/filter for query - return only processes that
* are assigned to the specified node name
*/
keyval.key = ORTE_NODE_NAME_KEY;
keyval.type = ORTE_STRING;
keyval.value.strptr = strdup(hostname);
condition = &keyval;
/* query the process list from the registry */
rc = orte_gpr.get_conditional(
ORTE_GPR_KEYS_OR|ORTE_GPR_TOKENS_OR,
segment,
NULL,
keys,
1,
&condition,
&num_values,
&values);
/* query the process list from the registry */
rc = orte_gpr.get(
ORTE_GPR_KEYS_OR|ORTE_GPR_TOKENS_OR,