1
1

Intialize and finalize the RTE MCA module types

This commit was SVN r631.
Этот коммит содержится в:
Jeff Squyres 2004-01-31 21:47:59 +00:00
родитель cc05d5f606
Коммит 7bafbd0043
3 изменённых файлов: 61 добавлений и 2 удалений

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

@ -10,6 +10,10 @@
#include "lam/runtime/runtime.h" #include "lam/runtime/runtime.h"
#include "lam/util/output.h" #include "lam/util/output.h"
#include "lam/threads/mutex.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. * Leave a LAM RTE.
@ -21,6 +25,10 @@
*/ */
int lam_rte_finalize(void) int lam_rte_finalize(void)
{ {
mca_registry_base_close();
mca_oob_base_close();
mca_pcm_base_close();
/* All done */ /* All done */
return LAM_SUCCESS; return LAM_SUCCESS;

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

@ -10,6 +10,10 @@
#include "lam/runtime/runtime.h" #include "lam/runtime/runtime.h"
#include "lam/util/output.h" #include "lam/util/output.h"
#include "lam/threads/mutex.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. * Initialze and setup a process in the LAM RTE.
@ -19,8 +23,52 @@
* *
* This function performs * 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 #if 0
/* /*
* BWB - this comment should be removed at some point in the very * BWB - this comment should be removed at some point in the very

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

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