41 строка
920 B
C
41 строка
920 B
C
/*
|
|
* $HEADER$
|
|
*/
|
|
#include "ompi_config.h"
|
|
#include <stdio.h>
|
|
|
|
#include "mpi.h"
|
|
#include "mpi/c/bindings.h"
|
|
#include "runtime/runtime.h"
|
|
#include "errhandler/errclass.h"
|
|
#include "communicator/communicator.h"
|
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
|
#pragma weak MPI_Add_error_class = PMPI_Add_error_class
|
|
#endif
|
|
|
|
#if OMPI_PROFILING_DEFINES
|
|
#include "mpi/c/profile/defines.h"
|
|
#endif
|
|
|
|
int MPI_Add_error_class(int *errorclass)
|
|
{
|
|
int class;
|
|
|
|
if ( MPI_PARAM_CHECK ) {
|
|
if ( ompi_mpi_finalized )
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
|
"MPI_Add_error_class");
|
|
}
|
|
|
|
class = ompi_errclass_add();
|
|
if ( 0 > class ) {
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
|
"MPI_Add_error_class");
|
|
}
|
|
|
|
*errorclass = class;
|
|
return MPI_SUCCESS;
|
|
}
|
|
|