Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] MPI_File_open return error code 16
From: Changsheng Jiang (jiangzuoyan_at_[hidden])
Date: 2009-08-26 21:23:20


Hi List,

I am learning MPI.

A small code snippet try to open a file by MPI_File_open gets error
16(Internal error code.) in a single server with OpenMPI 1.3.3, but
it's run correctly in another server(with OpenMPI 1.3.2).

How to fix this problem? Thanks.

This is the snippet:

int main(int argc, char *argv[]) {
  MPI_File fh;
  MPI_Init( &argc, &argv );
  int ret = MPI_File_open(
      MPI_COMM_WORLD, "temp",
      MPI_MODE_RDWR | MPI_MODE_CREATE,
      MPI_INFO_NULL, &fh);
  if (ret != MPI_SUCCESS) {
    fprintf(stderr, "open file failed, code=%d\n", ret);
  } else {
    MPI_File_close(&fh);
  }
  MPI_Finalize();
  return 0;
}

                                                     Changsheng Jiang