Skip to content

Commit

Permalink
pr remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Feb 6, 2024
1 parent f1d1ff5 commit 47b7b9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cpp/benders/factories/BendersFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "gflags/gflags.h"
#include "glog/logging.h"

BENDERSMETHOD DeduceBenderMethod(size_t coupling_map_size, size_t batch_size) {
BENDERSMETHOD DeduceBendersMethod(size_t coupling_map_size, size_t batch_size) {
auto method = (batch_size == 0 || batch_size == coupling_map_size - 1)
? BENDERSMETHOD::BENDERS
: BENDERSMETHOD::BENDERSBYBATCH;
Expand Down Expand Up @@ -48,7 +48,7 @@ int RunBenders(char** argv, const std::filesystem::path& options_file,
Writer writer;
const auto coupling_map = build_input(benders_options.STRUCTURE_FILE);
const auto method =
DeduceBenderMethod(coupling_map.size(), options.BATCH_SIZE);
DeduceBendersMethod(coupling_map.size(), options.BATCH_SIZE);

if (world.rank() == 0) {
auto benders_log_console = benders_options.LOG_LEVEL > 0;
Expand Down
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ find_python_module(pytest)
find_python_module(numpy)

if (PYTHON_MODULE_pytest_FOUND AND PYTHON_MODULE_numpy_FOUND)
set(xpress_avalaible "")
set(xpress_available "")
if(${XPRESS})
set(xpress_avalaible "--xpress")
set(xpress_available "--xpress")
endif()
# Python unit test
add_test(
Expand Down Expand Up @@ -89,7 +89,7 @@ if (PYTHON_MODULE_pytest_FOUND AND PYTHON_MODULE_numpy_FOUND)
# benders end to end tests
add_test(
NAME sequential
COMMAND Python3::Interpreter -m pytest --installDir=${XPANSION_INSTALL_DIR} ${xpress_avalaible} test_bendersSequentialEndToEnd.py
COMMAND Python3::Interpreter -m pytest --installDir=${XPANSION_INSTALL_DIR} ${xpress_available} test_bendersSequentialEndToEnd.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/end_to_end/benders
)
set_property(TEST sequential PROPERTY LABELS benders benders-sequential end_to_end)
Expand All @@ -101,7 +101,7 @@ if (PYTHON_MODULE_pytest_FOUND AND PYTHON_MODULE_numpy_FOUND)
set_property(TEST sequential_restart PROPERTY LABELS benders benders-sequential end_to_end restart)
add_test(
NAME mpibenders
COMMAND Python3::Interpreter -m pytest --allow_run_as_root=${ALLOW_RUN_AS_ROOT} --installDir=${XPANSION_INSTALL_DIR} ${xpress_avalaible} test_bendersmpibendersEndToEnd.py
COMMAND Python3::Interpreter -m pytest --allow_run_as_root=${ALLOW_RUN_AS_ROOT} --installDir=${XPANSION_INSTALL_DIR} ${xpress_available} test_bendersmpibendersEndToEnd.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/end_to_end/benders
)
set_property(TEST mpibenders PROPERTY LABELS benders benders-mpi end_to_end)
Expand Down

0 comments on commit 47b7b9e

Please sign in to comment.