2015-04-07 23:42:35 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
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.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 23:09:25 +03:00
|
|
|
* 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.
|
2015-04-07 23:42:35 +03:00
|
|
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
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
|
|
|
|
2015-04-07 23:42:35 +03:00
|
|
|
extern int mca_base_opened;
|
|
|
|
|
2004-01-18 02:07:40 +03:00
|
|
|
/*
|
|
|
|
* Main MCA shutdown.
|
|
|
|
*/
|
|
|
|
int mca_base_close(void)
|
|
|
|
{
|
2015-04-07 23:42:35 +03:00
|
|
|
assert (mca_base_opened);
|
|
|
|
if (!--mca_base_opened) {
|
|
|
|
/* deregister all MCA base parameters */
|
|
|
|
int group_id = mca_base_var_group_find ("opal", "mca", "base");
|
|
|
|
|
|
|
|
if (-1 < group_id) {
|
|
|
|
mca_base_var_group_deregister (group_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close down the component repository */
|
|
|
|
mca_base_component_repository_finalize();
|
|
|
|
|
|
|
|
/* Shut down the dynamic component finder */
|
|
|
|
mca_base_component_find_finalize();
|
|
|
|
|
|
|
|
/* Close opal output stream 0 */
|
|
|
|
opal_output_close(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
return OPAL_SUCCESS;
|
2004-01-18 02:07:40 +03:00
|
|
|
}
|