From e9cbb82e0fc44afe2813597039a638c3b9838352 Mon Sep 17 00:00:00 2001 From: Urs Ganse Date: Wed, 6 Sep 2023 16:33:14 +0300 Subject: [PATCH] Add more fine-grained phiprof groups in MPI sends and recvs --- dccrg.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dccrg.hpp b/dccrg.hpp index a4b8426..bd9ff92 100644 --- a/dccrg.hpp +++ b/dccrg.hpp @@ -10077,6 +10077,7 @@ template < std::vector counts(number_of_receives, -1); std::vector 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; @@ -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, @@ -10144,6 +10147,7 @@ template < << std::endl; abort(); } + phiprof::stop("MPI Irecv"); MPI_Type_free(&receive_datatype); for (auto& type: datatypes) { @@ -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, @@ -10236,7 +10241,9 @@ template < abort(); } } + phiprof::stop("Build MPI Send Datatypes"); + phiprof::start("MPI Isend"); ret_val = MPI_Isend( address, count, @@ -10268,6 +10275,7 @@ template < abort(); } } + phiprof::stop("MPI Isend"); } } else { // if this->send_single_cells @@ -10277,6 +10285,7 @@ template < std::vector counts(number_of_sends, -1); std::vector 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; @@ -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, @@ -10345,6 +10356,7 @@ template < << std::endl; abort(); } + phiprof::stop("MPI Isend"); MPI_Type_free(&send_datatype); for (auto& type: datatypes) {