- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm working on an application using OpenMP to parallelize sections. I noticed that the file I/O was reducing the speedup so I wanted to use asynchronous writing.
The program has a loop with 1800 iterations. In each iteration several arrays are written to file like so
write(unitno,asynchronous='yes',rec=recnum)a1,a2,a3,a4......
When I run the program, it crashes at different iterations of the loop. I have no idea what is going on. Is it something with the write statement and writing multiple arrays, or does it have something to do with using asynchronous writes 1800 times?
I even did the following:
write(unitno,asynchronous='yes',rec=recnum)a1,a2,a3,a4......
wait(unitno)
I thought that this would make it the same as a synchronous write, but the program still crashes.
I am using the Intel Visual Fortran professional compiler edition 11.1 on Windows XP.
Thanks.
I'm working on an application using OpenMP to parallelize sections. I noticed that the file I/O was reducing the speedup so I wanted to use asynchronous writing.
The program has a loop with 1800 iterations. In each iteration several arrays are written to file like so
write(unitno,asynchronous='yes',rec=recnum)a1,a2,a3,a4......
When I run the program, it crashes at different iterations of the loop. I have no idea what is going on. Is it something with the write statement and writing multiple arrays, or does it have something to do with using asynchronous writes 1800 times?
I even did the following:
write(unitno,asynchronous='yes',rec=recnum)a1,a2,a3,a4......
wait(unitno)
I thought that this would make it the same as a synchronous write, but the program still crashes.
I am using the Intel Visual Fortran professional compiler edition 11.1 on Windows XP.
Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please define "crashes"
Does it give an error ? If so what is theerror message ?
Do you get a traceback ? If so it should give you some moreinformation.
If you do not get a traceback have you tried truning it on?
Are you running debug or release?
In debug have you turned on all the diagnostic capabilities?
If in release you could turn on run-time diagnostics.
Les
Does it give an error ? If so what is theerror message ?
Do you get a traceback ? If so it should give you some moreinformation.
If you do not get a traceback have you tried truning it on?
Are you running debug or release?
In debug have you turned on all the diagnostic capabilities?
If in release you could turn on run-time diagnostics.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Asynchronous writes are generally benificial when you can do other work during the writes.
For example, when you finish computing what is in the 1st iteration of the 1800 iterations, you asynchronously write the 1st iteraton, then when you complete computing the 2nd iteration's data you asynchronously write the 2nd iteration, and so on until after you write the 1800'th iteration. This of course requires the independence of the data (from modification) after each compute iteraton. You may also need to specify the ID=id-var on the write and also store into a ring buffer array such that you can restrict the number of pending writes. Not doing so might result in an Out Of Memory situation. As to the number of pending writes, this is up to you.
Jim Dempsey
For example, when you finish computing what is in the 1st iteration of the 1800 iterations, you asynchronously write the 1st iteraton, then when you complete computing the 2nd iteration's data you asynchronously write the 2nd iteration, and so on until after you write the 1800'th iteration. This of course requires the independence of the data (from modification) after each compute iteraton. You may also need to specify the ID=id-var on the write and also store into a ring buffer array such that you can restrict the number of pending writes. Not doing so might result in an Out Of Memory situation. As to the number of pending writes, this is up to you.
Jim Dempsey

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