[petsc-users] Specify -O2 for PETSc build in Windows

Qin Lu lu_qin_2000 at yahoo.com
Tue Nov 26 17:04:19 CST 2013


Satish,
 
It works. Thanks a lot!
 
Qin



On Tuesday, November 26, 2013 3:13 PM, Satish Balay <balay at mcs.anl.gov> wrote:
You have to set the optimzation flags with COPTFLAGS/FOPTFLAGS/CXXOPTFLAGS options.

The defaults are '-O3 -QxW' for intel compilers so you might want to use:

./configure COPTFLAGS='-O2 -QxW' CXXOPTFLAGS='-O2 -QxW' FOPTFLAGS='-O2 -QxW' .....

Satish


On Tue, 26 Nov 2013, Qin Lu wrote:

> Hello,
> 
> I was trying to build PETSc using Intel compiler with -O2 optimization option in Windows-7, but somehow it was override by -O3 during make. My configure options are as follows:
> 
> ./configure --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions --with-cc="win32fe icl -O2" --with-fc="win32fe ifort -O2" --with-cxx="win32fe icl" --with-petsc-arch=arch-win64-release-with-hypre-o2 --prefix=/cygdrive/c/cygwin_cache/petsc-3.4.2-release-win64-with-hypre-o2 --with-blas-lapack-dir="/cygdrive/c/Program Files (x86)/intel/Compiler/11.1/051/mkl/em64t/lib" --with-mpi-dir="/cygdrive/c/Program Files/mpich2x64" --with-debugging=0 --with-x=0 --with-x11=0 --with-xt=0 --with-shared-libraries=0 --useThreads=0
> 
> Then the make gave messages such as: 
> snesdnest.c
> libfast in: /cygdrive/c/cygwin_cache/petsc-3.4.2/src/snes/interface/ftn-auto
> icl: command line warning #10120: overriding '/O2' with '/O3'
>  
> How can I force the make to use -O2?
>  
> Many thanks for your suggestions,
> Qin  
> 


More information about the petsc-users mailing list