6aa956241f
is a lot more difficult than a PTL, and it can adapt it's behavior to the level of threading required by the user. In this case the behavior is the priorit of the PML. Therefore this information is never availale before the init function (of the PML) is called. So I try to keep nearly the same structure as it was before, with one change. When a PML get initialized it does not necessarily means it has been selected, so it does not means it has to create all it's internal structures (and select the PTL and all this stuff). They can all be done later, when a PML knows that it definitively get selected (when the enable function is called with the argument set to true). Thus, in the case of a PML close one have to check if the PML has been selected or not before trying to clean up the internals. I had to change the MPI_Init function to allow the PML to be enabled before we start adding procs inside. This commit was SVN r6434.
65 строки
1.7 KiB
C
65 строки
1.7 KiB
C
/*
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
* All rights reserved.
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
* All rights reserved.
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
* University of Stuttgart. All rights reserved.
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
/**
|
|
* @file
|
|
*/
|
|
#ifndef MCA_PTL_BASE_H
|
|
#define MCA_PTL_BASE_H
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "opal/class/opal_list.h"
|
|
#include "mca/mca.h"
|
|
#include "mca/ptl/ptl.h"
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct mca_ptl_base_selected_module_t {
|
|
opal_list_item_t super;
|
|
|
|
mca_ptl_base_component_t *pbsm_component;
|
|
mca_ptl_base_module_t *pbsm_module;
|
|
};
|
|
typedef struct mca_ptl_base_selected_module_t mca_ptl_base_selected_module_t;
|
|
|
|
|
|
/*
|
|
* Global functions for MCA: overall PTL open and close
|
|
*/
|
|
|
|
OMPI_DECLSPEC int mca_ptl_base_open(void);
|
|
OMPI_DECLSPEC int mca_ptl_base_select(bool enable_progress_threads,
|
|
bool enable_mpi_threads);
|
|
OMPI_DECLSPEC int mca_ptl_base_close(void);
|
|
|
|
|
|
/*
|
|
* Globals
|
|
*/
|
|
OMPI_DECLSPEC extern int mca_ptl_base_output;
|
|
OMPI_DECLSPEC extern char* mca_ptl_base_include;
|
|
OMPI_DECLSPEC extern char* mca_ptl_base_exclude;
|
|
OMPI_DECLSPEC extern opal_list_t mca_ptl_base_components_opened;
|
|
OMPI_DECLSPEC extern opal_list_t mca_ptl_base_components_initialized;
|
|
OMPI_DECLSPEC extern opal_list_t mca_ptl_base_modules_initialized;
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
}
|
|
#endif
|
|
#endif /* MCA_PTL_BASE_H */
|