Skip to content

Commit

Permalink
Fix failing compare_modes jobs when enable_llvm is False.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Oct 24, 2023
1 parent 61d503c commit 0682c70
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
21 changes: 12 additions & 9 deletions hoomd_validation/lj_fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,19 +1049,22 @@ def lj_fluid_compare_modes(*jobs):
separate_nvt_npt=True)

if quantity_name == "density":
print(f"Average npt_mc_cpu density {num_particles}:",
avg_quantity['npt_mc_cpu'], '+/-',
stderr_quantity['npt_mc_cpu'])
if 'npt_mc_cpu' in avg_quantity:
print(f"Average npt_mc_cpu density {num_particles}:",
avg_quantity['npt_mc_cpu'], '+/-',
stderr_quantity['npt_mc_cpu'])
print(f"Average npt_md_cpu density {num_particles}:",
avg_quantity['npt_bussi_md_cpu'], '+/-',
stderr_quantity['npt_bussi_md_cpu'])
if quantity_name == "pressure":
print(f"Average nvt_mc_cpu pressure {num_particles}:",
avg_quantity['nvt_mc_cpu'], '+/-',
stderr_quantity['nvt_mc_cpu'])
print(f"Average npt_mc_cpu pressure {num_particles}:",
avg_quantity['npt_mc_cpu'], '+/-',
stderr_quantity['npt_mc_cpu'])
if 'nvt_mc_cpu' in avg_quantity:
print(f"Average nvt_mc_cpu pressure {num_particles}:",
avg_quantity['nvt_mc_cpu'], '+/-',
stderr_quantity['nvt_mc_cpu'])
if 'npt_mc_cpu' in avg_quantity:
print(f"Average npt_mc_cpu pressure {num_particles}:",
avg_quantity['npt_mc_cpu'], '+/-',
stderr_quantity['npt_mc_cpu'])

filename = f'lj_fluid_compare_kT{kT}_density{round(set_density, 2)}_' \
f'r_cut{round(jobs[0].statepoint.r_cut, 2)}_' \
Expand Down
7 changes: 4 additions & 3 deletions hoomd_validation/lj_union.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,10 @@ def lj_union_compare_modes(*jobs):
separate_nvt_npt=True)

if quantity_name == "density":
print(f"Average npt_mc_cpu density {num_particles}:",
avg_quantity['npt_mc_cpu'], '+/-',
stderr_quantity['npt_mc_cpu'])
if 'npt_mc_cpu' in avg_quantity:
print(f"Average npt_mc_cpu density {num_particles}:",
avg_quantity['npt_mc_cpu'], '+/-',
stderr_quantity['npt_mc_cpu'])
print(f"Average npt_md_cpu density {num_particles}:",
avg_quantity['npt_bussi_md_cpu'], '+/-',
stderr_quantity['npt_bussi_md_cpu'])
Expand Down

0 comments on commit 0682c70

Please sign in to comment.