Jobs using Underworld3 hang when calling uw.timing.print_table() at large MPI scale (≈1000+ CPUs). The computation (including boundary integrals and metric evaluation) completes successfully, but the job does not exit and appears to stall during PETSc timing/log output.
this is what i am doing
metrics = {
"m": params.uw_m,
"cellsize": params.uw_cellsize,
"v_l2_norm": v_err_l2,
"p_l2_norm": p_err_l2,
"p_l2_norm_abs": p_err_l2_abs,
"v_l2_norm_lower": v_err_l2_lower,
"v_l2_norm_upper": v_err_l2_upper,
"p_l2_norm_lower": p_err_l2_lower,
"p_l2_norm_upper": p_err_l2_upper,
"p_l2_norm_lower_abs": p_err_l2_lower_abs,
"p_l2_norm_upper_abs": p_err_l2_upper_abs,
"sigma_rr_l2_norm_lower": sigma_rr_err_l2_lower,
"sigma_rr_l2_norm_upper": sigma_rr_err_l2_upper,
"u_dot_n_l2_norm_lower_abs": u_dot_n_l2_lower_abs,
"u_dot_n_l2_norm_upper_abs": u_dot_n_l2_upper_abs,
}
if uw.mpi.rank == 0:
print("=== L2 Error Metrics ===")
for key, value in metrics.items():
print(f"{key}: {value}")
integrals_stage_event.end()
if not params.uw_metrics_from_checkpoint_only:
uw.timing.print_table(filename=os.path.join(output_dir, "integrals_timing.txt"))
# %% [markdown]
# ### Save Metrics Output
# %%
uw.pprint("Stage start: saving metric output")
if uw.mpi.rank == 0:
metrics_h5 = os.path.join(output_dir, metrics_filename)
if os.path.isfile(metrics_h5):
os.remove(metrics_h5)
with h5py.File(metrics_h5, "w") as f_h5:
for key, value in metrics.items():
f_h5.create_dataset(key, data=value)
f_h5.create_dataset("git_sha", data=np.bytes_(git_sha))
f_h5.create_dataset("command", data=np.bytes_(cli_args))
for key, value in run_metadata.items():
f_h5.create_dataset(key, data=value)
uw.pprint("Stage complete: saving metric output")
if i do not call this line uw.timing.print_table(filename=os.path.join(output_dir, "integrals_timing.txt")) then job completes successfully.
Jobs using Underworld3 hang when calling uw.timing.print_table() at large MPI scale (≈1000+ CPUs). The computation (including boundary integrals and metric evaluation) completes successfully, but the job does not exit and appears to stall during PETSc timing/log output.
this is what i am doing
if i do not call this line
uw.timing.print_table(filename=os.path.join(output_dir, "integrals_timing.txt"))then job completes successfully.