Skip to content

Commit 4948160

Browse files
authored
Merge pull request #409 from JustinBonus/master
Celeris Stampede3 compatibility
2 parents 84825d4 + 25e2769 commit 4948160

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/createEVENT/Celeris/celeris/runner.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,12 @@ def Evolve_Display( # noqa: C901, N802, D102
609609
canvas = None
610610
import platform
611611
os_name = platform.system()
612+
ON_HPC = any("TACC" in k for k in os.environ)
613+
use_ggui = not bool(ON_HPC)
614+
show_gui = not bool(ON_HPC)
612615
try:
616+
if bool(ON_HPC):
617+
raise Exception('Headless mode detected, reverting to legacy GUI.')
613618
if 'Windows' in os_name:
614619
# Throw exception to force legacy GUI
615620
raise Exception('Windows detected, reverting GGUI to legacy GUI for reliability.')
@@ -624,6 +629,8 @@ def Evolve_Display( # noqa: C901, N802, D102
624629
use_fast_gui = False # Need ti.Vector.field equiv to self.solver.pixel to use fast_gui
625630
show_gui = True
626631
try:
632+
if bool(ON_HPC):
633+
raise Exception('Headless mode detected, reverting to legacy GUI.')
627634
show_gui = True
628635
print('Default: Show GUI window (e.g., for desktop use.')
629636
window = ti.GUI( # noqa: F405

0 commit comments

Comments
 (0)