2004-01-18 02:07:40 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2009-01-22 01:27:05 +03:00
|
|
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-18 02:07:40 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal_config.h"
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2005-07-04 03:31:27 +04:00
|
|
|
#include "opal/util/output.h"
|
2005-08-13 00:46:25 +04:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2005-09-01 16:16:36 +04:00
|
|
|
#include "opal/mca/base/mca_base_component_repository.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/constants.h"
|
2004-01-18 02:07:40 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Main MCA shutdown.
|
|
|
|
*/
|
|
|
|
int mca_base_close(void)
|
|
|
|
{
|
2004-01-22 03:37:58 +03:00
|
|
|
extern bool mca_base_opened;
|
|
|
|
if (mca_base_opened) {
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2009-12-08 20:32:22 +03:00
|
|
|
/* release the default paths */
|
|
|
|
if (NULL != mca_base_system_default_path) {
|
|
|
|
free(mca_base_system_default_path);
|
|
|
|
}
|
|
|
|
if (NULL != mca_base_user_default_path) {
|
|
|
|
free(mca_base_user_default_path);
|
|
|
|
}
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* Close down the component repository */
|
|
|
|
mca_base_component_repository_finalize();
|
2009-01-22 01:27:05 +03:00
|
|
|
|
|
|
|
/* Shut down the dynamic component finder */
|
|
|
|
mca_base_component_find_finalize();
|
|
|
|
|
|
|
|
/* Close opal output stream 0 */
|
|
|
|
opal_output_close(0);
|
2004-01-22 03:37:58 +03:00
|
|
|
}
|
|
|
|
mca_base_opened = false;
|
2004-01-18 02:07:40 +03:00
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
return OPAL_SUCCESS;
|
2004-01-18 02:07:40 +03:00
|
|
|
}
|