-
Notifications
You must be signed in to change notification settings - Fork 1
Add priorities for Charm++ messages #126
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds priority queue support for Charm++ messages in Reconverse, implementing a priority-based message scheduling system. This allows Charm++ applications to control execution order more precisely by assigning priorities to messages.
Key changes:
- Implements priority queues using
std::priority_queue
for both node-level and thread-level message scheduling - Adds
CqsEnqueueGeneral
function to handle different queueing strategies (FIFO, LIFO, integer priorities, long long priorities) - Updates the scheduler to process priority queues after regular Converse queues but before falling back to communication backend progress
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/scheduler.cpp |
Adds priority queue polling logic to both CsdScheduler() and CsdSchedulePoll() functions, implements CqsEnqueueGeneral for message enqueueing with priorities |
src/convcore.cpp |
Initializes priority queue data structures and locks during system startup |
src/cldb.rand.cpp |
Updates message handlers to use the new priority-aware enqueueing functions instead of direct PE pushing |
include/converse.h |
Defines priority queue types, comparator, and function declarations; moves lock type definitions and adds convenience macros |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This adds a priority queue to Reconverse.
For most messages in Charm++, when a receiving PE or node gets a Charm++ message (like an entry method call), it first enqueues that call into a priority queue. Then, the receiving PE or node polls the priority queue if the Converse PE and node queues are empty, triggering the execution of entry methods. This has the effect of prioritizing Converse-level messages over Charm messages, but also lets Charm applications use priorities to more closely control the execution of their programs.
Charm++ already has the infrastructure to support priorities, but this adds support to Reconverse. The main difference between the reconverse implementation and the old converse one is the use of std::priority_queue in reconverse, as opposed to the custom haeap implementation in old Converse (each priority level is a linked list).