1
1
This commit was SVN r369.
Этот коммит содержится в:
Tim Woodall 2004-01-14 15:15:17 +00:00
родитель d8bbd51773
Коммит f7145e2ea4
8 изменённых файлов: 255 добавлений и 2 удалений

37
src/mca/mpi/ptl/tcp/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,37 @@
#
# $HEADER$
#
# Use the top-level LAM Makefile.options
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
# According to the MCA spec, we have to make the output library here
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
module_noinst =
module_install = mca_ptl_tcp.la
else
module_noinst = libmca_mpi_ptl_tcp.la
module_install =
endif
mcamoduledir = $(libdir)/lam
mcamodule_LTLIBRARIES = $(module_install)
mca_ptl_tcp_la_SOURCES =
mca_ptl_tcp_la_LIBADD = \
src/libmca_ptl_tcp.la \
$(top_lam_builddir)/src/lam/liblam.la
mca_ptl_tcp_la_LDFLAGS = -module -avoid-version
noinst_LTLIBRARIES = $(module_noinst)
libmca_mpi_ptl_tcp_la_SOURCES =
libmca_mpi_ptl_tcp_la_LIBADD = src/libmca_ptl_tcp.la
libmca_mpi_ptl_tcp_la_LDFLAGS = -module -avoid-version

7
src/mca/mpi/ptl/tcp/configure.params Обычный файл
Просмотреть файл

@ -0,0 +1,7 @@
# -*- shell-script -*-
#
# $HEADER$
#
PARAM_INIT_FILE=src/ptl_tcp.c
PARAM_CONFIG_HEADER_FILE="src/tcp_config.h"
PARAM_CONFIG_FILES="Makefile src/Makefile"

Просмотреть файл

@ -21,5 +21,5 @@ ltmain.sh
missing
mkinstalldirs
stamp-h1
teg_config.h
teg_config.h.in
tcp_config.h
tcp_config.h.in

19
src/mca/mpi/ptl/tcp/src/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,19 @@
# -*- makefile -*-
#
# $HEADER$
#
include $(top_lam_srcdir)/config/Makefile.options
AM_CPPFLAGS = \
-I$(top_lam_builddir)/src/include \
-I$(top_lam_srcdir)/src \
-I$(top_lam_srcdir)/src/include
noinst_LTLIBRARIES = libmca_ptl_tcp.la
libmca_ptl_tcp_la_SOURCES = \
ptl_tcp.c \
ptl_tcp.h \
ptl_tcp_init.c \
ptl_tcp_module.c \
ptl_tcp_send.c

22
src/mca/mpi/ptl/tcp/src/ptl_tcp.c Обычный файл
Просмотреть файл

@ -0,0 +1,22 @@
#include "lam/util/malloc.h"
#include "mca/mpi/pml/pml.h"
#include "mca/mpi/ptl/ptl.h"
#include "ptl_tcp.h"
mca_ptl_tcp_t mca_ptl_tcp = {
{
&mca_ptl_tcp_module_1_0_0_0,
0, /* ptl_frag_first_size */
0, /* ptl_frag_min_size */
0, /* ptl_frag_max_size */
0, /* ptl_endpoint_latency */
0, /* ptl_endpoint_bandwidth */
0, /* ptl_endpoint_count */
mca_ptl_tcp_add_procs,
mca_ptl_tcp_fini,
mca_ptl_tcp_send,
mca_ptl_tcp_request_alloc
}
};

84
src/mca/mpi/ptl/tcp/src/ptl_tcp.h Обычный файл
Просмотреть файл

@ -0,0 +1,84 @@
/** @file
*
* TCP PTL
*/
/*
* $HEADER$
*/
#ifndef MCA_PTL_TCP_H_
#define MCA_PTL_TCP_H
#include "lam/util/reactor.h"
#include "mca/mpi/pml/pml.h"
#include "mca/mpi/ptl/ptl.h"
/*
* TCP PTL module.
*/
struct mca_ptl_tcp_module_1_0_0_t {
mca_ptl_base_module_1_0_0_t super;
lam_reactor_t tcp_reactor;
};
typedef struct mca_ptl_tcp_module_1_0_0_t mca_ptl_tcp_module_1_0_0_t;
typedef struct mca_ptl_tcp_module_1_0_0_t mca_ptl_tcp_module_t;
extern mca_ptl_tcp_module_1_0_0_t mca_ptl_tcp_module_1_0_0_0;
extern int mca_ptl_tcp_module_open(void);
extern int mca_ptl_tcp_module_close(void);
extern mca_ptl_t** mca_ptl_tcp_module_init(
int *num_ptls,
int *thread_min,
int *thread_max
);
extern void mca_ptl_tcp_module_progress(
mca_ptl_base_tstamp_t tstamp
);
/**
* TCP PTL Interface
*
*
*/
struct mca_ptl_tcp_t {
mca_ptl_t super; /**< comment */
};
typedef struct mca_ptl_tcp_t mca_ptl_tcp_t;
extern mca_ptl_tcp_t mca_ptl_tcp;
extern int mca_ptl_tcp_fini(
struct mca_ptl_t* ptl
);
extern int mca_ptl_tcp_add_procs(
struct mca_ptl_t* ptl,
struct lam_proc_t **procs,
size_t nprocs
);
extern int mca_ptl_tcp_request_alloc(
struct mca_ptl_t* ptl,
struct mca_ptl_base_send_request_t**
);
extern int mca_ptl_tcp_send(
struct mca_ptl_t* ptl,
struct mca_ptl_base_send_request_t*,
size_t size,
bool* complete
);
#endif

72
src/mca/mpi/ptl/tcp/src/ptl_tcp_module.c Обычный файл
Просмотреть файл

@ -0,0 +1,72 @@
#include "lam/util/malloc.h"
#include "mca/mpi/pml/pml.h"
#include "mca/mpi/ptl/ptl.h"
#include "ptl_tcp.h"
#define mca_ptl_tcp_param_register_int(n,v) \
mca_base_param_lookup_int( \
mca_base_param_register_int("ptl","tcp",n,0,v))
mca_ptl_tcp_module_1_0_0_t mca_ptl_tcp_module = {
{
/* First, the mca_base_module_t struct containing meta information
about the module itself */
{
/* Indicate that we are a pml v1.0.0 module (which also implies a
specific MCA version) */
MCA_PML_BASE_VERSION_1_0_0,
"tcp", /* MCA module name */
1, /* MCA module major version */
0, /* MCA module minor version */
0, /* MCA module release version */
mca_ptl_tcp_module_open, /* module open */
mca_ptl_tcp_module_close /* module close */
},
/* Next the MCA v1.0.0 module meta data */
{
/* Whether the module is checkpointable or not */
false
},
mca_ptl_tcp_module_init, /* module init */
mca_ptl_tcp_module_progress /* module progress */
}
};
/**
* some comment
*
* @param foo description
* @return
*
* long description
*/
int mca_ptl_tcp_module_open(void)
{
return LAM_SUCCESS;
}
int mca_ptl_tcp_module_close(void)
{
return LAM_SUCCESS;
}
mca_ptl_t** mca_ptl_tcp_module_init(int* num_tcps, int* thread_min, int* thread_max)
{
lam_reactor_init(&mca_ptl_tcp_module.tcp_reactor);
return NULL;
}
void mca_ptl_tcp_module_progress(mca_ptl_base_tstamp_t tstamp)
{
lam_reactor_poll(&mca_ptl_tcp_module.tcp_reactor);
}

12
src/mca/mpi/ptl/tcp/src/ptl_tcp_send.c Обычный файл
Просмотреть файл

@ -0,0 +1,12 @@
#include "ptl_tcp.h"
int mca_ptl_tcp_send(
struct mca_ptl_t* ptl,
struct mca_ptl_base_send_request_t* sendreq,
size_t size,
bool* complete)
{
return LAM_SUCCESS;
}