I have problems with writing 2d block cyclic distributed array in file.
I've tried this things:
rc=MPI_File_open(MPI_COMM_WORLD, rez, MPI_MODE_WRONLY, MPI_INFO_NULL, &cFile);
if(rc){printf("Failed to open file! Error: %d \n", rc);MPI_Finalize();
fflush(stdout);}
else
{
MPI_File_write_all(cFile, MatC, loccC*locrC, compa, &status);
}
...
rc=MPI_File_open(MPI_COMM_WORLD, rez, MPI_MODE_WRONLY, MPI_INFO_NULL, &cFile);
if(rc){printf("Failed to open file! Error: %d \n", rc);MPI_Finalize();
fflush(stdout);}
else
{
MPI_File_write_ordered(cFile, MatC, loccC*locrC, compa, &status);
}
...
rc=MPI_File_open(MPI_COMM_WORLD, rez, MPI_MODE_WRONLY, MPI_INFO_NULL, &cFile);
if(rc){printf("Failed to open file! Error: %d \n", rc);MPI_Finalize();
fflush(stdout);}
else
{
MPI_File_write_shared(cFile, MatC, loccC*locrC, compa, &status);
}
I couldn't find nothing in this post (But just how to read a file and format it into 2d block cyclic distributed array (which I've succeeded using that post)): MPI IO Reading and Writing Block Cyclic Matrix
Sorry for my terrible English :(