Skip save_images on headless machines without display#3944
Merged
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom Mar 2, 2026
Merged
Conversation
Resolves The-OpenROAD-Project#3034 final_report.tcl only checks if OpenROAD was compiled with GUI support before calling gui::show to run save_images.tcl. On headless machines without a display, this causes a fatal crash (std::runtime_error abort from Qt platform plugin initialization). Add a DISPLAY environment check alongside the existing GUI compilation check so image generation is gracefully skipped on headless systems. Signed-off-by: Harsh Kumar Patwa <harshkumarpatwa@gmail.com> Signed-off-by: Harsh Kumar <harshkumar3446@gmail.com>
maliberty
approved these changes
Mar 2, 2026
Member
|
@fredowski @stefanottili is DISPLAY set on MacOS? |
|
default zsh: env | grep DISPLAY |
|
not for me: MacBookProM4-2:~ fritz$ echo $HOME MacBookProM4-2:~ fritz$ |
Member
|
@fredowski is there some other way to detect the presence of a gui capable display? This PR checks for DISPLAY. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #3034
The flow crashes during
final_report.tclon headless machines (no X display) becausegui::showtries to initialize a Qt platform plugin, which fails with a fatalstd::runtime_errorabort when no display is available.Changes
flow/scripts/final_report.tclAdded a
DISPLAYenvironment check alongside the existingord::openroad_gui_compiledcheck before callinggui::showto runsave_images.tcl. On headless machines whereDISPLAYis unset/empty, image generation is now gracefully skipped instead of crashing the flow.Uses the existing
env_var_exists_and_non_emptyhelper (already used 3 times in the same file forRCX_RULES,PWR_NETS_VOLTAGES,GND_NETS_VOLTAGES).Context
variables.mkalready setsQT_QPA_PLATFORM=offscreenwhenDISPLAYis empty, but the Tcl script never checkedDISPLAYbefore attempting GUI operationsfinal_*.webp,cts_*.webp) are optional visualization output — no CI tests or Makefile targets depend on them