From 26ad8e029f7f387685f2ceebd84ac52caf90348c Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Wed, 25 May 2022 21:25:45 -0500 Subject: [PATCH] Close #321. --- CMake/FindGLPK.cmake | 40 ++++++++++ CMakeLists.txt | 16 ++++ adapter/mpiio/CMakeLists.txt | 2 +- adapter/posix/CMakeLists.txt | 2 +- adapter/pubsub/CMakeLists.txt | 2 +- adapter/stdio/CMakeLists.txt | 2 +- adapter/test/CMakeLists.txt | 2 +- adapter/test/vfd/CMakeLists.txt | 1 + benchmarks/CMakeLists.txt | 2 +- ci/install_deps.sh | 8 +- src/CMakeLists.txt | 22 +++--- src/data_placement_engine.cc | 128 ++++++++++++++++++++------------ test/CMakeLists.txt | 20 ++--- 13 files changed, 168 insertions(+), 79 deletions(-) create mode 100644 CMake/FindGLPK.cmake diff --git a/CMake/FindGLPK.cmake b/CMake/FindGLPK.cmake new file mode 100644 index 000000000..940e63864 --- /dev/null +++ b/CMake/FindGLPK.cmake @@ -0,0 +1,40 @@ +# Find GLPK header and library. +# + +# This module defines the following uncached variables: +# GLPK_FOUND, if false, do not try to use GLPK. +# GLPK_INCLUDE_DIRS, where to find glpk.h. +# GLPK_LIBRARIES, the libraries to link against to use the GLPK library +# GLPK_LIBRARY_DIRS, the directory where the GLPK library is found. + +find_path( + GLPK_INCLUDE_DIR + glpk.h +) + +if( GLPK_INCLUDE_DIR ) + find_library( + GLPK_LIBRARY + NAMES glpk + ) + if( GLPK_LIBRARY ) + set(GLPK_LIBRARY_DIR "") + get_filename_component(GLPK_LIBRARY_DIRS ${GLPK_LIBRARY} PATH) + # Set uncached variables as per standard. + set(GLPK_FOUND ON) + set(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR}) + set(GLPK_LIBRARIES ${GLPK_LIBRARY}) + endif(GLPK_LIBRARY) +else(GLPK_INCLUDE_DIR) + message(STATUS "FindGLPK: Could not find glpk.h") +endif(GLPK_INCLUDE_DIR) + +if(GLPK_FOUND) + if(NOT GLPK_FIND_QUIETLY) + message(STATUS "FindGLPK: Found both glpk.h and libglpk.a") + endif(NOT GLPK_FIND_QUIETLY) +else(GLPK_FOUND) + if(GLPK_FIND_REQUIRED) + message(STATUS "FindGLPK: Could not find glpk.h and/or libglpk.a") + endif(GLPK_FIND_REQUIRED) +endif(GLPK_FOUND) diff --git a/CMakeLists.txt b/CMakeLists.txt index 082f15163..54fda5c70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,6 +270,22 @@ if(HERMES_RPC_THALLIUM) endif() endif() +# GLOG +find_package(glog REQUIRED) +if(glog_FOUND) + message(STATUS "found GLOG at ${glog_DIR}") +endif() +find_path(GLOG_INCLUDE_DIRS NAME glog PATH_SUFFIXES include/) +include_directories(${GLOG_INCLUDE_DIRS}) + +# GFLAGS +find_package(gflags REQUIRED) +if(gflags_FOUND) + message(STATUS "found GFLAGS at ${gflags_DIR}") +endif() +find_path(GFLAG_INCLUDE_DIRS NAME gflags PATH_SUFFIXES include/) +include_directories(${GFLAG_INCLUDE_DIRS}) + # GOTCHA if(HERMES_INTERCEPT_IO) find_package(gotcha REQUIRED) diff --git a/adapter/mpiio/CMakeLists.txt b/adapter/mpiio/CMakeLists.txt index d641f330c..f0beb6fbc 100644 --- a/adapter/mpiio/CMakeLists.txt +++ b/adapter/mpiio/CMakeLists.txt @@ -20,7 +20,7 @@ set(MPIIO_ADAPTER_PRIVATE_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.h add_library(hermes_mpiio SHARED ${MPIIO_ADAPTER_PRIVATE_HEADER} ${MPIIO_ADAPTER_PUBLIC_HEADER} ${MPIIO_ADAPTER_SRC}) target_include_directories(hermes_mpiio PRIVATE ${HERMES_ADAPTER_DIR}) add_dependencies(hermes_mpiio hermes) -target_link_libraries(hermes_mpiio hermes MPI::MPI_CXX stdc++fs) +target_link_libraries(hermes_mpiio hermes MPI::MPI_CXX glog::glog stdc++fs) #----------------------------------------------------------------------------- # Add Target(s) to CMake Install diff --git a/adapter/posix/CMakeLists.txt b/adapter/posix/CMakeLists.txt index af15f2aef..de9ac18d8 100644 --- a/adapter/posix/CMakeLists.txt +++ b/adapter/posix/CMakeLists.txt @@ -20,7 +20,7 @@ set(POSIX_ADAPTER_PRIVATE_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.h add_library(hermes_posix SHARED ${POSIX_ADAPTER_PRIVATE_HEADER} ${POSIX_ADAPTER_PUBLIC_HEADER} ${POSIX_ADAPTER_SRC}) target_include_directories(hermes_posix PRIVATE ${HERMES_ADAPTER_DIR}) add_dependencies(hermes_posix hermes) -target_link_libraries(hermes_posix hermes MPI::MPI_CXX stdc++fs) +target_link_libraries(hermes_posix hermes MPI::MPI_CXX glog::glog stdc++fs) #----------------------------------------------------------------------------- # Add Target(s) to CMake Install diff --git a/adapter/pubsub/CMakeLists.txt b/adapter/pubsub/CMakeLists.txt index fdf2ccc32..f59ba11f8 100644 --- a/adapter/pubsub/CMakeLists.txt +++ b/adapter/pubsub/CMakeLists.txt @@ -12,7 +12,7 @@ set(PUBSUB_ADAPTER_SRC pubsub.cc metadata_manager.cc) add_library(hermes_pubsub SHARED ${PUBSUB_ADAPTER_PRIVATE_HEADER} ${PUBSUB_ADAPTER_PUBLIC_HEADER} ${PUBSUB_ADAPTER_SRC}) target_include_directories(hermes_pubsub PRIVATE ${HERMES_ADAPTER_DIR}) add_dependencies(hermes_pubsub hermes) -target_link_libraries(hermes_pubsub hermes MPI::MPI_CXX) +target_link_libraries(hermes_pubsub hermes MPI::MPI_CXX glog::glog) #----------------------------------------------------------------------------- # Add Target(s) to CMake Install diff --git a/adapter/stdio/CMakeLists.txt b/adapter/stdio/CMakeLists.txt index 236af3f76..2598600ed 100644 --- a/adapter/stdio/CMakeLists.txt +++ b/adapter/stdio/CMakeLists.txt @@ -20,7 +20,7 @@ set(STDIO_ADAPTER_PRIVATE_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.h add_library(hermes_stdio SHARED ${STDIO_ADAPTER_PRIVATE_HEADER} ${STDIO_ADAPTER_PUBLIC_HEADER} ${STDIO_ADAPTER_SRC}) target_include_directories(hermes_stdio PRIVATE ${HERMES_ADAPTER_DIR}) add_dependencies(hermes_stdio hermes) -target_link_libraries(hermes_stdio hermes MPI::MPI_CXX stdc++fs) +target_link_libraries(hermes_stdio hermes MPI::MPI_CXX glog::glog stdc++fs) #----------------------------------------------------------------------------- # Add Target(s) to CMake Install diff --git a/adapter/test/CMakeLists.txt b/adapter/test/CMakeLists.txt index 7566fd012..206e77efc 100644 --- a/adapter/test/CMakeLists.txt +++ b/adapter/test/CMakeLists.txt @@ -4,7 +4,7 @@ set(HERMES_ADAPTER_TEST_DIR ${HERMES_ADAPTER_DIR}/test) find_package(Catch2 REQUIRED) add_executable(hermes_daemon hermes_daemon.cc) -target_link_libraries(hermes_daemon -ldl -lc MPI::MPI_CXX) +target_link_libraries(hermes_daemon -ldl -lc MPI::MPI_CXX glog::glog) target_link_libraries(hermes_daemon hermes) add_dependencies(hermes_daemon hermes) diff --git a/adapter/test/vfd/CMakeLists.txt b/adapter/test/vfd/CMakeLists.txt index eeac1980d..82691f180 100644 --- a/adapter/test/vfd/CMakeLists.txt +++ b/adapter/test/vfd/CMakeLists.txt @@ -14,6 +14,7 @@ target_include_directories(hermes_vfd_test target_link_libraries(hermes_vfd_test hermes MPI::MPI_CXX + glog::glog stdc++fs ${HDF5_HERMES_VFD_EXT_LIB_DEPENDENCIES} ${HDF5_HERMES_VFD_EXT_PKG_DEPENDENCIES} diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 5254ed6b0..7abc369b8 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -8,7 +8,7 @@ set(BENCHMARKS mdm_bench dpe_bench vpic_bench) foreach(benchmark ${BENCHMARKS}) add_executable(${benchmark} ${benchmark}.cc) target_link_libraries(${benchmark} hermes MPI::MPI_CXX - $<$:thallium>) + $<$:thallium> glog::glog) target_compile_definitions(${benchmark} PRIVATE $<$:HERMES_RPC_THALLIUM>) endforeach() diff --git a/ci/install_deps.sh b/ci/install_deps.sh index 97ee28a61..97c19055f 100755 --- a/ci/install_deps.sh +++ b/ci/install_deps.sh @@ -10,7 +10,6 @@ MOCHI_REPO_DIR=${INSTALL_DIR}/mochi-spack-packages THALLIUM_VERSION=0.10.0 GOTCHA_VERSION=develop CATCH2_VERSION=2.13.3 -ORTOOLS_VERSION=7.7 SPACK_VERSION=0.17.2 HDF5_VERSION=1_13_0 @@ -59,11 +58,12 @@ spack repo add ./ci/hermes THALLIUM_SPEC="mochi-thallium@${THALLIUM_VERSION} ^mercury~boostsys" CATCH2_SPEC="catch2@${CATCH2_VERSION}" -ORTOOLS_SPEC="gortools@${ORTOOLS_VERSION}" +GLPK_SPEC="glpk" +GLOG_SPEC="glog" -spack install ${THALLIUM_SPEC} ${CATCH2_SPEC} ${ORTOOLS_SPEC} +spack install ${THALLIUM_SPEC} ${CATCH2_SPEC} ${GLPK_SPEC} ${GLOG_SPEC} SPACK_STAGING_DIR=~/spack_staging mkdir -p ${SPACK_STAGING_DIR} -spack view --verbose symlink ${SPACK_STAGING_DIR} ${THALLIUM_SPEC} ${CATCH2_SPEC} ${ORTOOLS_SPEC} +spack view --verbose symlink ${SPACK_STAGING_DIR} ${THALLIUM_SPEC} ${CATCH2_SPEC} ${GLPK_SPEC} ${GLOG_SPEC} cp -LRnv ${SPACK_STAGING_DIR}/* ${INSTALL_DIR} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bb2da8fa..8d36952f6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,18 +4,18 @@ configure_file(hermes_version.h.in hermes_version.h) #------------------------------------------------------------------------------ # External dependencies #------------------------------------------------------------------------------ -# google ortools -find_package(ortools REQUIRED) -if(ORTOOLS_FOUND) - include_directories(${ORTOOLS_INCLUDE_DIRS}) - message(STATUS "Found ortools") - set(HERMES_EXT_INCLUDE_DEPENDENCIES ${ORTOOLS_INCLUDE_DIRS} - ${HERMES_EXT_INCLUDE_DEPENDENCIES} - ) +# GNU Linear Programming Kit +find_package(GLPK REQUIRED) +if(GLPK_FOUND) + include_directories(${GLPK_INCLUDE_DIRS}) + message(STATUS "Found GLPK") + # set(HERMES_EXT_INCLUDE_DEPENDENCIES ${GLPK_INCLUDE_DIRS} + # ${HERMES_EXT_INCLUDE_DEPENDENCIES} + # ) set(HERMES_EXT_LIB_DEPENDENCIES - ${ORTOOLS_LIBRARIES} ${HERMES_EXT_LIB_DEPENDENCIES}) + ${GLPK_LIBRARIES} ${HERMES_EXT_LIB_DEPENDENCIES}) else() - message(STATUS "ortools not found") + message(STATUS "GLPK not found") endif() #------------------------------------------------------------------------------ @@ -50,7 +50,7 @@ target_include_directories(hermes ) target_link_libraries(hermes - PUBLIC ${ORTOOLS_LIBRARIES} + PUBLIC ${GLPK_LIBRARIES} PUBLIC thallium PUBLIC "$<$:${GOTCHA_MODULE_LIBS}>" PRIVATE $<$:MPI::MPI_CXX> diff --git a/src/data_placement_engine.cc b/src/data_placement_engine.cc index 54295b0f1..e807d461d 100644 --- a/src/data_placement_engine.cc +++ b/src/data_placement_engine.cc @@ -13,14 +13,13 @@ #include "data_placement_engine.h" #include +#include #include #include #include #include -#include "ortools/linear_solver/linear_solver.h" - #include "hermes.h" #include "hermes_types.h" #include "metadata_management.h" @@ -249,11 +248,6 @@ Status MinimizeIoTimePlacement(const std::vector &blob_sizes, const std::vector &targets, std::vector &output, const api::Context &ctx) { - using operations_research::MPSolver; - using operations_research::MPVariable; - using operations_research::MPConstraint; - using operations_research::MPObjective; - Status result; const size_t num_targets = targets.size(); const size_t num_blobs = blob_sizes.size(); @@ -272,103 +266,141 @@ Status MinimizeIoTimePlacement(const std::vector &blob_sizes, } const size_t total_constraints = - num_blobs + (num_targets * constraints_per_target) - 1; - std::vector blob_constrt(total_constraints); - std::vector> blob_fraction(num_blobs); - MPSolver solver("LinearOpt", MPSolver::GLOP_LINEAR_PROGRAMMING); - int num_constrts {0}; + num_blobs + (num_targets * constraints_per_target) - 1; + glp_prob *lp = glp_create_prob(); + int ia[1+1000], ja[1+1000], last = 0; + double ar[1+1000]; + // double x[num_blobs * num_targets]; + + glp_set_prob_name(lp, "min_io"); + glp_set_obj_dir(lp, GLP_MIN); + glp_add_rows(lp, total_constraints); + glp_add_cols(lp, num_blobs * num_targets); - // Constraint #1: Sum of fraction of each blob is 1 + int num_constrts {0}; // counter that increase to 1) blobs 2) targets X 3 + + // Constraint #1: Sum of fraction of each blob is 1. for (size_t i {0}; i < num_blobs; ++i) { - blob_constrt[num_constrts+i] = solver.MakeRowConstraint(1, 1); - blob_fraction[i].resize(num_targets); + // Use GLP_FX for the fixed contraint of 1. + std::string row_name {"blob_row_" + std::to_string(i)}; + glp_set_row_name(lp, i+1, row_name.c_str()); + glp_set_row_bnds(lp, i+1, GLP_FX, 1.0, 1.0); // TODO(KIMMY): consider remote nodes? for (size_t j {0}; j < num_targets; ++j) { + int ij = i * num_targets + j + 1; std::string var_name {"blob_dst_" + std::to_string(i) + "_" + std::to_string(j)}; - blob_fraction[i][j] = solver.MakeNumVar(0.0, 1, var_name); - blob_constrt[num_constrts+i]->SetCoefficient(blob_fraction[i][j], 1); + // total umber of variables = number of blobs * number of targets. + glp_set_col_name(lp, ij, var_name.c_str()); + glp_set_col_bnds(lp, ij, GLP_DB, 0.0, 1.0); + ia[ij] = i+1, ja[ij] = j+1, ar[ij] = 1.0; // var[i][j] = 1.0 + last = ij; } } num_constrts += num_blobs; // Constraint #2: Minimum Remaining Capacity Constraint + int last2 = 0; if (minimum_remaining_capacity != 0) { - for (size_t j {0}; j < num_targets; ++j) { + for (size_t j{0}; j < num_targets; ++j) { double remaining_capacity_threshold = - static_cast(node_state[j]) * minimum_remaining_capacity; - blob_constrt[num_constrts+j] = solver.MakeRowConstraint( - 0, static_cast(node_state[j]) - remaining_capacity_threshold); - for (size_t i {0}; i < num_blobs; ++i) { - blob_constrt[num_constrts+j]->SetCoefficient( - blob_fraction[i][j], static_cast(blob_sizes[i])); + static_cast(node_state[j]) * minimum_remaining_capacity; + std::string row_name{"mrc_row_" + std::to_string(j)}; + glp_set_row_name(lp, num_constrts + j + 1, row_name.c_str()); + glp_set_row_bnds( + lp, num_constrts + j + 1, GLP_DB, 0.0, + static_cast(node_state[j]) - remaining_capacity_threshold); + + for (size_t i{0}; i < num_blobs; ++i) { + // Starting row of contraint array is (blob * target)*num_constrts. + int ij = j * num_blobs + i + 1 + last; + ia[ij] = num_constrts + j + 1, ja[ij] = j + 1, + ar[ij] = static_cast(blob_sizes[i]); + last2 = ij; } } num_constrts += num_targets; } // Constraint #3: Remaining Capacity Change Threshold + int last3 = 0; if (capacity_change_threshold != 0) { for (size_t j {0}; j < num_targets; ++j) { - blob_constrt[num_constrts+j] = - solver.MakeRowConstraint(0, capacity_change_threshold * node_state[j]); + std::string row_name {"rcct_row_" + std::to_string(j)}; + glp_set_row_name(lp, num_constrts+j+1, row_name.c_str()); + glp_set_row_bnds(lp, num_constrts+j+1, GLP_DB, 0.0, + capacity_change_threshold * node_state[j]); for (size_t i {0}; i < num_blobs; ++i) { - blob_constrt[num_constrts+j]->SetCoefficient( - blob_fraction[i][j], static_cast(blob_sizes[i])); + int ij = j * num_blobs + i + 1 + last2; + ia[ij] = num_constrts+j+1, ja[ij] = j+1, + ar[ij] = static_cast(blob_sizes[i]); + last3 = ij; } } num_constrts += num_targets; } + int last4 = 0; // Placement Ratio for (size_t j {0}; j < num_targets-1; ++j) { - blob_constrt[num_constrts+j] = - solver.MakeRowConstraint(0, solver.infinity()); + std::string row_name {"pr_row_" + std::to_string(j)}; + glp_set_row_name(lp, num_constrts+j+1, row_name.c_str()); + glp_set_row_bnds(lp, num_constrts+j+1, GLP_LO, 0.0, 0.0); + for (size_t i {0}; i < num_blobs; ++i) { - blob_constrt[num_constrts+j]->SetCoefficient( - blob_fraction[i][j+1], static_cast(blob_sizes[i])); + int ij = j * num_blobs + i + 1 + last3 + j; + ia[ij] = num_constrts+j+1, ja[ij] = j+2, + ar[ij] = static_cast(blob_sizes[i]); + double placement_ratio = static_cast(node_state[j+1])/ node_state[j]; - blob_constrt[num_constrts+j]->SetCoefficient( - blob_fraction[i][j], - static_cast(blob_sizes[i])*(0-placement_ratio)); + ij = ij + 1; + ia[ij] = num_constrts+j+1, ja[ij] = j+1, + ar[ij] = static_cast(blob_sizes[i])*(0-placement_ratio); + last4 = ij; } } // Objective to minimize IO time - MPObjective* const objective = solver.MutableObjective(); for (size_t i {0}; i < num_blobs; ++i) { for (size_t j {0}; j < num_targets; ++j) { - objective->SetCoefficient(blob_fraction[i][j], - static_cast(blob_sizes[i])/bandwidths[j]); + int ij = i * num_targets + j + 1; + glp_set_obj_coef(lp, ij, + static_cast(blob_sizes[i])/bandwidths[j]); } } - objective->SetMinimization(); - - const MPSolver::ResultStatus result_status = solver.Solve(); + glp_load_matrix(lp, last4, ia, ja, ar); + glp_smcp parm; + glp_init_smcp(&parm); + parm.msg_lev = GLP_MSG_OFF; + glp_simplex(lp, &parm); // Check if the problem has an optimal solution. - if (result_status != MPSolver::OPTIMAL) { + if (glp_get_status(lp) != GLP_OPT) { result = DPE_ORTOOLS_NO_SOLUTION; LOG(ERROR) << result.Msg(); + glp_delete_prob(lp); return result; } + glp_get_obj_val(lp); for (size_t i {0}; i < num_blobs; ++i) { PlacementSchema schema; size_t target_pos {0}; // to track the target with most data - auto largest_bulk{blob_fraction[i][0]->solution_value()*blob_sizes[i]}; + auto largest_bulk{glp_get_col_prim(lp, i*num_targets+1) *blob_sizes[i]}; // NOTE: could be inefficient if there are hundreds of targets for (size_t j {1}; j < num_targets; ++j) { - if (blob_fraction[i][j]->solution_value()*blob_sizes[i] > largest_bulk) + if (glp_get_col_prim(lp, i*num_targets+j+1)*blob_sizes[i] > largest_bulk) target_pos = j; } + size_t blob_partial_sum {0}; + for (size_t j {0}; j < num_targets; ++j) { if (j == target_pos) { continue; } - double check_frac_size {blob_fraction[i][j]->solution_value()* + double check_frac_size {glp_get_col_prim(lp, i*num_targets+j+1)* blob_sizes[i]}; // blob fraction size size_t frac_size_cast = static_cast(check_frac_size); // If size to this destination is not 0, push to result @@ -382,7 +414,7 @@ Status MinimizeIoTimePlacement(const std::vector &blob_sizes, targets[target_pos])); output.push_back(schema); } - + glp_delete_prob(lp); return result; } @@ -418,8 +450,8 @@ Status CalculatePlacement(SharedMemoryContext *context, RpcContext *rpc, std::vector output_tmp; Status result; - // NOTE(chogan): Start with local targets and gradually expand the target list - // until the placement succeeds + // NOTE(chogan): Start with local targets and gradually expand the target + // list until the placement succeeds. for (int i = 0; i < Topology_Count; ++i) { std::vector targets; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 140d6fcac..8d9833247 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,7 +17,7 @@ set(API_TESTS dpe_optimization_test dpe_random_test foreach(program ${API_TESTS}) add_executable(${program} ${program}.cc) target_link_libraries(${program} ${LIBRT} hermes MPI::MPI_CXX - $<$:thallium>) + $<$:thallium> glog::glog) target_compile_definitions(${program} PRIVATE $<$:HERMES_RPC_THALLIUM>) add_test(NAME "Test${program}" @@ -37,7 +37,7 @@ endif() add_executable(bucket_test bucket_test.cc) target_link_libraries(bucket_test ${LIBRT} hermes MPI::MPI_CXX ZLIB::ZLIB - $<$:thallium>) + $<$:thallium> glog::glog) target_compile_definitions(bucket_test PRIVATE $<$:HERMES_RPC_THALLIUM>) add_test(NAME "Testbucket_test" @@ -62,7 +62,7 @@ endif() #------------------------------------------------------------------------------ add_executable(bp buffer_pool_test.cc) target_link_libraries(bp ${LIBRT} hermes MPI::MPI_CXX - $<$:thallium>) + $<$:thallium> glog::glog) target_compile_definitions(bp PRIVATE $<$:HERMES_RPC_THALLIUM>) add_test(NAME "TestBufferPool" COMMAND "${CMAKE_BINARY_DIR}/bin/bp") @@ -71,7 +71,7 @@ set_tests_properties("TestBufferPool" PROPERTIES ENVIRONMENT add_executable(bp_test buffer_pool_client_test.cc) target_link_libraries(bp_test hermes MPI::MPI_CXX - $<$:thallium>) + $<$:thallium> glog::glog) target_compile_definitions(bp_test PRIVATE $<$:HERMES_RPC_THALLIUM>) @@ -80,7 +80,7 @@ target_compile_definitions(bp_test #------------------------------------------------------------------------------ add_executable(config_parser_test config_parser_test.cc) target_link_libraries(config_parser_test hermes - $<$:thallium>) + $<$:thallium> glog::glog) add_test(NAME TestConfigParser COMMAND config_parser_test ${CMAKE_CURRENT_SOURCE_DIR}/data/hermes.conf) @@ -91,14 +91,14 @@ target_compile_definitions(config_parser_test # Memory Management tests #------------------------------------------------------------------------------ add_executable(mem memory_test.cc) -target_link_libraries(mem hermes $<$:thallium>) +target_link_libraries(mem hermes $<$:thallium> glog::glog) add_test(NAME TestMemoryManagement COMMAND mem) target_compile_definitions(mem PRIVATE $<$:HERMES_RPC_THALLIUM>) add_executable(stb_map stb_map_test.cc) target_link_libraries(stb_map hermes ${LIBRT} - $<$:thallium> MPI::MPI_CXX) + $<$:thallium> glog::glog MPI::MPI_CXX) target_compile_definitions(stb_map PRIVATE $<$:HERMES_DEBUG_HEAP> PRIVATE $<$:HERMES_RPC_THALLIUM>) @@ -109,7 +109,7 @@ add_test(NAME TestSTBMapWithHeap COMMAND stb_map) #------------------------------------------------------------------------------ add_executable(mdm mdm_test.cc) target_link_libraries(mdm hermes ${LIBRT} - $<$:thallium> MPI::MPI_CXX) + $<$:thallium> MPI::MPI_CXX glog::glog) target_compile_definitions(mdm PRIVATE $<$:HERMES_RPC_THALLIUM>) add_test(NAME TestMDM COMMAND mdm) @@ -121,7 +121,7 @@ set_tests_properties("TestMDM" PROPERTIES ENVIRONMENT #------------------------------------------------------------------------------ add_executable(trait trait_test.cc) target_link_libraries(trait ${LIBRT} hermes MPI::MPI_CXX -$<$:thallium> Catch2::Catch2 -lstdc++fs) +$<$:thallium> Catch2::Catch2 glog::glog -lstdc++fs) target_compile_definitions(trait PRIVATE $<$:HERMES_RPC_THALLIUM>) add_test(NAME "TestTrait" COMMAND "${CMAKE_BINARY_DIR}/bin/trait" "-s" "--reporter" "compact" @@ -134,7 +134,7 @@ LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/data/asan.supp) #------------------------------------------------------------------------------ add_executable(bo buffer_organizer_test.cc) target_link_libraries(bo ${LIBRT} hermes MPI::MPI_CXX - $<$:thallium>) + $<$:thallium> glog::glog gflags) target_compile_definitions(bo PRIVATE $<$:HERMES_RPC_THALLIUM>) add_test(NAME TestBufferOrganizer COMMAND bo)