<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 23, 2019 at 2:13 PM Maahi Talukder via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@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"><div dir="ltr">I think I didn't build with PETSC-ARCH=arch-opt. <div>So just to make sure, now I just run the command - ./configure PETSC_ARCH = arch-opt - and it will create the missing directory and I can switch between different architectures, right?</div></div></blockquote><div><br></div><div>I would not put any spaces around "=", and you can also just look at what PETSc defaulted to and use that directory. PETSc will pick a default architecture name and you should see an "arch..." directory in your PETSc directory.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks,</div><div>Maahi Talukder</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 3:12 PM Balay, Satish <<a href="mailto:balay@mcs.anl.gov" target="_blank">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">Did you build PETSc with PETSC_ARCH=arch-opt?<br>
<br>
Btw - I used PETSC_ARCH=arch-debug to illustrate - but you already<br>
have a build with PETSC_ARCH=arch-linux2-c-debug - so you should stick<br>
to that.<br>
<br>
Satish<br>
<br>
On Fri, 22 Mar 2019, Maahi Talukder via petsc-users wrote:<br>
<br>
> Hi,<br>
> <br>
> I tried to run the command 'make PETSC_ARCH=arch-opt wholetest1' but it<br>
> shows me the following error-<br>
> <br>
> ..................................................................................................................................................<br>
> [maahi@CB272PP-THINK1 Desktop]$ make PETSC_ARCH=arch-opt wholetest1<br>
> /home/maahi/petsc/lib/petsc/conf/rules:960:<br>
> */home/maahi/petsc/arch-opt/lib/petsc/conf/petscrules:<br>
> No such file or directory*<br>
> make: *** No rule to make target<br>
> '/home/maahi/petsc/arch-opt/lib/petsc/conf/petscrules'. Stop.<br>
> ........................................................................................................................................................<br>
> <br>
> My .bashrc is the following -<br>
> <br>
> .....................................................................<br>
> <br>
> PATH=$PATH:$HOME/.local/bin:$HOME/bin:/usr/lib64/openmpi/bin<br>
> <br>
> export PATH<br>
> <br>
> export PETSC_DIR=$HOME/petsc<br>
> export PETSC_ARCH=arch-linux2-c-debug<br>
> #export PETSC_ARCH=arch-debug<br>
> <br>
> ..........................................................................................<br>
> <br>
> Could you please tell me what went wrong?<br>
> <br>
> Regards,<br>
> Maahi Talukder<br>
> <br>
> <br>
> On Thu, Mar 21, 2019 at 11:55 PM Maahi Talukder <<a href="mailto:maahi.buet@gmail.com" target="_blank">maahi.buet@gmail.com</a>><br>
> wrote:<br>
> <br>
> > Thank you so much for your reply. That clear things up!<br>
> ><br>
> > On Thu, Mar 21, 2019 at 10:43 PM Balay, Satish <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> ><br>
> >> 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<br>
> >> did<br>
> >> > in case of PETSC_DIR ?<br>
> >><br>
> >> You can specify PETSC_ARCH as an option to make. You can have a default<br>
> >> 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<br>
> >> [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<br>
> >> 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>><br>
> >> 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<br>
> >> that if<br>
> >> > > I<br>
> >> > > > run ./configure --with-debugging=no, the performance would be<br>
> >> faster. My<br>
> >> > > > question is: what would I do if I want to go back to debugging<br>
> >> mode, and<br>
> >> > > If<br>
> >> > > > I configure it now with no debugging option, would it make any<br>
> >> changes to<br>
> >> > > > my current setting?<br>
> >> > > ><br>
> >> > > > Regards,<br>
> >> > > > Maahi Talukder<br>
> >> > > ><br>
> >> > ><br>
> >> > ><br>
> >> ><br>
> >><br>
> >><br>
> <br>
<br>
</blockquote></div>
</blockquote></div></div>