From d151a93931d4dc237380507834eb2205d1483af3 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Mon, 17 Aug 2020 16:46:17 -0600 Subject: [PATCH] dont use trimean in exchange-strong --- bin/CMakeLists.txt | 2 +- bin/exchange_strong.cu | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index b4b3550..db4c100 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -75,7 +75,7 @@ add_executable(exchange-weak exchange_weak.cu) target_link_libraries(exchange-weak stencil::stencil) add_args(exchange-weak) -add_executable(exchange-strong exchange_strong.cu statistics.cpp) +add_executable(exchange-strong exchange_strong.cu) target_link_libraries(exchange-strong stencil::stencil) add_args(exchange-strong) diff --git a/bin/exchange_strong.cu b/bin/exchange_strong.cu index 6d42190..e909e48 100644 --- a/bin/exchange_strong.cu +++ b/bin/exchange_strong.cu @@ -5,8 +5,6 @@ #include -#include "statistics.hpp" - #include "argparse/argparse.hpp" #include "stencil/stencil.hpp" @@ -79,7 +77,6 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } - MethodFlags methods = MethodFlags::None; if (useStaged) { methods = MethodFlags::CudaMpi; @@ -141,19 +138,15 @@ int main(int argc, char **argv) { MPI_Barrier(MPI_COMM_WORLD); - Statistics stats; - double elapsed = MPI_Wtime(); - for (int iter = 0; iter < nIters; ++iter) { if (0 == rank) { std::cerr << "exchange " << iter << "\n"; } dd.exchange(); + elapsed = MPI_Wtime() - elapsed; } - elapsed = MPI_Wtime() - elapsed; MPI_Allreduce(MPI_IN_PLACE, &elapsed, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - stats.insert(elapsed); #ifdef STENCIL_SETUP_STATS if (0 == rank) { @@ -186,15 +179,16 @@ int main(int argc, char **argv) { // clang-format off // same as strong.cu // header should be - // bin,config,naive,x,y,z,s,MPI (B),Colocated (B),cudaMemcpyPeer (B),direct (B)iters,gpus,nodes,ranks,mpi_topo,node_gpus,trimean (s) + // bin,config,naive,x,y,z,s,MPI (B),Colocated (B),cudaMemcpyPeer (B),direct (B)iters,gpus,nodes,ranks,mpi_topo,node_gpus,exchange (s) // clang-format on - printf("exchange,%s,%d,%lu,%lu,%lu,%lu," // s - "%lu,%lu,%lu,%lu," // <- exchange bytes - "%d,%d,%d,%d,%e\n", - methodStr.c_str(), useNaivePlacement, x, y, z, x * y * z, dd.exchange_bytes_for_method(MethodFlags::CudaMpi), - dd.exchange_bytes_for_method(MethodFlags::CudaMpiColocated), - dd.exchange_bytes_for_method(MethodFlags::CudaMemcpyPeer), - dd.exchange_bytes_for_method(MethodFlags::CudaKernel), nIters, numSubdoms, numNodes, size, stats.trimean()); + printf( + "exchange,%s,%d,%lu,%lu,%lu,%lu," // s + "%lu,%lu,%lu,%lu," // <- exchange bytes + "%d,%d,%d,%d,%e\n", + methodStr.c_str(), useNaivePlacement, x, y, z, x * y * z, dd.exchange_bytes_for_method(MethodFlags::CudaMpi), + dd.exchange_bytes_for_method(MethodFlags::CudaMpiColocated), + dd.exchange_bytes_for_method(MethodFlags::CudaMemcpyPeer), + dd.exchange_bytes_for_method(MethodFlags::CudaKernel), nIters, numSubdoms, numNodes, size, elapsed); } #endif // STENCIL_EXCHANGE_STATS