Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler crash in OpenMP code

Theo_M_
Principiante
556 Visualizações

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

0 Kudos
2 Respostas
Steven_L_Intel1
Funcionário
556 Visualizações

The first problem I can reproduce in 16.0.1 but not in 16.0.2, which should be out within a week or so.

The second problem I can reproduce in our latest build and I will send that on to the developers - thanks. Issue ID DPD200381389.

Steven_L_Intel1
Funcionário
556 Visualizações

I expect the second issue to be fixed in Parallel Studio XE 2016 Update 3. I'll also note that Update 2 has been delayed about a week.

Responder