Fix a problem that affected attributes - we were missing the vm_register function call.
This commit was SVN r3692.
Этот коммит содержится в:
родитель
a4c8e4f15c
Коммит
5e560cb148
@ -67,7 +67,7 @@ int ompi_attr_create_predefined(void)
|
||||
|
||||
rc = ompi_registry.subscribe(
|
||||
OMPI_REGISTRY_OR,
|
||||
OMPI_REGISTRY_NOTIFY_ON_STARTUP|OMPI_REGISTRY_NOTIFY_INCLUDE_STARTUP_DATA,
|
||||
OMPI_REGISTRY_NOTIFY_ON_STARTUP|OMPI_REGISTRY_NOTIFY_INCLUDE_STARTUP_DATA,
|
||||
OMPI_RTE_VM_STATUS_SEGMENT,
|
||||
NULL,
|
||||
ompi_attr_create_predefined_callback,
|
||||
@ -84,12 +84,10 @@ void ompi_attr_create_predefined_callback(
|
||||
ompi_registry_notify_message_t *msg,
|
||||
void *cbdata)
|
||||
{
|
||||
int num, err;
|
||||
int err;
|
||||
ompi_list_item_t *item;
|
||||
ompi_registry_value_t *reg_value;
|
||||
ompi_buffer_t buffer;
|
||||
char *bogus;
|
||||
ompi_process_name_t name;
|
||||
ompi_rte_vm_status_t *vm_stat;
|
||||
|
||||
/* Set some default values */
|
||||
|
||||
@ -124,26 +122,13 @@ void ompi_attr_create_predefined_callback(
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&msg->data)) {
|
||||
reg_value = (ompi_registry_value_t *) item;
|
||||
buffer = (ompi_buffer_t) reg_value->object;
|
||||
|
||||
/* Node name */
|
||||
ompi_unpack_string(buffer, &bogus);
|
||||
free(bogus);
|
||||
|
||||
/* Process name */
|
||||
ompi_unpack(buffer, &name, 1, OMPI_NAME);
|
||||
free(&name);
|
||||
|
||||
/* OOB contact info */
|
||||
ompi_unpack_string(buffer, &bogus);
|
||||
free(bogus);
|
||||
vm_stat = ompi_rte_unpack_vm_status(reg_value);
|
||||
|
||||
/* Process slot count */
|
||||
ompi_unpack(buffer, &num, 1, OMPI_INT32);
|
||||
attr_universe_size += num;
|
||||
attr_universe_size += vm_stat->num_cpus;
|
||||
|
||||
/* Discard the rest */
|
||||
ompi_buffer_free(buffer);
|
||||
free(vm_stat);
|
||||
OBJ_RELEASE(item);
|
||||
}
|
||||
}
|
||||
|
@ -114,6 +114,13 @@ OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_reserve_range(mca_ns_base_jobid_
|
||||
|
||||
OMPI_DECLSPEC int mca_ns_base_free_name(ompi_process_name_t* name);
|
||||
|
||||
OMPI_DECLSPEC mca_ns_base_cellid_t mca_ns_base_create_cellid_not_available(void);
|
||||
|
||||
OMPI_DECLSPEC mca_ns_base_jobid_t mca_ns_base_create_jobid_not_available(void);
|
||||
|
||||
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_get_vpid_range_not_available(mca_ns_base_jobid_t job,
|
||||
mca_ns_base_vpid_t range);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -35,6 +35,30 @@
|
||||
* globals
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* "not available" functions
|
||||
*/
|
||||
mca_ns_base_cellid_t
|
||||
mca_ns_base_create_cellid_not_available(void)
|
||||
{
|
||||
return MCA_NS_BASE_CELLID_MAX;
|
||||
}
|
||||
|
||||
mca_ns_base_jobid_t
|
||||
mca_ns_base_create_jobid_not_available(void)
|
||||
{
|
||||
return MCA_NS_BASE_JOBID_MAX;
|
||||
}
|
||||
|
||||
mca_ns_base_vpid_t
|
||||
mca_ns_base_get_vpid_range_not_available(mca_ns_base_jobid_t job,
|
||||
mca_ns_base_vpid_t range)
|
||||
{
|
||||
return MCA_NS_BASE_VPID_MAX;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* functions
|
||||
*/
|
||||
|
@ -40,7 +40,36 @@
|
||||
* Global variables
|
||||
*/
|
||||
int mca_ns_base_output = -1;
|
||||
mca_ns_base_module_t ompi_name_server;
|
||||
mca_ns_base_module_t ompi_name_server = {
|
||||
mca_ns_base_create_cellid_not_available,
|
||||
mca_ns_base_assign_cellid_to_process,
|
||||
mca_ns_base_create_jobid_not_available,
|
||||
mca_ns_base_create_process_name,
|
||||
mca_ns_base_copy_process_name,
|
||||
mca_ns_base_convert_string_to_process_name,
|
||||
mca_ns_base_get_vpid_range_not_available,
|
||||
mca_ns_base_free_name,
|
||||
mca_ns_base_get_proc_name_string,
|
||||
mca_ns_base_get_vpid_string,
|
||||
mca_ns_base_convert_vpid_to_string,
|
||||
mca_ns_base_convert_string_to_vpid,
|
||||
mca_ns_base_get_jobid_string,
|
||||
mca_ns_base_convert_jobid_to_string,
|
||||
mca_ns_base_convert_string_to_jobid,
|
||||
mca_ns_base_get_cellid_string,
|
||||
mca_ns_base_convert_cellid_to_string,
|
||||
mca_ns_base_convert_string_to_cellid,
|
||||
mca_ns_base_get_vpid,
|
||||
mca_ns_base_get_jobid,
|
||||
mca_ns_base_get_cellid,
|
||||
mca_ns_base_compare,
|
||||
mca_ns_base_pack_name,
|
||||
mca_ns_base_unpack_name,
|
||||
mca_ns_base_pack_cellid,
|
||||
mca_ns_base_unpack_cellid,
|
||||
mca_ns_base_pack_jobid,
|
||||
mca_ns_base_unpack_jobid
|
||||
};
|
||||
bool mca_ns_base_selected = false;
|
||||
ompi_list_t mca_ns_base_components_available;
|
||||
mca_ns_base_component_t mca_ns_base_selected_component;
|
||||
|
@ -281,6 +281,11 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the virtual machine status for this node
|
||||
*/
|
||||
ompi_rte_vm_register();
|
||||
|
||||
/* execute the compound command - no return data requested
|
||||
* we'll get it all from the startup message
|
||||
*/
|
||||
|
@ -133,7 +133,7 @@ ompi_rte_vm_status_t
|
||||
return stat_ptr;
|
||||
}
|
||||
|
||||
int ompi_vm_register(void)
|
||||
int ompi_rte_vm_register(void)
|
||||
{
|
||||
ompi_rte_vm_status_t status;
|
||||
|
||||
|
@ -490,9 +490,9 @@ OMPI_DECLSPEC void ompi_rte_parse_environ(void);
|
||||
|
||||
|
||||
/**
|
||||
* Register a daemon on the virtual machine segment.
|
||||
* Register on the virtual machine segment.
|
||||
*/
|
||||
OMPI_DECLSPEC int ompi_vm_register(void);
|
||||
OMPI_DECLSPEC int ompi_rte_vm_register(void);
|
||||
|
||||
/**
|
||||
* Startup a job - notify processes that all ready to begin
|
||||
|
@ -236,7 +236,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
/* register this node on the virtual machine */
|
||||
ompi_vm_register();
|
||||
ompi_rte_vm_register();
|
||||
|
||||
if (ompi_daemon_debug) {
|
||||
ompi_output(0, "[%d,%d,%d] ompid: issuing callback", ompi_rte_get_self()->cellid,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user