1
1

Intialize and finalize the RTE MCA module types

This commit was SVN r631.
This commit is contained in:
Jeff Squyres 2004-01-31 21:47:59 +00:00
parent cc05d5f606
commit 7bafbd0043
3 changed files with 61 additions and 2 deletions

View File

@ -10,6 +10,10 @@
#include "lam/runtime/runtime.h"
#include "lam/util/output.h"
#include "lam/threads/mutex.h"
#include "mca/lam/pcm/base/base.h"
#include "mca/lam/oob/base/base.h"
#include "mca/lam/registry/base/base.h"
/**
* Leave a LAM RTE.
@ -21,6 +25,10 @@
*/
int lam_rte_finalize(void)
{
mca_registry_base_close();
mca_oob_base_close();
mca_pcm_base_close();
/* All done */
return LAM_SUCCESS;

View File

@ -10,6 +10,10 @@
#include "lam/runtime/runtime.h"
#include "lam/util/output.h"
#include "lam/threads/mutex.h"
#include "mca/lam/pcm/base/base.h"
#include "mca/lam/oob/base/base.h"
#include "mca/lam/registry/base/base.h"
/**
* Initialze and setup a process in the LAM RTE.
@ -19,8 +23,52 @@
*
* This function performs
*/
int lam_rte_init(void)
int lam_rte_init(bool *allow_multi_user_threads, bool *have_hidden_threads)
{
int ret;
bool user_threads, hidden_threads;
*allow_multi_user_threads = false;
*have_hidden_threads = false;
/* Added by JMS -- feel free to move around */
if (LAM_SUCCESS != (ret = mca_pcm_base_open())) {
/* JMS show_help */
return ret;
}
if (LAM_SUCCESS != (ret = mca_pcm_base_select(&user_threads,
&hidden_threads))) {
/* JMS show_help */
return ret;
}
*allow_multi_user_threads |= user_threads;
*have_hidden_threads |= hidden_threads;
if (LAM_SUCCESS != (ret = mca_oob_base_open())) {
/* JMS show_help */
return ret;
}
if (LAM_SUCCESS != (ret = mca_oob_base_select(&user_threads,
&hidden_threads))) {
/* JMS show_help */
return ret;
}
*allow_multi_user_threads |= user_threads;
*have_hidden_threads |= hidden_threads;
if (LAM_SUCCESS != (ret = mca_registry_base_open())) {
/* JMS show_help */
return ret;
}
if (LAM_SUCCESS != (ret = mca_registry_base_select(&user_threads,
&hidden_threads))) {
/* JMS show_help */
return ret;
}
*allow_multi_user_threads |= user_threads;
*have_hidden_threads |= hidden_threads;
#if 0
/*
* BWB - this comment should be removed at some point in the very

View File

@ -5,6 +5,9 @@
#ifndef LAM_RUNTIME_H
#define LAM_RUNTIME_H
#include "lam_config.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -12,7 +15,7 @@ extern "C" {
int lam_abort(int status, char *fmt, ...);
int lam_init(int argc, char* argv[]);
int lam_finalize(void);
int lam_rte_init(void);
int lam_rte_init(bool *allow_multi_user_threads, bool *have_hidden_threads);
int lam_rte_finalize(void);
#ifdef __cplusplus