-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update HTEX to report manager version info (#3417)
htex.connected_managers will now report `python_version` and `parsl_version` for each connected manager.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import pytest | ||
import logging | ||
|
||
import sys | ||
import parsl | ||
from parsl.app.app import python_app | ||
from parsl.tests.configs.htex_local import fresh_config | ||
|
||
|
||
def local_setup(): | ||
config = fresh_config() | ||
config.executors[0].poll_period = 1 | ||
config.executors[0].max_workers_per_node = 1 | ||
parsl.load(config) | ||
|
||
|
||
def local_teardown(): | ||
parsl.dfk().cleanup() | ||
parsl.clear() | ||
|
||
|
||
@python_app | ||
def dummy(): | ||
pass | ||
|
||
|
||
@pytest.mark.local | ||
def test_connected_managers(): | ||
|
||
# Run dummy function to ensure a manager is online | ||
x = dummy() | ||
assert x.result() is None | ||
executor = parsl.dfk().executors['htex_local'] | ||
manager_info_list = executor.connected_managers() | ||
assert len(manager_info_list) == 1 | ||
manager_info = manager_info_list[0] | ||
assert 'python_version' in manager_info | ||
assert 'parsl_version' in manager_info | ||
assert manager_info['parsl_version'] == parsl.__version__ | ||
assert manager_info['python_version'] == f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" |