This commit is contained in:
@@ -743,6 +743,9 @@ contains
|
||||
integer :: cutbacks
|
||||
integer :: linear_iter
|
||||
integer :: linear_status
|
||||
integer :: node_count
|
||||
integer :: element_count
|
||||
integer :: dof_count
|
||||
real(rk) :: target
|
||||
real(rk) :: factor
|
||||
real(rk) :: residual
|
||||
@@ -794,13 +797,17 @@ contains
|
||||
call output_vtk_write(nl%cloud_step, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
call fem_get_model_size(node_count, element_count, dof_count, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
vtk_name = vtk_result_basename(nl%cloud_step)
|
||||
summary_id = 98
|
||||
call open_csv(summary_id, &
|
||||
join_path(dir, 'strength_reduction_cloud_summary.csv'), ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
call write_nonlinear_cloud_summary(summary_id, nl, factor, target, &
|
||||
vtk_name, solve_ierr, converged_i, &
|
||||
vtk_name, node_count, element_count, &
|
||||
solve_ierr, converged_i, &
|
||||
conv_status, failure_code, cutbacks, &
|
||||
iter_total, correction_norm, last_dt, &
|
||||
accepted_time, linear_iter, &
|
||||
|
||||
@@ -8,6 +8,8 @@ module sr_benchmark_report
|
||||
|
||||
private
|
||||
|
||||
real(rk), parameter :: reference_displacement_scale = 3.0e-1_rk
|
||||
|
||||
type mc_struct_diag
|
||||
integer :: point_count = 0
|
||||
integer :: updated_points = 0
|
||||
@@ -195,7 +197,8 @@ contains
|
||||
end subroutine write_nonlinear_summary
|
||||
|
||||
subroutine write_nonlinear_cloud_summary(unit_id, nl, factor, target, &
|
||||
vtk_name, solve_ierr, converged_i, &
|
||||
vtk_name, node_count, element_count, &
|
||||
solve_ierr, converged_i, &
|
||||
conv_status, failure_code, cutbacks, &
|
||||
iter_total, correction_norm, last_dt, &
|
||||
accepted_time, linear_iter, &
|
||||
@@ -209,6 +212,8 @@ contains
|
||||
real(rk), intent(in) :: factor
|
||||
real(rk), intent(in) :: target
|
||||
character(len=*), intent(in) :: vtk_name
|
||||
integer, intent(in) :: node_count
|
||||
integer, intent(in) :: element_count
|
||||
integer, intent(in) :: solve_ierr
|
||||
integer, intent(in) :: converged_i
|
||||
integer, intent(in) :: conv_status
|
||||
@@ -243,9 +248,14 @@ contains
|
||||
write(unit_id,'(A,F10.4)') 'reference_fos,', target
|
||||
write(unit_id,'(A,A)') 'vtk_file,', trim(vtk_name)
|
||||
write(unit_id,'(A,I0)') 'vtk_step,', nl%cloud_step
|
||||
write(unit_id,'(A,I0)') 'nodes,', node_count
|
||||
write(unit_id,'(A,I0)') 'elements,', element_count
|
||||
write(unit_id,'(A,I0)') 'solver_ierr,', solve_ierr
|
||||
write(unit_id,'(A,I0)') 'solve_ierr,', solve_ierr
|
||||
write(unit_id,'(A,I0)') 'converged,', converged_i
|
||||
write(unit_id,'(A,I0)') 'conv_status,', conv_status
|
||||
write(unit_id,'(A,I0)') 'convergence_status,', conv_status
|
||||
write(unit_id,'(A,I0)') 'conv_failure,', failure_code
|
||||
write(unit_id,'(A,I0)') 'failure_code,', failure_code
|
||||
write(unit_id,'(A,I0)') 'cutbacks,', cutbacks
|
||||
write(unit_id,'(A,I0)') 'iterations,', iter_total
|
||||
@@ -259,6 +269,10 @@ contains
|
||||
write(unit_id,'(A,ES16.8)') 'relative_residual,', relative_residual
|
||||
write(unit_id,'(A,ES16.8)') 'combined_norm,', combined_norm
|
||||
write(unit_id,'(A,ES16.8)') 'max_displacement,', max_disp
|
||||
write(unit_id,'(A,ES16.8)') 'reference_displacement_scale,', &
|
||||
reference_displacement_scale
|
||||
write(unit_id,'(A,ES16.8)') 'displacement_scale_ratio,', &
|
||||
max_disp / reference_displacement_scale
|
||||
write(unit_id,'(A,ES16.8)') 'stop_displacement,', nl%displacement_limit
|
||||
write(unit_id,'(A,ES16.8)') 'plastic_share,', plastic_share
|
||||
write(unit_id,'(A,ES16.8)') 'max_eqps,', max_eqps
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,7 +9,8 @@ from pathlib import Path
|
||||
SOURCE_SUFFIXES = {".f90", ".c", ".h", ".py"}
|
||||
FORTRAN_ROUTINE = re.compile(
|
||||
r"^\s*(?:recursive\s+)?(?:subroutine|function|integer\s+function|"
|
||||
r"logical\s+function|real\s*\([^)]*\)\s+function)\s+([a-zA-Z_]\w*)",
|
||||
r"logical\s+function|real\s*\([^)]*\)\s+function|"
|
||||
r"type\s*\([^)]*\)\s+function)\s+([a-zA-Z_]\w*)",
|
||||
re.IGNORECASE,
|
||||
)
|
||||
PYTHON_FUNCTION = re.compile(r"^(?P<indent>\s*)def\s+(?P<name>[a-zA-Z_]\w*)\s*\(")
|
||||
|
||||
Reference in New Issue
Block a user