- #1
tav98f
- 6
- 0
I am working in FORTRAN
I need to avoid writing to the same file at the same time while working in a parallel environment.
I have a program (that I have not written and cannot edit) that calls a subroutine (that I have written and can edit). The subroutine is called over and over again by several processors working at the same time. I am having issues with more than one processor writing to the same file at the same time.
I need a way to avoid writing to the file at the same time.
The best way that I can think of is to break the file into several files; one per processor and name them by processor. However, I need some way to determine which processor is doing the writing.
Does anyone know how to do that?
Or does anyone have any other suggestions?
Thank you,
Timothy
I need to avoid writing to the same file at the same time while working in a parallel environment.
I have a program (that I have not written and cannot edit) that calls a subroutine (that I have written and can edit). The subroutine is called over and over again by several processors working at the same time. I am having issues with more than one processor writing to the same file at the same time.
I need a way to avoid writing to the file at the same time.
The best way that I can think of is to break the file into several files; one per processor and name them by processor. However, I need some way to determine which processor is doing the writing.
Does anyone know how to do that?
Or does anyone have any other suggestions?
Thank you,
Timothy