~ubuntu-branches/ubuntu/hardy/openmpi/hardy-updates

« back to all changes in this revision

Viewing changes to orte/mca/ras/base/ras_base_close.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-10-15 00:46:11 UTC
  • Revision ID: james.westby@ubuntu.com-20061015004611-uuhxnaxyjmuxfd5h
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
 
3
 *                         University Research and Technology
 
4
 *                         Corporation.  All rights reserved.
 
5
 * Copyright (c) 2004-2005 The University of Tennessee and The University
 
6
 *                         of Tennessee Research Foundation.  All rights
 
7
 *                         reserved.
 
8
 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 
 
9
 *                         University of Stuttgart.  All rights reserved.
 
10
 * Copyright (c) 2004-2005 The Regents of the University of California.
 
11
 *                         All rights reserved.
 
12
 * $COPYRIGHT$
 
13
 * 
 
14
 * Additional copyrights may follow
 
15
 * 
 
16
 * $HEADER$
 
17
 */
 
18
 
 
19
#include "orte_config.h"
 
20
 
 
21
#include <stdio.h>
 
22
 
 
23
#include "orte/orte_constants.h"
 
24
 
 
25
#include "opal/mca/mca.h"
 
26
#include "opal/mca/base/base.h"
 
27
#include "orte/mca/ras/base/base.h"
 
28
 
 
29
 
 
30
int orte_ras_base_finalize(void)
 
31
{
 
32
    opal_list_item_t* item;
 
33
 
 
34
    /* Finalize all available modules */
 
35
    if (orte_ras_base.ras_available_valid) {
 
36
        while (NULL != 
 
37
               (item = opal_list_remove_first(&orte_ras_base.ras_available))) {
 
38
            orte_ras_base_cmp_t* cmp = (orte_ras_base_cmp_t*)item;
 
39
            cmp->module->finalize();
 
40
            OBJ_RELEASE(cmp);
 
41
        }
 
42
        OBJ_DESTRUCT(&orte_ras_base.ras_available);
 
43
    }
 
44
 
 
45
    return ORTE_SUCCESS;
 
46
}
 
47
 
 
48
 
 
49
int orte_ras_base_close(void)
 
50
{
 
51
    /* Close all remaining available components (may be one if this is a
 
52
       Open RTE program, or [possibly] multiple if this is ompi_info) */
 
53
 
 
54
    mca_base_components_close(orte_ras_base.ras_output, 
 
55
                              &orte_ras_base.ras_opened, NULL);
 
56
  
 
57
    return ORTE_SUCCESS;
 
58
}
 
59