1
我在寫入2d塊循環分佈式數組時遇到了問題。MPI輸出使用部分MPI_File_write寫C中的2d塊循環分佈
我已經試過這件事情:
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);
}
我找不到任何在這個崗位(只是如何讀取文件並將其格式化爲2d塊循環分佈式數組(我已成功使用該文章)): MPI IO Reading and Writing Block Cyclic Matrix
對不起,我糟糕的英國:(