Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 ディスカッション

ifort v:12.0.4 Bug: OpenMP segmentation fault

Kamil_Kie
ビギナー
591件の閲覧回数
When I compile below code by "ifort -openmp bug.f90" and run I get "Segmentation fault" :
[fortran]program bug
  implicit none
  integer :: n
  parameter (n=1024)
  real :: A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)
  
  print *,"hello"
  A=1
  B=2
  C3=3

  if(.not. all(C1.eq.C2)) print *,"error C1!=C2"
  if(.not. all(C1.eq.C3)) print *,"error C1!=C3"

end program[/fortran]
For n=512, or without "-openmp" option, everything is fine. How to fix it?
0 件の賞賛
1 解決策
jimdempseyatthecove
名誉コントリビューター III
591件の閲覧回数
Either use heap arrays or

real, save::A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)

Jim Dempsey

元の投稿で解決策を見る

3 返答(返信)
jimdempseyatthecove
名誉コントリビューター III
592件の閲覧回数
Either use heap arrays or

real, save::A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)

Jim Dempsey
Kamil_Kie
ビギナー
591件の閲覧回数
ok thanks.
返信