Hi,
I get this error when trying to write 360 000 000 000 MPI_LONG:
with Openmpi-1.4.5:
ERROR Returned by MPI_File_write_all: 35
ERROR_string Returned by MPI_File_write_all: MPI_ERR_IO: input/output error
with Openmpi-1.6.2:
ERROR Returned by MPI_File_write_all: 13
ERROR_string Returned by MPI_File_write_all: MPI_ERR_ARG: invalid
argument of some other kind
First, the error in 1.6.2 seems to be less usefull to understand what
happened for the user...
Second, am I wrong to try to write that much MPI_LONG? Is this
limitation documented or to be fixed?
Thanks,
Eric
=====================================================
Here is the code:
#include <stdio.h>
#include "mpi.h"
int main (int argc, char *argv[])
{
MPI_Datatype filetype;
MPI_File fh;
long *local_array;
MPI_Status status;
MPI_Init( &argc, &argv );
int nb_proc = 0;
MPI_Comm_size( MPI_COMM_WORLD, &nb_proc );
if (nb_proc != 1) {
printf( "Test code for 1 process!\n" );
MPI_Abort( MPI_COMM_WORLD, 1 );
}
int size=90000000*4;
local_array = new long[size];
MPI_File_open(MPI_COMM_WORLD, "2.6Gb",
MPI_MODE_CREATE | MPI_MODE_WRONLY,
MPI_INFO_NULL, &fh);
int ierr = MPI_File_write_all(fh, local_array, size, MPI_LONG,
&status);
if (ierr != MPI_SUCCESS) {
printf("ERROR Returned by MPI_File_write_all: %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_File_write_all: %s\n",lCharPtr);
MPI_Abort( MPI_COMM_WORLD, 1 );
}
MPI_File_close(&fh);
MPI_Finalize();
return 0;
}
~
~