Let user-defined main() work for all execution environments
#2 Updated by Phil Miller about 2 years ago
Revisiting this, are there situation where the desired outcome of this issue isn't satisfied?
readonly variables need some new treatment? What else would get in the way.
I'm going to have some of the Charmworks interns and new hires explore conversion from mainchare to user
main() to flesh this out further.
#7 Updated by Eric Mikida 3 months ago
- Target version set to 6.10.0
I've updated Justin Szaday's patch (https://charm.cs.illinois.edu/gerrit/c/charm/+/2732) to allow user driven interop to work without mainchares. This allows any charm program to use user-defined main, and removes the need for mainchares as well. It also addresses Phil's above point of still allowing readonlies by splitting the CharmInit into two steps. The old CharmInit is preserved for backwards compatibility.
It does fundamentally change semantics of user driven startup, in that CharmInit returns automatically after charm initialization is done. Previously, it only returned after the charm code called CkExit. However, that meant a mainchare was required. I'm pretty sure Charades is currently the only user of this API, so the breaking changes are not an issue.