Skip to content

Commit 49167a7

Browse files
Skip save_images on headless machines without display
Resolves #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>
1 parent d205bf1 commit 49167a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flow/scripts/final_report.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ report_cell_usage
6464
report_metrics 6 "finish"
6565

6666
# Save a final image if openroad is compiled with the gui
67-
if { [ord::openroad_gui_compiled] } {
67+
# and a display is available (skip on headless machines)
68+
if { [ord::openroad_gui_compiled] && [env_var_exists_and_non_empty DISPLAY] } {
6869
gui::show "source $::env(SCRIPTS_DIR)/save_images.tcl" false
6970
}

0 commit comments

Comments
 (0)