Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,9 @@ jobs:
- name: Run perf count checker
run: |
python3 scripts/run_perf_counter.py --required-tests-number=2
env:
OMP_NUM_THREADS: 2
PROC_COUNT: 2
- name: Run perf tests
run: |
bash -e scripts/generate_perf_results.sh
Expand Down
6 changes: 4 additions & 2 deletions scripts/create_perf_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import re
import xlsxwriter
import multiprocessing

parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', help='Input file path (logs of perf tests, .txt)', required=True)
Expand Down Expand Up @@ -50,7 +49,10 @@
worksheet.set_column('A:Z', 23)
right_bold_border = workbook.add_format({'bold': True, 'right': 2, 'bottom': 2})
bottom_bold_border = workbook.add_format({'bold': True, 'bottom': 2})
cpu_num = multiprocessing.cpu_count()
cpu_num = os.environ.get("PROC_COUNT")
if cpu_num is None:
raise EnvironmentError("Required environment variable 'PROC_COUNT' is not set.")
cpu_num = int(cpu_num)
worksheet.write(0, 0, "cpu_num = " + str(cpu_num), right_bold_border)

it = 1
Expand Down
9 changes: 4 additions & 5 deletions scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ def run_processes(self, additional_mpi_args):

def run_performance(self):
if not os.environ.get("ASAN_RUN"):
mpi_running = ""
if platform.system() in ("Linux", "Windows"):
mpi_running = f"{self.mpi_exec} -np 4"
elif platform.system() == "Darwin":
mpi_running = f"{self.mpi_exec} -np 2"
proc_count = os.environ.get("PROC_COUNT")
if proc_count is None:
raise EnvironmentError("Required environment variable 'PROC_COUNT' is not set.")
mpi_running = f"{self.mpi_exec} -np {proc_count}"
self.__run_exec(f"{mpi_running} {self.work_dir / 'all_perf_tests'} {self.__get_gtest_settings(1)}")
self.__run_exec(f"{mpi_running} {self.work_dir / 'mpi_perf_tests'} {self.__get_gtest_settings(1)}")

Expand Down
Loading