- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Tim suggestsyour problem would typically reside in un-initialized variables. The Debug options and Runtime options can be set to break on reading an un-initialized variable before writing to it. I would suggest you begin by enabling full debug capabilities including array limit checks and un-initialized variable usage.
Often you will find implicit variables in effect and either a typeo or a missing header file or mod filecausing a local variable to be created and used in place of the intended variable reference. Use of "implicit none" whenever you can will usualy catch most of the problems before debug phase but as we all know sometimes you have to live with the code you are given with and must keep the implicits as-is
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The other difference that I have seen is in the result of code somewhat like the following (trying to tack the four most significant bits of a two-byte integer on to the end of a four byte integer):
real (kind=8) :: xx, lsb_value
integer (kind=4) :: int_var4
integer (kind=2) :: int_var2
lsb_value = 1.0d0 / 65536.0d0
xx = lsb_value * (int_var4 * 16.0d0 + ishft(ibits(int_var2,Z'F000'),-12) )
In some instances, the result of the ishft(...) is treated as positive, whereas sometimes it takes the sign of int_var2. In Debug mode, I'm pretty sure that a positive value is always returned. I think the sign might be inconsistent in Release mode.
-gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think that you have correctly described the situation. The intrinsic IBITS takes three arguments, in the form IBITS(i, pos, len), whereas your code snippet shows only two, which the compiler will respond to with "Warning: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [IBiTS]"
Please present a complete example that demonstrates the behavior claimed.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page