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

Implement QD to automatically call cmk::exit when idle #38

Open
NK-Nikunj opened this issue Jan 26, 2022 · 2 comments
Open

Implement QD to automatically call cmk::exit when idle #38

NK-Nikunj opened this issue Jan 26, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@NK-Nikunj
Copy link
Contributor

NK-Nikunj commented Jan 26, 2022

An empty charmlite program such as follows fails to run to completion with non-SMP (and potentially SMP) builds:

#include <charmlite/charmlite.hpp>

int main(int argc, char* argv[])
{
    cmk::initialize(argc, argv);

    {
        // Some code OR no code
    }

    cmk::finalize();

    return 0;
}
@jszaday
Copy link
Member

jszaday commented Jan 26, 2022

It's a little awkward, but we require an explicit call to cmk::exit at the moment. We have not implemented QD to automatically detect when the runtime has processed all messages.

Subsequently, have you tried the following:

#include <charmlite/charmlite.hpp>

int main(int argc, char* argv[])
{
    // Initialize Converse and CharmLite 
    cmk::initialize(argc, argv);
    // Broadcast a message to all PEs to
    // start shutting down
    if (CmiMyNode() == 0) {
        cmk::exit();
    }
    // Then run the Converse scheduler
    // loop until it exits on this node
    cmk::finalize();
    return 0;
}

@NK-Nikunj
Copy link
Contributor Author

cmk::exit does work in this situation. We may want to pin this issue until we get QD to automatically detect that there was no message created in the first place so we don't need an explicit call to cmk::exit.

@jszaday jszaday added the enhancement New feature or request label Jan 26, 2022
@jszaday jszaday changed the title Charmlite program with no chare creation hangs Implement QD to automatically call cmk::exit when program is idle Jan 26, 2022
@jszaday jszaday changed the title Implement QD to automatically call cmk::exit when program is idle Implement QD to automatically call cmk::exit when idle Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants