Example #1
0
int
MdrunTestFixture::callGrompp()
{
#ifdef GMX_LIB_MPI
    // When compiled with external MPI, only call one instance of the
    // grompp function
    if (0 != gmx_node_rank())
    {
        return 0;
    }
#endif
    return callGromppOnThisRank();
}
Example #2
0
int
SimulationRunner::callGrompp()
{
    int returnValue = 0;
#if GMX_LIB_MPI
    // When compiled with external MPI, we're trying to run mdrun with
    // MPI, but we need to make sure that we only do grompp on one
    // rank
    if (0 == gmx_node_rank())
#endif
    {
        returnValue = callGromppOnThisRank();
    }
#if GMX_LIB_MPI
    // Make sure rank zero has written the .tpr file before other
    // ranks try to read it. Thread-MPI and serial do this just fine
    // on their own.
    MPI_Barrier(MPI_COMM_WORLD);
#endif
    return returnValue;
}