Skip to content

Properly dispatch exceptions thrown from hpx_main to be rethrown from hpx::init/hpx::stop#4487

Merged
msimberg merged 5 commits intomasterfrom
fixing_hpx_main_exceptions
Apr 8, 2020
Merged

Properly dispatch exceptions thrown from hpx_main to be rethrown from hpx::init/hpx::stop#4487
msimberg merged 5 commits intomasterfrom
fixing_hpx_main_exceptions

Conversation

@hkaiser
Copy link
Member

@hkaiser hkaiser commented Apr 1, 2020

No description provided.

msimberg
msimberg previously approved these changes Apr 1, 2020
Copy link
Contributor

@msimberg msimberg left a comment

Choose a reason for hiding this comment

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

Very nice, thanks!

@msimberg
Copy link
Contributor

msimberg commented Apr 2, 2020

Hmm, this is throwing more/in a different place than some of our tests expect. We do have some tests that catch an exception thrown in hpx_main (error_callback is the simplest). What sort of exceptions were not propagated up through init/main?

@msimberg
Copy link
Contributor

msimberg commented Apr 2, 2020

report_error is mean to store exceptions thrown, which the runtime then rethrows after everything has been shut down. Could it be that report_error is not getting called, or encounters an error itself (did the application hang?)?

@hkaiser
Copy link
Member Author

hkaiser commented Apr 2, 2020

Hmm, this is throwing more/in a different place than some of our tests expect. We do have some tests that catch an exception thrown in hpx_main (error_callback is the simplest). What sort of exceptions were not propagated up through init/main?

I'll investigate.

hkaiser added 3 commits April 3, 2020 11:16
- flyby: make existing test cover the new functionality
- flyby: adding asserts to shared_priority_queue_scheduler to avoid using -1 as array indices
@hkaiser hkaiser force-pushed the fixing_hpx_main_exceptions branch from 2e14b4f to 74ecb08 Compare April 3, 2020 17:00
@msimberg msimberg self-assigned this Apr 3, 2020
@msimberg
Copy link
Contributor

msimberg commented Apr 6, 2020

@hkaiser I've attempted to clean up the thread number handling. local_num is allowed to be -1, for example when creating a thread from a non-worker thread (like spawning hpx_main/run_helper as was the case here). @biddisco could you have a look to see if the changes to the shared_priority_queue_scheduler make sense?

@hkaiser
Copy link
Member Author

hkaiser commented Apr 6, 2020

@hkaiser I've attempted to clean up the thread number handling. local_num is allowed to be -1, for example when creating a thread from a non-worker thread (like spawning hpx_main/run_helper as was the case here).

Thanks @msimberg. I did suspect that much, but was not sure what the correct handling in the scheduler should be. Let's see how the tests fare.

@msimberg msimberg merged commit 969833a into master Apr 8, 2020
@msimberg msimberg deleted the fixing_hpx_main_exceptions branch April 8, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants