Skip to content

MPI spinning consumes excessive battery and interferes with other apps #235

@m8pple

Description

@m8pple

I'd noticed that trying to do any work with the orchestrator killed my laptop battery, to
the point that I'd mostly stopped trying. Then I accidentally left the orchestrator open,
and realised (after it had burnt half my battery), that it was the spinning threads
that were running permanently even if the orchestrator was idle.

Many users of the orchestrator are going to be developing applications and spending
most of their time getting them compiling and parsing (and eventually simulating), and
they are quite likely to be doing this on laptops. Every student we have had working
with POETS so far has worked on their laptop, and only connected to a hardware server once
it was all debugged and working in simulation.

So it would be nice if the spinner adapted if nothing is happening, e.g. some kind of
exponential backoff down to 10ms if there is repeatedly nothing there. I can see
something mentioned in the Mothership spinner, but this seems to be related to
debugging rather than efficiency.

Presumably this would be added here:

for (;;) {
// See if there are any MPI packets coming down the pipe
MPI_Status status; // Note the multi-threaded MPI probe
int flag;
MPI_Iprobe(MPI_ANY_SOURCE,MPI_ANY_TAG,MPI_COMM_WORLD,&flag,&status);
if (flag==0) { // Nothing there....
OnIdle(); // Guess
continue; // And try again
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions