Hi all,
I have a performance problem with the next code. 

int main( int argc, char *argv[] )
{
        MPI_Init(&argc, &argv);

        int myid;
        MPI_Comm_rank(MPI_COMM_WORLD, &myid);

        //Imagine some important job here, but P0 ends first.
        if (myid != 0)
        {       
                sleep(20);
        }

        printf("Calling MPI_Finalize() ...\n");
        // Process 0 maintain core load at 100%.
        MPI_Finalize();
        printf("Ok\n");

        return 0;
}

If some MPI threads call MPI_Finalize() while others threads are still 
"working", the MPI_Finalize() function maintains the core load in 100% 
and not allows other threads or jobs in the processor to run faster.

Any idea to avoid the load or force the P0 to sleep?

Thanks,
Ivan Cores.

Reply via email to