- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
one more superfluous question. I need some suggestions on error
handling of a moderate size code(~3000 line).
In my code, i have already done error handling in file opening, human
error etc. But arithmatic error and other part is to be done. can you
give me some points to check when I try to check errors ?
one more superfluous question. I need some suggestions on error
handling of a moderate size code(~3000 line).
In my code, i have already done error handling in file opening, human
error etc. But arithmatic error and other part is to be done. can you
give me some points to check when I try to check errors ?
one more question.
[plain]open(19,file="err.log")
......
open
(11,file=ASMAP,status='old',IOSTAT=ios,form='unformatted',iomsg=ermsg)
if(ios/=0)then
write(*,*) ios
write(19,*) trim(ermsg)
.......
close(19)
[/plain]
writes the output on fort.19 (i am in linux) and not in err.log as
intended. why?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since you have paraphrased an excerpt of the code and not shown anything complete, all I can guess is that the actual code does not resemble the paraphrase. At the time you're doing the WRITE to unit 19, unit 19 would appear to be not open. You can use INQUIRE to test whether or not the unit is open and debug the program to see if the OPEN is actually being executed.
My further advice is to try to cut down the program to the minimum that reproduces the problem - you'll almost certainly find the error in that process.
My further advice is to try to cut down the program to the minimum that reproduces the problem - you'll almost certainly find the error in that process.
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