<div dir="ltr">Thank you so much for your reply. That clear things up! </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019 at 10:43 PM Balay, Satish <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 21 Mar 2019, Maahi Talukder via petsc-users wrote:<br>
<br>
> Thank you for your reply.<br>
> <br>
> So do I need to set the value of PETSC_ARCH as needed in .bashrc as I did<br>
> in case of PETSC_DIR ?<br>
<br>
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.<br>
<br>
For ex: in .bashrc<br>
<br>
export PETSC_ARCH=arch-debug<br>
<br>
Now if you want to build with debug libraries:<br>
<br>
make wholetest1<br>
<br>
Now If you want to build with optimized libraries:<br>
<br>
make PETSC_ARCH=arch-opt wholetest1<br>
<br>
<br>
> And by PETSC_ARCH=arch-opt, do you mean the<br>
> non-debugging mode?<br>
<br>
Yes. You can use whatever name you think is appropriate here.<br>
<br>
./configure PETSC_ARCH=a-name-i-can-easily-associate-with-this-build [other configure options.]<br>
<br>
> <br>
> And I am using the following makefile with my code-<br>
> <br>
> CFLAGS =<br>
> FFLAGS =-I/home/maahi/petsc/include<br>
> -I/home/maahi/petsc/arch-linux2-c-debug/include -cpp -mcmodel=large<br>
<br>
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<br>
<br>
Satish<br>
<br>
> CPPFLAGS =<br>
> FPPFLAGS =<br>
> <br>
> <br>
> include ${PETSC_DIR}/lib/petsc/conf/variables<br>
> include ${PETSC_DIR}/lib/petsc/conf/rules<br>
> <br>
> wholetest1: wholetest1.o<br>
> -${FLINKER} -o wholetest1 wholetest1.o ${PETSC_LIB}<br>
> ${RM} wholetest1.o<br>
> <br>
> So where do I add that PETSC_ARCH?<br>
> <br>
> Thanks,<br>
> Maahi Talukder<br>
> <br>
> On Thu, Mar 21, 2019 at 10:14 PM Balay, Satish <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> <br>
> > PETSc uses the concept of PETSC_ARCH to enable multiple in-place<br>
> > builds.<br>
> ><br>
> > So you can have a debug build with PETSC_ARCH=arch-debug, and a<br>
> > optimized build with PETSC_ARCH=arch-opt etc.<br>
> ><br>
> > And if you are using a petsc formatted makefile with your code - you<br>
> > can switch between these builds by just switching PETSC_ARCH.<br>
> ><br>
> > Satish<br>
> ><br>
> > On Thu, 21 Mar 2019, Maahi Talukder via petsc-users wrote:<br>
> ><br>
> > > Dear All,<br>
> > ><br>
> > > Currently, I am running PETSc with debugging option. And it says that if<br>
> > I<br>
> > > run ./configure --with-debugging=no, the performance would be faster. My<br>
> > > question is: what would I do if I want to go back to debugging mode, and<br>
> > If<br>
> > > I configure it now with no debugging option, would it make any changes to<br>
> > > my current setting?<br>
> > ><br>
> > > Regards,<br>
> > > Maahi Talukder<br>
> > ><br>
> ><br>
> ><br>
> <br>
<br>
</blockquote></div>