1
1

Update of name server - still having problems with diagnostic output. Submitted to Jeff for review.

This commit was SVN r1627.
Этот коммит содержится в:
Ralph Castain 2004-07-12 03:20:54 +00:00
родитель ce78b2eee7
Коммит 4c358b6435
5 изменённых файлов: 14 добавлений и 6 удалений

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

@ -6,6 +6,7 @@
*/ */
#include "ompi_config.h" #include "ompi_config.h"
#include "util/output.h"
#include "mca/mca.h" #include "mca/mca.h"
#include "mca/ns/base/base.h" #include "mca/ns/base/base.h"
@ -22,6 +23,8 @@ ompi_process_name_t* ns_base_create_process_name(ompi_process_id_t cell,
{ {
ompi_process_name_t *newname; ompi_process_name_t *newname;
ompi_output(mca_ns_base_output, "create_process_name\n");
newname = OBJ_NEW(ompi_process_name_t); newname = OBJ_NEW(ompi_process_name_t);
if (NULL == newname) { /* got an error */ if (NULL == newname) { /* got an error */
return(NULL); return(NULL);

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

@ -44,7 +44,7 @@ int mca_ns_base_select(bool *allow_multi_user_threads,
/* Call the component's init function and see if it wants to be /* Call the component's init function and see if it wants to be
selected */ selected */
ompi_output(mca_ns_base_output, "calling component init\n"); ompi_output(mca_ns_base_output, "base_select: calling component init\n");
module = component->ns_init(&multi, &hidden, &priority); module = component->ns_init(&multi, &hidden, &priority);
/* If we got a non-NULL module back, then the component wants to /* If we got a non-NULL module back, then the component wants to
@ -52,7 +52,7 @@ int mca_ns_base_select(bool *allow_multi_user_threads,
module with the highest priority */ module with the highest priority */
if (NULL != module) { if (NULL != module) {
ompi_output(mca_ns_base_output, "base_select: got non-NULL module\n");
/* If this is the best one, save it */ /* If this is the best one, save it */
if (priority > best_priority) { if (priority > best_priority) {
@ -69,6 +69,9 @@ int mca_ns_base_select(bool *allow_multi_user_threads,
best_component = component; best_component = component;
*allow_multi_user_threads = multi; *allow_multi_user_threads = multi;
*have_hidden_threads = hidden; *have_hidden_threads = hidden;
/* update the best priority */
best_priority = priority;
} }
/* If it's not the best one, finalize it */ /* If it's not the best one, finalize it */
@ -88,6 +91,7 @@ int mca_ns_base_select(bool *allow_multi_user_threads,
/* We have happiness -- save the component and module for later /* We have happiness -- save the component and module for later
usage */ usage */
ompi_output(mca_ns_base_output, "ns_select: best_pri %d\n", best_priority);
ompi_name_server = *best_module; ompi_name_server = *best_module;
mca_ns_base_selected_component = *best_component; mca_ns_base_selected_component = *best_component;
mca_ns_base_selected = true; mca_ns_base_selected = true;

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

@ -21,7 +21,7 @@
ompi_process_id_t ns_proxy_create_cellid(void) ompi_process_id_t ns_proxy_create_cellid(void)
{ {
/* JMS fill in here */ /* JMS fill in here */
return 0; return 1;
} }
ompi_process_id_t ns_proxy_create_jobid(void) ompi_process_id_t ns_proxy_create_jobid(void)

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

@ -19,6 +19,7 @@
#include "include/constants.h" #include "include/constants.h"
#include "util/proc_info.h" #include "util/proc_info.h"
#include "util/output.h"
#include "mca/mca.h" #include "mca/mca.h"
#include "mca/ns/base/base.h" #include "mca/ns/base/base.h"
#include "ns_proxy.h" #include "ns_proxy.h"
@ -91,7 +92,7 @@ mca_ns_t* mca_ns_proxy_init(bool *allow_multi_user_threads, bool *have_hidden_th
{ {
/* If we're NOT the seed, then we want to be selected, so do all /* If we're NOT the seed, then we want to be selected, so do all
the setup and return the module */ the setup and return the module */
fprintf(stderr, "ns_proxy: entered init\n"); ompi_output(mca_ns_base_output, "ns_proxy: entered init\n");
if (!ompi_process_info.seed) { if (!ompi_process_info.seed) {
/* Return a module (choose an arbitrary, positive priority -- /* Return a module (choose an arbitrary, positive priority --
@ -99,7 +100,7 @@ mca_ns_t* mca_ns_proxy_init(bool *allow_multi_user_threads, bool *have_hidden_th
we're not the seed, then we don't want to be selected, so we're not the seed, then we don't want to be selected, so
return NULL. */ return NULL. */
*priority = 50; *priority = 10;
/* We allow multi user threads but don't have any hidden threads */ /* We allow multi user threads but don't have any hidden threads */

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

@ -29,7 +29,7 @@ ompi_process_id_t ns_replica_create_cellid(void)
mca_ns_replica_last_used_cellid = mca_ns_replica_last_used_cellid + 1; mca_ns_replica_last_used_cellid = mca_ns_replica_last_used_cellid + 1;
return(mca_ns_replica_last_used_cellid); return(mca_ns_replica_last_used_cellid);
} else { } else {
return(0); return(1);
} }
} }