Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

Which options to use for optimizations to be similar to linux version

Last post 05-20-2008, 5:07 PM by quarkz. 7 replies.
Sort Posts: Previous Next
 05-15-2008, 7:28 AM 30254889  

Which options to use for optimizations to be similar to linux version

Hi,

In linux, I use "-xP -r8 -132 -fPIC -g -w90 -w -ipo -w95 -static-libcxa -O3 " to compile/optimize my code.

However, I found that when I tried to run my code compiled under windows, it seems to run slower, although the processor used is similar.

I also found that the default option for linux and windows are different, is that so? For e.g., check bound is enabled by default in windows but it is disabled in linux.

May I know what's the equavalent options for -xP and -ipo? I can't seem to be similar option in windows.

Thank you very much.

 
 05-15-2008, 7:53 AM 30254894 in reply to 30254889  

Re: Which options to use for optimizations to be similar to linux version

First, you see different defaults because you're using the compiler from inside Visual Studio and in a debug configuration, where additional options are used by default.

In the Compiler Options section of the on-disk documentation is a table giving correspondences between Linux and Windows options.  -fPIC and -static-libcxa do not apply on Windows, the others have corresponding options.  (-xP is /QxP, -r8 is /real_size:64, -132 is /extend_source:132, etc.)  Most of these have settings in the IDE.

Since you are seeing array bounds messages, that means you're building a Debug configuration which has optimizations disabled.  Select a Release configuration and you will get -O2 optimization by default.

Steve

Doctor Fortran: intel.com/software/drfortran
 
 05-15-2008, 9:30 PM 30254935 in reply to 30254894  

Re: Which options to use for optimizations to be similar to linux version

Thank you Steve! I found the options comparison in the help files. However, for -xP, I saw that its equivalent is /QaxP, instead of /QxP which you wrote.

Anyway, I tried both and both seem correct during compilation. However, during linking, it says option not recognize. May I know what's wrong?

 
 05-16-2008, 9:38 AM 30254939 in reply to 30254935  

Re: Which options to use for optimizations to be similar to linux version

Windows /QaxP is equivalent to linux -axP.  Steve informed you correctly, as usual.  If you drive your link by either ifort option, the correct run-time libraries will be linked.  If you don't figure it out, please give exactly the error message.  Among the possibilities are that you are using the Intel64 compiler with Visual Studio, but did not install the optional 64-bit CL, which ifort 64-bit requires.
 
 05-16-2008, 10:08 AM 30254943 in reply to 30254939  

Re: Which options to use for optimizations to be similar to linux version

If you use "ifort" to link, then it will accept the compiler switches (though many, such as /QxP, will be ignored when not compiling.).  If you use "link" to link, then compiler switches will not be recognized.

Steve

Doctor Fortran: intel.com/software/drfortran
 
 05-18-2008, 6:59 PM 30255010 in reply to 30254943  

Re: Which options to use for optimizations to be similar to linux version

Hi,

I don't really understand what you are talking about. I did my compilation under Vs2003 with ifort 32-bit.

I simply add under command line, additional options in the linking property

/MACHINE:I386 /Qipo /QxP (or /QaxP)

During linking I got:

Link: warning ignoring_unknown_option1: ignoring unknown option '/QxP' (or QaxP)

Am I not supposed to do it this way?

Thank you.

 
 05-19-2008, 8:07 AM 30255032 in reply to 30255010  

Re: Which options to use for optimizations to be similar to linux version

No - those are compiler options, not linker options.

If you want, you can add these under Fortran > Command line > Additional Options, though /QxP and /QaxP can be specified as:

Optimization > Require Intel(R) Processor Extensions > Intel Pentium 4 Processor with Streaming SIMD Extensions 3
(/QxP)
or:
Optimization > Use Intel(R) Processor Extensions > Intel Pentium 4 Processor with Streaming SIMD Extensions 3
(/QaxP)

At present, you have to add /Qipo to Additional Options.



Steve

Doctor Fortran: intel.com/software/drfortran
 
 05-20-2008, 5:07 PM 30255205 in reply to 30255032  

Re: Which options to use for optimizations to be similar to linux version

Ok. I understand now. Thank you.
 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...