1
1
This commit was SVN r376.
Этот коммит содержится в:
Tim Woodall 2004-01-14 17:41:36 +00:00
родитель 03af93aa08
Коммит a0d0e4773c
10 изменённых файлов: 139 добавлений и 56 удалений

15
src/mca/mpi/pml/teg/config/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,15 @@
# -*- makefile -*-
#
# $HEADER$
#
include $(top_lam_srcdir)/config/Makefile.options
# This file is only here so that "make dist" grabs all the extra
# config-level files that are necessary to build a LAM distribution
# tarball. Nothing gets built in this directory.
# Seems to be an automake bug -- depcomp is not automatically included
# in distribution tarballs.
EXTRA_DIST = depcomp

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

@ -7,4 +7,4 @@
PARAM_INIT_FILE=src/pml_teg.c
PARAM_CONFIG_HEADER_FILE="src/teg_config.h"
PARAM_CONFIG_FILES="Makefile src/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile config/Makefile"

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

@ -32,7 +32,7 @@ int mca_pml_teg_add_comm(lam_communicator_t* comm)
{
/* allocate pml specific comm data */
struct mca_pml_comm_t* pml_comm = (mca_pml_comm_t*)LAM_MALLOC(sizeof(mca_pml_comm_t));
mca_pml_ptl_comm_init(pml_comm);
mca_pml_ptl_comm_init(pml_comm, comm->c_remote_group->g_proc_count);
comm->c_pml_comm = pml_comm;
return LAM_SUCCESS;
}
@ -65,7 +65,7 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs)
/* preallocate space in array for max number of ptls */
mca_ptl_array_reserve(&proc_pml->proc_ptl_first, mca_pml_teg.teg_num_ptls);
mca_ptl_array_reserve(&proc_pml->proc_ptl_first, mca_pml_teg.teg_num_ptls);
mca_ptl_array_reserve(&proc_pml->proc_ptl_next, mca_pml_teg.teg_num_ptls);
proc_pml->proc_lam = proc;
proc->proc_pml = proc_pml;
}
@ -76,9 +76,33 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs)
mca_ptl_t* ptl = mca_pml_teg.teg_ptls[i];
ptl->ptl_add_procs(ptl, procs, nprocs);
}
/* compute a weighting factor for each ptl */
for(i=0; i<nprocs; i++) {
lam_proc_t *proc = procs[i];
mca_pml_proc_t* proc_pml = proc->proc_pml;
}
return LAM_SUCCESS;
}
int mca_pml_teg_del_procs(lam_proc_t** procs, size_t nprocs)
{
#if 0
size_t i;
for(i=0; i<nprocs; i++) {
lam_proc_t *proc = procs[i];
mca_pml_proc_t* proc_pml = proc->proc_pml;
/* notify each ptl that the proc is going away */
size_t p;
for(p=0; p<proc_pml->proc_ptl_first.ptl_size; p++) {
mca_ptl_info_t* ptl_info = proc_pml->proc_ptl_first.ptl_array[p];
ptl_info->ptl->ptl_del_proc(proc);
}
}
#endif
}
int mca_pml_teg_module_fini(void)
{
return LAM_SUCCESS;

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

@ -1,7 +1,7 @@
#include "ptl_base_comm.h"
void mca_pml_ptl_comm_init(mca_pml_comm_t* comm)
void mca_pml_ptl_comm_init(mca_pml_comm_t* comm, size_t size)
{
}

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

@ -43,7 +43,7 @@ struct mca_pml_comm_t {
typedef struct mca_pml_comm_t mca_pml_comm_t;
extern void mca_pml_ptl_comm_init(struct mca_pml_comm_t*);
extern void mca_pml_ptl_comm_init(struct mca_pml_comm_t*, size_t);
extern void mca_pml_ptl_comm_destroy(struct mca_pml_comm_t*);
#endif

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

@ -51,55 +51,55 @@ int mca_ptl_base_match(mca_ptl_base_reliable_hdr_t *frag_header,
mca_ptl_base_recv_frag_t *frag_desc, int *match_made,
lam_list_t *additional_matches)
{
/* local variables */
mca_ptl_base_sequence_t frag_msg_seq_num,next_msg_seq_num_expected;
lam_communicator_t *comm_ptr;
mca_ptl_base_recv_request_t *matched_receive;
/* local variables */
mca_ptl_base_sequence_t frag_msg_seq_num,next_msg_seq_num_expected;
lam_communicator_t *comm_ptr;
mca_ptl_base_recv_request_t *matched_receive;
mca_pml_comm_t *pml_comm;
int frag_src;
int frag_src;
/* initialization */
*match_made=0;
/* communicator pointer */
comm_ptr=lam_comm_lookup(frag_header->hdr_base.hdr_contextid);
/* communicator pointer */
comm_ptr=lam_comm_lookup(frag_header->hdr_base.hdr_contextid);
pml_comm=(mca_pml_comm_t *)comm_ptr->c_pml_comm;
/* source sequence number */
frag_msg_seq_num = frag_header->hdr_msg_seq_num;
/* source sequence number */
frag_msg_seq_num = frag_header->hdr_msg_seq_num;
/* get fragment communicator source rank */
frag_src = frag_header->hdr_frag_seq_num;
/* get fragment communicator source rank */
frag_src = frag_header->hdr_frag_seq_num;
/* get next expected message sequence number - if threaded
* run, lock to make sure that if another thread is processing
* a frag from the same message a match is made only once.
* Also, this prevents other posted receives (for a pair of
* end points) from being processed, and potentially "loosing"
* the fragment.
*/
/* get next expected message sequence number - if threaded
* run, lock to make sure that if another thread is processing
* a frag from the same message a match is made only once.
* Also, this prevents other posted receives (for a pair of
* end points) from being processed, and potentially "loosing"
* the fragment.
*/
THREAD_LOCK((pml_comm->c_matching_lock)+frag_src);
/* get sequence number of next message that can be processed */
next_msg_seq_num_expected = *((pml_comm->c_next_msg_seq_num)+frag_src);
/* get sequence number of next message that can be processed */
next_msg_seq_num_expected = *((pml_comm->c_next_msg_seq_num)+frag_src);
if (frag_msg_seq_num == next_msg_seq_num_expected) {
if (frag_msg_seq_num == next_msg_seq_num_expected) {
/*
* This is the sequence number we were expecting,
* so we can try matching it to already posted
* receives.
*/
/*
* This is the sequence number we were expecting,
* so we can try matching it to already posted
* receives.
*/
/* We're now expecting the next sequence number. */
(pml_comm->c_next_msg_seq_num[frag_src])++;
/* We're now expecting the next sequence number. */
(pml_comm->c_next_msg_seq_num[frag_src])++;
/* see if receive has already been posted */
matched_receive = mca_ptl_base_check_recieves_for_match(frag_header,
/* see if receive has already been posted */
matched_receive = mca_ptl_base_check_recieves_for_match(frag_header,
pml_comm);
/* if match found, process data */
if (matched_receive) {
/* if match found, process data */
if (matched_receive) {
/* set flag indicating the input fragment was matched */
*match_made=1;
@ -107,13 +107,13 @@ int mca_ptl_base_match(mca_ptl_base_reliable_hdr_t *frag_header,
* descriptor */
frag_desc->matched_recv=matched_receive;
/*
* update deliverd sequence number information,
* if need be.
*/
/*
* update deliverd sequence number information,
* if need be.
*/
} else {
/* if no match found, place on unexpected queue - need to
} else {
/* if no match found, place on unexpected queue - need to
* lock to prevent probe from interfering with updating
* the list */
THREAD_LOCK((pml_comm->unexpected_frags_lock)+frag_src);
@ -121,20 +121,20 @@ int mca_ptl_base_match(mca_ptl_base_reliable_hdr_t *frag_header,
(lam_list_item_t *)frag_desc);
THREAD_UNLOCK((pml_comm->unexpected_frags_lock)+frag_src);
}
}
/*
* Now that new message has arrived, check to see if
* any fragments on the c_frags_cant_match list
* may now be used to form new matchs
*/
if (0 < lam_list_get_size((pml_comm->frags_cant_match)+frag_src)) {
/*
* Now that new message has arrived, check to see if
* any fragments on the c_frags_cant_match list
* may now be used to form new matchs
*/
if (0 < lam_list_get_size((pml_comm->frags_cant_match)+frag_src)) {
lam_check_cantmatch_for_match(additional_matches,pml_comm,frag_src);
}
}
/*
* if threaded, ok to release lock, since the posted
* receive is not on any queue, so it won't be
@ -484,7 +484,7 @@ mca_ptl_base_recv_request_t *check_specific_and_wild_receives_for_match(
}
#if (0)
/* need to handle this -- lam_check_cantmatch_for_match();
/* need to handle this -- lam_check_cantmatch_for_match();
*/
/**
* Scan the list of frags that came in ahead of time to see if any
@ -508,7 +508,7 @@ void lam_check_cantmatch_for_match(lam_list_t *additional_matches,
int match_found;
mca_pml_base_sequence_t next_msg_seq_num_expected, frag_seq_number;
mca_pml_base_recv_frag_t *frag_desc;
mca_pml_base_recv_request_t *matched_receive;
mca_pml_base_recv_request_t *matched_receive;
/*
* Initialize list size - assume that most of the time this search
@ -589,7 +589,7 @@ void lam_check_cantmatch_for_match(lam_list_t *additional_matches,
(lam_list_item_t *)frag_desc);
} else {
/* if no match found, place on unexpected queue - need to
* lock to prevent probe from interfering with updating
* the list */

6
src/mca/mpi/ptl/tcp/VERSION Обычный файл
Просмотреть файл

@ -0,0 +1,6 @@
major=1
minor=0
release=0
alpha=0
beta=0
cvs=1

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

@ -0,0 +1,23 @@
Makefile
Makefile.in
acinclude.m4
aclocal.m4
configure
configure.ac
config.log
config.status
libtool
autom4te.cache
.libs
.deps
*.la
*.lo
.lam*
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
stamp-h1

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

@ -0,0 +1,15 @@
# -*- makefile -*-
#
# $HEADER$
#
include $(top_lam_srcdir)/config/Makefile.options
# This file is only here so that "make dist" grabs all the extra
# config-level files that are necessary to build a LAM distribution
# tarball. Nothing gets built in this directory.
# Seems to be an automake bug -- depcomp is not automatically included
# in distribution tarballs.
EXTRA_DIST = depcomp

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

@ -4,4 +4,4 @@
#
PARAM_INIT_FILE=src/ptl_tcp.c
PARAM_CONFIG_HEADER_FILE="src/tcp_config.h"
PARAM_CONFIG_FILES="Makefile src/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile config/Makefile"