In the case od a distributed file,be careful of the following point by MPI.
1.The input of data
Small files, such as rose meter, are read and distributed by rank=0.
Similarly, the output of a small text file, etc. are collected and outputted by rank=0.
2.Description by a program
In this program, N is divided by making arrangement A (N, M) into all the domains.
N and M are distributed. Its domain in its duty is determined after reception.
integer irank, isize,ierr,NM(2)
call MPI_Comm_size(MPI_COMM_WORLD, isize, ierr)
call MPI_Comm_rank(MPI_COMM_WORLD, irank, ierr)
if(irank.eq.0) read(5,*) NM(1),NM(2)
! ----- set of a parameter,Its charge is determind henceforth
Nst=Nsize*irank + 1
write(*,*) irank,Nsize,isize,Nst,Ned ←(check)
! ----- start
ALLOCATE ( A(Nst:Ned,M) )
In the case of a MPI program, there is fear of overwrite.
Please consider so that each file becomes unique.
As one of the methods of making it unique, a process number is put into a file name.
write(crank,' (i4.4) ') irank
This outpits a file,as a result of calling it out.0000 - .....
An output is a unformated and becomes processing that a package output is the earliest.
In continuation outputs, such as a text file, the load of Lustre becomes high.