-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement resource hints for the SlurmProvider (#1217)
* Implement resource hints for the SlurmProvider Partially addresses #942. This commit adds the `cores_per_node` and `mem_per_node` keyword args to the SlurmProvider. These default to None, and behavior is not modified in the default case. Setting either has three effects. First, it modifies the Slurm submit script to request the appropriate cores and/or memory. Second, it sets the environment variables `PARSL_MEMORY_GB` and `PARSL_CORES` on the node. Finally, the `workers_per_node` attribute is added to the `HighThroughputExecutor` which will be calculated according to the resource hints, if they are available. This is read by the strategy piece, enabling a more accurate calculation for scaling resources up and down. An example configuration, tested on Midway, is provided below. This configuration requests 4 1-core workers, each with 3 GB of memory. ``` from parsl.config import Config from parsl.providers import SlurmProvider from parsl.addresses import address_by_hostname from parsl.executors import HighThroughputExecutor config = Config( executors=[ HighThroughputExecutor( cores_per_worker=1, mem_per_worker=3, address=address_by_hostname(), provider=SlurmProvider( 'broadwl', nodes_per_block=1, init_blocks=1, min_blocks=1, max_blocks=1, mem_per_node=12, cores_per_node=4, exclusive=False ), ) ], ) ``` * Add default mem_per_node and cores_per_node * Switch to properties in base class Also: clarify docstrings. * Fix flake8 Also: fix incomplete conversion to property. * Fix setter definition
- Loading branch information
1 parent
4b9afce
commit 636ea59
Showing
4 changed files
with
81 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters