Re: Simultaneous write on textfile over NFS [message #69817 is a reply to message #69722] |
Wed, 10 February 2010 07:04  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Johannes Korn schrieb:
> Hi,
>
> I often run idl programs which utilize only one CPU core (for loops).
> The output is a text line appended to a file.
>
> To exploit a multicore I run multiple instances with different parameter
> setups. The output goes to different files. After all jobs are completed
> I manually merge the files.
> This ways I have to keep track which file contains what output and so on.
>
> My question, what happens if I use the same output file for all jobs. Is
> it save?
>
No
you need one processor which serializes your output and which takes care
on the order.
May be read a bit about mpi / openmp
cheers
Reimar
> This means every job would write about every 15 seconds a line like that.
>
> OPENW, u, 'file.txt', /GET_LUN, WIDTH=250, /APPEND
> printf, a, b, c
> FREE_LUN,u
>
> What if two write accesses collide? Will the file be corrupted? Will
> there be an error? Will the second job wait until the first one has
> closed the file?
>
> Filesystem is NFS.
>
> Regards,
>
> Johannes
|
|
|