- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Either use heap arrays or
real, save::A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)
Jim Dempsey
real, save::A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)
Jim Dempsey
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Either use heap arrays or
real, save::A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)
Jim Dempsey
real, save::A(n,n),B(n,n),C1(n,n),C2(n,n),C3(n,n)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok thanks.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page