Skip to content
Snippets Groups Projects
Commit 3d1066e5 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Now works, but runs out of tags when doubling the number of messages for the EAGLE_25 testdata

parent 7b8772df
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ static int datacheck_test(size_t size, void *data) {
}
/**
* @brief send nitiates MPI_Isend requests and the waits for completion.
* @brief Initiates MPI_Isend requests and the waits for completion.
*/
static void *send_thread(void *arg) {
......@@ -168,10 +168,13 @@ static void *send_thread(void *arg) {
if (datacheck) datacheck_fill(log->size, log->data);
/* And send. Note using different communicator so need to construct
* different, still unique and computable, tag.*/
* different, still unique and computable, tag. Also each send/recv pair
* needs the same communicator... as well as each send/test and recv/test
* the same thread! */
log->tag = log->tag + maxtag * log->subtype;
int comm = log->otherrank % 2;
err = MPI_Isend(log->data, log->size, MPI_BYTE, log->otherrank,
log->tag + maxtag * log->subtype,
subtypeMPI_comms[0], &log->req);
log->tag, subtypeMPI_comms[comm], &log->req);
/* Add a new send request. */
sends_queue[nr_sends_queue] = log;
......@@ -249,7 +252,7 @@ static void *send_thread(void *arg) {
}
/**
* @brief send nitiates MPI_Irecv requests and the waits for completion.
* @brief Initiates MPI_Irecv requests and the waits for completion.
*/
static void *recv_thread(void *arg) {
......@@ -311,11 +314,11 @@ static void *recv_thread(void *arg) {
/* Fill data with pattern. */
if (datacheck) datacheck_fill(log->size, log->data);
/* And listen for send. Note using different communicator so need to
* construct different, still unique and computable, tag.*/
err = MPI_Isend(log->data, log->size, MPI_BYTE, log->otherrank,
log->tag + maxtag * log->subtype,
subtypeMPI_comms[1], &log->req);
/* And listen for remote sends. Same constraints as sends... */
log->tag = log->tag + maxtag * log->subtype;
int comm = log->rank % 2;
err = MPI_Irecv(log->data, log->size, MPI_BYTE, log->otherrank,
log->tag, subtypeMPI_comms[comm], &log->req);
/* Add a new recv request. */
recvs_queue[nr_recvs_queue] = log;
......@@ -324,7 +327,6 @@ static void *recv_thread(void *arg) {
if (verbose)
message("recv injections completed: %d", nr_recvs_queue);
/* Now we wait for the recvs to complete. */
/* Global MPI_Test statistics. */
int ncalls = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment