2004-08-17 22:24:17 +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.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-17 22:24:17 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte_config.h"
|
2004-08-17 22:24:17 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2011-10-19 20:18:14 +00:00
|
|
|
#include "opal/mca/hwloc/hwloc.h"
|
|
|
|
|
2007-07-20 01:34:02 +00:00
|
|
|
#include "orte/mca/grpcomm/base/base.h"
|
2004-08-17 22:24:17 +00:00
|
|
|
|
|
|
|
|
2007-07-20 01:34:02 +00:00
|
|
|
int orte_grpcomm_base_close(void)
|
2004-08-17 22:24:17 +00:00
|
|
|
{
|
2007-07-20 01:34:02 +00:00
|
|
|
/* If we have a selected component and module, then finalize it */
|
|
|
|
|
2010-02-25 01:11:29 +00:00
|
|
|
if (orte_grpcomm_base.selected) {
|
2008-03-24 20:50:31 +00:00
|
|
|
orte_grpcomm.finalize();
|
2007-07-20 01:34:02 +00:00
|
|
|
}
|
|
|
|
|
2008-03-24 20:50:31 +00:00
|
|
|
/* Close all remaining available components (may be one if this is a
|
2007-07-20 01:34:02 +00:00
|
|
|
OpenRTE program, or [possibly] multiple if this is ompi_info) */
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2010-02-25 01:11:29 +00:00
|
|
|
mca_base_components_close(orte_grpcomm_base.output,
|
|
|
|
&orte_grpcomm_base.components_available, NULL);
|
2007-07-20 01:34:02 +00:00
|
|
|
|
2011-10-19 20:18:14 +00:00
|
|
|
#if OPAL_HAVE_HWLOC
|
|
|
|
if (NULL != orte_grpcomm_base.working_cpuset) {
|
|
|
|
hwloc_bitmap_free(orte_grpcomm_base.working_cpuset);
|
|
|
|
orte_grpcomm_base.working_cpuset = NULL;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-11-06 19:09:26 +00:00
|
|
|
/* Close the framework output */
|
|
|
|
opal_output_close (orte_grpcomm_base.output);
|
|
|
|
orte_grpcomm_base.output = -1;
|
|
|
|
|
2007-07-20 01:34:02 +00:00
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|