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-04-19 23:46:16 +00:00
|
|
|
#include "communicator/communicator.h"
|
|
|
|
#include "errhandler/errhandler.h"
|
|
|
|
#include "file/file.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_File_get_errhandler = PMPI_File_get_errhandler
|
|
|
|
#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-01-24 23:17:43 +00:00
|
|
|
int MPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler) {
|
2004-04-19 23:46:16 +00:00
|
|
|
/* Error checking */
|
|
|
|
|
|
|
|
if (MPI_PARAM_CHECK) {
|
|
|
|
if (NULL == file ||
|
|
|
|
MPI_FILE_NULL == file) {
|
2004-06-07 15:33:53 +00:00
|
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
2004-04-19 23:46:16 +00:00
|
|
|
"MPI_File_get_errhandler");
|
|
|
|
} else if (NULL == errhandler) {
|
2004-06-07 15:33:53 +00:00
|
|
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
2004-04-19 23:46:16 +00:00
|
|
|
"MPI_File_get_errhandler");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the errhandler. Do not increase the refcount here; we
|
|
|
|
only refcount on communicators */
|
|
|
|
|
|
|
|
*errhandler = file->error_handler;
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
return MPI_SUCCESS;
|
2004-01-24 23:17:43 +00:00
|
|
|
}
|