<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 22, 2021, at 12:19 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">On Mon, Mar 22, 2021 at 12:16 PM Scott Kruger <<a href="mailto:kruger@txcorp.com" class="">kruger@txcorp.com</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br class="">
The short answer is $PETSC_INSTALL_DIR/lib/pkgconfig/PETSc.pc<br class="">
<br class="">
Attached is a PETSc CMake snippet that should show you how to use<br class="">
pkg-config.<br class="">
<br class="">
It also shows how to set the compilers to the same as PETSc's for build<br class="">
consistency, but this part is not strictly necessary (but perhaps a good<br class="">
idea).<br class="">
<br class="">
FYI, Barry has been pushing to get a CMake build example as part of the<br class="">
test harness with the help of Jed and myself, but the Windows issues<br class="">
have been a real hold-up.<br class=""></blockquote><div class=""><br class=""></div><div class="">Also, letting people go over a cliff is one thing, but pointing them over is another ;)</div></div></div></div></blockquote><div><br class=""></div> We when see people racing to the cliff in their fast broken cars we need to have a nice gentle reliable donkey to point them to to get them down the cmake cliff. This does not mean we are advocating the donkey, it is just there to break the fall of those determined to plunge off the cliff regardless of the warnings they get. <br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class=""> Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Scott<br class="">
<br class="">
<br class="">
On 2021-03-22 11:03, Mark Adams did write:<br class="">
> Thanks Scott,<br class="">
> <br class="">
> Can you please tell us where this pkg-config file is?<br class="">
> <br class="">
> Thank again,<br class="">
> Mark<br class="">
> <br class="">
> On Mon, Mar 22, 2021 at 10:45 AM Scott Kruger <<a href="mailto:kruger@txcorp.com" target="_blank" class="">kruger@txcorp.com</a>> wrote:<br class="">
> <br class="">
> ><br class="">
> > From you make.log, it looks like petsc found it here:<br class="">
> > /opt/cray/wlm_detect/1.3.3-7.0.1.1_4.19__g7109084.ari/lib64<br class="">
> ><br class="">
> > PETSc has it and found it because BuildSystem did the query of what<br class="">
> > it takes to get C/C++/Fortran to work together. Why is it needed?<br class="">
> > That's up to Cray.<br class="">
> ><br class="">
> > But the question is:<br class="">
> ><br class="">
> > How is your CMake build getting PETSc info?<br class="">
> ><br class="">
> > If<br class="">
> > a) it using pkg-config and CMake's ability to parse it, then it looks like<br class="">
> > our pkg-config export might need work.<br class="">
> > We'd need to see the pkg-config file to be sure though.<br class="">
> ><br class="">
> > and if<br class="">
> > b) it is not using pkg-config, then the answer is it should.<br class="">
> ><br class="">
> > Scott<br class="">
> ><br class="">
> ><br class="">
> > On 2021-03-21 08:25, Mark Adams did write:<br class="">
> > > We are having problems with linking and use static linking.<br class="">
> > > We get this error and have seen others like it (eg, lpetsc_lib_gcc_s)<br class="">
> > ><br class="">
> > > /usr/bin/ld: cannot find -lpetsc_lib_wlm_detect-NOTFOUND<br class="">
> > ><br class="">
> > > wlm_detect is some sort of system library, but I have no idea where this<br class="">
> > > petsc string comes from.<br class="">
> > > This is on Cori and the application uses cmake.<br class="">
> > > I can run PETSc tests fine.<br class="">
> > ><br class="">
> > > Any ideas?<br class="">
> > ><br class="">
> > > Thanks,<br class="">
> > > Mark<br class="">
> ><br class="">
> ><br class="">
> ><br class="">
> ><br class="">
> > --<br class="">
> > Scott Kruger<br class="">
> > Tech-X Corporation <a href="mailto:kruger@txcorp.com" target="_blank" class="">kruger@txcorp.com</a><br class="">
> > 5621 Arapahoe Ave, Suite A Phone: (720) 466-3196<br class="">
> > Boulder, CO 80303 Fax: (303) 448-7756<br class="">
> ><br class="">
<br class="">
-- <br class="">
Scott Kruger<br class="">
Tech-X Corporation <a href="mailto:kruger@txcorp.com" target="_blank" class="">kruger@txcorp.com</a><br class="">
5621 Arapahoe Ave, Suite A Phone: (720) 466-3196<br class="">
Boulder, CO 80303 Fax: (303) 448-7756<br class="">
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></body></html>