2004-08-14 01:56:05 +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-14 01:56:05 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
2004-09-14 10:55:10 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/constants.h"
|
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "ompi/mca/io/io.h"
|
|
|
|
#include "ompi/mca/io/base/base.h"
|
|
|
|
#include "ompi/mca/io/base/io_base_request.h"
|
2004-08-14 01:56:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
int mca_io_base_close(void)
|
|
|
|
{
|
2005-02-09 02:09:07 +00:00
|
|
|
/* stop the progress engine */
|
|
|
|
mca_io_base_request_progress_fini();
|
|
|
|
|
2004-12-12 15:29:29 +00:00
|
|
|
/* Destroy the freelist */
|
|
|
|
|
|
|
|
if (mca_io_base_requests_valid) {
|
|
|
|
OBJ_DESTRUCT(&mca_io_base_requests);
|
|
|
|
mca_io_base_requests_valid = false;
|
|
|
|
}
|
|
|
|
|
2004-09-14 10:55:10 +00:00
|
|
|
/* Close all components that are still open. This may be the opened
|
|
|
|
list (if we're in ompi_info), or it may be the available list (if
|
|
|
|
we're anywhere else). */
|
|
|
|
|
|
|
|
if (mca_io_base_components_opened_valid) {
|
|
|
|
mca_base_components_close(mca_io_base_output,
|
|
|
|
&mca_io_base_components_opened, NULL);
|
|
|
|
OBJ_DESTRUCT(&mca_io_base_components_opened);
|
|
|
|
mca_io_base_components_opened_valid = false;
|
|
|
|
} else if (mca_io_base_components_available_valid) {
|
|
|
|
mca_base_components_close(mca_io_base_output,
|
|
|
|
&mca_io_base_components_available, NULL);
|
|
|
|
OBJ_DESTRUCT(&mca_io_base_components_available);
|
|
|
|
mca_io_base_components_available_valid = false;
|
|
|
|
}
|
|
|
|
|
2004-12-12 15:29:29 +00:00
|
|
|
/* Destroy some io framework resrouces */
|
|
|
|
|
|
|
|
mca_io_base_component_finalize();
|
|
|
|
|
2004-09-14 10:55:10 +00:00
|
|
|
/* All done */
|
|
|
|
|
2004-08-14 01:56:05 +00:00
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|