- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I get the error message "FLUSH--FAILED:: Bad address" when flush() is called for stdout under certain circumstances.
The following small code reproduces the problem:
program flushtest
write(*,*) "now flushing"
call flush(6)
write(*,*) "after flush"
end
Executing this code ("flushtest") produces the standard output
now flushing
after flush
as expected. You can also redirect this output and append it to an existing text file "abc":
flushtest >> abc
This works as expected as long as "abc" does not contain more than 1023 characters! If "abc" contains 1024 or more characters, a series of the special character "^@" is flushed and the abovementioned error message is issued.
Does somebody know the reason for this strange behaviour? Any workarounds for this problem?
(I'm using ifc 7.0 built in October 2002, Kernel 2.4.)
Thanks,
Christian.
I get the error message "FLUSH--FAILED:: Bad address" when flush() is called for stdout under certain circumstances.
The following small code reproduces the problem:
program flushtest
write(*,*) "now flushing"
call flush(6)
write(*,*) "after flush"
end
Executing this code ("flushtest") produces the standard output
now flushing
after flush
as expected. You can also redirect this output and append it to an existing text file "abc":
flushtest >> abc
This works as expected as long as "abc" does not contain more than 1023 characters! If "abc" contains 1024 or more characters, a series of the special character "^@" is flushed and the abovementioned error message is issued.
Does somebody know the reason for this strange behaviour? Any workarounds for this problem?
(I'm using ifc 7.0 built in October 2002, Kernel 2.4.)
Thanks,
Christian.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the meantime I found an ugly workaround:
flushtest | cat - >> abc
But this of course is not a solution to the problem.
Christian
flushtest | cat - >> abc
But this of course is not a solution to the problem.
Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens if you write to unit 6 and not *? By the standard, these are supposed to be distinct.
If you think it's a bug, please report it to Premier Support - the behavior you describe sounds like a bug to me.
Steve
If you think it's a bug, please report it to Premier Support - the behavior you describe sounds like a bug to me.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No matter whether the code writes to unit "*" or "6". I observed the same strange behaviour in both cases.
Since I don't have Premier Support I think that compiler bugs posted in this forum should be considered by the Intel-Premier-Support-people (given they read it) anyway for the next release of the compiler.
Christian.
Since I don't have Premier Support I think that compiler bugs posted in this forum should be considered by the Intel-Premier-Support-people (given they read it) anyway for the next release of the compiler.
Christian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone who has a copy of the Intel compiler is eligible to sign up for Premier Support and you can report bugs that way. If you have a noncommercial license, you may not get access to fixes right away, but you should at least get an appropriate response, and Premier Support is the only way that problem reports are tracked. This is a user forum, not a formal Intel support channel.
Steve
Steve

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