-
Notifications
You must be signed in to change notification settings - Fork 54
Compile charm with CMK_LBDB_ON=0 #3904
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
It will be worthwhile to run some fine grained benchmarks with and without this being set to 1. (make sure you are timing inside the program.. not the startup.) . For pingpong with chare arrays, use a long number of iterations. You also may need a program with UsesAtSync (?) and isMigratable turned on, which is nevertheless fine grained. Of course without any actual calls to AtSync(). |
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.
I will approve it soon, since we need it merged but:
(a) we should write the performance test I indicated. Although admittedly is tedious to run the test since w need two different bulds of charm (without and without CMK_LBDB_ON).
(b) is this meant to shut of only object load measurement or object migration itself? If only the former, we still need location record (right?) . This is when (for exmple) you may use migrteMe() calls, or balance based on estimated loads, or migrate for other objectives than load balancing (such as shrink expand or fault tolerance).
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 enables Charm++ to compile with the CMK_LBDB_ON flag set to off by reorganizing conditional compilation blocks and moving some declarations outside of LBDB-specific guards.
- Reorganizes conditional compilation blocks to ensure necessary declarations are available regardless of LBDB status
- Moves critical member variables and function declarations outside of CMK_LBDB_ON guards
- Adds default parameter to ckFinishConstruction method
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/ck-ldb/LBObj.C | Reorganizes CMK_LBDB_ON guards to allow IncrementTime method to compile without LBDB |
src/ck-core/ckmigratable.h | Adds default parameter to ckFinishConstruction method |
src/ck-core/cklocrec.h | Moves syncBarrier and ldHandle declarations outside CMK_LBDB_ON guards |
src/ck-core/ck.h | Removes CMK_LBDB_ON guard from CkActiveLocRec function declaration |
src/ck-core/ck.C | Moves CMK_LBDB_ON guard inside CkActiveLocRec function implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/ck-core/ck.C
Outdated
} else { | ||
return nullptr; | ||
} | ||
#endif |
Copilot
AI
Sep 24, 2025
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.
The function CkActiveLocRec has no return statement when CMK_LBDB_ON is disabled, which will cause undefined behavior. Add an explicit return statement for the disabled case, such as return nullptr;
after the #endif.
#endif | |
#endif | |
return nullptr; |
Copilot uses AI. Check for mistakes.
a ) I will work on it. But what's interesting is that you can just turn the instrumentation off with |
This allows Charm++ to compile with CMK_LBDB_ON set to off.