Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more fine-grained phiprof groups in MPI sends and recvs #29

Open
wants to merge 1 commit into
base: vlasiator-version
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions dccrg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10077,6 +10077,7 @@ template <
std::vector<int> counts(number_of_receives, -1);
std::vector<MPI_Datatype> datatypes(number_of_receives, MPI_DATATYPE_NULL);

phiprof::start("Build MPI Receive Datatypes");
for (size_t i = 0; i < number_of_receives; i++) {
const uint64_t cell = sender->second[i].first;

Expand Down Expand Up @@ -10124,9 +10125,11 @@ template <
<< std::endl;
abort();
}
phiprof::stop("Build MPI Receive Datatypes");

this->receive_requests[sender->first].push_back(MPI_Request());

phiprof::start("MPI Irecv");
ret_val = MPI_Irecv(
addresses[0],
1,
Expand All @@ -10144,6 +10147,7 @@ template <
<< std::endl;
abort();
}
phiprof::stop("MPI Irecv");

MPI_Type_free(&receive_datatype);
for (auto& type: datatypes) {
Expand Down Expand Up @@ -10208,6 +10212,7 @@ template <
int count = -1;
MPI_Datatype user_datatype = MPI_DATATYPE_NULL;

phiprof::start("Build MPI Send Datatypes");
std::tie(
address,
count,
Expand Down Expand Up @@ -10236,7 +10241,9 @@ template <
abort();
}
}
phiprof::stop("Build MPI Send Datatypes");

phiprof::start("MPI Isend");
ret_val = MPI_Isend(
address,
count,
Expand Down Expand Up @@ -10268,6 +10275,7 @@ template <
abort();
}
}
phiprof::stop("MPI Isend");
}

} else { // if this->send_single_cells
Expand All @@ -10277,6 +10285,7 @@ template <
std::vector<int> counts(number_of_sends, -1);
std::vector<MPI_Datatype> datatypes(number_of_sends, MPI_DATATYPE_NULL);

phiprof::start("Build MPI Send Datatypes");
for (size_t i = 0; i < number_of_sends; i++) {
const uint64_t cell = receiver->second[i].first;

Expand Down Expand Up @@ -10325,9 +10334,11 @@ template <
<< std::endl;
abort();
}
phiprof::stop("Build MPI Send Datatypes");

this->send_requests[receiver->first].push_back(MPI_Request());

phiprof::start("MPI Isend");
ret_val = MPI_Isend(
addresses[0],
1,
Expand All @@ -10345,6 +10356,7 @@ template <
<< std::endl;
abort();
}
phiprof::stop("MPI Isend");

MPI_Type_free(&send_datatype);
for (auto& type: datatypes) {
Expand Down