2004-01-15 09:08:25 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "lam_config.h"
|
|
|
|
|
2004-03-19 00:35:28 +03:00
|
|
|
#include "include/constants.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "runtime/runtime.h"
|
2004-01-15 09:08:25 +03:00
|
|
|
#include "mpi.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "group/group.h"
|
|
|
|
#include "runtime/runtime.h"
|
|
|
|
#include "mca/base/base.h"
|
|
|
|
#include "mca/ptl/ptl.h"
|
|
|
|
#include "mca/ptl/base/base.h"
|
|
|
|
#include "mca/pml/pml.h"
|
|
|
|
#include "mca/pml/base/base.h"
|
|
|
|
#include "mca/coll/coll.h"
|
|
|
|
#include "mca/coll/base/base.h"
|
2004-01-29 22:40:22 +03:00
|
|
|
|
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 */
|
|
|
|
|
2004-01-31 02:03:01 +03:00
|
|
|
if (LAM_SUCCESS != (ret = mca_coll_base_close())) {
|
|
|
|
return ret;
|
|
|
|
}
|
2004-01-29 22:40:22 +03:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2004-01-30 06:56:21 +03:00
|
|
|
/* Close down the MCA */
|
|
|
|
|
|
|
|
if (LAM_SUCCESS != (ret = mca_base_close())) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-01-29 22:40:22 +03:00
|
|
|
/* Leave LAM */
|
|
|
|
|
2004-02-18 09:07:06 +03:00
|
|
|
/* free group resources */
|
|
|
|
if (LAM_SUCCESS != (ret = lam_group_finalize())) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-01-15 09:08:25 +03:00
|
|
|
if (LAM_SUCCESS != (ret = lam_finalize())) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|