Re: [deal.II] Integrate difference isn't picking on the

2023-07-22 Thread Abbas Ballout
If I change a single line in deal I'll have to wait a good amount of time 
for it to compile. 
Do you all go through this? All I have is a 4 cores and 16 GBs of RAM on my 
Laptop.  

On Monday, July 17, 2023 at 9:48:00 AM UTC+2 Abbas Ballout wrote:

> YES. Would take me a while but I ll do it. 
> Be prepared for many questions. 
>
> On Monday, July 17, 2023 at 2:44:01 AM UTC+2 Wolfgang Bangerth wrote:
>
>> On 7/16/23 07:22, Abbas Ballout wrote: 
>> > I get this error when I call the 
>> exact_solution_vector_function.gradient(p1): 
>> > !ERROR Message: 
>> > /An error occurred in line <135> of file 
>> > 
>> 
>>  
>> in function 
>> > dealii::Tensor<1, dim, Number> dealii::Function> > RangeNumberType>::gradient(const dealii::Point&, unsigned int) 
>> const 
>> > [with int dim = 2; RangeNumberType = double] 
>> > The violated condition was: 
>> > false 
>> > Additional information: 
>> > You (or a place in the library) are trying to call a function that 
>> is 
>> > declared as a virtual function in a base class but that has not 
>> been 
>> > overridden in your derived class./ 
>> > / 
>> > / 
>> > Calling value  works fine but not gradient even though I have 
>> overridden both 
>> > functions. 
>>
>> You do in your own class, but VectorFunctionFromTensorFunction does not. 
>> That's not by design, but probably simply because nobody has ever had a 
>> need 
>> for this. Would you like to try and write a patch that adds 
>> VectorFunctionFromTensorFunction::gradient()? You could model it on 
>> VectorFunctionFromTensorFunction::value(). 
>>
>> Best 
>> Wolfgang 
>>
>> -- 
>>  
>> Wolfgang Bangerth email: bang...@colostate.edu 
>> www: http://www.math.colostate.edu/~bangerth/ 
>>
>>
>>

-- 
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 this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/15f0b1e7-d5ea-49ed-b58f-ea10fae84d52n%40googlegroups.com.


Re: [deal.II] Integrate difference isn't picking on the

2023-07-22 Thread Lucas Myers
I haven't tried this with deal.II yet, but I've recently started using the
mold linker for programs I write which have many compilation units (link to
GitHub here: https://github.com/rui314/mold). If you're only changing one
line then probably only one compilation unit is being recompiled, so the
bulk of the wait time is probably being taken by the linker.

Note that, to get a significant speedup, you'll have to recompile with all
of your cores so the linking can be parallelized. I've found that using all
cores to compile sometimes causes make to get killed because it uses too
much memory, but if most things are compiled and you're just on the linking
stage you don't really run into this.

Alternatively, I think that some other folks use gold linker or the lld
linker (in case you can't get mold to work).

- Lucas


On Sat, Jul 22, 2023, 11:37 AM Abbas Ballout 
wrote:

> If I change a single line in deal I'll have to wait a good amount of time
> for it to compile.
> Do you all go through this? All I have is a 4 cores and 16 GBs of RAM on
> my Laptop.
>
> On Monday, July 17, 2023 at 9:48:00 AM UTC+2 Abbas Ballout wrote:
>
>> YES. Would take me a while but I ll do it.
>> Be prepared for many questions.
>>
>> On Monday, July 17, 2023 at 2:44:01 AM UTC+2 Wolfgang Bangerth wrote:
>>
>>> On 7/16/23 07:22, Abbas Ballout wrote:
>>> > I get this error when I call the
>>> exact_solution_vector_function.gradient(p1):
>>> > !ERROR Message:
>>> > /An error occurred in line <135> of file
>>> >
>>> 
>>> in function
>>> > dealii::Tensor<1, dim, Number> dealii::Function>> > RangeNumberType>::gradient(const dealii::Point&, unsigned int)
>>> const
>>> > [with int dim = 2; RangeNumberType = double]
>>> > The violated condition was:
>>> > false
>>> > Additional information:
>>> > You (or a place in the library) are trying to call a function that
>>> is
>>> > declared as a virtual function in a base class but that has not
>>> been
>>> > overridden in your derived class./
>>> > /
>>> > /
>>> > Calling value  works fine but not gradient even though I have
>>> overridden both
>>> > functions.
>>>
>>> You do in your own class, but VectorFunctionFromTensorFunction does not.
>>> That's not by design, but probably simply because nobody has ever had a
>>> need
>>> for this. Would you like to try and write a patch that adds
>>> VectorFunctionFromTensorFunction::gradient()? You could model it on
>>> VectorFunctionFromTensorFunction::value().
>>>
>>> Best
>>> Wolfgang
>>>
>>> --
>>> 
>>> Wolfgang Bangerth email: bang...@colostate.edu
>>> www: http://www.math.colostate.edu/~bangerth/
>>>
>>>
>>> --
> 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 this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/15f0b1e7-d5ea-49ed-b58f-ea10fae84d52n%40googlegroups.com
> 
> .
>

-- 
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 this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CALTw5sYqf2rOe664ZpMftqvMtQ79%3Dejt%3DzZA8Mw5GH5XJLYNcg%40mail.gmail.com.


[deal.II] Re: How to transpose a distributed PETScWrappers::MPI::SparseMatrix

2023-07-22 Thread Laryssa Abdala
Never mind, I have been using version 9.4.2. There are a couple of extra 
features implemented in the newest versions that will help me, e.g., there 
is a PETScWrappers::MatrixBase constructor that takes a Mat as input
(https://github.com/dealii/dealii/commit/97911ba3839d7a06c3fb0cd06f7574ea0849103b).
 
Thanks to the developers :)


On Friday, July 21, 2023 at 7:07:22 PM UTC-4 Laryssa Abdala wrote:

> Hello everyone, 
>
> It seems like PETScWrappers::MatrixBase::transpose()  
> 
>  only 
> works in serial. Is there a way to transpose a distributed 
> PETScWrappers::MPI::SparseMatrix in place? It seems like the way to do this 
> is to:
> Mat temp;
> MatTranspose( petsc_wrapper_matrix,  MAT_INITIAL_MATRIX, &temp);
>  
> From there, is there a way to copy a Mat into a 
> PETScWrappers::MPI::SparseMatrix? Please let me know if I am 
> missing something or if you have other suggestions.
>
> Thank you, 
> Laryssa
>

-- 
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 this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/1897a935-af08-4e75-a3d6-201b79a25314n%40googlegroups.com.


Re: [deal.II] Re: How to transpose a distributed PETScWrappers::MPI::SparseMatrix

2023-07-22 Thread Wolfgang Bangerth

On 7/22/23 11:54, Laryssa Abdala wrote:

**

Never mind, I have been using version 9.4.2. There are a couple of extra 
features implemented in the newest versions that will help me, e.g., there is 
a PETScWrappers::MatrixBase constructor that takes a Mat as input

(https://github.com/dealii/dealii/commit/97911ba3839d7a06c3fb0cd06f7574ea0849103b).
 Thanks to the developers :)


Yes, I'm glad you found those. Stefano Zampini gets the credit for 
implementing these!


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/


--
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 this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/cc05c794-f7dd-73b8-8c83-62786db36f76%40colostate.edu.


Re: [deal.II] Compilation error in v9.5.1

2023-07-22 Thread Wolfgang Bangerth



Tomas:
can you try whether the changes here are sufficient for you to compile this 
file?
  https://github.com/dealii/dealii/pull/15781

Best
 Wolfgang


On 7/21/23 19:49, Wolfgang Bangerth wrote:

On 7/21/23 15:26, Tomáš Levý wrote:


Any advice please?


Tomas:
that's awkward -- I guess nobody tests deal.II with PETSc but without MPI :-(

Can you try if it compiles for you if you simply comment out the entire 
content of the export_to_ghosted_array_start() and 
export_to_ghosted_array_finish() functions? Or are there other functions that 
then still don't compile?


Best
  W.



--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/


--
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 this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d431dac6-9c33-9d1b-e1de-e7c4e2561e51%40colostate.edu.