- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have problems using -fpe0 option for program using openmp, in combination with underflows, can someone explain what is happening?
example:
program below aborts if compiled as:
ifort -r8 -openmp -fpe0 ex.f90
where it runs normally without -openmp or -fpe option...
( on dual athlon running fedora)
program ex
integer, parameter :: n=25
real x(n),y
integer i
!$omp parallel do private(y) shared(x)
do i=1,n
y=32*i
x(i)=exp(-y)
enddo
print*,x
end
example:
program below aborts if compiled as:
ifort -r8 -openmp -fpe0 ex.f90
where it runs normally without -openmp or -fpe option...
( on dual athlon running fedora)
program ex
integer, parameter :: n=25
real x(n),y
integer i
!$omp parallel do private(y) shared(x)
do i=1,n
y=32*i
x(i)=exp(-y)
enddo
print*,x
end
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As no one has stepped up to this, I'll ask you for clarification.
If I read your question right, you're writing a program which intentionally produces underflow in exp(). You're asking the compiler to generate code which traps on underflow, and it does so. When you don't ask for trap on underflow, it simply runs to completion, presumably setting many of those results to zero. How is this different from your expectation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok.
the problem is that it does _not_ abort while compiling _without_ -openmp, which should not make a difference for the occurance of the underflow. I do not understand why -openmp option causes difference.
the problem is that it does _not_ abort while compiling _without_ -openmp, which should not make a difference for the occurance of the underflow. I do not understand why -openmp option causes difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There may be an uninitialized variable in the program. -openmp implies -automatic, which puts local variables on the stack.

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