Код: Выделить всё
int MPI_Errhandler_free(MPI_Errhandler *errhandler)Согласно этому предложению, правильное использование следующего шаблона (C++):
Код: Выделить всё
MPI_Errhandler errhandler;
MPI_Comm_create_errhandler(custom_error_handler_func, &errhandler);
MPI_Comm_set_errhandler(comm, errhandler);
MPI_Errhandler_free(&errhandler);
// errhandler goes out of scope here..
}
// A lot of code follows here.. then in another function, an MPI command is called on
// the comm (communicator handle), e.g. MPI_Send():
MPI_Send(
&variable,
/*count=*/1,
/*datatype=*/MPI_DOUBLE,
/*dest_rank=*/0,
/*tag=*/SomeTag,
comm
);
Подробнее здесь: https://stackoverflow.com/questions/792 ... ndler-free
Мобильная версия