00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "mpioimpl.h"
00010
00011 #ifdef HAVE_WEAK_SYMBOLS
00012
00013 #if defined(HAVE_PRAGMA_WEAK)
00014 #pragma weak MPI_File_get_type_extent = PMPI_File_get_type_extent
00015 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
00016 #pragma _HP_SECONDARY_DEF PMPI_File_get_type_extent MPI_File_get_type_extent
00017 #elif defined(HAVE_PRAGMA_CRI_DUP)
00018 #pragma _CRI duplicate MPI_File_get_type_extent as PMPI_File_get_type_extent
00019
00020 #endif
00021
00022
00023 #define MPIO_BUILD_PROFILING
00024 #include "mpioprof.h"
00025 #endif
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype,
00040 MPI_Aint *extent)
00041 {
00042 #ifndef PRINT_ERR_MSG
00043 int error_code;
00044 static char myname[] = "MPI_FILE_GET_TYPE_EXTENT";
00045 #endif
00046
00047 #ifdef PRINT_ERR_MSG
00048 if ((fh <= (MPI_File) 0) || (fh->cookie != ADIOI_FILE_COOKIE)) {
00049 FPRINTF(stderr, "MPI_File_get_type_extent: Invalid file handle\n");
00050 MPI_Abort(MPI_COMM_WORLD, 1);
00051 }
00052 #else
00053 ADIOI_TEST_FILE_HANDLE(fh, myname);
00054 #endif
00055
00056 if (datatype == MPI_DATATYPE_NULL) {
00057 #ifdef PRINT_ERR_MSG
00058 FPRINTF(stderr, "MPI_File_get_type_extent: Invalid datatype\n");
00059 MPI_Abort(MPI_COMM_WORLD, 1);
00060 #else
00061 error_code = MPIR_Err_setmsg(MPI_ERR_TYPE, MPIR_ERR_TYPE_NULL,
00062 myname, (char *) 0, (char *) 0);
00063 return ADIOI_Error(fh, error_code, myname);
00064 #endif
00065 }
00066
00067 return MPI_Type_extent(datatype, extent);
00068 }