Skip to content

Example code to break into an interactive console from a component#6

Draft
skuntz wants to merge 6 commits intotactcomplabs:develfrom
skuntz:break_interactive
Draft

Example code to break into an interactive console from a component#6
skuntz wants to merge 6 commits intotactcomplabs:develfrom
skuntz:break_interactive

Conversation

@skuntz
Copy link
Collaborator

@skuntz skuntz commented Mar 14, 2025

This code provides an example (igrid) of breaking into an interactive console from a component (in this case in the event handler). It defines a breakEnable variable that can be set from the command line. It can also be set from the interactive console to turn the break capability on/off during execution. Note that setting breakEnable from the command line enables it for all
components. However, modifying it from the interactive console must be done for each component individually. So, for example, you could "set breakEnable 0" for the instance in component 0 but it would still be enabled in other components.

The BaseComponent::initiateInteractive() functionality is used to break into the interactive console. (Note: This is different from a previous version that used the interactive realtime action directly, which is an invalid use of realtime actions per Sandia.)

The test_igrid.sh tests the break into an interactive console from a component.
The test_interactive_console gives an example of using the interactive_console with the built-in --interactive-start=1s flag.

This example can be expanded to support more complex debugging funtionality.

@skuntz
Copy link
Collaborator Author

skuntz commented Mar 14, 2025

Note that this requires Werror disabled. There are some warnings in sst-core serialization that will cause errors otherwise.

@skuntz
Copy link
Collaborator Author

skuntz commented Mar 18, 2025

Using SST.h resolves the compiler warnings.

@kpgriesser
Copy link
Collaborator

I just added guidelines for sst integration in PR #7 to help future developers avoid the -Werror issues.

@skuntz skuntz marked this pull request as draft March 20, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants