1
1

Call some MCA startup / finalize routines during init/finalize

This commit was SVN r590.
Этот коммит содержится в:
Jeff Squyres 2004-01-29 19:40:22 +00:00
родитель 0e2d2040ea
Коммит 7a63d2df99
2 изменённых файлов: 41 добавлений и 2 удалений

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

@ -8,12 +8,34 @@
#include "lam/runtime/runtime.h"
#include "mpi.h"
#include "mpi/runtime/runtime.h"
#include "mca/mpi/ptl/ptl.h"
#include "mca/mpi/pml/pml.h"
int lam_mpi_finalize(void)
{
int ret;
lam_mpi_finalized = 1;
lam_mpi_finalized = true;
/* Close down MCA modules */
if (LAM_SUCCESS != (ret = mca_ptl_base_close())) {
return ret;
}
if (LAM_SUCCESS != (ret = mca_pml_base_close())) {
return ret;
}
/* Leave the RTE */
if (LAM_SUCCESS != (ret = lam_rte_finalize())) {
return ret;
}
/* Leave LAM */
if (LAM_SUCCESS != (ret = lam_finalize())) {
return ret;
}

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

@ -8,22 +8,39 @@
#include "lam/runtime/runtime.h"
#include "mpi.h"
#include "mpi/runtime/runtime.h"
#include "mca/mpi/ptl/ptl.h"
#include "mca/mpi/pml/pml.h"
int lam_mpi_init(int argc, char **argv, int requested, int *provided)
{
int ret;
/* Become a LAM process */
if (LAM_SUCCESS != (ret = lam_init(argc, argv))) {
return ret;
}
/* Join the run-time environment */
if (LAM_SUCCESS != (ret = lam_rte_init())) {
return ret;
}
/* Open up relevant MCA modules */
if (LAM_SUCCESS != (ret = mca_pml_base_open())) {
/* JMS show_help */
return LAM_ERROR;
}
if (LAM_SUCCESS != (ret = mca_ptl_base_open())) {
/* JMS show_help */
return LAM_ERROR;
}
/* All done */
lam_mpi_initialized = 1;
lam_mpi_initialized = true;
return MPI_SUCCESS;
}