<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 4, 2016 at 1:58 AM, leejearl <span dir="ltr"><<a href="mailto:leejearl@126.com" target="_blank">leejearl@126.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hi, all PETSc developer:</p>
Thank you for your great works. I have deploy my fvm code based
on the PETSc.<br>
It works well, and the results are beautiful. But I found a problem
that some of the <br>
functions, such as DMPlexGetSupport and <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexPointLocalRef.html" target="_blank">DMPlexPointLocalRef,
are very expensive.</a></div></blockquote><div><br></div><div>I can believe that some parts are expensive, but I think it is probably something other than</div><div>GetSupport() and PointLocalRef(). Lets look at the code. First support is just two pointer lookups</div><div><br></div><div> <a href="https://bitbucket.org/petsc/petsc/src/8191f1e31285033beeebf70760bc9786361aefca/src/dm/impls/plex/plex.c?at=master&fileviewer=file-view-default#plex.c-1502">https://bitbucket.org/petsc/petsc/src/8191f1e31285033beeebf70760bc9786361aefca/src/dm/impls/plex/plex.c?at=master&fileviewer=file-view-default#plex.c-1502</a></div><div><br></div><div>and for Point LocalRef() its one lookup and arithmetic</div><div><br></div><div> <a href="https://bitbucket.org/petsc/petsc/src/8191f1e31285033beeebf70760bc9786361aefca/src/dm/impls/plex/plexpoint.c?at=master&fileviewer=file-view-default#plexpoint.c-105">https://bitbucket.org/petsc/petsc/src/8191f1e31285033beeebf70760bc9786361aefca/src/dm/impls/plex/plexpoint.c?at=master&fileviewer=file-view-default#plexpoint.c-105</a></div><div><br></div><div>I have benchmark code that runs these, and they should definitely take < 1e-7s, and maybe</div><div>10-100 times less. You can look at Plex test ex9 to see some of it.</div><div><br></div><div>What is taking a lot of time?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><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 bgcolor="#FFFFFF">
It costs a lot of times if such routines are involved. Is there any
method one can use to reduce <br>
the time costs and improve the efficiency of the executable
applications?<br>
Thanks<span class="gmail-HOEnZb"><font color="#888888"><br>
leejearl</font></span></div></blockquote></div>-- <br><div class="gmail_signature">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</div>
</div></div>