- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am looking into using the new F2003 feature, asynchronous output. My question is this:
You make an asynchronous WRITE, then continue doing computations and make another asynchronous WRITE to the same file. If the output from the previous WRITE is not complete, what happens to the data that are being output with the second WRITE? Do they safely get queued and printed after the first WRITE is over, or do they mess up the whole output? Should there be a WAIT or FLUSH command between the two WRITEs?
Thanks,
Jon
I am looking into using the new F2003 feature, asynchronous output. My question is this:
You make an asynchronous WRITE, then continue doing computations and make another asynchronous WRITE to the same file. If the output from the previous WRITE is not complete, what happens to the data that are being output with the second WRITE? Do they safely get queued and printed after the first WRITE is over, or do they mess up the whole output? Should there be a WAIT or FLUSH command between the two WRITEs?
Thanks,
Jon
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The second asynchronous WRITE queues the data and it is written after the first one completes. But the second one must use different variables than are in the I/O list of the first, unless you do a WAIT before the second WRITE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Consider the output of a large matrix in the following way:
do i =1,n
write (100,*,asynchronous='yes') (a(i,j),j=1,m)
end do
Would this require WAIT in the DO-loop before each WRITE?
Thanks,
Jon
Consider the output of a large matrix in the following way:
do i =1,n
write (100,*,asynchronous='yes') (a(i,j),j=1,m)
end do
Would this require WAIT in the DO-loop before each WRITE?
Thanks,
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, though I'll also tell you that this operation will be done synchronously in our implementation (and I wager on most others.) The benefit of asynchronous I/O is in unformatted reads and writes of large, single arrays. You can ask for asynch for formatted and list-directed, and for multiple item I/O lists, but you probably won't get it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want asynchronous formatted read or write consider using a seperate thread.
Jim Dempsey
![](/skins/images/895D6060305DF45A57FACF854B5A8CD1/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page