Compiler Optimization Override
Aron Ahmadia
aja2111 at columbia.edu
Wed Jun 27 08:20:33 CDT 2007
And as a correction to my last email, PETSC_ARCH is a 'global'
environment variable, it along with PETSC_DIR help you coordinate
multiple PETSc installations and builds.
~A
On 6/27/07, Aron Ahmadia <aja2111 at columbia.edu> wrote:
> Dear Tim,
>
> I was just in Ireland a few weeks ago, had a great time climbing
> Carantouhil and the Pilgrim's Path :D
>
> Have you tried declaring a new $PETSC_ARCH and then overriding the
> optimization flags in ./conf/configure? PETSc likes to use the
> $PETSC_ARCH flag to maintain all local builds under the same directory
> structure instead of the -prefix flags common to autoconf-style
> builds.
>
> Ideally you'd do something like this...
>
> declare -x PETSC_ARCH=petsc_linux_o3
> cd $PETSC_DIR
> ./config/configure.py --COPTFLAGS=-O3
> make
>
> If you want to build a debugging version as well, then type:
> declare -x PETSC_ARCH=petsc_debug
> ./config/configure.py --with-debugging=1
>
> you'll then be able to use PETSc makefiles to build your code as long
> as you declare your PETSC_ARCH and PETSC_DIR variables ahead of time.
>
> Let me know if this works!
> ~Aron
>
> On 6/27/07, Tim Stitt <timothy.stitt at ichec.ie> wrote:
> > Hi PETSc Users/Developers,
> >
> > Could someone explain how I can override the default optimization level that
> > comes with my PETSc build (currently -O). I want to set a more aggressive
> > optimization level (e.g. -O3) for my compiler (PathScale).
> >
> > Ideally I would prefer a solution which doesn't involve rebuilding PETSc each
> > time I want to switch the optimization level. I tried to add the switch to
> > the petscrules file but it always defaulted to the first (lower?)
> > optimization switch that appeared in the application compile command line
> > which seems to be built into PETSc.
> >
> > Any help gratefully received.
> >
> > Regards,
> >
> > Tim.
> >
> > --
> > Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
> > HPC Application Consultant - ICHEC (www.ichec.ie)
> >
> > Dublin Institute for Advanced Studies
> > 5 Merrion Square - Dublin 2 - Ireland
> >
> > +353-1-6621333 (tel) / +353-1-6621477 (fax) / +353-874195427 (mobile)
> >
> >
>
More information about the petsc-users
mailing list