[petsc-users] About Configuring PETSc

Maahi Talukder maahi.buet at gmail.com
Thu Mar 21 22:55:32 CDT 2019


Thank you so much for your reply. That clear things up!

On Thu, Mar 21, 2019 at 10:43 PM Balay, Satish <balay at mcs.anl.gov> wrote:

> On Thu, 21 Mar 2019, Maahi Talukder via petsc-users wrote:
>
> > Thank you for your reply.
> >
> > So do I need to set the value of PETSC_ARCH as needed in .bashrc  as I
> did
> > in case of PETSC_DIR ?
>
> You can specify PETSC_ARCH as an option to make. You can have a default
> value set in .bashrc - and change to a different value on command line.
>
> For ex: in .bashrc
>
> export PETSC_ARCH=arch-debug
>
> Now if you want to build with debug libraries:
>
> make wholetest1
>
> Now If you want to build with optimized libraries:
>
> make PETSC_ARCH=arch-opt wholetest1
>
>
> >  And by PETSC_ARCH=arch-opt, do you mean the
> > non-debugging mode?
>
> Yes. You can use whatever name you think is appropriate here.
>
> ./configure PETSC_ARCH=a-name-i-can-easily-associate-with-this-build
> [other configure options.]
>
> >
> > And I am using the following makefile with my code-
> >
> > CFLAGS =
> > FFLAGS =-I/home/maahi/petsc/include
> > -I/home/maahi/petsc/arch-linux2-c-debug/include -cpp -mcmodel=large
>
> Hm - you shouldn't be needing these options here. You should switch your
> source files from .f to .F and .f90 to .F90 - and remove the above FFLAGS
>
> Satish
>
> > CPPFLAGS =
> > FPPFLAGS =
> >
> >
> > include ${PETSC_DIR}/lib/petsc/conf/variables
> > include ${PETSC_DIR}/lib/petsc/conf/rules
> >
> > wholetest1: wholetest1.o
> > -${FLINKER} -o wholetest1 wholetest1.o ${PETSC_LIB}
> > ${RM} wholetest1.o
> >
> > So where do I add that PETSC_ARCH?
> >
> > Thanks,
> > Maahi Talukder
> >
> > On Thu, Mar 21, 2019 at 10:14 PM Balay, Satish <balay at mcs.anl.gov>
> wrote:
> >
> > > PETSc uses the concept of PETSC_ARCH to enable multiple in-place
> > > builds.
> > >
> > > So you can have a debug build with PETSC_ARCH=arch-debug, and a
> > > optimized build with PETSC_ARCH=arch-opt etc.
> > >
> > > And if you are using a petsc formatted makefile with your code - you
> > > can switch between these builds by just switching PETSC_ARCH.
> > >
> > > Satish
> > >
> > > On Thu, 21 Mar 2019, Maahi Talukder via petsc-users wrote:
> > >
> > > > Dear All,
> > > >
> > > > Currently, I am running PETSc with debugging option. And it says
> that if
> > > I
> > > > run ./configure --with-debugging=no, the performance would be
> faster. My
> > > > question is: what would I do if I want to go back to debugging mode,
> and
> > > If
> > > > I configure it now with no debugging option, would it make any
> changes to
> > > > my current setting?
> > > >
> > > > Regards,
> > > > Maahi Talukder
> > > >
> > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190321/c24b3e7b/attachment-0001.html>


More information about the petsc-users mailing list