Fortran unformatted output with each MPI process writing part of an array

前端 未结 3 1534
后悔当初
后悔当初 2021-01-20 01:22

In my parallel program, there was a big matrix. Each process computed and stored a part of it. Then the program wrote the matrix to a file by letting each process wrote its

3条回答
  •  终归单人心
    2021-01-20 01:51

    If you are writing MPI, why not MPI-IO? Each process will call MPI_File_set_view to set a subarray view of the file, then each process can collectively write the data with MPI_FILE_WRITE_ALL . This approach is likely to scale really well on big machines (though your approach will be fine up to oh, maybe 100 processors.)

提交回复
热议问题