On Thu, Sep 6, 2012 at 10:29 AM, <span dir="ltr"><<a href="mailto:0sabio00@gmail.com" target="_blank">0sabio00@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I tried </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">and it printed out</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">-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-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
I gor rid of all ',' and used the flag above and it had error with -Wl and -rpath flags </div></blockquote><div><br></div><div>Why did you do that? These commas are meaningful. See the gcc manual.</div><div><br></div>
<div> Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">gcc: unrecognized option -rpath </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
cclplus: error : unrecognized command line option "-Wl"</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
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-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">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-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
But There was no library for petsc "libpetsc.*" anywhere. </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Am I missing something??</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Thank you</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><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><div>
<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>
</blockquote></div><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>