Add the empty basic component where the function pointer from the
base will be copied over. Without such a decoy component the entire framework will not function correctly. This commit was SVN r28692.
Этот коммит содержится в:
родитель
dc1e68c3c1
Коммит
e665cda6c2
0
ompi/mca/topo/basic/.windows
Обычный файл
0
ompi/mca/topo/basic/.windows
Обычный файл
44
ompi/mca/topo/basic/Makefile.am
Обычный файл
44
ompi/mca/topo/basic/Makefile.am
Обычный файл
@ -0,0 +1,44 @@
|
||||
#
|
||||
# Copyright (c) 2011-2013 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2011-2013 INRIA. All rights reserved.
|
||||
# Copyright (c) 2011-2013 Université Bordeaux 1
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
EXTRA_DIST = .windows
|
||||
|
||||
sources = \
|
||||
topo_basic.h \
|
||||
topo_basic_component.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if MCA_BUILD_ompi_topo_basic_DSO
|
||||
lib =
|
||||
lib_sources =
|
||||
component = mca_topo_basic.la
|
||||
component_sources = $(sources)
|
||||
else
|
||||
lib = libmca_topo_basic.la
|
||||
lib_sources = $(sources)
|
||||
component =
|
||||
component_sources =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component)
|
||||
mca_topo_basic_la_SOURCES = $(component_sources)
|
||||
mca_topo_basic_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
noinst_LTLIBRARIES = $(lib)
|
||||
libmca_topo_basic_la_SOURCES = $(lib_sources)
|
||||
libmca_topo_basic_la_LDFLAGS = -module -avoid-version
|
||||
|
1815
ompi/mca/topo/basic/Makefile.in
Обычный файл
1815
ompi/mca/topo/basic/Makefile.in
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
18
ompi/mca/topo/basic/configure.params
Обычный файл
18
ompi/mca/topo/basic/configure.params
Обычный файл
@ -0,0 +1,18 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2011-2013 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2011-2013 INRIA. All rights reserved.
|
||||
# Copyright (c) 2011-2013 Université Bordeaux 1
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Specific to this module
|
||||
|
||||
PARAM_CONFIG_FILES="Makefile"
|
||||
|
30
ompi/mca/topo/basic/topo_basic.h
Обычный файл
30
ompi/mca/topo/basic/topo_basic.h
Обычный файл
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2013 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* Copyright (c) 2011-2013 INRIA. All rights reserved.
|
||||
* Copyright (c) 2011-2013 Université Bordeaux 1
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MCA_TOPO_BASIC_H
|
||||
#define MCA_TOPO_BASIC_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/mca/topo/topo.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
typedef mca_topo_base_component_2_1_0_t mca_topo_basic_component_t;
|
||||
/* Public component instance */
|
||||
OMPI_MODULE_DECLSPEC extern mca_topo_basic_component_t
|
||||
mca_topo_basic_component;
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* MCA_TOPO_BASIC_H */
|
||||
|
82
ompi/mca/topo/basic/topo_basic_component.c
Обычный файл
82
ompi/mca/topo/basic/topo_basic_component.c
Обычный файл
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2013 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2011-2013 INRIA. All rights reserved.
|
||||
* Copyright (c) 2011-2013 Université Bordeaux 1
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/mca/topo/basic/topo_basic.h"
|
||||
|
||||
/*
|
||||
* Public string showing the topo basic module version number
|
||||
*/
|
||||
const char *mca_topo_basic_component_version_string =
|
||||
"Open MPI basic topology MCA component version" OMPI_VERSION;
|
||||
|
||||
/*
|
||||
* Local funtions
|
||||
*/
|
||||
static int init_query(bool enable_progress_threads, bool enable_mpi_threads);
|
||||
static struct mca_topo_base_module_t *
|
||||
comm_query(const ompi_communicator_t *comm, int *priority, uint32_t type);
|
||||
|
||||
/*
|
||||
* Public component structure
|
||||
*/
|
||||
mca_topo_basic_component_t mca_topo_basic_component =
|
||||
{
|
||||
{
|
||||
MCA_TOPO_BASE_VERSION_2_1_0,
|
||||
|
||||
"basic",
|
||||
OMPI_MAJOR_VERSION,
|
||||
OMPI_MINOR_VERSION,
|
||||
OMPI_RELEASE_VERSION,
|
||||
|
||||
/* NULLs for the rest of the function pointers */
|
||||
},
|
||||
|
||||
{
|
||||
/* The component is checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
||||
},
|
||||
|
||||
init_query,
|
||||
comm_query
|
||||
};
|
||||
|
||||
|
||||
static int init_query(bool enable_progress_threads, bool enable_mpi_threads)
|
||||
{
|
||||
/* Nothing to do */
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static struct mca_topo_base_module_t *
|
||||
comm_query(const ompi_communicator_t *comm, int *priority, uint32_t type)
|
||||
{
|
||||
/* Don't use OBJ_NEW, we need to zero the memory or the functions pointers
|
||||
* will not be correctly copied over from the base.
|
||||
*/
|
||||
mca_topo_base_module_t *basic = calloc(1, sizeof(mca_topo_base_module_t));
|
||||
|
||||
if (NULL == basic) {
|
||||
return NULL;
|
||||
}
|
||||
OBJ_CONSTRUCT(basic, mca_topo_base_module_t);
|
||||
|
||||
/* This component has very low priority -- it's a basic, after all! */
|
||||
*priority = 0;
|
||||
basic->type = type;
|
||||
return basic;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user