Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions hexrdgui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
# Prevent crashing when using OpenBLAS
os.environ['OPENBLAS_NUM_THREADS'] = '1'

if sys.platform in ('linux', 'darwin'):
# Use OpenMP instead of TBB as the numba threading layer.
# TBB prints an unavoidable C-level warning to stderr on every
# non-main-thread fork ("Attempted to fork from a non-main thread"),
# which is harmless but noisy in our Qt background thread workflow.
# OpenMP is equally thread-safe and performant, emits no fork
# warning, and has a built-in safety net: it terminates any forked
# child that accidentally calls a numba parallel=True function,
# rather than silently running with undefined behavior.
# workqueue is not viable (crashes on concurrent thread access).
os.environ.setdefault('NUMBA_THREADING_LAYER', 'omp')

from PySide6.QtCore import QCoreApplication, Qt
from PySide6.QtGui import QIcon, QPixmap
from PySide6.QtWidgets import QApplication
Expand Down
Loading