1
1

* Make the spawn constants slightly more clear in meaning

* fix typo in error message for spawning processes
* Remove the name field from the global ompi_process_info struct, replacing
  usage with calls to ompi_rte_get_self().  Cleaned up the resulting logic
  in ompi_rte_init() to make it slightly simpler when dealing with the
  singleton case.  Reduces data duplication and I believe fixes bug
  #1009 as a nice side effect.

This commit was SVN r3230.
Этот коммит содержится в:
Brian Barrett 2004-10-20 02:24:40 +00:00
родитель d324a7725c
Коммит cc44f2abc2
17 изменённых файлов: 118 добавлений и 123 удалений

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

@ -14,7 +14,7 @@
#include "mca/ns/base/base.h"
#include "mca/gpr/gpr.h"
#include "mca/gpr/base/base.h"
#include "runtime/runtime.h"
/*
* Private functions
@ -63,7 +63,7 @@ int ompi_attr_create_predefined(void)
/* Set some default values */
attr_appnum = (int) ompi_name_server.get_jobid(ompi_process_info.name);
attr_appnum = (int) ompi_name_server.get_jobid(ompi_rte_get_self());
/* Query the registry to find out how many CPUs there will be.
This will only return a non-empty list in a persistent

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

@ -17,6 +17,7 @@
#include "mca/ns/ns.h"
#include "mca/ns/base/base.h"
#include "mca/base/mca_base_module_exchange.h"
#include "runtime/runtime.h"
/**
*
@ -354,12 +355,12 @@ int mca_base_modex_send(
source_component->mca_component_major_version,
source_component->mca_component_minor_version);
keys[0] = ompi_name_server.get_proc_name_string(ompi_process_info.name);
keys[0] = ompi_name_server.get_proc_name_string(ompi_rte_get_self());
keys[1] = component_name_version;
keys[2] = NULL;
ompi_buffer_init(&buffer, size+256);
ompi_pack(buffer, ompi_process_info.name, 1, OMPI_NAME);
ompi_pack(buffer, ompi_rte_get_self(), 1, OMPI_NAME);
ompi_pack_string(buffer, component_name_version);
ompi_pack(buffer, &size, 1, OMPI_INT32);
ompi_pack(buffer, (void*)data, size, OMPI_BYTE);
@ -439,7 +440,7 @@ int mca_base_modex_recv(
int mca_base_modex_exchange(void)
{
return mca_base_modex_subscribe(ompi_process_info.name);
return mca_base_modex_subscribe(ompi_rte_get_self());
}

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

@ -18,6 +18,7 @@
#include "mca/mca.h"
#include "mca/gpr/base/base.h"
#include "gpr_proxy.h"
#include "runtime/runtime.h"
/**
* globals
@ -143,8 +144,8 @@ int gpr_proxy_put(ompi_registry_mode_t mode, char *segment,
}
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_put: initiating send", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr_proxy_put: initiating send", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
if (NULL == mca_gpr_my_replica) {
ompi_output(0, "\tBAD REPLICA");
}
@ -158,8 +159,8 @@ int gpr_proxy_put(ompi_registry_mode_t mode, char *segment,
}
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_put: send complete", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr_proxy_put: send complete", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
if (0 > mca_oob_recv_packed(mca_gpr_my_replica, &answer, &recv_tag)) {
@ -195,7 +196,7 @@ int gpr_proxy_delete_object(ompi_registry_mode_t mode,
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
/* need to protect against errors */
@ -244,7 +245,7 @@ int gpr_proxy_delete_object(ompi_registry_mode_t mode,
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object: calling mca_oob_send_packed",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
if (0 > mca_oob_send_packed(mca_gpr_my_replica, cmd, MCA_OOB_TAG_GPR, 0)) {
@ -253,7 +254,7 @@ int gpr_proxy_delete_object(ompi_registry_mode_t mode,
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object: calling mca_oob_recv_packed",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
if (0 > mca_oob_recv_packed(mca_gpr_my_replica, &answer, &recv_tag)) {
@ -262,7 +263,7 @@ int gpr_proxy_delete_object(ompi_registry_mode_t mode,
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object: mca_oob_recv_packed returned",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
@ -276,13 +277,13 @@ int gpr_proxy_delete_object(ompi_registry_mode_t mode,
ompi_buffer_free(answer);
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object: unable to unpack response",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
return OMPI_ERROR;
} else {
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object: returning with status %d",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid, response);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid, response);
}
ompi_buffer_free(answer);
return (int)response;
@ -291,7 +292,7 @@ int gpr_proxy_delete_object(ompi_registry_mode_t mode,
CLEANUP:
if (mca_gpr_proxy_debug) {
ompi_output(0, "[%d,%d,%d] gpr_proxy_delete_object: cleanup\n",
ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
ompi_buffer_free(cmd);
return OMPI_ERROR;

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

@ -30,6 +30,7 @@
#include "mca/gpr/base/base.h"
#include "gpr_replica.h"
#include "gpr_replica_internals.h"
#include "runtime/runtime.h"
int gpr_replica_delete_segment(char *segment)
@ -48,8 +49,8 @@ int gpr_replica_delete_segment_nl(char *segment)
mca_gpr_replica_segment_t *seg;
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: delete_segment entered", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica: delete_segment entered", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
seg = gpr_replica_find_seg(true, segment);
@ -96,16 +97,16 @@ int gpr_replica_put_nl(ompi_registry_mode_t addr_mode, char *segment,
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: put entered on segment %s 1st token %s",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid, segment, *tokens);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid, segment, *tokens);
}
/* protect ourselves against errors */
if (NULL == segment || NULL == object || 0 == size || NULL == tokens || NULL == *tokens) {
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: error in input - put rejected",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid);
}
return OMPI_ERROR;
}
@ -218,8 +219,8 @@ int gpr_replica_put_nl(ompi_registry_mode_t addr_mode, char *segment,
OBJ_RELEASE(keylist);
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-put: complete", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-put: complete", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
return return_code;
@ -252,8 +253,8 @@ int gpr_replica_delete_object_nl(ompi_registry_mode_t addr_mode,
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: delete_object entered: segment 1st token",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid, segment, *tokens);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid, segment, *tokens);
}
keys = NULL;
@ -375,8 +376,8 @@ ompi_list_t* gpr_replica_index_nl(char *segment)
ompi_registry_index_value_t *ans;
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: index entered segment: %s", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid, segment);
ompi_output(0, "[%d,%d,%d] gpr replica: index entered segment: %s", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid, segment);
}
answer = OBJ_NEW(ompi_list_t);
@ -440,8 +441,8 @@ int gpr_replica_subscribe_nl(ompi_registry_mode_t addr_mode,
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: subscribe entered: segment %s 1st token %s",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid, segment, tokens ? *tokens : "");
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid, segment, tokens ? *tokens : "");
}
/* protect against errors */
@ -493,8 +494,8 @@ mca_gpr_notify_id_t gpr_replica_unsubscribe_nl(ompi_registry_mode_t addr_mode,
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: unsubscribe entered: segment %s 1st token %s",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid, segment, *tokens);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid, segment, *tokens);
}
/* protect against errors */
@ -550,8 +551,8 @@ int gpr_replica_synchro_nl(ompi_registry_synchro_mode_t synchro_mode,
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: synchro entered on segment %s trigger %d",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid, segment, trigger);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid, segment, trigger);
}
/* protect against errors */
@ -603,8 +604,8 @@ mca_gpr_notify_id_t gpr_replica_cancel_synchro_nl(ompi_registry_synchro_mode_t s
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: cancel_synchro entered: segment %s 1st token %s",
ompi_process_info.name->cellid, ompi_process_info.name->jobid,
ompi_process_info.name->vpid, segment, *tokens);
ompi_rte_get_self()->cellid, ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid, segment, *tokens);
}
/* protect against errors */
@ -772,8 +773,8 @@ ompi_list_t* gpr_replica_get_nl(ompi_registry_mode_t addr_mode,
int num_tokens=0;
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: get entered", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica: get entered", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
answer = OBJ_NEW(ompi_list_t);
@ -789,8 +790,8 @@ ompi_list_t* gpr_replica_get_nl(ompi_registry_mode_t addr_mode,
return answer;
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-get: segment found", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-get: segment found", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
if (NULL == tokens) { /* wildcard case - return everything */
@ -819,8 +820,8 @@ ompi_list_t* gpr_replica_get_nl(ompi_registry_mode_t addr_mode,
}
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-get: got keylist", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-get: got keylist", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
/* traverse the segment's registry, looking for matching tokens per the specified mode */
@ -839,8 +840,8 @@ ompi_list_t* gpr_replica_get_nl(ompi_registry_mode_t addr_mode,
}
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-get: finished search", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-get: finished search", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
CLEANUP:
@ -854,8 +855,8 @@ ompi_list_t* gpr_replica_get_nl(ompi_registry_mode_t addr_mode,
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-get: leaving", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-get: leaving", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
return answer;
}

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

@ -29,6 +29,7 @@
#include "mca/gpr/base/base.h"
#include "gpr_replica.h"
#include "gpr_replica_internals.h"
#include "runtime/runtime.h"
/*
@ -680,8 +681,8 @@ ompi_registry_notify_message_t *gpr_replica_construct_notify_message(ompi_regist
OBJ_RELEASE(reg_entries);
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-construct_notify: msg built", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-construct_notify: msg built", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
return msg;
@ -697,8 +698,8 @@ bool gpr_replica_process_triggers(char *segment,
mca_gpr_replica_callbacks_t *cb;
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica: process_trig entered", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica: process_trig entered", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
/* protect against errors */
@ -713,8 +714,8 @@ bool gpr_replica_process_triggers(char *segment,
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-process_trig: segment found", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-process_trig: segment found", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
@ -759,8 +760,8 @@ bool gpr_replica_process_triggers(char *segment,
OBJ_RELEASE(trig);
}
if (mca_gpr_replica_debug) {
ompi_output(0, "[%d,%d,%d] gpr replica-process_trig: complete", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] gpr replica-process_trig: complete", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
return false;

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

@ -236,7 +236,7 @@ int mca_oob_base_module_init(void)
ompi_list_item_t* item;
/* setup self to point to actual process name */
mca_oob_name_self = *ompi_process_info.name;
mca_oob_name_self = *ompi_rte_get_self();
/* Initialize all modules after oob/gpr/ns have initialized */
for (item = ompi_list_get_first(&mca_oob_base_modules);

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

@ -9,6 +9,7 @@
#include "mca/oob/base/base.h"
#include "include/types.h"
#include "include/constants.h"
#include "mca/ns/ns.h"
#include <stdio.h>
#include <sys/types.h>
@ -29,8 +30,10 @@ init_proclist(void)
(ompi_process_name_t*) malloc(sizeof(ompi_process_name_t));
if (NULL == mca_pcmclient_singleton_procs) return OMPI_ERROR;
/* the oob has already assigned a unique name to the process */
mca_pcmclient_singleton_procs[0] = mca_oob_name_self;
/* assign illegal name - someone will repair later */
mca_pcmclient_singleton_procs[0].cellid = MCA_NS_BASE_CELLID_MAX;
mca_pcmclient_singleton_procs[0].jobid = MCA_NS_BASE_JOBID_MAX;
mca_pcmclient_singleton_procs[0].vpid = MCA_NS_BASE_VPID_MAX;
return OMPI_SUCCESS;
}

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

@ -42,7 +42,7 @@ int MPI_Abort(MPI_Comm comm, int errorcode)
actually loop over ompi_rte_kill_proc() to only kill the procs
in comm, and additionally to somehow use errorcode. */
jobid = ompi_name_server.get_jobid(ompi_process_info.name);
jobid = ompi_name_server.get_jobid(ompi_rte_get_self());
ompi_rte_kill_job(jobid, 0);
/* If we return from this, then the selected PCM was unable to

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

@ -46,7 +46,7 @@ int ompi_mpi_finalize(void)
/* unregister process */
if (OMPI_SUCCESS != (ret = ompi_registry.rte_unregister(
ns_base_get_proc_name_string(ompi_process_info.name)))) {
ns_base_get_proc_name_string(ompi_rte_get_self())))) {
return ret;
}

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

@ -122,6 +122,7 @@ int ompi_rte_init(ompi_cmd_line_t *cmd_line, bool *allow_multi_user_threads, boo
mca_ns_base_jobid_t jobid;
mca_ns_base_vpid_t vpid;
ompi_process_name_t illegal_name={MCA_NS_BASE_CELLID_MAX, MCA_NS_BASE_JOBID_MAX, MCA_NS_BASE_VPID_MAX};
ompi_process_name_t *new_name;
*allow_multi_user_threads = true;
*have_hidden_threads = false;
@ -183,7 +184,7 @@ int ompi_rte_init(ompi_cmd_line_t *cmd_line, bool *allow_multi_user_threads, boo
return ret;
}
printname("pcmclient");
printname("component open");
/*
* Process Control and Monitoring Client -
@ -202,18 +203,6 @@ int ompi_rte_init(ompi_cmd_line_t *cmd_line, bool *allow_multi_user_threads, boo
printname("pcm_select");
/* Initialize the name - set to value provided by enviro, if available */
if (NULL != ompi_process_info.name) { /* should NOT have been previously set */
free(ompi_process_info.name);
ompi_process_info.name = NULL;
}
if (NULL != ompi_rte_get_self()) { /* name set in environment - nonsingleton - record name */
ompi_process_info.name = ompi_rte_get_self();
}
printname("get_self");
/* complete setup of OOB */
if (OMPI_SUCCESS != (ret = mca_oob_base_init(&user_threads,
&hidden_threads))) {
@ -347,28 +336,36 @@ int ompi_rte_init(ompi_cmd_line_t *cmd_line, bool *allow_multi_user_threads, boo
printname("gpr_select");
/***** SET MY NAME IF NOT ALREADY PROVIDED IN ENVIRONMENT *****/
if (NULL == ompi_process_info.name ||
(0 == ompi_name_server.compare(OMPI_NS_CMP_ALL, ompi_process_info.name, &illegal_name))) { /* name not previously set */
if (ompi_process_info.seed || NULL == ompi_process_info.ns_replica) { /* seed or singleton - couldn't join existing univ */
if (NULL != ompi_process_info.name) {
free(ompi_process_info.name);
}
ompi_process_info.name = ompi_name_server.create_process_name(0,0,0);
if (0 == ompi_name_server.compare(OMPI_NS_CMP_ALL,
ompi_rte_get_self(),
&illegal_name)) {
/* name not previously set */
if (ompi_process_info.seed || NULL == ompi_process_info.ns_replica) {
/* seed or singleton - couldn't join existing univ */
new_name = ompi_name_server.create_process_name(0,0,0);
*ompi_rte_get_self() = *new_name;
free(new_name);
printname("singleton/seed");
} else { /* not seed or singleton - name server exists elsewhere - get a name for me */
} else {
/* not seed or singleton - name server exists elsewhere - get a name for me */
jobid = ompi_name_server.create_jobid();
vpid = ompi_name_server.reserve_range(jobid, 1);
ompi_process_info.name = ompi_name_server.create_process_name(0, jobid, vpid);
new_name = ompi_name_server.create_process_name(0, jobid, vpid);
*ompi_rte_get_self() = *new_name;
free(new_name);
printname("name_server_provided");
}
}
/* setup my session directory */
jobid_str = ompi_name_server.get_jobid_string(ompi_process_info.name);
procid_str = ompi_name_server.get_vpid_string(ompi_process_info.name);
jobid_str = ompi_name_server.get_jobid_string(ompi_rte_get_self());
procid_str = ompi_name_server.get_vpid_string(ompi_rte_get_self());
if (ompi_rte_debug_flag) {
ompi_output(0, "[%d,%d,%d] setting up session dir with", ompi_process_info.name->cellid, ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] setting up session dir with",
ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid,
ompi_rte_get_self()->vpid);
if (NULL != ompi_process_info.tmpdir_base) {
ompi_output(0, "\ttmpdir %s", ompi_process_info.tmpdir_base);
}
@ -408,10 +405,10 @@ int ompi_rte_init(ompi_cmd_line_t *cmd_line, bool *allow_multi_user_threads, boo
static void printname(char *loc)
{
if (ompi_rte_debug_flag) {
if (NULL == ompi_process_info.name) {
if (NULL == ompi_rte_get_self()) {
ompi_output(0, "My name after %s has NOT been set", loc);
} else {
ompi_output(0, "My name after %s is [%d,%d,%d]", loc, OMPI_NAME_ARGS(*ompi_process_info.name));
ompi_output(0, "My name after %s is [%d,%d,%d]", loc, OMPI_NAME_ARGS(*ompi_rte_get_self()));
}
}
}

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

@ -51,7 +51,7 @@ ompi_rte_get_spawn_handle(int criteria, bool have_threads)
/* BWB - long term, this has to go. But for now, here we are */
if (0 != (OMPI_RTE_SPAWN_MULTI_CELL & criteria)) {
printf("ompi_rte_get_spawn_handle: warning: multi-cell support "
"implemented. Removing criteria.\n");
"not implemented. Removing criteria.\n");
criteria ^= OMPI_RTE_SPAWN_MULTI_CELL;
}

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

@ -38,7 +38,7 @@ int ompi_vm_register(void)
goto ERROR;
}
if (OMPI_SUCCESS != ompi_pack(buffer, ompi_process_info.name, 1, OMPI_NAME)) {
if (OMPI_SUCCESS != ompi_pack(buffer, ompi_rte_get_self(), 1, OMPI_NAME)) {
ret_code = OMPI_ERROR;
goto ERROR;
}
@ -62,7 +62,7 @@ int ompi_vm_register(void)
goto ERROR;
}
keys[0] = ompi_name_server.get_proc_name_string(ompi_process_info.name);
keys[0] = ompi_name_server.get_proc_name_string(ompi_rte_get_self());
keys[1] = NULL;
ret_code = ompi_registry.put(OMPI_REGISTRY_XAND, "ompi-vm", keys, buffer, sizeof(buffer));

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

@ -36,22 +36,19 @@
/** Spawn constraint - require ability to launch daemons. The
selected spawn system must be capable of starting daemon process.
Setting this flag will result in a spawn service that does not
provide process monitoring or standard I/O forwarding. The caller
may exit before all children are cleaned up, but
OMPI_RTE_SPAWN_EARLY_EXIT is not implied because there is no
expectation of process monitoring. */
neccessarily provide process monitoring or standard I/O
forwarding. The calling process may exit before all children have
exited. */
#define OMPI_RTE_SPAWN_DAEMON 0x0002
/** Spawn constraint - require quality of service support. The
selected spawn system must provide I/O forwarding, quick process
shutdown, and process status monitoring. */
#define OMPI_RTE_SPAWN_HIGH_QOS 0x0004
/** Spawn constraint - caller is an MPI process. The caller is an MPI
application (has called MPI_Init). Implies
OMPI_RTE_SPAWN_EARLY_EXIT */
#define OMPI_RTE_SPAWN_FROM_MPI 0x0018
/** Spawn constraint - caller may exit before child. The caller may
exit before children have exited. */
#define OMPI_RTE_SPAWN_EARLY_EXIT 0x0010
application (has called MPI_Init). This should be used only for
MPI_COMM_SPAWN and MPI_COMM_SPAWN_MULTIPLE. The calling process
will follow the semantics of the MPI_COMM_SPAWN_* functions. */
#define OMPI_RTE_SPAWN_FROM_MPI 0x0008
#ifdef __cplusplus
extern "C" {

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

@ -166,8 +166,8 @@ main(int argc, char *argv[])
if (OMPI_SUCCESS != (ret = ompi_write_universe_setup_file(contact_file))) {
if (ompi_rte_debug_flag) {
ompi_output(0, "[%d,%d,%d] ompid: couldn't write setup file", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: couldn't write setup file", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
}
}

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

@ -187,19 +187,19 @@ int main(int argc, char *argv[])
if (OMPI_SUCCESS != (ret = ompi_write_universe_setup_file(contact_file))) {
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: couldn't write setup file", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: couldn't write setup file", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
} else if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: wrote setup file", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: wrote setup file", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
}
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: registering", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: registering", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
@ -207,8 +207,8 @@ int main(int argc, char *argv[])
ompi_vm_register();
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: issuing callback", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: issuing callback", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
/* register the daemon main callback function */
@ -223,8 +223,8 @@ int main(int argc, char *argv[])
*/
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: setting up event monitor", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: setting up event monitor", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
/* setup and enter the event monitor */
@ -237,8 +237,8 @@ int main(int argc, char *argv[])
OMPI_THREAD_UNLOCK(&ompi_daemon_mutex);
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: mutex cleared - finalizing", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: mutex cleared - finalizing", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
/* if i'm the seed, remove the universe-setup file */
@ -253,8 +253,8 @@ int main(int argc, char *argv[])
ompi_finalize();
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: done - exiting", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: done - exiting", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
exit(0);
@ -272,8 +272,8 @@ static void ompi_daemon_recv(int status, ompi_process_name_t* sender,
OMPI_THREAD_LOCK(&ompi_daemon_mutex);
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: received message", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
ompi_output(0, "[%d,%d,%d] ompid: received message", ompi_rte_get_self()->cellid,
ompi_rte_get_self()->jobid, ompi_rte_get_self()->vpid);
}
if (OMPI_SUCCESS != ompi_buffer_init(&answer, 0)) {

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

@ -65,11 +65,6 @@ int main(int argc, char **argv)
return ret;
}
/* give myself default bootstrap name */
ompi_process_info.name = ns_base_create_process_name(MCA_NS_BASE_CELLID_MAX,
MCA_NS_BASE_JOBID_MAX,
MCA_NS_BASE_VPID_MAX);
/* setup to read common command line options that span all Open MPI programs */
cmd_line = OBJ_NEW(ompi_cmd_line_t);

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

@ -35,7 +35,6 @@ struct ompi_proc_info_t {
* called at least once so fields have valid values
*/
pid_t pid; /**< Local process ID for this process */
ompi_process_name_t *name; /**< Process name structure */
bool seed; /**< Indicate whether or not this is seed daemon */
ompi_process_name_t *ns_replica; /**< Name of my name server replica (NULL=>me) */
ompi_process_name_t *gpr_replica; /**< Name of my registry replica (NULL=>me) */