Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
23d06a3
fix: add --display MAP_DEVEL to prun command for DVM state verification
markcoletti Jun 9, 2026
58297d9
fix: update command to include ALLOCATION and BINDINGS in display opt…
markcoletti Jun 9, 2026
340946b
fix: add print statements for task launch and logging information
markcoletti Jun 12, 2026
87fb070
By default we use PIPE connections to capture stdout/stderr that are …
markcoletti Jun 12, 2026
7cb1752
Corrected thinko
markcoletti Jun 12, 2026
9cf5273
fix: wait for a majority of Dask workers to be online before proceeding
markcoletti Jun 12, 2026
479274a
Switch to using map from submit for Dask tasks
markcoletti Jun 16, 2026
da05942
refactor: streamline Dask shutdown process and clean up task management
markcoletti Jun 16, 2026
f2ea5c6
Adding more logging to Dask shutdown sequence
markcoletti Jun 16, 2026
ca0442f
fix: improve DVM shutdown process by checking for pterm or prte-term …
markcoletti Jun 17, 2026
0bfd758
feat: add optional logfile and errfile parameters for task submission
markcoletti Jun 19, 2026
b1907eb
feat: add optional logfile and errfile parameters for task submission
markcoletti Jun 19, 2026
d9552f2
Added example of stdout and stderr for ensembles
markcoletti Jun 19, 2026
3aaffa7
fix: enhance error logging by ensuring stderr can be directed to a sp…
markcoletti Jun 19, 2026
75730dc
Merge remote-tracking branch 'origin/249-ensemble-instances-not-all-r…
markcoletti Jun 19, 2026
ae6a412
test: add unit tests for logging parameters in ensemble tasks
markcoletti Jun 19, 2026
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
9 changes: 7 additions & 2 deletions examples-proposed/020-simple-ensemble/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@ def step(self, timestamp=0.0):
# given set of variables. E.g., the instance corresponding to
# {'A' : 2, 'B' : 5.82, 'C' : 'baz'} is probably found in the
# `INSTANCE_1` subdirectory.

# We also demonstrate that stdout and stderr output per instance can
# be captured in files by specifying logfile and errfile, respectively.
mapping = self.services.run_ensemble(template, variables,
run_dir=Path('.').absolute(),
name='INSTANCE_',
num_nodes=1,
cores_per_instance=1)
cores_per_instance=1,
logfile='stdout.txt',
errfile='stderr.txt')
# Print each mapping of instance name to what variable values were used.
for instance in mapping:
self.services.info(f'{instance!s}')
self.services.info(f'{instance!s}')
2 changes: 1 addition & 1 deletion examples-proposed/020-simple-ensemble/ensemble.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SIM_NAME = simpleensemble
SIM_ROOT = $PWD/ENSEMBLES
LOG_FILE = log
LOG_LEVEL = INFO
LOG_LEVEL = DEBUG
SIMULATION_MODE = NORMAL

[PORTS]
Expand Down
5 changes: 5 additions & 0 deletions examples-proposed/020-simple-ensemble/instance_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class InstanceComponent(Component):
def step(self, timestamp: float = 0.0, **keywords):
start = time()



# ENSEMBLE_INSTANCE is a special IPS variable that contains the
# string uniquely identifying this instance. Each instance will have
# the `run_ensemble()` `name` argument prepended to a unique number
Expand All @@ -24,6 +26,8 @@ def step(self, timestamp: float = 0.0, **keywords):
self.services.info(f'{instance_id}: Start of step of instance '
f'component.')

print(f'start of instance component for {instance_id}')

# Echo the parameters we're expecting, A, B, and C
self.services.info(f'{instance_id}: instance component parameters: '
f'A={self.A}, B={self.B}, C={self.C}')
Expand All @@ -38,6 +42,7 @@ def step(self, timestamp: float = 0.0, **keywords):
writer.writerow([instance_id, sys.argv[0], run_env['hostname'],
run_env['pid'], run_env['core_id'], start, time()])

print(f'Wrote stats.csv for {instance_id}')

self.services.info(f'{instance_id}: End of step of instance '
f'component.')
2 changes: 1 addition & 1 deletion examples-proposed/020-simple-ensemble/template.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SIM_NAME = simpleensembleinstance
SIM_ROOT = $PWD
LOG_FILE = log
LOG_LEVEL = INFO
LOG_LEVEL = DEBUG
SIMULATION_MODE = NORMAL

[PORTS]
Expand Down
Loading
Loading