<div>I am not sure which PETSc makefile to use as there are many in PETSc directory. Also do you mean PETSc makefile just to build this example or to build hypre from scratch? In the makefile I sent you I added the path of libfblas and libflapack which PETSc had downloaded and installed as an external package but it didn't work either.</div>

<div><br><div class="gmail_quote">On Fri, Aug 3, 2012 at 8:24 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Fri, Aug 3, 2012 at 8:12 AM, Amneet Bhalla <span dir="ltr"><<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Thanks Matt for a quick reply.</div><div><br></div>Attached is the Makefile I used for building ex9. I used the same Makefile provided by  hypre. I just changed the <div>path of hypre's directory. Also attached is the command and full output I got. Using the same Makefile I was able to</div>




<div>build and run ex1, ex2, ex3 and ex4 of hypre.</div></blockquote><div><br></div></div><div>You are missing the BLAS. Use the PETSc makefiles.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>Can you point me to PETSc's examples of AMG, ML or GAMG?<br></div></blockquote><div><br></div></div><div>cd src/snes/examples/tutorials</div><div>make ex5</div><div>./ex5 -pc_type ml -snes_monitor</div><div><br>

</div><div>
   Matt</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote">On Fri, Aug 3, 2012 at 7:47 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Fri, Aug 3, 2012 at 7:28 AM, Amneet Bhalla <span dir="ltr"><<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>></span> wrote:<br>




</div><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All, <div><br></div><div>I am trying to solve system of PDEs on AMR grid. I using PETSc 's Krylov solver for that. This requires me</div><div>to use a FAC preconditioner with a non-Krylov solver for the level 0. I actually tried PETSc's Krylov Solver</div>








<div>for level 0 (by building  MPIAIJ Mat and Vec), but it does not really improve the convergence rate. So I believe</div><div>I will have to use a multigrid solver for level 0. Can I use my already built PETSc Mat and Vec and call multigrid solvers from PETSc?  </div>





</blockquote><div><br></div></div><div>Use AMG to start here since it is easy. You can either use ML or GAMG (which is builtin) to start, or Hypre if</div><div>you straighten out the link (likely broken from not using the makefiles).</div>




<div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>If thats not possible, I am planning to use hypre's "SysPFMG" to write a multigrid solver for level 0. </div>





<div>I have installed PETSc with hypre by using --download-hypre=1 option.  I can build and run many </div>


<div>examples in PETSC_ARCH/externalpackages/hypre-2.7.0b/src/examples/ but not ex9; which is the</div><div>closest I could find for my purpose.</div><div><a href="http://acts.nersc.gov/hypre/example09/ex9.c.html" target="_blank">http://acts.nersc.gov/hypre/example09/ex9.c.html</a></div>







<div><br></div><div> I am getting some linkage error like</div></blockquote><div><br></div></div><div>Always send the entire output, including the command that was run. I have no idea what file you are trying to</div><div>




compile here. Does the example work?</div>
<div><br></div><div>   Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>$HOME/SOFTWARES/LIBRARIES/PETSc/linux/lib/libHYPRE.a(par_gsmg.o): In function `hypre_BoomerAMGFitVectors':</div>





<div>$HOME/SOFTWARES/LIBRARIES/PETSc/externalpackages/hypre-2.7.0b/src/parcsr_ls/par_gsmg.c:735: undefined reference to `dgels_'</div>

<div>$HOME/SOFTWARES/LIBRARIES/PETSc/linux/lib/libHYPRE.a(par_relax.o): In function `hypre_BoomerAMGRelax':</div><div>$HOME/SOFTWARES/LIBRARIES/PETSc/externalpackages/hypre-2.7.0b/src/parcsr_ls/par_relax.c:3135: undefined reference to `dgetrf_'</div>







<div>$HOME/SOFTWARES/LIBRARIES/PETSc/externalpackages/hypre-2.7.0b/src/parcsr_ls/par_relax.c:3146: undefined reference to `dgetrs_'</div><div>$HOME/SOFTWARES/LIBRARIES/PETSc/linux/lib/libHYPRE.a(schwarz.o): In function `hypre_AMGNodalSchwarzSmoother':</div>







<div>$HOME/SOFTWARES/LIBRARIES/PETSc/externalpackages/hypre-2.7.0b/src/parcsr_ls/schwarz.c:312: undefined reference to `dpotrf_'</div></div><div><br></div><div><div>Any help will be appreciated.</div><div><br></div><div>







Thanks,</div><span><font color="#888888">-- <br><div>Amneet <br><br></div><div><br></div><div><br></div><br>
</font></span></div>
</blockquote></div></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>





-- Norbert Wiener<br>
</font></span></font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Amneet <br><br></div><div><br></div><div><br></div><br>
</font></span></div>
</blockquote></div></div></div><div class="HOEnZb"><div class="h5"><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>


-- Norbert Wiener<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Amneet <br><br></div><div><br></div><div><br></div><br>
</div>