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

Debug vs. Release for LAPACK Machine Parameters

intelgg
Beginner
680 Views
I have a Pentium III - Windows 2000 system and
Visual Fortran 6.5.A.
I built LAPACK 3.0 (2000-05-31) and wrote a
small program to test the Double Precision Machine
Parameters function DLAMCH().
The debug and release configurations give different
results. In particular, the release configuration
gives zero for the safe minimum.
Before I implement my own DLAMCH(), I would
appreciate better suggestions.
Are there settings in the release configuration
that will make it behave without transforming it
into a debug configuration?
Thank you
0 Kudos
3 Replies
Steven_L_Intel1
Employee
680 Views
See http://h18009.www1.hp.com/fortran/kb/q1006.html - code that tries to compute these values at run-time falls afoul of optimizations, especially on X86.

Steve
0 Kudos
intelgg
Beginner
680 Views
Dear Steve,

Thank you for your response.

It seems that I fixed the problem.
Or at least the debug and release configurations
now give the same result.

In my LAPACK Visual Fortran project, I changed
the optimization level from "Full Optimizations"
to "Optimize for Speed", but only for
files dlamch.f and slamch.f, and only for the
release configuration.

I would still appreciate comments.
In particular, did I really fix the problem
or did I just manage to get debug and release
configurations to give same results?

Attached is the output from the release version
of the test program.

Thank you
0 Kudos
Steven_L_Intel1
Employee
680 Views
I can't really say if you "fixed" the problem or not. I would guess "not", as the optimizations done can change in new releases. You are better off to use the intrinsics for this.

Steve
0 Kudos
Reply