Running results are different for an application from compiling -O0 option and -O3 option

Running results are different for an application from compiling -O0 option and -O3 option

Imagen de Lyndon L.

Hi,

    I am running some climate models and met an annoying problem. If the climate model was compiled wih debug mode -O0 (using intel/12.1.9.293 and openmpi 1.4.3), then the running result is totally different from that running model compiled with -O3 option.

    Could someone please tell me if this is normal?  Should a model compiled with debug mode be used in production runs?

     Many thanks.

Cheers,

Lyndon.

publicaciones de 7 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Tim Prince

You may need to investigate questions such as whether the differences are resolved by

-fp-model precise

(or some of the components of that group option)

It may help to know if there are accepted build options for another compiler, such as gcc.  If -O3 isn't acceptable for gcc, you might conclude the application isn't robust enough for more than -O1.

Then, if there are only small differences remaining, you must make you own assessment about repeatability vs. performance.

You will expect differences from MPI when you change distribution of ranks.  It's helpful to have a generally accepted test case.

Imagen de Armando Lazaro Alaminos Bouza

Are you mixing  float and double in your code ?  If this is your case try  /fp:double

Imagen de Tim Prince

Cita:

Armando Lazaro Alaminos Bouza wrote:

Are you mixing  float and double in your code ?  If this is your case try  /fp:double

If the application is compiled for 32-bit mode, the default for gcc (and, until about 4 years ago) for icc) was x87 mode, with implicit double (-mia32 option for your version if 32-bit icc) or long double evaluation of expressions.  At -O3, the double evaluation effect could extend across assignments.

/fp:double forces implicit promotion of float expression evaluation, as was expected by traditional C implementations prior to 20 years ago.  If that produces variations in results, it would verify a problem of that nature.  With the default -msse2 architecture of current Intel compilers, there is no implicit data type promotion, and this explanation of differences between -O0 and -O3 seems remote.

Imagen de Tim Prince

The forum is acting strangely.  A few minutes ago, a response by Heinz B early today replaced all the others, and now that one has disappeared.

Imagen de jimdempseyatthecove

>>The forum is acting strangely.

I am geting some 504 problems and clicks to links are abysmally slow.

If I get a 504 on a post, it is iffy as to if the post makes it to the website.

Jim Dempsey

www.quickthreadprogramming.com
Imagen de iliyapolak

Lyndon can you post some results?

Inicie sesión para dejar un comentario.