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

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.

7 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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.

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

Citation :

Armando Lazaro Alaminos Bouza a écrit :

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.

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.

>>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

Lyndon can you post some results?

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui