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

Add support for turning off signal handler that prints backtrace #543

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

VictorYing
Copy link

@VictorYing VictorYing commented Nov 22, 2024

Enable modelers to disable Sparta's signal handlers, since it conflicts with other framework like SST. No change to default behavior.

Added option to disable backtrace (conflicts with other framework like SST)
@klingaard
Copy link
Member

klingaard commented Nov 23, 2024

Hi Victor, thank you for the submission!

Instead of adding a new construction parameter to the Simulation class, add this behavior to SimulationConfiguration.

Then, move the backtrace_ set handler calls to this function of Simulation:

if(sim_config_->install_signals_handlers) {
   ...
}

Much appreciated!

@VictorYing
Copy link
Author

VictorYing commented Nov 25, 2024

Thanks for the feedback. It led us to find an existing variable SimulatorConfiguration::signal_mode that seemed to exist for this purpose but have no effect previously, so we simply hooked it up in Simulation::configure() as you suggested.

Copy link
Member

@klingaard klingaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the update. I've asked Tim in the other PR to update MacOS CI.

@klingaard klingaard marked this pull request as ready for review November 27, 2024 14:56
@klingaard
Copy link
Member

Hey @VictorYing, can you pull from the latest master of sparta into your fork? The CI issue has been resolved.

@VictorYing VictorYing requested a review from klingaard December 2, 2024 20:55
@klingaard klingaard merged commit 7f7bf30 into sparcians:master Dec 2, 2024
9 checks passed
@klingaard klingaard added enhancement Enhancement or request component: sparta Issue is related to sparta framework labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sparta Issue is related to sparta framework enhancement Enhancement or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants