This commit is contained in:
@@ -11,6 +11,10 @@ from pathlib import Path
|
||||
|
||||
|
||||
METRICS = (
|
||||
"path_steps",
|
||||
"path_active",
|
||||
"path_bvh_nodes",
|
||||
"path_cache_used",
|
||||
"active_count",
|
||||
"search_facets",
|
||||
"search_masters",
|
||||
@@ -25,7 +29,7 @@ def run_case(source_root: Path, executable: Path, threads: int) -> dict[str, int
|
||||
env = os.environ.copy()
|
||||
env["OMP_NUM_THREADS"] = str(threads)
|
||||
proc = subprocess.run(
|
||||
[str(executable), "32", "1"],
|
||||
[str(executable), "64", "1", "4"],
|
||||
cwd=source_root,
|
||||
env=env,
|
||||
text=True,
|
||||
@@ -57,6 +61,17 @@ def parse_metrics(output: str, threads: int) -> dict[str, int]:
|
||||
)
|
||||
if values["active_count"] <= 0:
|
||||
raise SystemExit(f"no active contact for OMP_NUM_THREADS={threads}")
|
||||
if values["path_active"] <= 0:
|
||||
raise SystemExit(f"no active contact path for OMP_NUM_THREADS={threads}")
|
||||
if values["path_bvh_nodes"] <= 0:
|
||||
raise SystemExit(f"no BVH build path for OMP_NUM_THREADS={threads}")
|
||||
if values["path_cache_used"] <= 0:
|
||||
raise SystemExit(f"no BVH cache path for OMP_NUM_THREADS={threads}")
|
||||
if values["path_steps"] != 4:
|
||||
raise SystemExit(
|
||||
f"unexpected path step count for OMP_NUM_THREADS={threads}: "
|
||||
f"{values['path_steps']}"
|
||||
)
|
||||
if values["cache_used"] <= 0:
|
||||
raise SystemExit(f"no BVH cache use for OMP_NUM_THREADS={threads}")
|
||||
return values
|
||||
@@ -89,7 +104,7 @@ def main(argv: list[str]) -> int:
|
||||
)
|
||||
return 1
|
||||
|
||||
print("perf_contact_pair OpenMP consistency: PASS")
|
||||
print("perf_contact_pair path OpenMP consistency: PASS")
|
||||
for metric in METRICS:
|
||||
print(f" {metric}: {serial[metric]}")
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user