Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SmartSim to use Dragon V0.10 #753

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Docstrs
  • Loading branch information
MattToast committed Oct 28, 2024
commit 0a0cccc0ffc67d4f83dff0dec96791ff501dc42d
18 changes: 16 additions & 2 deletions smartsim/_core/launcher/dragon/dragonBackend.py
Original file line number Diff line number Diff line change
@@ -84,24 +84,38 @@ def smartsim_info(self) -> t.Tuple[SmartSimStatus, t.List[int]]:

@property
MattToast marked this conversation as resolved.
Show resolved Hide resolved
def puids(self) -> t.List[int]:
"""List of Process UIDS belonging to the ProcessGroup"""
"""List of Process IDs belonging to the ProcessGroup.

:returns: List of Process IDs belonging to the ProcessGroup.
"""
return list(set(itertools.chain(self.active_puids, self.inactive_puids)))
ankona marked this conversation as resolved.
Show resolved Hide resolved

@property
def active_puids(self) -> t.List[int]:
"""List of process IDs that are running.

:returns: List of process IDs that are running.
"""
if self.process_group is None:
MattToast marked this conversation as resolved.
Show resolved Hide resolved
return []
return list(self.process_group.puids)

@property
def inactive_puids(self) -> t.List[int]:
"""List of process IDs that have completed.

:returns: List of process IDs that have completed.
"""
if self.process_group is None:
MattToast marked this conversation as resolved.
Show resolved Hide resolved
return []
return [puid for puid, _ in self.process_group.inactive_puids]

@property
def return_codes(self) -> t.List[int]:
"""List of return codes of completed processes"""
"""List of return codes of completed processes.

:returns: List of return codes of completed processes.
"""
if self.process_group is None:
return [-1]
MattToast marked this conversation as resolved.
Show resolved Hide resolved
if self.status == SmartSimStatus.STATUS_CANCELLED: