diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index df4ad4146..45789cedd 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -85,9 +85,8 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX) # To use sanitizer with cuda runtime, one must follow a few steps: -# 1. Find libasan.so with "gcc -print-file-name=libasan.so" -# 2. Run the binary with env var set: LD_PRELOAD=$PATH_TO_LIBASAN ASAN_OPTIONS='protect_shadow_gap=0:replace_intrin=0' -# 3. (Optional) To run with a debugger (gdb or cuda-gdb) use the additional ASAN option alloc_dealloc_mismatch=0 +# 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' +# 2. (Optional) To run with a debugger (gdb or cuda-gdb) use the additional ASAN option alloc_dealloc_mismatch=0 if(BUILD_SANITIZER) list(APPEND CUOPT_CXX_FLAGS -fsanitize=address,undefined -fno-omit-frame-pointer -g -Wno-error=maybe-uninitialized) add_link_options(-fsanitize=address,undefined) diff --git a/cpp/src/mip/problem/problem.cu b/cpp/src/mip/problem/problem.cu index e4ab0835d..598534c61 100644 --- a/cpp/src/mip/problem/problem.cu +++ b/cpp/src/mip/problem/problem.cu @@ -1278,6 +1278,7 @@ void problem_t::compute_integer_fixed_problem() return; } rmm::device_uvector assignment(n_variables, handle_ptr->get_stream()); + thrust::fill(handle_ptr->get_thrust_policy(), assignment.begin(), assignment.end(), 0.); integer_fixed_problem = std::make_shared>(get_problem_after_fixing_vars( assignment, integer_indices, integer_fixed_variable_map, handle_ptr)); integer_fixed_problem->check_problem_representation(true);