Skip to content

Commit 0121888

Browse files
authored
Merge pull request #264 from HPC-SimTools/dvm-concurrency-amelioration
This brings in additional DVM diagnostics and merges those with fixes Lance had done.
2 parents d83090d + 22ca58a commit 0121888

7 files changed

Lines changed: 214 additions & 52 deletions

File tree

‎doc/user_guides/ensembles.rst‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,46 @@ The ensemble system provides robust error handling:
398398
- Resource allocation errors are reported with detailed messages
399399
- Configuration template errors are caught before execution begins
400400

401+
DVM diagnostics
402+
---------------
403+
404+
Each Dask worker's DVM launch creates a persistent directory beneath the
405+
ensemble driver's working directory::
406+
407+
dvm/<hostname>.<worker-pid>.<launch-uuid>/
408+
uri
409+
output.log
410+
lifecycle.jsonl
411+
shutdown.log
412+
413+
``uri`` contains PRTE's connection URI, and ``output.log`` captures the DVM's
414+
combined stdout and stderr directly to disk. ``lifecycle.jsonl`` contains
415+
UTC timestamps, monotonic elapsed times, worker and DVM identities, launch
416+
parameters, readiness, instance start/end records, observed exits, and shutdown
417+
actions. Only selected Slurm and PRTE environment settings are recorded.
418+
``shutdown.log`` is created when a shutdown command is attempted and captures
419+
its combined output. Records are flushed as they are written.
420+
421+
Shutdown first attempts ``pterm`` or ``prte-term`` with a ten-second timeout,
422+
then waits up to ten seconds for the DVM to exit. If necessary, it sends
423+
terminate and waits five seconds, then sends kill and waits another five
424+
seconds. Command results and escalation are recorded, and diagnostic files
425+
are retained.
426+
427+
Nonzero MPI task results returned by ``wait_task()`` create a
428+
``dvm-failures.<component-pid>.jsonl`` file in the component working directory.
429+
These records include the instance name, task command, return code, and the
430+
associated lifecycle journal path. Each component owns its own failure file
431+
to avoid concurrent appends from different processes.
432+
433+
DVM process state is sampled by the owning worker at lifecycle events,
434+
including instance start and end; there is no background monitor. Child
435+
failure records explicitly report DVM state as unknown in the child.
436+
An ``exit_observed`` timestamp is the time the worker detected an exit,
437+
not necessarily the time it occurred. A running process does not establish
438+
DVM responsiveness. Abrupt worker or node loss may leave no final record.
439+
Components must still check ``wait_task()`` results and propagate failures.
440+
401441
Limitations
402442
-----------
403443

‎examples-proposed/020-simple-ensemble/ensemble.conf‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ LOG_FILE = log
44
LOG_LEVEL = DEBUG
55
SIMULATION_MODE = NORMAL
66

7+
RUN_COMMENT = Example
8+
79
[PORTS]
810
NAMES = DRIVER
911
[[DRIVER]]

‎examples-proposed/021-ensembles-from-CSV/ensemble.conf‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ LOG_FILE = log
44
LOG_LEVEL = INFO
55
SIMULATION_MODE = NORMAL
66

7+
RUN_COMMENT = Example
8+
79
[PORTS]
810
NAMES = DRIVER
911
[[DRIVER]]

‎examples-proposed/022-tasks-and-ensembles/ensemble.conf‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ LOG_FILE = log
44
LOG_LEVEL = INFO
55
SIMULATION_MODE = NORMAL
66

7+
RUN_COMMENT = Example
8+
79
[PORTS]
810
NAMES = DRIVER
911
[[DRIVER]]

‎examples-proposed/023-simple-ensemble-with-portal/ensemble.conf‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ SIMULATION_MODE = NORMAL
66

77
INPUT_DIR = $PWD/input_dir/
88

9+
RUN_COMMENT = Example
10+
911
USE_PORTAL = True
1012
PORTAL_URL=https://lb.ipsportal.development.svc.spin.nersc.org
1113
# do not commit actual PORTAL_API_KEY value to version control, best to set as an environment variable

‎examples-proposed/024-aggregated-compute-ensemble/ensemble.conf‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ SIMULATION_MODE = NORMAL
77
# This is where we have the base jupyter notebook for the ensemble instances.
88
INPUT_DIR = $PWD/input_dir/
99

10+
RUN_COMMENT = Example
11+
1012
USE_PORTAL = True
1113
PORTAL_URL = https://lb.ipsportal.development.svc.spin.nersc.org
1214
# do not commit actual PORTAL_API_KEY value to version control, best to set as an environment variable

0 commit comments

Comments
 (0)