From 7fc3002b5db3b40bf2801360f62134c156dfcc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Wed, 17 Feb 2021 15:01:50 +0100 Subject: [PATCH] change dht_collisions to dht_evictions + use option instead of set --- src/DHT/CMakeLists.txt | 4 ++-- src/model/ChemMaster.cpp | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/DHT/CMakeLists.txt b/src/DHT/CMakeLists.txt index 6658bf7b6..8346f7e25 100644 --- a/src/DHT/CMakeLists.txt +++ b/src/DHT/CMakeLists.txt @@ -3,7 +3,7 @@ target_include_directories(DHT PUBLIC ${MPI_C_INCLUDE_DIRS}) target_link_libraries(DHT PRIVATE MPI::MPI_C) target_compile_definitions(DHT PUBLIC OMPI_SKIP_MPICXX) -set(DHT_Debug FALSE CACHE BOOL "Toggle output of stastic table for each iteration") +option(DHT_Debug "Toggle output of stastic table for each iteration" OFF) if (DHT_Debug) target_compile_definitions(DHT PUBLIC DHT_STATISTICS) @@ -14,4 +14,4 @@ find_library(CRYPTO_LIBRARY crypto) add_library(DHT_Wrapper DHT_Wrapper.cpp DHT_Wrapper.h) target_include_directories(DHT_Wrapper PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(DHT_Wrapper PRIVATE DHT ${MATH_LIBRARY} ${CRYPTO_LIBRARY} POET_Util) \ No newline at end of file +target_link_libraries(DHT_Wrapper PRIVATE DHT ${MATH_LIBRARY} ${CRYPTO_LIBRARY} POET_Util) diff --git a/src/model/ChemMaster.cpp b/src/model/ChemMaster.cpp index afb0452e2..3e01b8941 100644 --- a/src/model/ChemMaster.cpp +++ b/src/model/ChemMaster.cpp @@ -286,12 +286,9 @@ void ChemMaster::end() { int dht_hits = 0; int dht_miss = 0; - int dht_collision = 0; + int dht_evictions = 0; if (dht_enabled) { - dht_hits = 0; - dht_miss = 0; - dht_collision = 0; dht_perfs = (int *)calloc(3, sizeof(int)); } @@ -324,7 +321,7 @@ void ChemMaster::end() { MPI_STATUS_IGNORE); dht_hits += dht_perfs[0]; dht_miss += dht_perfs[1]; - dht_collision += dht_perfs[2]; + dht_evictions += dht_perfs[2]; } } @@ -356,8 +353,8 @@ void ChemMaster::end() { R.parseEvalQ("profiling$dht_hits <- dht_hits"); R["dht_miss"] = dht_miss; R.parseEvalQ("profiling$dht_miss <- dht_miss"); - R["dht_collision"] = dht_collision; - R.parseEvalQ("profiling$dht_collisions <- dht_collision"); + R["dht_evictions"] = dht_evictions; + R.parseEvalQ("profiling$dht_evictions <- dht_evictions"); R["dht_get_time"] = dht_get_time; R.parseEvalQ("profiling$dht_get_time <- dht_get_time"); R["dht_fill_time"] = dht_fill_time;