2004-07-11 00:10:52 +00:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2004-07-11 00:57:30 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
2004-07-11 02:21:23 +00:00
|
|
|
#include <sys/types.h>
|
2004-07-11 00:10:52 +00:00
|
|
|
|
|
|
|
#include "runtime/runtime.h"
|
|
|
|
#include "util/output.h"
|
|
|
|
#include "util/proc_info.h"
|
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/base/base.h"
|
|
|
|
#include "mca/ns/base/base.h"
|
2004-07-11 00:57:30 +00:00
|
|
|
#include "mca/ns/replica/src/ns_replica.h"
|
2004-07-11 00:10:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function for selecting one module from all those that are
|
|
|
|
* available.
|
|
|
|
*
|
|
|
|
* Decide whether or not to be a replica, then call appropriate
|
|
|
|
* component to init module.
|
|
|
|
*/
|
|
|
|
int mca_ns_base_select(bool *allow_multi_user_threads,
|
|
|
|
bool *have_hidden_threads)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* check to see if I'm supposed to be a replica
|
|
|
|
* definitely 'yes' if I'm the seed daemon
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (ompi_process_info.seed) { /* true if I'm the seed daemon */
|
2004-07-11 00:57:30 +00:00
|
|
|
ompi_name_server = *mca_ns_replica_init(allow_multi_user_threads, have_hidden_threads);
|
2004-07-11 00:10:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|