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
Resource partitioner #2789
Resource partitioner #2789
Conversation
This cannot be merged until I (or you @hkaiser) eliminates and fixes the commit marked "WIP: FIX THIS PROPERLY" |
f54f94c
to
7a1dfbf
Compare
basic structure of the resource_partitioner class working
Affinity_data as data members of resource partitioner and make them friends
Add resource partitioner's initialization step to hpx_init(...). Add get_resource_partitioner() function returning reference to one static instance of the resource partitioner
Adapt the initialization flow in hpx_init(...). Undo type-erasure of runtime and threadmanager. Type erase thread_pool. Compiles, execution not tested yet.
Modify constructors of threadmanager and threadpool accordingly. Remove affinity_data and topology from scheduler
cleanup and add more coments
- change data member of threadmanager - change constructor of threadmanager - change member functions of threadmanager which act on pools - make changes to threadmanager functions accordingly - change internal data structure of resource-partitioner from vector<std::size_t> to mask_type - add function in resource-partitioner checking for: - oversubscription (pu sharing) - empty default pool - compatibility between --hpx:threads and number of PUS assigned - make sure the default pool pool is the one that gets instantiated first by the threadmanager
- fix compilation errors in threadmanager - resource partitioner instantiates a default thread pool at construction - threadmanager::default_pool() returns a pointer to default_pool
1242ec2
to
45d3cff
Compare
Could I please ask @KhalidHasanov to have a look through this branch and check if the work he contributed to the throttling policy has been accidentally deleted. If this is the case, then I will either edit the commit that deleted it and force push, or if @KhalidHasanov can provide a patch that reinstates anything missing, we can merge it back in. Thanks |
@KhalidHasanov, @sithhell, @biddisco I think this branch allows to remove the throttling policy altogether as it now can be held outside of the core HPX libraries. This scheduler is very project specific, so let's leave it in project space. |
Very good point. @KhalidHasanov you should have a look at the file
on this branch (around line 277) to see how to supply a custom scheduler to the default pool. |
@biddisco Thanks for pointing out the example file. I will have a look once the branch is merged and see how it goes. |
- fix --hpx:threads=all command line option to properly interact with hpx.os_threads=N configuration setting - adding more convenience functions for resource_partitioner - adding some convenience headers
- Reduced exposed user interface, changed creation of RP in user-code - shuffled things around, etc.
a5296f2
to
03964cf
Compare
d56eeeb
to
9b97602
Compare
940e9bf
to
a9d2f7b
Compare
a9d2f7b
to
df54dd7
Compare
victim_queues_.clear(); | ||
victim_queues_.resize(num_worker_queues); | ||
// | ||
BOOST_ASSERT(num_worker_queues != 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we switch to HPX_ASSERT here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks. We should add that to the obsolete macro tests in inspect.
# include <hpx/runtime/serialization/dynamic_bitset.hpp> | ||
# endif | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be moved in the header of the target to enable its serialization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should go away. It's a leftover from Shoshana's experiments...
Only a few minor comments here. This PR is rather big and we should get it in ASAP, and keep improving it as we gain experience with the new feature. |
I couldn't agree more. |
a051f7e
to
78b4f27
Compare
@shoshijak Thanks again for all your work on this! @aserio will get in contact with you to send a STE||AR-Group t-shirt as a small token of appreciation of your work. |
@shoshijak would you send me an email so we can discuss getting you a T-shirt? |
No description provided.