2004-01-15 09:08:25 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "lam_config.h"
|
|
|
|
|
|
|
|
#include "lam/constants.h"
|
|
|
|
#include "lam/runtime/runtime.h"
|
|
|
|
#include "mpi.h"
|
|
|
|
#include "mpi/runtime/runtime.h"
|
2004-01-29 22:40:22 +03:00
|
|
|
#include "mca/mpi/ptl/ptl.h"
|
|
|
|
#include "mca/mpi/pml/pml.h"
|
|
|
|
|
2004-01-15 09:08:25 +03:00
|
|
|
|
|
|
|
int lam_mpi_finalize(void)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2004-01-29 22:40:22 +03:00
|
|
|
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 */
|
|
|
|
|
2004-01-15 09:08:25 +03:00
|
|
|
if (LAM_SUCCESS != (ret = lam_finalize())) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|