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

Not going to use ranktag_counts, so remove

parent 8db8aa2d
Branches
No related tags found
1 merge request!8Draft: RDMA version with wrapped infinity calls
......@@ -99,7 +99,6 @@ static size_t max_logs = 0;
/* Offsets of the ranktag regions within the receive windows and lists of the
* assocated tags. */
static size_t ranktag_sizes[MAX_NR_RANKS] = {0};
// static size_t *ranktag_counts;
static size_t *ranktag_offsets;
static size_t *ranktag_lists;
......@@ -278,13 +277,10 @@ static void *send_thread(void *arg) {
* subtype, tag and rank. Need to search the ranktag_lists for our ranktag
* value. XXX bisection search if sorted? XXX */
size_t ranktag = toranktag(log->subtype, log->otherrank, log->tag);
// size_t counts = ranktag_counts[INDEX2(MAX_NR_RANKS, myrank,
// log->otherrank)];
log->offset = 0;
int found = 0;
size_t counts = max_logs; // We search all of ranktag_lists...
for (size_t j = 0; j < counts; j++) {
for (size_t j = 0; j < max_logs; j++) {
if (ranktag_lists[INDEX3(MAX_NR_RANKS, nr_ranks, log->rank,
log->otherrank, j)] == ranktag) {
log->offset = ranktag_offsets[INDEX3(MAX_NR_RANKS, nr_ranks, log->rank,
......@@ -296,8 +292,8 @@ static void *send_thread(void *arg) {
if (!found) {
error(
"Failed sending a message of size %zd to %d/%d "
"@ %zd\n, no offset found for ranktag %zd, counts = %zd",
datasize, log->otherrank, log->subtype, log->offset, ranktag, counts);
"@ %zd\n, no offset found for ranktag %zd",
datasize, log->otherrank, log->subtype, log->offset, ranktag);
}
if (verbose)
......@@ -567,7 +563,6 @@ static size_t pick_logs() {
(size_t *)calloc(MAX_NR_RANKS * nr_ranks * max_logs, sizeof(size_t));
ranktag_lists =
(size_t *)calloc(MAX_NR_RANKS * nr_ranks * max_logs, sizeof(size_t));
// ranktag_counts = (size_t *)calloc(MAX_NR_RANKS * nr_ranks, sizeof(size_t));
/* Setup the ranktag offsets for our receive windows. Also define the sizes
* of the windows. XXX note these are over the complete lists not the
......@@ -583,8 +578,6 @@ static size_t pick_logs() {
/* Need to use a multiple of blocks to keep alignment. */
size_t size = toblocks(log->size) + HEADER_SIZE;
ranktag_sizes[log->otherrank] += size;
// ranktag_counts[INDEX2(MAX_NR_RANKS, log->otherrank, myrank)]++;
}
free(recv_queue);
......@@ -686,8 +679,6 @@ int main(int argc, char *argv[]) {
MPI_Allreduce(MPI_IN_PLACE, ranktag_offsets,
MAX_NR_RANKS * nr_ranks * max_logs, MPI_AINT, MPI_SUM,
MPI_COMM_WORLD);
// MPI_Allreduce(MPI_IN_PLACE, ranktag_counts, MAX_NR_RANKS * nr_ranks,
// MPI_AINT, MPI_SUM, MPI_COMM_WORLD);
MPI_Allreduce(MPI_IN_PLACE, ranktag_lists, MAX_NR_RANKS * nr_ranks * max_logs,
MPI_AINT, MPI_SUM, MPI_COMM_WORLD);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment