[petsc-users] petsc gcc intel and compilerflags

Manfred Gratt manfred.gratt at uibk.ac.at
Wed May 9 01:36:53 CDT 2012


Barry,
thank you for your reply. I only thought that there was a problem with 
gcc and higher optimizations.  I have for example a problem with gcc 4.6 
as when I compile my program with -O3 the result would then not converge 
any more.  With the optimisation -O2 it works all well also all other 
gcc I had before made no problems. So I thought as configure set gcc 
with only -O and icc with -O3 there was generally a problem with gcc and 
optimizations. But if not it is good.

Manfred

Barry Smith schrieb:
>   Manfred,
>
>     ./configure is not smart enough to know what optimization flags are best for all compilers/systems. Thus we have relatively straightforward defaults. As Jed notes, if you know what flags are most appropriate for your build you must pass them in to ./configure
>
>    Barry
>
> On May 8, 2012, at 7:59 AM, Jed Brown wrote:
>
>   
>> On Tue, May 8, 2012 at 1:32 AM, Manfred Gratt <manfred.gratt at uibk.ac.at> wrote:
>> when I compile petsc with --with-debugging=0 with gcc and icc in configure there are different optimization flags set depending on compiler. So is with gcc -O set wich means -O1 optimization. While with icc -O3 optimisation is set. Is there a reason only icc gets the high performance flag while gcc not? Are there any problems when some optimizations are activated on gcc?
>>
>> I don't know why only -O1 is used with gcc, but you can pass COPTFLAGS='-O3 -march=native' or whatever you like to configure to make it use those instead.
>>     
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120509/833f1ab2/attachment.htm>


More information about the petsc-users mailing list