Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

Optimization with o3

Jump to solution

Dear Forum Users,

I'm trying to run my Fortran code with /O3 enabled for speed.

In Properties > Fortran > General I change the following settings:

1) Optimization: max speed plus higher level optimization (/O3)

2) Debug information format: None

Then I press "Start without debugging"

Unfortunately I get the message 

warning #10182: disabling optimization; runtime debug checks enabled

The code runs, but without optimization

Can someone please explain what's wrong here? Thanks

Best,

Alessandro

0 Kudos

Accepted Solutions
Highlighted
2 Views

What I mean you have two

Jump to solution

What I mean you have two options for testing "-O3":

1. Continue to test -O3 in debug build but you need turn off "/check stack" in the project properties.

Or

2. Test -O3 in release build which has "/check stack" turned off by default. (I recommend this one).

 

What you did is checking the "Release" build setting of "Check Stack Frame" (Showed in your screenshot) but still building your code with "Debug" build (Showed in your build log). So please make sure to select "Debug"  at the left top of the project properties when you want to change the setting for "Debug" build.

 

Thanks,

Xiaoping Duan

Intel Customer Support

View solution in original post

0 Kudos
11 Replies
Highlighted
Valued Contributor II
2 Views

To a full build and post the

Jump to solution
Do a full build and post the build log
0 Kudos
Highlighted
Beginner
2 Views

Here is the log

Jump to solution

Here is the log

 

<HTML><HEAD><meta content="text/html; charset=utf-16" http-equiv="Content-Type"></HEAD><BODY><PRE></pre><table width=100% bgcolor=#E0E0E0><tr><td><font face=arial size=+2> Build Log </font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#E0E0E0>&nbsp;</td><td width=0 bgcolor=white>&nbsp;</td><td width=*><pre><h3> Build started: Project: test, Configuration: Debug|Win32 </h3></pre></table><table width=100% bgcolor=#E0E0E0><tr><td><font face=arial size=+1> Output </font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#E0E0E0>&nbsp;</td><td width=0 bgcolor=white>&nbsp;</td><td width=*><pre>Compiling with Intel(R) Visual Fortran Compiler 16.0 [IA-32]...
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\toolbox.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
C:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\toolbox.f90(2508): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.   
    function uniformCDF_Inv(x, a, b)
----------------------------^
C:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\toolbox.f90(2459): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.   
    function uniformCDF(x, a, b)
------------------------^
C:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\toolbox.f90(2412): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.   
    function uniformPDF(x, a, b)
------------------------^
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\mod_baselib.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\mod_param.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\main.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\sub_write.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\sub_howard.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\sub_dist.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\sub_vfi.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\sub_read.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\sub_plot.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
Linking...
Link /OUT:&quotDebug\test.exe&quot /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:&quotDebug\test.exe.intermediate.manifest&quot /MANIFESTUAC:&quotlevel='asInvoker' uiAccess='false'&quot /DEBUG /PDB:&quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\test\Debug\test.pdb&quot /SUBSYSTEM:CONSOLE /IMPLIB:&quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\test\Debug\test.lib&quot &quotDebug\toolbox.obj&quot &quotDebug\mod_baselib.obj&quot &quotDebug\mod_param.obj&quot &quotDebug\main.obj&quot &quotDebug\sub_write.obj&quot &quotDebug\sub_howard.obj&quot &quotDebug\sub_dist.obj&quot &quotDebug\sub_vfi.obj&quot &quotDebug\sub_read.obj&quot &quotDebug\sub_plot.obj&quot
Embedding manifest...
mt.exe /nologo /outputresource:&quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\test\Debug\test.exe;#1&quot /manifest &quotDebug\test.exe.intermediate.manifest&quot
 
test - 0 error(s), 13 warning(s)
</PRE></BODY></HTML>
0 Kudos
Highlighted
2 Views

The debug build has "/check

Jump to solution

The debug build has "/check stack" turned on which will disables optimization and overrides any optimization level set by option O. Suggest you do the O3 testing with the release build.

 

Thanks,

Xiaoping Duan

Intel Customer Support

0 Kudos
Highlighted
Beginner
2 Views

Thanks but how can I turn off

Jump to solution

Thanks but how can I turn off "/check stack"?

 

0 Kudos
Highlighted
2 Views

Go to "Project Properties ->

Jump to solution

Go to "Project Properties -> Fortran -> Runtime -> Check Stack Frame" and select "No".

It is turned off by default for release build.

 

Thanks,

Xiaoping Duan

Intel Customer Support

0 Kudos
Highlighted
Beginner
2 Views

I did as you suggested but it

Jump to solution

I did as you suggested but it doesn't work

In particular, in Project Properties I selected "Configuration: Release" and I made sure that 

check stack frame is NO (this is indeed the default option for Release)

However I still get the same mistake

ifort: warning #10182: disabling optimization; runtime debug checks enabled

I write below the build log. I also attach a screenshot with the project properties

<HTML><HEAD><meta content="text/html; charset=utf-16" http-equiv="Content-Type"></HEAD><BODY><PRE></pre><table width=100% bgcolor=#E0E0E0><tr><td><font face=arial size=+2> Build Log </font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#E0E0E0>&nbsp;</td><td width=0 bgcolor=white>&nbsp;</td><td width=*><pre><h3> Build started: Project: test, Configuration: Debug|Win32 </h3></pre></table><table width=100% bgcolor=#E0E0E0><tr><td><font face=arial size=+1> Output </font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#E0E0E0>&nbsp;</td><td width=0 bgcolor=white>&nbsp;</td><td width=*><pre>Compiling with Intel(R) Visual Fortran Compiler 16.0 [IA-32]...
ifort /nologo /O3 /warn:interfaces /module:&quotDebug\\&quot /object:&quotDebug\\&quot /Fd&quotDebug\vc140.pdb&quot /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin&quot &quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\main.f90&quot
ifort: warning #10182: disabling optimization; runtime debug checks enabled
 
Linking...
Link /OUT:&quotDebug\test.exe&quot /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:&quotDebug\test.exe.intermediate.manifest&quot /MANIFESTUAC:&quotlevel='asInvoker' uiAccess='false'&quot /DEBUG /PDB:&quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\test\Debug\test.pdb&quot /SUBSYSTEM:CONSOLE /IMPLIB:&quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\test\Debug\test.lib&quot &quotDebug\toolbox.obj&quot &quotDebug\mod_param.obj&quot &quotDebug\mod_baselib.obj&quot &quotDebug\sub_plot.obj&quot &quotDebug\sub_vfi.obj&quot &quotDebug\main.obj&quot &quotDebug\sub_write.obj&quot &quotDebug\sub_read.obj&quot &quotDebug\sub_dist.obj&quot &quotDebug\sub_howard.obj&quot
Embedding manifest...
mt.exe /nologo /outputresource:&quotC:\Dropbox\PROJECTMARIA\SHARED\codes and data\Fortran files\Source Codes\new_v6_sub1\test\Debug\test.exe;#1&quot /manifest &quotDebug\test.exe.intermediate.manifest&quot
 
test - 0 error(s), 1 warning(s)
</PRE></BODY></HTML>
0 Kudos
Highlighted
Beginner
2 Views

here

0 Kudos
Highlighted
2 Views

The build log shows you are

Jump to solution

The build log shows you are building the "Debug" build so please make sure you change the setting of "Debug" configuration.

 

Thanks,

Xiaoping Duan

Intel Customer Support

0 Kudos
Highlighted
Beginner
2 Views

I don't understand, if you

Jump to solution

I don't understand, if you look at the screenshot that I attached you can see that I selected "Configuration: Release"

Thanks

0 Kudos
Highlighted
3 Views

What I mean you have two

Jump to solution

What I mean you have two options for testing "-O3":

1. Continue to test -O3 in debug build but you need turn off "/check stack" in the project properties.

Or

2. Test -O3 in release build which has "/check stack" turned off by default. (I recommend this one).

 

What you did is checking the "Release" build setting of "Check Stack Frame" (Showed in your screenshot) but still building your code with "Debug" build (Showed in your build log). So please make sure to select "Debug"  at the left top of the project properties when you want to change the setting for "Debug" build.

 

Thanks,

Xiaoping Duan

Intel Customer Support

View solution in original post

0 Kudos
Highlighted
Beginner
2 Views

You also still have bounds

Jump to solution

You also still have bounds checking turned on.  You can disable via the same project properties.

It still isn't clear whether you are building "Release" or "Debug" configuration.  What Xiaoping is seeing is that, your linker message above is showing that the executable being created is "\Debug\test.exe".

While you may have changed these settings in the properties for the "Release" builds, the build logs you have posted above appear to be for the Debug build.

I suspect you may have tried to use "-O3" by altering the "Debug" configuration.  This is likely since the "stack" and "bounds" checks are only enabled (by default) for Debug builds.  Please double check that you are selecting and building (and running) the "Release" configuration, and be sure those (debug) runtime checks are not enabled for the Release build.

Mark

0 Kudos