2005-05-19 17:33:55 +04:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-23 07:32:36 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-05-19 17:33:55 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file **/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/orte_constants.h"
|
2006-02-07 06:32:36 +03:00
|
|
|
|
2005-07-04 03:09:55 +04:00
|
|
|
#include "opal/event/event.h"
|
2005-07-04 05:36:20 +04:00
|
|
|
#include "opal/util/if.h"
|
2005-07-04 05:59:52 +04:00
|
|
|
#include "opal/util/os_path.h"
|
2005-05-19 17:33:55 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "orte/runtime/orte_cr.h"
|
|
|
|
|
2006-02-07 06:32:36 +03:00
|
|
|
#include "orte/runtime/runtime.h"
|
|
|
|
#include "orte/runtime/orte_wait.h"
|
|
|
|
#include "orte/mca/rml/base/base.h"
|
2007-07-20 05:34:02 +04:00
|
|
|
#include "orte/mca/routed/base/base.h"
|
2006-02-07 06:32:36 +03:00
|
|
|
#include "orte/dss/dss.h"
|
|
|
|
#include "orte/mca/ns/base/base.h"
|
|
|
|
#include "orte/mca/gpr/base/base.h"
|
|
|
|
#include "orte/mca/errmgr/base/base.h"
|
2007-07-20 05:34:02 +04:00
|
|
|
#include "orte/mca/grpcomm/base/base.h"
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/mca/rds/base/base.h"
|
|
|
|
#include "orte/mca/ras/base/base.h"
|
|
|
|
#include "orte/mca/rmaps/base/base.h"
|
|
|
|
#include "orte/mca/pls/base/base.h"
|
2006-02-07 06:32:36 +03:00
|
|
|
#include "orte/mca/schema/base/base.h"
|
|
|
|
#include "orte/mca/iof/base/base.h"
|
|
|
|
#include "orte/mca/rmgr/base/base.h"
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "orte/mca/filem/base/base.h"
|
|
|
|
#if OPAL_ENABLE_FT == 1
|
|
|
|
#include "orte/mca/snapc/base/base.h"
|
|
|
|
#endif
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/mca/odls/base/base.h"
|
2006-02-07 06:32:36 +03:00
|
|
|
#include "orte/util/session_dir.h"
|
|
|
|
#include "orte/util/sys_info.h"
|
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
#include "orte/util/univ_info.h"
|
|
|
|
|
2005-05-19 17:33:55 +04:00
|
|
|
/**
|
|
|
|
* Leave ORTE.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Upon success.
|
|
|
|
* @retval ORTE_ERROR Upon failure.
|
|
|
|
*
|
|
|
|
* This function performs
|
|
|
|
*/
|
|
|
|
int orte_system_finalize(void)
|
|
|
|
{
|
|
|
|
char *contact_path;
|
|
|
|
|
|
|
|
/* if I'm the seed, remove the universe contact info file */
|
|
|
|
if (orte_process_info.seed) {
|
2005-07-04 05:59:52 +04:00
|
|
|
contact_path = opal_os_path(false, orte_process_info.universe_session_dir,
|
2005-05-19 17:33:55 +04:00
|
|
|
"universe-setup.txt", NULL);
|
|
|
|
unlink(contact_path);
|
|
|
|
free(contact_path);
|
|
|
|
}
|
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
orte_cr_finalize();
|
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
/* rmgr and odls close depend on wait/iof */
|
2005-05-19 17:33:55 +04:00
|
|
|
orte_rmgr_base_close();
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
#if OPAL_ENABLE_FT == 1
|
|
|
|
orte_snapc_base_close();
|
|
|
|
#endif
|
|
|
|
orte_filem_base_close();
|
|
|
|
|
2007-01-26 07:32:15 +03:00
|
|
|
orte_odls_base_close();
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2005-05-19 17:33:55 +04:00
|
|
|
orte_wait_finalize();
|
|
|
|
orte_iof_base_close();
|
|
|
|
|
|
|
|
orte_ns_base_close();
|
|
|
|
orte_gpr_base_close();
|
2005-07-06 22:41:40 +04:00
|
|
|
orte_schema_base_close();
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/* finalize selected modules so they can de-register
|
|
|
|
* their receives
|
|
|
|
*/
|
|
|
|
orte_rds_base_close();
|
|
|
|
orte_ras_base_close();
|
|
|
|
orte_rmaps_base_close();
|
|
|
|
orte_pls_base_close();
|
|
|
|
/* the errmgr close function retains the base
|
|
|
|
* module so that error logging can continue
|
|
|
|
*/
|
|
|
|
orte_errmgr_base_close();
|
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
/* now can close the rml and its friendly group comm */
|
|
|
|
orte_grpcomm_base_close();
|
|
|
|
orte_routed_base_close();
|
2005-05-19 17:33:55 +04:00
|
|
|
orte_rml_base_close();
|
2006-02-07 06:32:36 +03:00
|
|
|
orte_dss_close();
|
2005-07-06 22:41:40 +04:00
|
|
|
|
2005-05-19 17:33:55 +04:00
|
|
|
orte_session_dir_finalize(orte_process_info.my_name);
|
|
|
|
|
|
|
|
/* clean out the global structures */
|
|
|
|
orte_sys_info_finalize();
|
|
|
|
orte_proc_info_finalize();
|
|
|
|
orte_univ_info_finalize();
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|