Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _Please refer to our [documentation](https://darma-tasking.github.io/lbaf_docs/i

## Getting Started

LBAF currently supports Python 3.8 - 3.11. You can download Python [here](https://www.python.org/downloads/).
LBAF currently supports Python 3.9 - 3.11. You can download Python [here](https://www.python.org/downloads/).

### Optional: Create a virtual environment *(recommended in development)*

Expand All @@ -37,7 +37,7 @@ source venv/bin/activate
```

> [!NOTE]
> You can create separate virtual environments for different development branches. For example, a Python 3.8 environment for branch 125 could be named `venv38-branch-125`. Within this environment, you can install `lbaf` as an editable package (see below).
> You can create separate virtual environments for different development branches. For example, a Python 3.9 environment for branch 125 could be named `venv38-branch-125`. Within this environment, you can install `lbaf` as an editable package (see below).

## Installation

Expand Down
2 changes: 1 addition & 1 deletion config/synthetic-blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ algorithm:
order_strategy: arbitrary
transfer_strategy: Clustering
max_subclusters: 4
criterion: TemperedWithUpdates
criterion: Tempered
max_objects_per_transfer: 8
deterministic_transfer: true

Expand Down
3 changes: 0 additions & 3 deletions src/lbaf/Execution/lbsCriterionBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ def factory(criterion_name: str, work_model: WorkModelBase, logger: Logger):
"""Produce the necessary concrete criterion."""

# Load up available criteria
# pylint:disable=W0641:possibly-unused-variable,C0415:import-outside-toplevel
from .lbsTemperedCriterion import TemperedCriterion
from .lbsTemperedWithUpdatesCriterion import TemperedWithUpdatesCriterion
from .lbsStrictLocalizingCriterion import StrictLocalizingCriterion
# pylint:enable=W0641:possibly-unused-variable,C0415:import-outside-toplevel

# Ensure that criterion name is valid
try:
Expand Down
16 changes: 5 additions & 11 deletions src/lbaf/Execution/lbsTemperedCriterion.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


class TemperedCriterion(CriterionBase):
"""A concrete class for the Grapevine criterion modified in line 6."""
"""A concrete class for the Grapevine criterion with update formulae."""

def __init__(self, work_model, lgr: Logger):
"""Class constructor."""
Expand All @@ -57,7 +57,7 @@ def __init__(self, work_model, lgr: Logger):
self._logger.info(f"Instantiated {type(self).__name__} concrete criterion")

def compute(self, r_src: Rank, o_src: list, r_dst: Rank, o_dst: Optional[list]=None) -> float:
"""Tempered work criterion based on L1 norm of works."""
"""Tempered work criterion based on L1 norm of works using update formulae."""
if o_dst is None:
o_dst = []

Expand All @@ -66,16 +66,10 @@ def compute(self, r_src: Rank, o_src: list, r_dst: Rank, o_dst: Optional[list]=N
self._work_model.compute(r_src),
self._work_model.compute(r_dst))

# Move objects into proposed new arrangement
self._phase.transfer_objects(r_src, o_src, r_dst, o_dst)

# Compute maximum work of proposed new arrangement
# Compute update formulae
w_max_new = max(
self._work_model.compute(r_src),
self._work_model.compute(r_dst))

# Move objects back into original arrangement
self._phase.transfer_objects(r_dst, o_src, r_src, o_dst)
self._work_model.update(r_src, o_src, o_dst),
self._work_model.update(r_dst, o_dst, o_src))

# Return criterion value
return w_max_0 - w_max_new
91 changes: 0 additions & 91 deletions src/lbaf/Execution/lbsTemperedWithUpdatesCriterion.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/lbaf/IO/lbsConfigurationValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"CentralizedPrefixOptimizer",
"PrescribedPermutation",
"PhaseStepper")
ALLOWED_CRITERIA = ("Tempered", "TemperedWithUpdates", "StrictLocalizing")
ALLOWED_CRITERIA = ("Tempered", "StrictLocalizing")
ALLOWED_LOGGING_LEVELS = ("info", "debug", "warning", "error")
ALLOWED_LOAD_VOLUME_SAMPLER = ("uniform", "lognormal")

Expand Down
8 changes: 4 additions & 4 deletions src/lbaf/Model/lbsAffineCombinationWorkModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ def __update_homing(self, rank: Rank, o_snd: list, o_rcv: list):
# Remove object from rank
r_obj.discard(o)

# Skip locally homed blocks
# Retrieve shared block and skip if none or not locally homed
b = o.get_shared_block()
if b.get_home_id() == r_id:
if b is None or b.get_home_id() == r_id:
continue

# Determine set of removed non-homed blocks
Expand All @@ -249,9 +249,9 @@ def __update_homing(self, rank: Rank, o_snd: list, o_rcv: list):

# Iterate over all received objects
for o in o_rcv:
# Skip locally homed blocks
# Retrieve shared block and skip if none or not locally homed
b = o.get_shared_block()
if b.get_home_id() == r_id:
if b is None or b.get_home_id() == r_id:
continue

# Determine set of added non-homed blocks
Expand Down
Loading