This source file includes following definitions.
- MPI_File_get_view
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 #include "mpioimpl.h"
   9 
  10 #ifdef HAVE_WEAK_SYMBOLS
  11 
  12 #if defined(HAVE_PRAGMA_WEAK)
  13 #pragma weak MPI_File_get_view = PMPI_File_get_view
  14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
  15 #pragma _HP_SECONDARY_DEF PMPI_File_get_view MPI_File_get_view
  16 #elif defined(HAVE_PRAGMA_CRI_DUP)
  17 #pragma _CRI duplicate MPI_File_get_view as PMPI_File_get_view
  18 
  19 #elif defined(HAVE_WEAK_ATTRIBUTE)
  20 int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_Datatype *filetype,
  21                       char *datarep) __attribute__((weak,alias("PMPI_File_get_view")));
  22 #endif
  23 
  24 
  25 #define MPIO_BUILD_PROFILING
  26 #include "mpioprof.h"
  27 #endif
  28 #ifdef MPISGI
  29 #include "mpisgi2.h"
  30 #endif
  31 
  32 
  33 
  34 
  35 
  36 
  37 
  38 
  39 
  40 
  41 
  42 
  43 
  44 
  45 
  46 int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
  47                       MPI_Datatype *filetype, char *datarep)
  48 {
  49     int error_code;
  50     ADIO_File adio_fh;
  51     static char myname[] = "MPI_FILE_GET_VIEW";
  52     int i, j, k, combiner;
  53     MPI_Datatype copy_etype, copy_filetype;
  54 
  55     ROMIO_THREAD_CS_ENTER();
  56 
  57     adio_fh = MPIO_File_resolve(fh);
  58 
  59     
  60     MPIO_CHECK_FILE_HANDLE(adio_fh, myname, error_code);
  61 
  62     if (datarep == NULL)
  63     {
  64         error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
  65                                           myname, __LINE__, MPI_ERR_ARG, 
  66                                           "**iodatarepnomem", 0);
  67         error_code = MPIO_Err_return_file(adio_fh, error_code);
  68         goto fn_exit;
  69     }
  70     
  71 
  72     *disp = adio_fh->disp;
  73     ADIOI_Strncpy(datarep, 
  74             (adio_fh->is_external32 ? "external32": "native"), MPI_MAX_DATAREP_STRING);
  75 
  76     MPI_Type_get_envelope(adio_fh->etype, &i, &j, &k, &combiner);
  77     if (combiner == MPI_COMBINER_NAMED) *etype = adio_fh->etype;
  78     else {
  79         
  80 
  81 
  82         MPI_Type_contiguous(1, adio_fh->etype, ©_etype);
  83 
  84         
  85         MPI_Type_commit(©_etype);
  86         *etype = copy_etype;
  87     }
  88     
  89     MPI_Type_get_envelope(adio_fh->filetype, &i, &j, &k, &combiner);
  90     if (combiner == MPI_COMBINER_NAMED) *filetype = adio_fh->filetype;
  91     else {
  92         MPI_Type_contiguous(1, adio_fh->filetype, ©_filetype);
  93 
  94         MPI_Type_commit(©_filetype);
  95         *filetype = copy_filetype;
  96     }
  97 
  98 fn_exit:
  99     ROMIO_THREAD_CS_EXIT();
 100 
 101     return MPI_SUCCESS;
 102 }