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

Performance issues using /Qinit:zero and /Qinit:arrays compiler options

Chris_G_2
Beginner
417 Views

The Intel documentation suggests that the use of the  /Qinit:zero and /Qinit:arrays compiler options will slow down execution times.

Does anyone have experience of this? I have just run some tests and find that using these options makes my program run a few percent faster not slower when using optimised code.

0 Kudos
3 Replies
mecej4
Honored Contributor III
417 Views

One situation where this can happen is when a nonlinear problem is being solved iteratively, and x = 0 happens to be a better initial guess than x = uninitialized.

You may experience two other consequences: larger EXE size, and slower program loading.

0 Kudos
jimdempseyatthecove
Honored Contributor III
417 Views

>> I have just run some tests and find that using these options makes my program run a few percent faster not slower when using optimised code.

This may depend on how you run your test. If you are timing section of code is timed on the 1st instance the improved runtime will be affected by the  /Qinit:zero and /Qinit:arrays performing the first touch prior to your timed code. First Touch involves interaction with the O/S to map out the process's virtual addresses used to RAM and Page File. Additionally, the first touch will pre-charge your cache levels.

Run your timed section a few times within the same run session. Throw out the 1st time, average the remainder. In the case where your application does not loop your timed section, place your time snapshots in the shell/batch script.

Jim Dempsey

0 Kudos
JohnNichols
Valued Contributor III
417 Views

The timing can also depend on background processes you are not necessarily seeing the same access to resources, I have a program that runs for between 150 and 300 seconds, it varies and it is not always apparent why - the program does the same thing time after time 

0 Kudos
Reply