On Thu, Aug 27, 2009 at 09:23:20AM +0800, Changsheng Jiang wrote:
> Hi List,
> 
> I am learning MPI.

Welcome! sorry for the several-months lateness of my reply: I check in
on OpenMPI only occasionally looking for MPI-IO questions. 

> 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;
> }

The error code isn't very interesting, but if you can turn that error
code into a human readable string with the MPI_Error_string() routine,
then maybe you'll have a hint as to what is causing the problem.

==rob

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA

Reply via email to