Add ptl base open and close functions; ensure that ptl base is compiled
into the rollup MCA MPI convenience library This commit was SVN r573.
Этот коммит содержится в:
родитель
a224b8d594
Коммит
ede4459f9a
@ -22,8 +22,8 @@ libmca_mpi_convenience_la_SOURCES =
|
||||
libmca_mpi_convenience_la_LIBADD = \
|
||||
base/libmca_mpi_base.la \
|
||||
coll/libmca_mpi_coll.la \
|
||||
pml/libmca_mpi_pml.la
|
||||
# Add in common_mpi, io, one, pml, ptl, topo as necessary
|
||||
pml/libmca_mpi_pml.la \
|
||||
ptl/libmca_mpi_ptl.la
|
||||
libmca_mpi_convenience_la_DEPENDENCIES = $(libmca_mpi_convenience_la_LIBADD)
|
||||
|
||||
# Conditionally install the header files
|
||||
|
@ -11,6 +11,13 @@ DIST_SUBDIRS = base $(MCA_ptl_ALL_SUBDIRS)
|
||||
|
||||
headers = ptl.h
|
||||
|
||||
noinst_LTLIBRARIES = libmca_mpi_ptl.la
|
||||
libmca_mpi_ptl_la_SOURCES =
|
||||
libmca_mpi_ptl_la_LIBADD = \
|
||||
base/libmca_mpi_ptl_base.la \
|
||||
$(MCA_ptl_STATIC_LTLIBS)
|
||||
libmca_mpi_ptl_la_DEPENDENCIES = $(libmca_mpi_ptl_la_LIBADD)
|
||||
|
||||
# Conditionally install the header files
|
||||
|
||||
if WANT_INSTALL_HEADERS
|
||||
|
@ -19,9 +19,11 @@ headers = \
|
||||
|
||||
libmca_mpi_ptl_base_la_SOURCES = \
|
||||
$(headers) \
|
||||
ptl_base_close.c \
|
||||
ptl_base_comm.c \
|
||||
ptl_base_fragment.c \
|
||||
ptl_base_match.c \
|
||||
ptl_base_open.c \
|
||||
ptl_base_recvfrag.c \
|
||||
ptl_base_recvreq.c \
|
||||
ptl_base_sendfrag.c \
|
||||
|
29
src/mca/mpi/ptl/base/ptl_base_close.c
Обычный файл
29
src/mca/mpi/ptl/base/ptl_base_close.c
Обычный файл
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "lam/constants.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/lam/base/base.h"
|
||||
#include "mca/mpi/ptl/ptl.h"
|
||||
|
||||
|
||||
int mca_ptl_base_close(void)
|
||||
{
|
||||
extern lam_list_t mca_ptl_base_modules_available;
|
||||
|
||||
/* Close all remaining available modules (may be one if this is a
|
||||
LAM RTE program, or [possibly] multiple if this is laminfo) */
|
||||
|
||||
mca_base_modules_close(mca_ptl_base_output,
|
||||
&mca_ptl_base_modules_available, NULL);
|
||||
|
||||
/* All done */
|
||||
|
||||
return LAM_SUCCESS;
|
||||
}
|
51
src/mca/mpi/ptl/base/ptl_base_open.c
Обычный файл
51
src/mca/mpi/ptl/base/ptl_base_open.c
Обычный файл
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "mca/mca.h"
|
||||
#include "mca/lam/base/base.h"
|
||||
#include "mca/mpi/ptl/ptl.h"
|
||||
|
||||
|
||||
/*
|
||||
* The following file was created by configure. It contains extern
|
||||
* statements and the definition of an array of pointers to each
|
||||
* module's public mca_base_module_t struct.
|
||||
*/
|
||||
|
||||
#include "mca/mpi/ptl/base/static-modules.h"
|
||||
|
||||
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
int mca_ptl_base_output = -1;
|
||||
mca_ptl_t mca_ptl;
|
||||
lam_list_t mca_ptl_base_modules_available;
|
||||
mca_ptl_base_module_t mca_ptl_base_selected_module;
|
||||
|
||||
|
||||
/**
|
||||
* Function for finding and opening either all MCA modules, or the one
|
||||
* that was specifically requested via a MCA parameter.
|
||||
*/
|
||||
int mca_ptl_base_open(void)
|
||||
{
|
||||
/* Open up all available modules */
|
||||
|
||||
if (LAM_SUCCESS !=
|
||||
mca_base_modules_open("ptl", 0, mca_ptl_base_static_modules,
|
||||
&mca_ptl_base_modules_available)) {
|
||||
return LAM_ERROR;
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
return LAM_SUCCESS;
|
||||
}
|
@ -5,15 +5,14 @@
|
||||
*
|
||||
* P2P Transport Layer (PTL)
|
||||
*/
|
||||
#ifndef LAM_MCA_PTL_H
|
||||
#define LAM_MCA_PTL_H
|
||||
#ifndef MCA_PTL_H
|
||||
#define MCA_PTL_H
|
||||
|
||||
#include "mca/mca.h"
|
||||
#include "lam/lam.h"
|
||||
#include "lam/lfc/list.h"
|
||||
#include "mpi/proc/proc.h"
|
||||
#include "mca/mpi/pml/pml.h"
|
||||
#include "mca/mpi/ptl/ptl.h"
|
||||
|
||||
|
||||
/*
|
||||
@ -165,26 +164,19 @@ typedef struct mca_ptl_t mca_ptl_t;
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int mca_ptl_base_close(void);
|
||||
int mca_ptl_base_open(void);
|
||||
int mca_ptl_base_query(void);
|
||||
int mca_ptl_base_init(void);
|
||||
int mca_ptl_base_close(void);
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Public variables
|
||||
* Globals
|
||||
*/
|
||||
|
||||
extern lam_list_t *mca_ptl_base_opened;
|
||||
extern lam_list_t *mca_ptl_base_available;
|
||||
|
||||
/*
|
||||
* Global instance of array of pointers to mca_t. Will
|
||||
* effectively be filled in by configure.
|
||||
*/
|
||||
|
||||
extern const mca_base_module_t **mca_ptl_base_modules;
|
||||
extern int mca_ptl_base_output;
|
||||
extern lam_list_t mca_ptl_base_modules_available;
|
||||
extern mca_ptl_base_module_t mca_ptl_base_selected_module;
|
||||
extern mca_ptl_t mca_ptl;
|
||||
|
||||
#endif /* LAM_MCA_PTL_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user