2004-01-24 23:17:43 +00:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#include "ompi_config.h"
|
2004-01-24 23:17:43 +00:00
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 18:45:16 +00:00
|
|
|
#include "mpi/c/bindings.h"
|
2004-03-19 19:01:09 +00:00
|
|
|
#include "errhandler/errhandler.h"
|
|
|
|
#include "communicator/communicator.h"
|
2004-01-24 23:17:43 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
2004-01-24 23:17:43 +00:00
|
|
|
#pragma weak MPI_Errhandler_f2c = PMPI_Errhandler_f2c
|
|
|
|
#endif
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#if OMPI_PROFILING_DEFINES
|
2004-04-20 18:50:43 +00:00
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-03-19 19:01:09 +00:00
|
|
|
|
|
|
|
MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler_f)
|
|
|
|
{
|
2004-03-20 01:55:10 +00:00
|
|
|
size_t eh_index = (size_t) errhandler_f;
|
2004-03-19 19:01:09 +00:00
|
|
|
|
|
|
|
/* Error checking */
|
|
|
|
|
|
|
|
if (MPI_PARAM_CHECK) {
|
2004-03-20 01:54:18 +00:00
|
|
|
if (0 > eh_index ||
|
2004-06-07 15:33:53 +00:00
|
|
|
eh_index >= ompi_pointer_array_get_size(ompi_errhandler_f_to_c_table)) {
|
2004-03-19 19:01:09 +00:00
|
|
|
return MPI_ERRHANDLER_NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
return ompi_errhandler_f_to_c_table->addr[eh_index];
|
2004-01-24 23:17:43 +00:00
|
|
|
}
|