Hi,

Could you possibly resend the timing results with the original/correct
spacing?  They're a little tough to read.

It looks like you are inserting two (or more?) different element
matrices for each element and it looks like the "neighbor matrix
insertion" is taking the most time.

This appears to be an atypical usage pattern which I don't understand
(for example, is there only one neighbor per element?) and may be
either a library bug or a bug in your implementation.  As Roy already
mentioned, the most likely culprit in cases where matrix assembly
takes too long is incorrect memory pre-allocation; your symptoms
combined with the fact that you are performing a non-standard (at
least for LibMesh) assembly procedure leads me to think that Roy is on
the right track.   Simply saying that

> I check the init funciton in petsc_matrix.C and it is ok, the matrix
> size is dofs X dofs before assemble,

is not really meaningful, one needs to know the number of non-zeros
per row and the coupling between the different DoFs to be sure the
sparsity pattern is set correctly.

I would say that you should post your code so that we can take a look,
but I'm not sure anyone has enough time to give it such a detailed
examination.  What might be more helpful is a PDF describing the
finite element method you are attempting to implement... then we could
give a few pointers on what might be the right approach to take in
LibMesh.

Finally, slow performance aside, does your code actually produce good
answers or are we spending time debugging something that's not
conceptually correct?

-J




On Mon, May 12, 2008 at 12:41 AM, luyi <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  I make a DG programme on libmesh, there is a problem that the first step
>  takes so long when I use
>  high order basis, the performance log is as follow:
>
>  
> ------------------------------------------------------------------------------
>  | Matrix Assembly Performance: Alive time=683.179, Active time=682.44 |
>  
> ------------------------------------------------------------------------------
>  | Event nCalls Total Avg Percent of |
>  | Time Time Active Time |
>  
> |------------------------------------------------------------------------------|
>  | |
>  | Assemble init 1 0.0001 0.000120 0.00 |
>  | bounray matrix 134 0.0041 0.000030 0.00 |
>  | elem init 1470 0.0757 0.000051 0.01 |
>  | interior matrix 4276 0.2926 0.000068 0.04 |
>  | mass matrix 5880 0.0607 0.000010 0.01 |
>  | matrix insertion 1470 173.4288 0.117979 25.41 |
>  | neighbor matrix insertion 4276 508.5776 0.118938 74.52 |
>  
> ------------------------------------------------------------------------------
>  | Totals: 17507 682.4396 100.00 |
>  
> ------------------------------------------------------------------------------
>
>  Why the matrix insertion spend more than 10 minutes even there is only
>  17460 dofs?
>  code like this:
>  perf_log.stop_event("interior matrix");
>
>  perf_log.start_event ("neighbor matrix insertion");
>
>  euler_system.matrix->add_matrix(Kn,dof_indices,neighbor_dof_indices);
>
>  perf_log.stop_event ("neighbor matrix insertion");
>
>  perf_log.start_event ("matrix insertion");
>
>  euler_system.matrix->add_matrix(Ke, dof_indices);
>  euler_system.rhs->add_vector(Fe, dof_indices);
>
>  perf_log.stop_event ("matrix insertion");
>
>
>
>
> -------------------------------------------------------------------------
>  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  Don't miss this year's exciting event. There's still time to save $100.
>  Use priority code J8TL2D2.
>  
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
>  Libmesh-users mailing list
>  [email protected]
>  https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to