tutorial/12.buddycr.c
/* Do all the magic in the error handler */
Do all the magic in the error handler
Do all the magic in the error handler
static void errhandler_respawn(MPI_Comm* pcomm, int* errcode, ...) {
    int eclass;
    MPI_Error_class(*errcode, &eclass);
    MPI_Error_string(*errcode, estr, &strl);
    if( MPIX_ERR_PROC_FAILED != eclass &&
        MPIX_ERR_REVOKED != eclass ) {
        fprintf(stderr, "%04d: errhandler invoked with unknown error %s\n", rank, estr);
        MPI_Abort(MPI_COMM_WORLD, *errcode);
    }
    if( verbose ) {
        fprintf(stderr, "%04d: errhandler invoked with error %s\n", rank, estr);
    }
    MPIX_Comm_revoke(*pcomm);
    if(app_needs_repair()) longjmp(restart, 0);
}
static void errhandler_respawn ( MPI_Comm * pcomm , int * errcode , ... ) { int eclass ; MPI_Error_class ( * errcode , & eclass ) ; MPI_Error_string ( * errcode , estr , & strl ) ; if ( MPIX_ERR_PROC_FAILED != eclass && MPIX_ERR_REVOKED != eclass ) { fprintf ( stderr , " \n " , rank , estr ) ; MPI_Abort ( MPI_COMM_WORLD , * errcode ) ; } if ( verbose ) { fprintf ( stderr , " \n " , rank , estr ) ; } MPIX_Comm_revoke ( * pcomm ) ; if ( app_needs_repair ( ) ) longjmp ( restart , 0 ) ; }
Do all the magic in the error handler
Do all the magic in the error handler