Пример #1
0
int processExceptionAtExit(const std::exception & /*ex*/)
{
    int returnCode = 1;
    // If we have more than one rank (whether real MPI or thread-MPI),
    // we cannot currently know whether just one rank or all ranks
    // actually threw the error, so we need to exit here.
    // Returning would mean graceful cleanup, which is not possible if
    // some code is still executing on other ranks/threads.
    if (gmx_node_num() > 1)
    {
        gmx_exit_on_fatal_error(ExitType_Abort, returnCode);
    }
    return returnCode;
}
Пример #2
0
void gmx_fatal_mpi_va(int /*f_errno*/, const char *file, int line,
                      gmx_bool bMaster, gmx_bool bFinalize,
                      const char *fmt, va_list ap)
{
    if (bMaster)
    {
        char msg[STRLEN];
        vsprintf(msg, fmt, ap);
        call_error_handler("fatal", file, line, msg);
    }

    ExitType exitType = ExitType_CleanExit;
    if (!bFinalize)
    {
        exitType = bMaster ? ExitType_Abort : ExitType_NonMasterAbort;
    }
    gmx_exit_on_fatal_error(exitType, 1);
}
Пример #3
0
void _gmx_error(const char *key, const char *msg, const char *file, int line)
{
    call_error_handler(key, file, line, msg);
    gmx_exit_on_fatal_error(ExitType_Abort, 1);
}
Пример #4
0
void processExceptionAsFatalError(const std::exception &ex)
{
    printFatalErrorMessage(stderr, ex);
    gmx_exit_on_fatal_error(ExitType_Abort, 1);
}