- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following example segfaults ifort (version Version 8.0 Build 20031016Z Package ID: l_fc_p_8.0.034).
compile command: ifort -openmp crash.f90
--
program main
implicit none
integer :: i
real(8) :: a,b
!$OMP PARALLEL DO
do i = 1, 100000
if (a == b) then
exit
else
a = b
end if
end do
!$OMP END PARALLEL DO
end program main
--
--donour
compile command: ifort -openmp crash.f90
--
program main
implicit none
integer :: i
real(8) :: a,b
!$OMP PARALLEL DO
do i = 1, 100000
if (a == b) then
exit
else
a = b
end if
end do
!$OMP END PARALLEL DO
end program main
--
--donour
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With a current version I get:
fortcom: Error: t.f90, line 10: An EXIT statement is not legal in a DO loop associated with a an OpenMP DO directive.
exit
^
exit
^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, "exit" may be one of the problem in this piece of code. But from Intel's release note, OpenMP does not work with new NPTL. Is there any solution? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure what NPTL means, but the release notes give explicit instructions for how to work around the bugs in linuxthreads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, NPTL stands for "Native POSIX Thread Library" written by Ulrich Drepper. It's supposed to replace old Linuxthreads. icc 7.1 works for both OpenMP and pthread programs. ifc 8.0 compiles an OpenMP program, but get a segmentation fault when executing, ifc 7.0 cannot compile them with some errors such as "segmentation fault"...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest that you stick to the supported threads libraries as documented in the release notes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sblionel wrote:With a current version I get:fortcom: Error: t.f90, line 10: An EXIT statement is not legal in a DO loop associated with a an OpenMP DO directive.
exit
^
Really? I don't see anything about it in the OpenMP 2.0 spec.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sblionel wrote:With a current version I get:
Current version? I see nothing more recent on the ftp server. Even if the code ISN'T legal, it shouldn't segfault the compiler. right? :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Updated versions aren't on the FTP server. You log into your Premier Support account and they are there. Yes, obviously, an illegal construct should not segfault the compiler.
Although it doesn't mention EXIT by name, I think the following text from the OpenMP standard addresses the issue:
The following restrictions apply to the
DO directives:It is noncompliant to branch out of a
DO loop associated with a DO directive.Message Edited by sblionel on 05-04-2004 03:55 PM

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