1
1

* Remove unneeded prototype that was causing compile issues anyway

* Use proper tag space (the negatives below the blocking communicators)
  instead of the point-to-point space
* Use the PML interface instead of the MPI interface, since the MPI
  interface 1) shouldn't be used by components and 2) doesn't like
  negative tags

This commit was SVN r26693.
Этот коммит содержится в:
Brian Barrett 2012-06-28 16:52:03 +00:00
родитель b0954a6a3e
Коммит 0b887ab5a1
5 изменённых файлов: 15 добавлений и 43 удалений

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

@ -40,4 +40,5 @@
#define MCA_COLL_BASE_TAG_SCAN -23
#define MCA_COLL_BASE_TAG_SCATTER -24
#define MCA_COLL_BASE_TAG_SCATTERV -25
#define MCA_COLL_BASE_TAG_NONBLOCKING_BASE -26
#endif /* MCA_COLL_BASE_TAGS_H */

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

@ -20,7 +20,7 @@
EXTRA_DIST =
sources = \
coll_libnbc.h
coll_libnbc.h \
coll_libnbc_component.c \
coll_libnbc_not_implemented.c \
nbc.c \

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

@ -55,7 +55,7 @@ BEGIN_C_DECLS
#define NBC_INVALID_TOPOLOGY_COMM 8 /* invalid topology attached to communicator */
/* number of implemented collective functions */
#define NBC_NUM_COLL 19
#define NBC_NUM_COLL 17
struct ompi_coll_libnbc_component_t {
mca_coll_base_component_2_0_0_t super;

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

@ -9,6 +9,7 @@
*
*/
#include "nbc_internal.h"
#include "ompi/mca/coll/base/coll_tags.h"
/* only used in this file */
static inline int NBC_Start_round(NBC_Handle *handle);
@ -296,8 +297,8 @@ int NBC_Progress(NBC_Handle *handle) {
Test_time -= MPI_Wtime();
#endif
#ifdef HAVE_OMPI
/*res = ompi_request_test_all(handle->req_count, handle->req_array, &flag, MPI_STATUSES_IGNORE);*/
res = MPI_Testall(handle->req_count, handle->req_array, &flag, MPI_STATUSES_IGNORE);
res = ompi_request_test_all(handle->req_count, handle->req_array, &flag, MPI_STATUSES_IGNORE);
/* res = MPI_Testall(handle->req_count, handle->req_array, &flag, MPI_STATUSES_IGNORE); */
if(res != OMPI_SUCCESS) { printf("MPI Error in MPI_Testall() (%i)\n", res); ret=res; goto error; }
#endif
#ifdef NBC_TIMING
@ -393,9 +394,9 @@ static inline int NBC_Start_round(NBC_Handle *handle) {
#ifdef HAVE_OMPI
handle->req_array = (MPI_Request*)realloc((void*)handle->req_array, (handle->req_count)*sizeof(MPI_Request));
NBC_CHECK_NULL(handle->req_array);
/*res = MCA_PML_CALL(isend_init(buf1, sendargs->count, sendargs->datatype, sendargs->dest, handle->tag, MCA_PML_BASE_SEND_STANDARD, handle->comm, handle->req_array+handle->req_count-1));
printf("MPI_Isend(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, sendargs->count, (unsigned long)sendargs->datatype, sendargs->dest, handle->tag, (unsigned long)handle->comm, res);*/
res = MPI_Isend(buf1, sendargs->count, sendargs->datatype, sendargs->dest, handle->tag, handle->comm, handle->req_array+handle->req_count-1);
res = MCA_PML_CALL(isend_init(buf1, sendargs->count, sendargs->datatype, sendargs->dest, handle->tag, MCA_PML_BASE_SEND_STANDARD, handle->comm, handle->req_array+handle->req_count-1));
/*printf("MPI_Isend(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, sendargs->count, (unsigned long)sendargs->datatype, sendargs->dest, handle->tag, (unsigned long)handle->comm, res);*/
/* res = MPI_Isend(buf1, sendargs->count, sendargs->datatype, sendargs->dest, handle->tag, handle->comm, handle->req_array+handle->req_count-1); */
if(OMPI_SUCCESS != res) { printf("Error in MPI_Isend(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, sendargs->count, (unsigned long)sendargs->datatype, sendargs->dest, handle->tag, (unsigned long)handle->comm, res); ret=res; goto error; }
#endif
#ifdef NBC_TIMING
@ -421,9 +422,9 @@ static inline int NBC_Start_round(NBC_Handle *handle) {
#ifdef HAVE_OMPI
handle->req_array = (MPI_Request*)realloc((void*)handle->req_array, (handle->req_count)*sizeof(MPI_Request));
NBC_CHECK_NULL(handle->req_array);
/*res = MCA_PML_CALL(irecv(buf1, recvargs->count, recvargs->datatype, recvargs->source, handle->tag, handle->comm, handle->req_array+handle->req_count-1));
printf("MPI_Irecv(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, recvargs->count, (unsigned long)recvargs->datatype, recvargs->source, handle->tag, (unsigned long)handle->comm, res); */
res = MPI_Irecv(buf1, recvargs->count, recvargs->datatype, recvargs->source, handle->tag, handle->comm, handle->req_array+handle->req_count-1);
res = MCA_PML_CALL(irecv(buf1, recvargs->count, recvargs->datatype, recvargs->source, handle->tag, handle->comm, handle->req_array+handle->req_count-1));
/*printf("MPI_Irecv(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, recvargs->count, (unsigned long)recvargs->datatype, recvargs->source, handle->tag, (unsigned long)handle->comm, res); */
/*res = MPI_Irecv(buf1, recvargs->count, recvargs->datatype, recvargs->source, handle->tag, handle->comm, handle->req_array+handle->req_count-1); */
if(OMPI_SUCCESS != res) { printf("Error in MPI_Irecv(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, recvargs->count, (unsigned long)recvargs->datatype, recvargs->source, handle->tag, (unsigned long)handle->comm, res); ret=res; goto error; }
#endif
#ifdef NBC_TIMING
@ -528,13 +529,13 @@ int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t
/******************** Do the tag and shadow comm administration ... ***************/
/* we found it */
comminfo->tag++;
comminfo->tag--;
handle->tag=comminfo->tag;
handle->comm=comm;
/*printf("got comminfo: %lu tag: %i\n", comminfo, comminfo->tag);*/
/* reset counter ... */
if(handle->tag == 32767) {
if(handle->tag == -32767) {
handle->tag=1;
comminfo->tag=1;
NBC_DEBUG(2,"resetting tags ...\n");
@ -549,8 +550,7 @@ int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t
}
int NBC_Init_comm(MPI_Comm comm, NBC_Comminfo *comminfo) {
/* set tag to 1 */
comminfo->tag=1;
comminfo->tag= MCA_COLL_BASE_TAG_NONBLOCKING_BASE;
#ifdef NBC_CACHE_SCHEDULE
/* initialize the NBC_ALLTOALL SchedCache tree */

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

@ -57,8 +57,6 @@ extern "C" {
#define NBC_SCAN 13
#define NBC_SCATTER 14
#define NBC_SCATTERV 15
#define NBC_CART_SHIFT_XCHG 16
#define NBC_NEIGHBOR_XCHG 17
/* set the number of collectives in nbc.h !!!! */
/* several typedefs for NBC */
@ -230,34 +228,7 @@ typedef struct {
} NBC_Scatter_args;
int NBC_Scatter_args_compare(NBC_Scatter_args *a, NBC_Scatter_args *b, void *param);
typedef struct {
NBC_Schedule *schedule;
void *sbuf;
int scount;
MPI_Datatype stype;
void *rbuf;
int rcount;
MPI_Datatype rtype;
int direction;
int disp;
MPI_Comm comm;
} NBC_Icart_shift_xchg_args;
int NBC_Icart_shift_xchg_args_compare(NBC_Icart_shift_xchg_args *a, NBC_Icart_shift_xchg_args *b, void *param);
typedef struct {
NBC_Schedule *schedule;
void *sbuf;
int scount;
MPI_Datatype stype;
void *rbuf;
int rcount;
MPI_Datatype rtype;
MPI_Comm comm;
} NBC_Ineighbor_xchg_args;
int NBC_Ineighbor_xchg_args_compare(NBC_Ineighbor_xchg_args *a, NBC_Ineighbor_xchg_args *b, void *param);
/* Schedule cache structures/functions */
u_int32_t adler32(u_int32_t adler, int8_t *buf, int len);
void NBC_SchedCache_args_delete(void *entry);
void NBC_SchedCache_args_delete_key_dummy(void *k);