<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I tried </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">and it printed out</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">-Wl, -rpath, /PETSC_DIR/PETSC_ARCH/lib -L//PETSC_DIR/PETSC_ARCH/lib -lpetsc -lpthread -Wl -rpath, /PETSC_DIR/PETSC_ARCH/lib -lflapack -lfblas -lm -L/usr/lib/gcc/i486-linux-gnu/4.4.5 -L/usr/lib/i486-linux-gru -lmpichf90 -lgfortran -lm -lm -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl </div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

I gor rid of all ',' and used the flag above and it had error with -Wl and -rpath flags </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">gcc: unrecognized option -rpath </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

cclplus: error : unrecognized command line option "-Wl"</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

so i got rid of those two flags and compiled and I still get the same error with DMGetMatrix not being declared.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I checked the location of all the libraries listed above. (with find -name lib'blahblah'.*) at "/" </div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

But There was no library for petsc "libpetsc.*" anywhere. </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

Am I missing something??</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

Thank you</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div class="gmail_quote">On Thu, Sep 6, 2012 at 6:28 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>The routine is spelled DMCreateMatrix()</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Sep 6, 2012 12:23 AM,  <<a href="mailto:0sabio00@gmail.com" target="_blank">0sabio00@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>I think i'm having a trouble linking to the petsc library.</div><div><br></div><div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px">gcc  main.cpp  -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include </span></font></div>




<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px">-L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test </span></font></div>




</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px"><br>




</span></font></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px">I get an error => DMGetMatrix not declared in this scope. </span></font></div>




<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px"><br>




</span></font></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px">and I realized that I can't find libpetsc.a or libpetsc.so anywhere.  Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem?</span></font></div>




<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px"><br>




</span></font></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><font color="#333333" face="Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif"><span style="line-height:18.200000762939453px">Thanks</span></font></div>





</blockquote></div>
</div></div></blockquote></div><br>