2004-01-29 05:43:58 +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.
|
2006-08-24 20:38:08 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* 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.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-29 05:43:58 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-29 05:43:58 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "ompi/constants.h"
|
|
|
|
#include "ompi/mca/pml/pml.h"
|
|
|
|
#include "ompi/mca/pml/base/base.h"
|
2004-01-29 05:43:58 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
2004-08-02 04:24:22 +04:00
|
|
|
* component's public mca_base_component_t struct.
|
2004-01-29 05:43:58 +03:00
|
|
|
*/
|
|
|
|
|
2005-07-04 22:24:58 +04:00
|
|
|
#include "ompi/mca/pml/base/static-components.h"
|
2004-01-29 05:43:58 +03:00
|
|
|
|
2005-01-13 18:30:49 +03:00
|
|
|
int mca_pml_base_progress(void)
|
2004-08-28 05:15:19 +04:00
|
|
|
{
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2006-07-15 01:33:26 +04:00
|
|
|
#define xstringify(pml) #pml
|
|
|
|
#define stringify(pml) xstringify(pml)
|
2004-01-29 05:43:58 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global variables
|
|
|
|
*/
|
2006-08-24 20:38:08 +04:00
|
|
|
int mca_pml_base_output = 0;
|
|
|
|
mca_pml_base_module_t mca_pml = {
|
2004-10-12 19:50:01 +04:00
|
|
|
NULL, /* pml_add_procs */
|
|
|
|
NULL, /* pml_del_procs */
|
|
|
|
NULL, /* pml_control */
|
|
|
|
mca_pml_base_progress, /* pml_progress */
|
|
|
|
NULL, /* pml_add_comm */
|
|
|
|
NULL, /* pml_del_comm */
|
|
|
|
NULL, /* pml_irecv_init */
|
|
|
|
NULL, /* pml_irecv */
|
|
|
|
NULL, /* pml_recv */
|
|
|
|
NULL, /* pml_isend_init */
|
|
|
|
NULL, /* pml_isend */
|
|
|
|
NULL, /* pml_send */
|
|
|
|
NULL, /* pml_iprobe */
|
|
|
|
NULL, /* pml_probe */
|
|
|
|
NULL /* pml_start */
|
2004-08-28 05:15:19 +04:00
|
|
|
};
|
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t mca_pml_base_components_available;
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_pml_base_component_t mca_pml_base_selected_component;
|
2005-06-20 20:40:12 +04:00
|
|
|
char *mca_pml_base_pml;
|
2004-01-29 05:43:58 +03:00
|
|
|
|
|
|
|
/**
|
2004-08-02 04:24:22 +04:00
|
|
|
* Function for finding and opening either all MCA components, or the one
|
2004-01-29 05:43:58 +03:00
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
|
|
|
int mca_pml_base_open(void)
|
|
|
|
{
|
2006-11-10 07:53:00 +03:00
|
|
|
char* default_pml;
|
|
|
|
|
2005-07-12 09:40:56 +04:00
|
|
|
/* Open up all available components */
|
2004-01-29 05:43:58 +03:00
|
|
|
|
2005-07-12 09:40:56 +04:00
|
|
|
if (OMPI_SUCCESS !=
|
|
|
|
mca_base_components_open("pml", 0, mca_pml_base_static_components,
|
|
|
|
&mca_pml_base_components_available,
|
|
|
|
!MCA_pml_DIRECT_CALL)) {
|
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
2004-01-31 01:56:36 +03:00
|
|
|
|
2005-07-12 09:40:56 +04:00
|
|
|
/* Set a sentinel in case we don't select any components (e.g.,
|
|
|
|
ompi_info) */
|
2004-01-31 01:56:36 +03:00
|
|
|
|
2005-07-12 09:40:56 +04:00
|
|
|
mca_pml_base_selected_component.pmlm_finalize = NULL;
|
2005-06-20 20:40:12 +04:00
|
|
|
|
2006-11-10 07:53:00 +03:00
|
|
|
/**
|
|
|
|
* Right now our selection of BTLs is completely broken. If we have
|
|
|
|
* multiple PMLs we will open all BTLs several times, leading to
|
|
|
|
* undefined behaviors. The simplest solution, at least until we
|
|
|
|
* figure out the correct way to do it, is to force a default value
|
|
|
|
* in the mca_pml_base_pml global.
|
|
|
|
*/
|
|
|
|
#if MCA_pml_DIRECT_CALL
|
|
|
|
default_pml = stringify(MCA_pml_DIRECT_CALL_COMPONENT);
|
|
|
|
#else
|
|
|
|
default_pml = "ob1";
|
|
|
|
#endif
|
|
|
|
|
2005-07-12 09:40:56 +04:00
|
|
|
mca_base_param_lookup_string(
|
2006-07-15 01:33:26 +04:00
|
|
|
mca_base_param_register_string("pml",
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-11-10 07:53:00 +03:00
|
|
|
default_pml),
|
2006-07-15 01:33:26 +04:00
|
|
|
&mca_pml_base_pml);
|
2006-11-10 07:53:00 +03:00
|
|
|
if( NULL == mca_pml_base_pml )
|
|
|
|
mca_pml_base_pml = default_pml;
|
2006-02-23 08:24:58 +03:00
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
2004-01-29 05:43:58 +03:00
|
|
|
}
|