- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone! This is my first time posting a question here.
In my fortran code (very long), there is a subroutine in which I have a do loop. For debugging purposes, I am trying to print array variables that are assigned value inside the loop. But the print statement prints nothing. It only prints the variable value, when the statement is out of the loop. I am not a pro coder, so I have no clue why this might be happening.
Can anyone give me some clues where to look?
Thanks and regards,
Chaitanya
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What does the DO statement contain? If it resembles DO I = Ja, Jb, and Ja is less than Jb when this statement is reached, the DO repeat count is zero, and the loop body is not executed.
Add a print statement just before the DO to see the values of Ja, Jb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you are reporting is unusual. You have not give any details to help either.
WIndows or Linux? Version of OS and if linux distribution. VM or not?
Remote connection or local workstation?
If on a cluster, know that stdout/stderr are buffered by the runtime and have to be forwarded from the compute nodes and can get thrown if the app aborts.
So you see, we really don't know your environment. More than likely it's that you are using remote servers and/or clusters. You can investigate adding FLUSH to see if that helps (sometimes it does, sometimes not)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page