Skip to content

Commit 3dc71e7

Browse files
authored
Fix bug in fixed_problem_computation (#403)
The issue was the problem check that some constraint values were going -inf and nan. This was caught by exceptions but it didn't crash the process as it is caught. We need more graceful handling of exceptions: #264 Authors: - Akif ÇÖRDÜK (https://github.com/akifcorduk) Approvers: - Alice Boucher (https://github.com/aliceb-nv) - Ramakrishnap (https://github.com/rgsl888prabhu) URL: #403
1 parent 3307a41 commit 3dc71e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
8585
endif(CMAKE_COMPILER_IS_GNUCXX)
8686

8787
# To use sanitizer with cuda runtime, one must follow a few steps:
88-
# 1. Find libasan.so with "gcc -print-file-name=libasan.so"
89-
# 2. Run the binary with env var set: LD_PRELOAD=$PATH_TO_LIBASAN ASAN_OPTIONS='protect_shadow_gap=0:replace_intrin=0'
90-
# 3. (Optional) To run with a debugger (gdb or cuda-gdb) use the additional ASAN option alloc_dealloc_mismatch=0
88+
# 1. Run the binary with env var set: LD_PRELOAD="$(gcc -print-file-name=libasan.so)" ASAN_OPTIONS='protect_shadow_gap=0:replace_intrin=0'
89+
# 2. (Optional) To run with a debugger (gdb or cuda-gdb) use the additional ASAN option alloc_dealloc_mismatch=0
9190
if(BUILD_SANITIZER)
9291
list(APPEND CUOPT_CXX_FLAGS -fsanitize=address,undefined -fno-omit-frame-pointer -g -Wno-error=maybe-uninitialized)
9392
add_link_options(-fsanitize=address,undefined)

cpp/src/mip/problem/problem.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,7 @@ void problem_t<i_t, f_t>::compute_integer_fixed_problem()
12781278
return;
12791279
}
12801280
rmm::device_uvector<f_t> assignment(n_variables, handle_ptr->get_stream());
1281+
thrust::fill(handle_ptr->get_thrust_policy(), assignment.begin(), assignment.end(), 0.);
12811282
integer_fixed_problem = std::make_shared<problem_t<i_t, f_t>>(get_problem_after_fixing_vars(
12821283
assignment, integer_indices, integer_fixed_variable_map, handle_ptr));
12831284
integer_fixed_problem->check_problem_representation(true);

0 commit comments

Comments
 (0)