Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6f5afc9
fix typo in README
noajshu Jun 5, 2025
a94992d
Merge pull request #1 from noajshu/codex/edit-readme.md-for-wording-c…
noajshu Jun 5, 2025
029ac62
Merge branch 'main' into main
noajshu Jun 7, 2025
64e20ff
Fix Bazel build on Linux by disabling LTO
noajshu Jun 7, 2025
05fbd87
Merge pull request #2 from noajshu/codex/test-bazel-build-and-tests
noajshu Jun 7, 2025
9bfba58
Sanitize DEM usage and enforce no zero-probability errors
noajshu Jun 7, 2025
c9f3c52
Merge branch 'main' into 06npdl-codex/modify-dem_from_counts-in-src/c…
noajshu Jun 10, 2025
14542d1
Merge pull request #4 from noajshu/06npdl-codex/modify-dem_from_count…
noajshu Jun 10, 2025
bf62f84
Add BFS detector ordering option
noajshu Jun 10, 2025
7174ce4
Add short and long test modes
noajshu Jun 10, 2025
ac9787b
Merge pull request #6 from noajshu/codex/optimize-test-runtime-and-do…
noajshu Jun 10, 2025
904f08f
docs: add links to visualization tool and site
noajshu Jun 10, 2025
218515c
Merge pull request #8 from noajshu/codex/add-links-to-readme-for-viz-…
noajshu Jun 10, 2025
b4f1d62
Merge pull request #5 from noajshu/codex/add-cli-flag-for-error-sampl…
noajshu Jun 10, 2025
b61faae
emit detector coords with bfs
noajshu Jun 10, 2025
b371843
Merge pull request #11 from noajshu/codex/update-readme-and-modify-in…
noajshu Jun 10, 2025
55393a4
add logfile example and update README
noajshu Jun 10, 2025
68b7adb
Merge pull request #13 from noajshu/viz-update
noajshu Jun 10, 2025
28ec30e
Merge branch 'main' into main
noajshu Jun 10, 2025
e482f1a
Merge branch 'quantumlib:main' into main
noajshu Jun 10, 2025
f7d4752
silence unused variable warning
noajshu Jun 10, 2025
165f2b7
Merge pull request #16 from noajshu/codex/suppress-unused-variable-wa…
noajshu Jun 10, 2025
1e1665f
Merge branch 'quantumlib:main' into main
noajshu Jun 15, 2025
b6add10
remove NDEBUG definition from project and confine it to highs project…
noajshu Jun 17, 2025
378461f
Merge remote-tracking branch 'origin/main'
noajshu Jun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
common --enable_bzlmod --enable_workspace
build --cxxopt='-std=c++20'
# HIGHS requires this define or else it is about 1.5x slower
build --copt="-DNDEBUG=0"
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ git_repository(
http_archive(
name = "highs",
sha256 = HIGHS_SHA_256,
build_file = "//external:highs.BUILD",
strip_prefix = "HiGHS-" + HIGHS_VERSION,
urls = ["https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v" + HIGHS_VERSION + ".tar.gz"],
)
Expand Down
178 changes: 178 additions & 0 deletions external/highs.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary", "cc_test")

NDEBUG_COPTS = [
"-DNDEBUG",
]

copy_file(
name = "highs-config",
src = "src/HConfig.h.bazel.in",
out = "HConfig.h",
visibility = ["//visibility:public"],
)

cc_library(
name = "config",
srcs = ["HConfig.h"],
copts = NDEBUG_COPTS,
visibility = ["//visibility:public"],
)

cc_library(
name = "highs",
srcs = glob([
"extern/filereaderlp/*.cpp",
"src/interfaces/highs_c_api.cpp",
"src/io/*.cpp",
"src/ipm/*.cpp",
"src/ipm/ipx/*.cc",
"src/ipm/basiclu/*.c",
"src/lp_data/*.cpp",
"src/mip/*.cpp",
"src/model/*.cpp",
"src/parallel/*.cpp",
"src/pdlp/*.cpp",
"src/pdlp/cupdlp/*.c",
"src/presolve/*.cpp",
"src/qpsolver/*.cpp",
"src/simplex/*.cpp",
"src/test/*.cpp",
"src/util/*.cpp",
]),
hdrs = glob([
"**/*.h",
"src/qpsolver/*.hpp",
"src/Highs.h",
"extern/filereaderlp/*.hpp",
"extern/zstr/*.hpp",
]),
copts = [
"-Wno-unused-variable",
"-Wno-unused-but-set-variable",
] + NDEBUG_COPTS,
includes = [
"extern",
# "extern/filereaderlp",
# "extern/zstr",
"src",
# "src/ipm",
# "src/ipm/ipx",
# "src/ipm/basiclu",
# "src/lp_data",
# "src/mip",
# "src/model",
# "src/parallel",
# "src/presolve",
# "src/qpsolver",
# "src/simplex",
# "src/test",
# "src/util",
"bazel-bin",
],
linkopts = ["-lpthread"],
visibility = ["//visibility:public"],
deps = [
"//:config",
"@zlib",
],
)

cc_binary(
name = "call-highs-example",
srcs = ["examples/call_highs_from_cpp.cpp"],
visibility = ["//visibility:public"],
deps = [
"//:highs",
],
)

## Add tests
copy_file(
name = "highs-check-config",
src = "check/HCheckConfig.h.bazel.in",
out = "HCheckConfig.h",
)

cc_library(
name = "check-config",
srcs = ["HCheckConfig.h"],
)

cc_library(
name = "test_lib",
testonly = True,
srcs = [
"HCheckConfig.h",
"check/Avgas.cpp",
"check/TestMain.cpp",
],
hdrs = [
"check/Avgas.h",
"check/SpecialLps.h",
"check/matrix_multiplication.hpp",
"extern/catch.hpp",
],
copts = ["-Iextern"],
data = glob(["check/instances/*"]),
includes = ["check"],
deps = [
":highs",
"//:check-config",
],
)

TEST_NAMES = [
"TestAlienBasis",
"TestBasis",
"TestBasisSolves",
"TestCheckSolution",
"TestCrossover",
"TestDualize",
"TestEkk",
"TestFactor",
"TestFilereader",
"TestFreezeBasis",
"TestHighsGFkSolve",
"TestHighsHash",
"TestHighsHessian",
"TestHighsIntegers",
"TestHighsModel",
"TestHighsParallel",
"TestHighsRbTree",
"TestHotStart",
"TestHSet",
"TestICrash",
"TestInfo",
"TestIO",
"TestIpx",
"TestLogging",
"TestLpModification",
"TestLpOrientation",
"TestLpSolvers",
"TestLpValidation",
"TestMipSolver",
"TestPresolve",
"TestQpSolver",
"TestRanging",
"TestRays",
"TestSemiVariables",
"TestSetup",
"TestSort",
"TestSpecialLps",
"TestThrow",
]

[cc_test(
name = name,
srcs = ["check/%s.cpp" % name],
copts = [
"-Iextern",
"-Wno-unused-variable",
"-Wno-unused-but-set-variable",
],
deps = [
":highs",
":test_lib",
],
) for name in TEST_NAMES]
3 changes: 2 additions & 1 deletion src/simplex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ void SimplexDecoder::decode_to_errors(const std::vector<uint64_t>& detections) {
}

// Get the model status
const HighsModelStatus& model_status = highs->getModelStatus();
[[maybe_unused]] const HighsModelStatus& model_status =
highs->getModelStatus();
assert(model_status == HighsModelStatus::kOptimal);
}

Expand Down