Mojtaba Ghasemi
2012-01-06 00:42:35 UTC
Hello
I am a graduate student working in the reservoir simulation group at
University of Texas at Austin.
I am working on a project related to the application of MPI for
development of a parallel reservoir simulator.
For post processing of the results, I need to write the results into
binary files.
I want to write the results sorted (I mean first processor writes and
then second processor and then third processor and etc. )
I am thinking of the following loop for my idea:
Do K = 1, NZ (local NX,NY,NZ)
DO IP = 1, # of Processors
IF (Current Processor is
equal to IP) Then
DO J =1, NY
DO I =1, NX
Write(Binary
file) Pressure(I,J,K)
END DO ! I
END DO ! J
END IF
Other Processors WAIT here !
END DO ! IP
END DO ! K
But I don’t know how I should say that other processors wait until
current processor writes its output and then they go to the next
processor.
Is there any MPI command which I can use for my work?
I appreciate your help.
Sincerely
Mojtaba Ghasemi
I am a graduate student working in the reservoir simulation group at
University of Texas at Austin.
I am working on a project related to the application of MPI for
development of a parallel reservoir simulator.
For post processing of the results, I need to write the results into
binary files.
I want to write the results sorted (I mean first processor writes and
then second processor and then third processor and etc. )
I am thinking of the following loop for my idea:
Do K = 1, NZ (local NX,NY,NZ)
DO IP = 1, # of Processors
IF (Current Processor is
equal to IP) Then
DO J =1, NY
DO I =1, NX
Write(Binary
file) Pressure(I,J,K)
END DO ! I
END DO ! J
END IF
Other Processors WAIT here !
END DO ! IP
END DO ! K
But I don’t know how I should say that other processors wait until
current processor writes its output and then they go to the next
processor.
Is there any MPI command which I can use for my work?
I appreciate your help.
Sincerely
Mojtaba Ghasemi