Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
111 Views

findloc with back input and in-situ calculation of array

The following code results with successful compilation using gfortran 9.2 but fails using intel compiler 19 u5:

 

      program check_findloc
      implicit none
      logical :: just(5)
      real(8), parameter :: small = 1d-5, sep = 1d-3
      integer, parameter :: lines = 100, maxseg_in_line = 5000
      real(8) :: zline(maxseg_in_line, lines)
      integer :: n, line, l, loc
      just(1:3) = .false.
      just(4:5) = .true.
      n = findloc(just, .true., dim=1, back=.true.)
      write(*, *) n
      line = 1
      loc = maxseg_in_line / 10
      do n = 1, loc
         zline(n, line) = sep * dble(n)
      end do
      l = findloc(abs(zline(1:loc, line) - sep) > small, .true., dim=1, back=.true.)
      write(*, *) l
      end program check_findloc
 

 

The error returned by intel compiler:

 

check_findloc.f90(17): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
 

 

Amending the code a little bit - by making the subtraction outside of the findloc function (but usign the abs within it) works, i.e. the following code results with successful compilation using both gfortran 9.2 and ifort 19 u5:

 

      program check_findloc
      implicit none
      logical :: just(5)
      real(8), parameter :: small = 1d-5, sep = 1d-3
      integer, parameter :: lines = 100, maxseg_in_line = 5000
      real(8) :: zline(maxseg_in_line, lines), temporary(maxseg_in_line)
      integer :: n, line, l, loc
      just(1:3) = .false.
      just(4:5) = .true.
      n = findloc(just, .true., dim=1, back=.true.)
      write(*, *) n
      line = 1
      loc = maxseg_in_line / 10
      do n = 1, loc
         zline(n, line) = sep * dble(n)
      end do
      temporary(1:loc) = zline(1:loc, line) - sep
      l = findloc(abs(temporary(1:loc)) > small, .true., dim=1, back=.true.)
      write(*, *) l
      end program check_findloc
 

Also - omitting the back input from the findloc - makes the original source compile successfully.

 

 

The OS details:

OS : CentOS 7.5
Compiler : intel parallel studio xe/2019 update 5
gcc : 9.2.0

 

Thanks for the help.

5 Replies
Highlighted
Black Belt Retired Employee
111 Views

Ah, this is the program you posted in comp.lang.fortran. It still fails in 19.1. Please report it to Intel using the Online Service Center. Posting here is not guaranteed to make it to the developers.

0 Kudos
Highlighted
Novice
111 Views

Thanks.

 

Sent the request in https://supporttickets.intel.com/?lang=en-US

Highlighted
Moderator
111 Views

Thank you for reporting this. I am currently investigating this issue.

0 Kudos
Highlighted
Novice
111 Views

Highlighted
Novice
47 Views

Any news yet? I have the same issue.

0 Kudos