Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
Here is a data point: ``` pkrysl@firenze:~/dealii-9.5.2/examples/step-3$ make Consolidate compiler generated dependencies of target step-3 [ 50%] Building CXX object CMakeFiles/step-3.dir/step-3.cc.o [100%] Linking CXX executable step-3 [100%] Built target step-3

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
Thank you. I have actually no complaints about the performance. I just want to know what is going on in deal.ii for a paper I am working on. On Tuesday, March 12, 2024 at 6:59:19 PM UTC-7 bruno.t...@gmail.com wrote: > If building the sparsity pattern is the bottleneck in your code, feel free >

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Bruno Turcksin
If building the sparsity pattern is the bottleneck in your code, feel free to open an issue and we can take a look at how we can improve it. Though if the assembly of the matrix is performance critical, using the MatrixFree class is the way to go. Bruno Le mar. 12 mars 2024 à 20:38, Petr Krysl

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
In Matlab calling sparse() is equivalent to building a sparsity pattern (just forget about the actual values) from the I, J row and column indices. And that is NOT a negligible expense. It is a sizeable fraction of the cost of building a Laplacian matrix on triangles, for instance. On Tuesday,

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Bruno Turcksin
I am not sure why but I need to approve all of your messages. Usually we only need to approve the first time someone posts. Not sure what's going on here. I don't remember how long the computation of the sparsity pattern took but it was small. The reason this part is not parallelized in deal.II

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
Oops. I was wondering what happened to my response, and I did not realize it was subject to approval and posted another attempt at framing the answer. Sorry. On Tuesday, March 12, 2024 at 2:15:22 PM UTC-7 Petr Krysl wrote: > Good point about Tpetra: I will check it out. > > > SparsityPattern

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
That is a good point about Tpetra: I will check it out. > SparsityPattern is usually extremely fast It can still become a bottleneck, provided everything else runs in parallel. ;-) Which reminds me: I wanted to ask you about the WorkStream paper: The sparsity pattern computation was not

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
Good point about Tpetra: I will check it out. > SparsityPattern is usually extremely fast If it is the only sequential of a program executed with multiple threads, it can still control the scalability. Which reminds me: In your WorkStream paper, you do not report the time taken to construct

Re: [deal.II] Re: Sparsity pattern

2024-03-12 Thread Bruno Turcksin
In Trilinos, the Tpetra library has Graph which is basically a SparsityPattern. Tpetra uses Kokkos (which abstracts multithreading and GPU support) everywhere so I would expect that they use Kokkos to build the Graph too. Multithreading for dealii's SparsityPattern is not planned so far. It could

[deal.II] Re: Sparsity pattern

2024-03-12 Thread Petr Krysl
Thanks, that is a helpful confirmation. Would you know if there is any multithreading sparsity pattern computation available anywhere? Is something like this planned for dealii? On Tuesday, March 12, 2024 at 10:39:22 AM UTC-7 bruno.t...@gmail.com wrote: > Hello, > > SparsityPattern is used for

[deal.II] Re: Sparsity pattern

2024-03-12 Thread Bruno Turcksin
Hello, SparsityPattern is used for deal.II own matrices which do not support MPI. As far as I can tell, SparsityPattern does not use multithreading and I don't think adding elements is threadsafe. So you are right. Best, Bruno On Tuesday, March 12, 2024 at 12:58:37 PM UTC-4

[deal.II] Sparsity pattern

2024-03-12 Thread Petr Krysl
It would appear that the sparsity pattern is not (and cannot be) computed in parallel. That is my reading of the code. Am I wrong? -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received

Re: [deal.II] Broadcasting user types containing smart pointers

2024-03-12 Thread Paras Kumar
Thank you for the hints. It works now. Best regards, Paras On Wed, Mar 6, 2024 at 12:36 AM Wolfgang Bangerth wrote: > On 3/5/24 09:59, Paras Kumar wrote: > > > > Thank you for your response. That is exactly what I am trying to do via > the > > deserialize function. I build an object of the