This source file includes following definitions.
- MPI_Info_c2f
   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_Info_c2f = PMPI_Info_c2f
  14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
  15 #pragma _HP_SECONDARY_DEF PMPI_Info_c2f MPI_Info_c2f
  16 #elif defined(HAVE_PRAGMA_CRI_DUP)
  17 #pragma _CRI duplicate MPI_Info_c2f as PMPI_Info_c2f
  18 
  19 #endif
  20 
  21 
  22 #define MPIO_BUILD_PROFILING
  23 #include "mpioprof.h"
  24 #endif
  25 #include "adio_extern.h"
  26 
  27 
  28 
  29 
  30 
  31 
  32 
  33 
  34 
  35 
  36 MPI_Fint MPI_Info_c2f(MPI_Info info)
  37 {
  38 #ifndef INT_LT_POINTER
  39     return (MPI_Fint) info;
  40 #else
  41     int i;
  42 
  43     if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) 
  44         return (MPI_Fint) 0;
  45     if (!MPIR_Infotable) {
  46         MPIR_Infotable_max = 1024;
  47         MPIR_Infotable = (MPI_Info *)
  48             ADIOI_Malloc(MPIR_Infotable_max*sizeof(MPI_Info)); 
  49         MPIR_Infotable_ptr = 0;  
  50 
  51         for (i=0; i<MPIR_Infotable_max; i++) MPIR_Infotable[i] = MPI_INFO_NULL;
  52     }
  53     if (MPIR_Infotable_ptr == MPIR_Infotable_max-1) {
  54         MPIR_Infotable = (MPI_Info *) ADIOI_Realloc(MPIR_Infotable, 
  55                            (MPIR_Infotable_max+1024)*sizeof(MPI_Info));
  56         for (i=MPIR_Infotable_max; i<MPIR_Infotable_max+1024; i++) 
  57             MPIR_Infotable[i] = MPI_INFO_NULL;
  58         MPIR_Infotable_max += 1024;
  59     }
  60     MPIR_Infotable_ptr++;
  61     MPIR_Infotable[MPIR_Infotable_ptr] = info;
  62     return (MPI_Fint) MPIR_Infotable_ptr;
  63 #endif
  64 }