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

2023-07-27 Thread Daniel Arndt
Abbas,

Try following the steps at
https://github.com/dealii/dealii/wiki/Contributing.

Best,
Daniel

On Thu, Jul 27, 2023 at 1:24 PM Abbas Ballout 
wrote:

> Lucas
> It's not the linker but I am guessing it's when I edit something deep
> within the library.h files.
> Since everything is linked to it many files are being rebuilt
> I didn't know about other linker so thanks for the tip. I am sure I will
> do that in the future.
>
> Anyone,
> This is my first pull request ever and I don't know exactly how to
> approach this.
> Details:
> I extended the VectorFunctionFromTensorFunction. to return the
> gradient of a function,
> I ended up editing the files: function.h and function.templates.h. but I
> ended up copying from other files.
>
> I am getting the right H1 convergence in my example code so I know what I
> am doing works.
> How do I proceed?
>
> Best,
> Abbas
>
>
> On Saturday, July 22, 2023 at 6:53:24 PM UTC+2 lucasm...@gmail.com wrote:
>
>> 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+un...@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
> 

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

2023-07-27 Thread Abbas Ballout
Lucas 
It's not the linker but I am guessing it's when I edit something deep 
within the library.h files. 
Since everything is linked to it many files are being rebuilt   
I didn't know about other linker so thanks for the tip. I am sure I will do 
that in the future. 

Anyone, 
This is my first pull request ever and I don't know exactly how to approach 
this. 
Details: 
I extended the VectorFunctionFromTensorFunction. to return the 
gradient of a function, 
I ended up editing the files: function.h and function.templates.h. but I 
ended up copying from other files. 

I am getting the right H1 convergence in my example code so I know what I 
am doing works. 
How do I proceed? 

Best,
Abbas  
 

On Saturday, July 22, 2023 at 6:53:24 PM UTC+2 lucasm...@gmail.com wrote:

> 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+un...@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/8ba758f4-06dc-4664-a715-72a7e60ff7bdn%40googlegroups.com.


Re: [deal.II] Question about compiling with CUDA

2023-07-27 Thread Daniel Arndt
Justin,

a docker file that we are using in a different project can be found at
https://github.com/arborx/ArborX/blob/master/docker/Dockerfile in case that
helps.
In general, I would advise against using nvhpc/nvc++ which proves to be
pretty buggy as compared to nvcc/nvcc_wrapper or even (clang++ which is
another option for a compiler supporting CUDA).
Anyway, it seems the current configuration is using nvcc_wrapper. What does
the failing compile-line look like? What is the host compiler (I guess g++
but which version)?

Best,
Daniel

On Thu, Jul 27, 2023 at 10:39 AM Justin O'Connor 
wrote:

> Howdy!
>
> I'm working on making a Dockerfile that will let me use deal.ii with CUDA.
> However, when I run make install, I get the following error:
>
> Error: Internal Compiler Error (codegen): "casting aggregate to non-void
> type is not supported!"
>
> make[2]: *** [source/fe/CMakeFiles/object_fe_debug.dir/build.make:713:
> source/fe/CMakeFiles/object_fe_debug.dir/fe_values.cc.o] Error 2
> make[2]: *** Waiting for unfinished jobs
>
> I'm hoping this is a known issue and I'm just doing something silly. Any
> pointers would be greatly appreciated.
>
> My Dockerfile is attached if that is of any use to anyone.
>
> Thank you,
> Justin
>
> --
> 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/34846fa5-7a9e-4417-80c9-af54792844a9n%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/CAOYDWb%2BAcEzUbpnYtnK1VvQsdYdVwJK7YreO34YTD-PPzW2eeg%40mail.gmail.com.


[deal.II] Question about compiling with CUDA

2023-07-27 Thread Justin O'Connor
Howdy!

I'm working on making a Dockerfile that will let me use deal.ii with CUDA. 
However, when I run make install, I get the following error:

Error: Internal Compiler Error (codegen): "casting aggregate to non-void 
type is not supported!"

make[2]: *** [source/fe/CMakeFiles/object_fe_debug.dir/build.make:713: 
source/fe/CMakeFiles/object_fe_debug.dir/fe_values.cc.o] Error 2
make[2]: *** Waiting for unfinished jobs

I'm hoping this is a known issue and I'm just doing something silly. Any 
pointers would be greatly appreciated.

My Dockerfile is attached if that is of any use to anyone.

Thank you,
Justin

-- 
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/34846fa5-7a9e-4417-80c9-af54792844a9n%40googlegroups.com.


Dockerfile
Description: Binary data


[deal.II] try catch of "ExcDereferenceInvalidCell"

2023-07-27 Thread Simon
Dear all,

I want to catch exceptions thrown by fePointEval.reinit(...), 
where fePointEval is an object of type FEPointEvaluation.

Here is a snippet of code demonstrating the issue:

try
{
 fePointEval.reinit(...);
}
catch(dealii::ExceptionBase & exception)
{
   std::cout<<"exception is catched"