- Integrate a new platform to OpenROAD Flow: Guide.
- Adding a new design: Guide.
- Continuous Integration: Guide.
- How do I update the codebase? There are different ways to update your codebase depending on the method you installed it. We provide detailed instructions in this guide.
- How do I contribute? Follow our Git Quickstart guide here.
Every flow stage (synthesis, floorplan, CTS, routing, etc.) is wrapped by
flow/scripts/run_command.py, which replaces the previous GNU time + tee
shell pipeline with a pure-Python implementation.
run_command.py runs a command and:
- Measures wall-clock time, CPU time (user + sys), and peak memory
using Python's
time.monotonic()andresource.getrusage(). - Streams output line-by-line to both the console and a log file
(replacing
tee), flushing after every line for real-timetail -fobservability. - Appends an
Elapsed time: ...line in the format expected bygenElapsedTime.pyandgenMetrics.py.
python3 flow/scripts/run_command.py [--log FILE] [--append] [--tee] -- command [args...]
| Flag | Effect |
|---|---|
--log FILE |
Write command output + timing line to FILE |
--append |
Append to log file instead of overwriting |
--tee |
Also write output to stdout (like the tee command) |
When running under Bazel (bazelisk test ...) or other batch systems that
hide console output, you can monitor progress by finding and tailing the log:
# Find the running stage's log file
ps -Af | grep run_command
# or
ps -Af | grep tmp.log
# Watch it in real time
tail -f /path/to/logs/4_cts.tmp.logOutput appears immediately in the log file (line-buffered with flush),
so tail -f shows real-time progress.
Works on both Linux and macOS using only Python standard library modules.
Peak memory is normalized automatically (ru_maxrss is KB on Linux,
bytes on macOS).
python3 -m pytest flow/test/test_run_command.py -v