Skip to content

Gurobi auto-detection, working graphs without it#798

Open
oflatt wants to merge 5 commits into
mainfrom
oflatt-gurobi-optional
Open

Gurobi auto-detection, working graphs without it#798
oflatt wants to merge 5 commits into
mainfrom
oflatt-gurobi-optional

Conversation

@oflatt

@oflatt oflatt commented Jul 7, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 7, 2026 22:20
@oflatt oflatt changed the title Make gurobi easier to integrate with auto detection in nightly Gurobi auto-detection, working graphs without it Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the nightly pipeline work in a “CBC-only” mode by auto-detecting whether Gurobi is installed/licensed, and gating graph generation based on what timing data is actually present rather than a single boolean flag.

Changes:

  • Add Gurobi auto-detection + new --no-gurobi flag, and adjust profiling/treatments so the COMPARISON run still produces useful CBC/tiger timing data without Gurobi.
  • Gate ILP/statewalk/region-timing graphs on available COMPARISON/Gurobi data; update normalized charts to label ILP series as CBC vs Gurobi.
  • Add docs + tooling for setup (Ubuntu CBC binary install notes, infra/requirements.txt, make gurobi-setup, infra/setup_gurobi.sh).

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Documents CBC binary dependency, local nightly prerequisites, and optional Gurobi behavior/flags.
Makefile Adds gurobi-setup target to install/verify a Gurobi license.
install_ubuntu.sh Installs both CBC dev library and cbc CLI binary; clarifies the distinction.
infra/statewalk_graphs.py Allows single-treatment plotting for multi scatter (needed for CBC-only mode).
infra/setup_gurobi.sh New helper script to install/verify a Gurobi license via gurobi_cl.
infra/requirements.txt Adds pinned Python deps for nightly graph generation.
infra/profile.py Adds Gurobi availability probe, moves COMPARISON into base treatments, and adjusts ILP timing flags for CBC-only.
infra/nightly.py Adds --no-gurobi, implements auto-detection, and enforces flag combinations.
infra/graphs.py Gates graph generation based on data presence; supports CBC-only normalized charts and labeling.
infra/graph_helpers.py Adds helpers to detect whether COMPARISON ran and whether Gurobi timing data exists.
infra/extract_time_graph.py Makes extraction CDF optionally omit the Gurobi series.
dag_in_context/src/tiger/time_ilp.h Adds ilp_ran to mark when Gurobi timing was skipped.
dag_in_context/src/tiger/time_ilp.cpp Skips populating ilp_* fields when Gurobi was skipped; emits ilp_ran to JSON.
dag_in_context/src/tiger/main.h Adds config flag for whether to run Gurobi during --time-ilp.
dag_in_context/src/tiger/main.cpp Disables the Gurobi timing run when --ilp-solver cbc is selected.
dag_in_context/src/lib.rs Adds ilp_ran to Rust-side deserialization with defaults for older data.
.gitignore Ignores gurobi.log.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/setup_gurobi.sh
#
# Usage:
# infra/setup_gurobi.sh [path/to/gurobi.lic]
# GUROBI_LICENSE_FILE=path/to/gurobi.lic infra/setup_gurobi.sh
Comment thread infra/setup_gurobi.sh

set -euo pipefail

LICENSE_SRC="${1:-${GUROBI_LICENSE_FILE:-}}"
Comment thread infra/setup_gurobi.sh
Comment on lines +36 to +42
if [ "$src_abs" != "$dest_abs" ]; then
cp "$LICENSE_SRC" "$DEST"
echo "Copied license to $DEST (Gurobi finds this automatically)."
else
echo "License already installed at $DEST."
fi
echo "(To keep the license elsewhere, set GRB_LICENSE_FILE in your shell profile instead.)"
Comment thread Makefile
# Install/verify an optional Gurobi license so the nightly auto-detects Gurobi.
# Usage: make gurobi-setup LICENSE=path/to/gurobi.lic (LICENSE optional -- omit to just verify)
gurobi-setup:
bash infra/setup_gurobi.sh $(LICENSE)
oflatt and others added 3 commits July 7, 2026 23:53
The CBC ILP treatment can exceed the wall-clock timeout (or be infeasible) on
large benchmarks, producing no cycles. The normalized chart substitutes that
treatment when Gurobi is absent, so guard every normalized() access with
has_run_cycles() and mark treatments with no result instead of averaging an
empty cycles list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In non-paper runs the eggcc-tiger-ILP-COMPARISON treatment can hit the
wall-clock timeout and produce no region timings (extractRegionTimings == False).
make_macros assumed every benchmark had a list of samples and crashed iterating a
bool. Filter the benchmark list to those with valid comparison timings up front;
in paper mode (where the comparison always succeeds) this filters nothing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The no-Gurobi nightly timed out at the server's 3h limit because CBC ILP solving
burns up to the 5-min per-region timeout on hard regions, across every benchmark
(both the ILP-CBC extraction treatment and the now-default COMPARISON pass).

Make the per-region ILP timeout configurable (eggcc --ilp-timeout-seconds ->
tiger), default 300s. NightlyConfig uses 30s in the default (non-paper) nightly
and keeps 5min for paper. Graphs now report the actual timeout used (e.g.
'Gurobi Timeout (30 s)') instead of a hardcoded '5 min', via a run-set value in
graph_helpers.

Measured: a 2mm COMPARISON run drops from 340s to ~20s.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants