2004-01-17 23:07:40 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00: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 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2009-01-21 22:27:05 +00:00
|
|
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-17 23:07:40 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal_config.h"
|
2004-01-17 23:07:40 +00:00
|
|
|
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2005-08-12 20:46:25 +00:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2005-09-01 12:16:36 +00:00
|
|
|
#include "opal/mca/base/mca_base_component_repository.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/constants.h"
|
2004-01-17 23:07:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Main MCA shutdown.
|
|
|
|
*/
|
|
|
|
int mca_base_close(void)
|
|
|
|
{
|
2004-01-22 00:37:58 +00:00
|
|
|
extern bool mca_base_opened;
|
|
|
|
if (mca_base_opened) {
|
2004-01-17 23:07:40 +00:00
|
|
|
|
2009-12-08 17:32:22 +00: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 00:24:22 +00:00
|
|
|
/* Close down the component repository */
|
|
|
|
mca_base_component_repository_finalize();
|
2009-01-21 22:27:05 +00:00
|
|
|
|
|
|
|
/* Shut down the dynamic component finder */
|
|
|
|
mca_base_component_find_finalize();
|
|
|
|
|
|
|
|
/* Close opal output stream 0 */
|
|
|
|
opal_output_close(0);
|
2004-01-22 00:37:58 +00:00
|
|
|
}
|
|
|
|
mca_base_opened = false;
|
2004-01-17 23:07:40 +00:00
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
return OPAL_SUCCESS;
|
2004-01-17 23:07:40 +00:00
|
|
|
}
|