This source file includes following definitions.
- MPIO_Err_create_code
- MPIO_Err_return_file
- MPIO_Err_return_comm
   1 
   2 
   3 
   4 
   5 
   6 
   7 #include <stdarg.h>
   8 #include <stdio.h>
   9 
  10 #include "mpioimpl.h"
  11 #include "adio_extern.h"
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 int MPIO_Err_create_code(int lastcode, int fatal, const char fcname[],
  20                          int line, int error_class, const char generic_msg[],
  21                          const char specific_msg[], ...)
  22 {
  23     va_list Argp;
  24     int idx = 0;
  25     char *buf;
  26 
  27     buf = (char *) ADIOI_Malloc(1024);
  28     if (buf != NULL) {
  29         idx += ADIOI_Snprintf(buf, 1023, "%s (line %d): ", fcname, line);
  30         if (specific_msg == NULL) {
  31             ADIOI_Snprintf(&buf[idx], 1023 - idx, "%s\n", generic_msg);
  32         }
  33         else {
  34             va_start(Argp, specific_msg);
  35             vsnprintf(&buf[idx], 1023 - idx, specific_msg, Argp);
  36             va_end(Argp);
  37         }
  38         ADIOI_Free(buf);
  39     }
  40 
  41     return error_class;
  42 }
  43 
  44 int MPIO_Err_return_file(MPI_File mpi_fh, int error_code)
  45 {
  46     return error_code;
  47 }
  48 
  49 int MPIO_Err_return_comm(MPI_Comm mpi_comm, int error_code)
  50 {
  51     return error_code;
  52 }