[petsc-users] DMSetLabelValue takes a lot of time for large domain

Matthew Knepley knepley at gmail.com
Wed Apr 25 04:30:03 CDT 2018


On Tue, Apr 24, 2018 at 11:57 PM, Danyang Su <danyang.su at gmail.com> wrote:

> Hi All,
>
> I use DMPlex in unstructured grid code and recently found DMSetLabelValue
> takes a lot of time for large problem, e.g., num. of cells > 1 million. In
> my code, I use
>
> DMPlexCreateFromCellList ()
>
> Loop over all cells/nodes{
>
> DMSetLabelValue
>
> }
>
> DMPlexDistribute
>
> The code works fine except DMSetLabelValue takes a lot of time for large
> problem. I use DMSetLabelValue to set material id for all the nodes or
> cells so that each subdomain has a copy of material id. Is there any other
> functions that can be used more efficient, e.g. set labels by array, not 1
> by 1?
>

1) I just want to make sure that you are running an optimized build,
configured using --with-debugging=0

2) How long does it take?

3) Do you have intervening queries to the label between insertions?

It should be fast, and I therefore suspect that logging code might be
responsible for the performance. I will
setup a test. Can you give me an idea roughly

  a) How many SetValue() calls you make

  b) How many different label values you use

  Thanks,

     Matt


> Thanks,
>
> Danyang
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180425/38d60a6e/attachment.html>


More information about the petsc-users mailing list