Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
26846 Discussions

findloc with back input and in-situ calculation of array

Klein__Ygal
Novice
340 Views

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
Steve_Lionel
Black Belt Retired Employee
340 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.

Klein__Ygal
Novice
340 Views

Thanks.

 

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

Devorah_H_Intel
Moderator
340 Views

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

Igor666
Novice
276 Views

Any news yet? I have the same issue.

Klein__Ygal
Novice
340 Views
Reply