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

Local execution of direct actions is now actually performed directly #3104

Merged
merged 1 commit into from Jan 19, 2018

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Jan 16, 2018

Proposed Changes

  • the test whether a direct action should actually be executed directly was checking for thread priority and thread stack-size. This patch removes those checks as they overly constrain direct execution.

this_thread::get_stack_size() ==
threads::get_stack_size(
static_cast<threads::thread_stacksize>(
traits::action_stacksize<Action>::value));
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to rather change it to

return !traits::action_decorate_function<Action>::value &&
    this_thread::get_stack_size() >=
        threads::get_stack_size(		
            static_cast<threads::thread_stacksize>(		
                traits::action_stacksize<Action>::value));

That way, we don't run into the problem if an action should run on a larger stack than what we have currently.
The priority change is correct though, as we intend to run the action immediately anyway.

Copy link
Member

Choose a reason for hiding this comment

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

The problem with not checking the priority is that the following test fails then:
http://cdash.cscs.ch/testDetails.php?test=11627793&build=73031
For the stacksize, we get this failure:
http://cdash.cscs.ch/testDetails.php?test=11628196&build=73031

Copy link
Member Author

Choose a reason for hiding this comment

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

Checking the priority does not make any sense as the function will be executed right away. I'd suggest correcting the test. I agree on the stack size change you suggested, though. That should also make the test pass.

Copy link
Member

Choose a reason for hiding this comment

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

The tests don't use direct actions. The actions are just executed locally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I didn't say anything about direct actions, though. I still think that the tests are overly constrained.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sithhell Your comments have been addressed.

@hkaiser hkaiser force-pushed the fixing_local_direct_actions branch 3 times, most recently from 14be494 to 1ebb3a3 Compare January 17, 2018 22:20
- flyby: expose has_decorates_action as a first class trait in namespace hpx::traits
Copy link
Member

@sithhell sithhell left a comment

Choose a reason for hiding this comment

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

LGTM

@hkaiser hkaiser merged commit 4efa868 into master Jan 19, 2018
@hkaiser hkaiser deleted the fixing_local_direct_actions branch January 19, 2018 18:08
hkaiser added a commit that referenced this pull request Jan 19, 2018
- this was exposed by the recent patch fixing direct execution (#3104)
hkaiser added a commit that referenced this pull request Jan 19, 2018
… execution)

- this was exposed by the recent patch fixing direct execution (#3104)
- flyby: don't run channel_2916 as a distributed test
hkaiser added a commit that referenced this pull request Jan 20, 2018
… execution)

- this was exposed by the recent patch fixing direct execution (#3104)
- flyby: don't run channel_2916 as a distributed test
hkaiser added a commit that referenced this pull request Jan 20, 2018
… execution)

- this was exposed by the recent patch fixing direct execution (#3104)
- flyby: don't run channel_2916 as a distributed test
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.

None yet

2 participants