Skip to content

Commit

Permalink
#386: improvement in compute_arrangement_works
Browse files Browse the repository at this point in the history
  • Loading branch information
tlamonthezie committed Jun 7, 2023
1 parent bf5260e commit 7cdd6de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lbaf/IO/lbsStatistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ def compute_arrangement_works(objects: tuple, arrangement: tuple, alpha: float,
works[rank] = alpha * compute_load(objects, rank_objects)

# Compute communication volumes
works[rank] += beta * max(compute_volume(objects, rank_objects, "received"),
compute_volume(objects, rank_objects, "sent"))
if beta != 0.0: # do not calculate max if beta = 0 for better performance
works[rank] += beta * max(compute_volume(objects, rank_objects, "received"),
compute_volume(objects, rank_objects, "sent"))

# Add constant
works[rank] += gamma
Expand Down

0 comments on commit 7cdd6de

Please sign in to comment.