Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

Compiler crash in OpenMP code

$
0
0

Hello,

The following code raises an internal error with ifort 15.0.2 and 16.0.1:

catastrophic error: **Internal compiler error: segmentation violation signal raised** 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.

program main
!$ use omp_lib
  integer :: a
  a = 42
  !$omp parallel
  !$omp master
  call foo(a)
  !$omp end master
  !$omp end parallel

  contains
subroutine foo(a)
!$ use omp_lib
   integer :: a
  !$omp task depend(in:a)
  write(*,*) '--->',a
  !$omp end task
end subroutine foo

end program

The code compiles if the depend clause is removed. It also compiles if the code in the foo subroutine is inserted directly in the main program body, or, inversely, if the parallel region is created in the foo subroutine.

Thanks,

Theo

ETA: Another compiler error (which may or may not be related to the first one)

I believe I have found another problem with the following code:

program main
!$ use omp_lib
  integer  :: a
  a = 42
  !$omp parallel
  !$omp master
  call foo(a)
  !$omp end master
  !$omp end parallel

  contains
subroutine foo(a)
!$ use omp_lib
   integer, target :: a
   integer, pointer :: p
   p => a
  !$omp task firstprivate(p) depend(in:p)
  write(*,*) '--->',p
  !$omp end task
end subroutine foo

end program

The compiler raises the following error: /tmp/ifort0sm6zA.o:(.data+0xf0): undefined reference to `foo$P$_4.0.2'

Interestingly, the code compiles without problem when the flag -O0 is used, so it looks the error might be due to a too aggressive optimization.

Theo


Viewing all articles
Browse latest Browse all 2746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>