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

Win vs Mac vs Linux?

lklawrie
Beginner
858 Views
Trying to match our releases on the 3 platforms: Win/Mac/Linux (both 32 and 64), we're seeing some substantial diffs between the 3.

And not consistent -- sometimes good agreement between two of the platforms and differing on the third (and not always the same different one).

Yes, we are trying to match all compiler switches to be the same.

Any ideas or how to proceed? Is this just "expected"?

Linda
0 Kudos
7 Replies
Steven_L_Intel1
Employee
858 Views
Not expected. The symptom strongly suggests access of uninitialized storage.
0 Kudos
Wendy_Doerner__Intel
Valued Contributor I
858 Views
Do the differences involve floating point results? I assume the platforms have different processors so that might be source of different floating point results in addition to Steve's suggestion. You can use the /check switch to check for some unitialized data references and this article explains how to get consitent floating point results with our compiler.

Wendy
Intel Developer Support
0 Kudos
Ron_Green
Moderator
858 Views
at optimization, yes different processors can give very slightly different results, and of course complex calculations can magnify those slight differences. And yes, operating systems and the math libraries can give differences.
If you goal is to get identical results, you can use /Od and -O0, /Qnolib-inline -nolib-inline
If you're trying to get optimized code consistent, -fp-model precise often helps. Also look at the new-fimf-arch-consistency option. but keep in mind, getting optimized code consistent across different processors, different OSes is a non-trivial task and may not be a reasonable goal.
ron
0 Kudos
lklawrie
Beginner
858 Views
Yes and yes and yes.

we have /ck uninit on. looking into the uninitialized possibilties.
we don't expect exact agreement, but the diffs are a bit too large to stomach.

thanks for the link.

Linda
0 Kudos
mecej4
Honored Contributor III
858 Views
Does your application use random numbers? If so, check if the same generator is used and started with the same seed. Not setting the seed can result in different results from different runs on even the same platform.
0 Kudos
lklawrie
Beginner
858 Views
No, does not use random numbers in this instance.

Linda
0 Kudos
jimdempseyatthecove
Honored Contributor III
858 Views
Linda,

I suggest you follow-up on Ron thoughts where small differences in calculation yield large differences in results. Until you experience one or two occasions of this it is hard to comprehend that your code is at fault. These errors in coding typically involve an assumption by the programmer of infinite precision .or. an assumption that programmers code written with consideration of finite precision is good enough.

Note, the impact of what this means is, the code you relied on written for one machine was likely given bad results or more likely the assumption of the precision of the results was that all digits in the results were accurate.

Knowing whichresults have the greatest disparity, check thecode that produced the results, see if it is sensitive to precision issues. If nothing stands out,starting with the results with the greatest disparity, step backwards in time (sequence of operations on the constituents of the result) and check for when the divergence occures. The purpose of stepping backwards is to narrow the choice of code sections that may be the source of the error.Repeat stepping backwards with occasional half step forwards until you locate the code that is responsible for the variance. Note, this may not necessarily be your code but may include a library call.

Jim Dempsey
0 Kudos
Reply