Skip to content

Commit

Permalink
added OMP flags to fix issue with .pvtu visualizations
Browse files Browse the repository at this point in the history
  • Loading branch information
shankinsMechEng committed Dec 20, 2024
1 parent 8aec665 commit b31d8ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion python/FIERRO-GUI/fierro_gui/Bulk_Forming.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from PySide6.QtWidgets import (QTableWidgetItem, QMessageBox, QApplication, QFileDialog, QWidget, QHBoxLayout, QVBoxLayout, QLabel, QLineEdit, QTableWidget, QPushButton, QTreeWidgetItem, QAbstractItemView)
from PySide6.QtCore import (QCoreApplication, QProcess, Qt)
from PySide6.QtCore import (QCoreApplication, QProcess, Qt, QProcessEnvironment)
from PySide6.QtGui import (QColor, QBrush, QFont)
import numpy as np
import re
Expand Down Expand Up @@ -1156,7 +1156,15 @@ def run_bulk_forming():
else:
warning_message("ERROR: Trying to run an incorrect file type.")

# Set up the environment
self.p = QProcess()
env = QProcessEnvironment.systemEnvironment()
if not env.contains("OMP_PROC_BIND"):
env.insert("OMP_PROC_BIND", "spread")
if not env.contains("OMP_NUM_THREADS"):
env.insert("OMP_NUM_THREADS", "1")
self.p.setProcessEnvironment(env)
# Set up the states
self.p.setWorkingDirectory(self.working_directory)
self.p.readyReadStandardOutput.connect(handle_stdout)
self.p.readyReadStandardError.connect(handle_stderr)
Expand Down
10 changes: 9 additions & 1 deletion python/FIERRO-GUI/fierro_gui/Homogenization.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from PySide6.QtWidgets import (QTableWidgetItem, QMessageBox, QApplication, QFileDialog)
from PySide6.QtCore import (QCoreApplication, QProcess, Qt)
from PySide6.QtCore import (QCoreApplication, QProcess, Qt, QProcessEnvironment)
import re
import csv
import numpy as np
Expand Down Expand Up @@ -646,7 +646,15 @@ def single_EVPFFT(BC_index):
if not os.path.exists(self.simulation_directory):
os.makedirs(self.simulation_directory)

# Set up the environment
self.p = QProcess()
env = QProcessEnvironment.systemEnvironment()
if not env.contains("OMP_PROC_BIND"):
env.insert("OMP_PROC_BIND", "spread")
if not env.contains("OMP_NUM_THREADS"):
env.insert("OMP_NUM_THREADS", "1")
self.p.setProcessEnvironment(env)
# Set up the states
self.p.setWorkingDirectory(self.simulation_directory)
self.p.readyReadStandardOutput.connect(handle_stdout)
self.p.readyReadStandardError.connect(handle_stderr)
Expand Down

0 comments on commit b31d8ef

Please sign in to comment.