Hi,

If you try to open a file with a ":" in the filename (ex: "file:o"), you get an MPI_ERR_NO_SUCH_FILE.

ERROR Returned by MPI: 42
ERROR_string Returned by MPI: MPI_ERR_NO_SUCH_FILE: no such file or directory

Just launch the simple test code attached to see the problem.

MPICH has the same bug, but is a little more explicit about it:

ADIO_RESOLVEFILETYPE_PREFIX(575): Invalid file name file:o

Is this really a bug?

Thanks,

Eric

#include "mpi.h"
#include <cstdio>
#include <cstdlib>

using namespace std;

void abortOnError(int ierr) {
  if (ierr != MPI_SUCCESS) {
    printf("ERROR Returned by MPI: %d\n",ierr);
    char* lCharPtr = new char[MPI_MAX_ERROR_STRING];
    int lLongueur = 0;
    MPI_Error_string(ierr,lCharPtr, &lLongueur);
    printf("ERROR_string Returned by MPI: %s\n",lCharPtr);
    MPI_Abort( MPI_COMM_WORLD, 1 );
  }
}

int main(int argc, char *argv[])
{
    int rank, size;

    MPI_Init(&argc, &argv);
    if (2 != argc) {
      printf("ERROR: you must specify a filename to create.\n");
      MPI_Finalize();
      return 1;
    }
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);

    MPI_File lFile; 
    abortOnError(MPI_File_open( MPI_COMM_WORLD, argv[1], MPI_MODE_RDWR | 
MPI_MODE_CREATE, MPI_INFO_NULL, &lFile ));

    abortOnError(MPI_File_close( &lFile ));

    MPI_Finalize();
    return 0;
}

Reply via email to