I'm testing openmpi-1.8.

MPI_Get_error_string() for the following error classes is failing. I
guess you just forgot to update the list of error strings.

    MPI_ERR_RMA_RANGE
    MPI_ERR_RMA_ATTACH
    MPI_ERR_RMA_FLAVOR
    MPI_ERR_RMA_SHARED

I'm attaching a simple test code for you to verify the issue.

Additionally, please update the following comment in mpi.h

/* Per MPI-3 p349 47, MPI_ERR_LASTCODE must be >= the last predefined
   MPI_ERR_<foo> code.  So just set it equal to the last code --
   MPI_ERR_RMA_FLAVOR, in this case. */
#define MPI_ERR_LASTCODE              MPI_ERR_RMA_SHARED

The comment is wrong, the last predefined error class is
MPI_ERR_RMA_SHARED and not  MPI_ERR_RMA_FLAVOR.


-- 
Lisandro Dalcin
---------------
CIMEC (UNL/CONICET)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1016)
Tel/Fax: +54-342-4511169
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[]) {
  int ierr;
  int errclasses[] = {
    MPI_SUCCESS,
    MPI_ERR_RMA_RANGE,
    MPI_ERR_RMA_ATTACH,
    MPI_ERR_RMA_FLAVOR,
    MPI_ERR_RMA_SHARED
  };
  int resultlen = 0;
  char errstring[MPI_MAX_ERROR_STRING];
  int i, n = sizeof(errclasses)/sizeof(int);

  MPI_Init(0,0);
  MPI_Comm_set_errhandler(MPI_COMM_WORLD,MPI_ERRORS_RETURN);
  for (i=0; i<n; i++) {
    printf("Test for error class: %d\n", errclasses[i]);
    ierr = MPI_Error_string(errclasses[i], errstring, &resultlen);
    if (ierr == MPI_SUCCESS) {
      printf("error string: %s\n", errstring);
    } else {
      printf("MPI_Error_string() failed with code %d!!!\n",ierr);
    }
  }
  MPI_Finalize();
}

Reply via email to