- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to use the ALL and ANY commands in a code similar to the following one:
...
integer :: Ordering(1:Number_Derivatives)
...
do i = 1, Number_Derivatives
do j = 1, Number_Derivatives
if(any(Ordering(1:i-1) == j)) cycle
...
enddo
enddo
Looking at the Fortran 95 standard and the Intel language reference guide, the previous code should not execute the cycle command when i = 1, since then the Mask for the command ANY has size zero, since the triplet turns out to be empty: 1:i-1 = 1:0.
Instead, the command any(Ordering(1:i-1) == j) for i = 1 returns nothing, not a true and not a false.
I would like to know if this is my interpretation error from the documents or it is a possible bug of the compiler.
Thanks in advance and greetings from Spain,
Miguel
...
integer :: Ordering(1:Number_Derivatives)
...
do i = 1, Number_Derivatives
do j = 1, Number_Derivatives
if(any(Ordering(1:i-1) == j)) cycle
...
enddo
enddo
Looking at the Fortran 95 standard and the Intel language reference guide, the previous code should not execute the cycle command when i = 1, since then the Mask for the command ANY has size zero, since the triplet turns out to be empty: 1:i-1 = 1:0.
Instead, the command any(Ordering(1:i-1) == j) for i = 1 returns nothing, not a true and not a false.
I would like to know if this is my interpretation error from the documents or it is a possible bug of the compiler.
Thanks in advance and greetings from Spain,
Miguel
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forgot to mention that I'm using version 8.0 without additional patches.
Miguel
Miguel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hard to say without a runnable example. I don't know how you can say that the expression returns "nothing".
I would suggest trying the latest compiler update, and if the problem persists, come up with a small, runnable example and submit it to support.

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