This source file includes following definitions.
- MPI_Info_get_nthkey
   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_get_nthkey = PMPI_Info_get_nthkey
  14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
  15 #pragma _HP_SECONDARY_DEF PMPI_Info_get_nthkey MPI_Info_get_nthkey
  16 #elif defined(HAVE_PRAGMA_CRI_DUP)
  17 #pragma _CRI duplicate MPI_Info_get_nthkey as PMPI_Info_get_nthkey
  18 
  19 #endif
  20 
  21 
  22 #define MPIO_BUILD_PROFILING
  23 #include "mpioprof.h"
  24 #endif
  25 
  26 
  27 
  28 
  29 
  30 
  31 
  32 
  33 
  34 
  35 
  36 
  37 
  38 int MPI_Info_get_nthkey(MPI_Info info, int n, char *key)
  39 {
  40     MPI_Info curr;
  41     int nkeys, i;
  42 
  43     if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) {
  44         FPRINTF(stderr, "MPI_Info_get_nthkey: Invalid info object\n");
  45         MPI_Abort(MPI_COMM_WORLD, 1);
  46     }
  47 
  48     if (key <= (char *) 0) {
  49         FPRINTF(stderr, "MPI_Info_get: key is an invalid address\n");
  50         MPI_Abort(MPI_COMM_WORLD, 1);
  51     }
  52 
  53     curr = info->next;
  54     nkeys = 0;
  55     while (curr) {
  56         curr = curr->next;
  57         nkeys++;
  58     }
  59 
  60     if ((n < 0) || (n >= nkeys)) {
  61         FPRINTF(stderr, "MPI_Info_get_nthkey: n is an invalid number\n");
  62         MPI_Abort(MPI_COMM_WORLD, 1);
  63     }
  64 
  65     curr = info->next;
  66     i = 0;
  67     while (i < n) {
  68         curr = curr->next;
  69         i++;
  70     }
  71     ADIOI_Strncpy(key, curr->key, MPI_MAX_INFO_KEY);
  72 
  73     return MPI_SUCCESS;
  74 }