Re: [deal.II] Vector-valued matrix-free operatior with CUDA

2023-08-07 Thread Justin O'Connor
I'm hoping to do linear elasticity, similar to step 8, so a FESystem of dim 
identical FE_Qs

On Monday, August 7, 2023 at 9:06:09 AM UTC-6 d.arnd...@gmail.com wrote:

> Justin,
>
> As far as I know, we haven't made any significant progress with 
> vector-valued support for CudaWrappers::MatrixFree (apart from porting it 
> to Kokkos).
> What's your specific use case? What functionality do you need specifically 
> (same finite elements? FESystsem?)?
>
> Best,
> Daniel
>
> On Mon, Aug 7, 2023 at 10:03 AM Justin O'Connor  
> wrote:
>
>> Howdy!
>>
>> I see here: 
>> https://github.com/dealii/dealii/issues/4399 
>> that using cuda for matrix-free operators with multiple components has 
>> been discussed before, and I think it is referenced again here 
>> https://github.com/dealii/dealii/issues/7037
>> but this issue hasn't been referenced by 2019. Has anyone been trying 
>> this?
>> Would it be at all possible to use the existing framework to grab the 
>> individual components, and work with them inside the loop to do the 
>> operations I need? And then somehow put the results into the result vector 
>> from there?
>>
>> 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+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/2974346e-9ed7-4697-a32a-2df5ed5bf85en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/2974346e-9ed7-4697-a32a-2df5ed5bf85en%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/efb882b1-1312-4a11-ba49-6cdf094e51efn%40googlegroups.com.


[deal.II] Vector-valued matrix-free operatior with CUDA

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

I see here: 
https://github.com/dealii/dealii/issues/4399 
that using cuda for matrix-free operators with multiple components has been 
discussed before, and I think it is referenced again here 
https://github.com/dealii/dealii/issues/7037
but this issue hasn't been referenced by 2019. Has anyone been trying this?
Would it be at all possible to use the existing framework to grab the 
individual components, and work with them inside the loop to do the 
operations I need? And then somehow put the results into the result vector 
from there?

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/2974346e-9ed7-4697-a32a-2df5ed5bf85en%40googlegroups.com.


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

2023-08-07 Thread Justin O'Connor
For posterity, ere's a dockerfile I got working that installs deal.ii with 
cuda capability. :)

Thanks,
Justin
On Friday, July 28, 2023 at 4:33:46 PM UTC-6 Justin O'Connor wrote:

> I'm now just using your dockerfile (thanks for the tips on it), and I am 
> trying to install deal.ii at the end. 
>
> Adding this to the end of it:
> RUN apt update && apt install -y libblas-dev liblapack-dev
>
> WORKDIR /opt
> ENV DEALII_VERSION 9.5.1
> RUN wget --no-verbose https://www.dealii.org/downloads/dealii-
> $DEALII_VERSION.tar.gz
> RUN gunzip -c dealii-$DEALII_VERSION.tar.gz | tar -xof -
> ENV DEALII_DIR /opt/dealii-$DEALII_VERSION
> WORKDIR $DEALII_DIR
> RUN pwd
> RUN mkdir build
> RUN mkdir dealii_installed
> WORKDIR $DEALII_DIR/build
> RUN cmake $DEALII_DIR -DCMAKE_INSTALL_PREFIX=opt/dealii_installed \
>-DCMAKE_CXX_COMPILER=clang++ \
>-DDEAL_II_WITH_TBB=ON \
>-DDEAL_II_WITH_MPI=ON \
>-DDEAL_II_MPI_WITH_DEVICE_SUPPORT=ON \
>-DDEAL_II_WITH_LAPACK=ON \
>-DDEAL_II_WITH_BLAS=ON \
>-DDEAL_II_WITH_64BIT_INDICES=ON \
>-DKOKKOS_DIR=$KOKKOS_DIR \
>-DDEAL_II_WITH_CUDA=ON 
>
> gives the attached error, still saying the compiler and linker flags are 
> the issue?
>
> short version:
>
> CMake Error at cmake/setup_finalize.cmake:126 (message):
>   
>
> Configuration error: Cannot compile a test program with the final set 
> of
> compiler and linker flags:
>   CXX flags (DEBUG): -openmp-simd -pthread 
> -ffp-exception-behavior=strict -Og -ggdb -Wa,--compress-debug-sections
>   LD flags  (DEBUG): -rdynamic  -pthread -fopenmp=libomp -ggdb 
> -Wl,--compress-debug-sections=zlib
>   LIBRARIES (DEBUG): dl;
> 
>
>   
>
> Call Stack (most recent call first):
>   cmake/macros/macro_verbose_include.cmake:19 (include)
>   CMakeLists.txt:123 (verbose_include)
>
>
> Thank you so much for all your help already,
>
> Justin
>
> On Thursday, July 27, 2023 at 10:58:58 AM UTC-6 d.arnd...@gmail.com wrote:
>
>> 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 <
>> jul...@rams.colostate.edu> 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+un...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/dealii/34846fa5-7a9e-4417-80c9-af54792844a9n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/dealii/34846fa5-7a9e-4417-80c9-af54792844a9n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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/3b70963d-f52a-4533-a92a-6248cc26db7en%40googlegroups.com.


Dockerfile
Description: Binary data


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

2023-07-28 Thread Justin O'Connor
I'm now just using your dockerfile (thanks for the tips on it), and I am 
trying to install deal.ii at the end. 

Adding this to the end of it:
RUN apt update && apt install -y libblas-dev liblapack-dev

WORKDIR /opt
ENV DEALII_VERSION 9.5.1
RUN wget --no-verbose https://www.dealii.org/downloads/dealii-
$DEALII_VERSION.tar.gz
RUN gunzip -c dealii-$DEALII_VERSION.tar.gz | tar -xof -
ENV DEALII_DIR /opt/dealii-$DEALII_VERSION
WORKDIR $DEALII_DIR
RUN pwd
RUN mkdir build
RUN mkdir dealii_installed
WORKDIR $DEALII_DIR/build
RUN cmake $DEALII_DIR -DCMAKE_INSTALL_PREFIX=opt/dealii_installed \
   -DCMAKE_CXX_COMPILER=clang++ \
   -DDEAL_II_WITH_TBB=ON \
   -DDEAL_II_WITH_MPI=ON \
   -DDEAL_II_MPI_WITH_DEVICE_SUPPORT=ON \
   -DDEAL_II_WITH_LAPACK=ON \
   -DDEAL_II_WITH_BLAS=ON \
   -DDEAL_II_WITH_64BIT_INDICES=ON \
   -DKOKKOS_DIR=$KOKKOS_DIR \
   -DDEAL_II_WITH_CUDA=ON 

gives the attached error, still saying the compiler and linker flags are 
the issue?

short version:

CMake Error at cmake/setup_finalize.cmake:126 (message):
  

Configuration error: Cannot compile a test program with the final set of
compiler and linker flags:
  CXX flags (DEBUG): -openmp-simd -pthread 
-ffp-exception-behavior=strict -Og -ggdb -Wa,--compress-debug-sections
  LD flags  (DEBUG): -rdynamic  -pthread -fopenmp=libomp -ggdb 
-Wl,--compress-debug-sections=zlib
  LIBRARIES (DEBUG): dl;


  

Call Stack (most recent call first):
  cmake/macros/macro_verbose_include.cmake:19 (include)
  CMakeLists.txt:123 (verbose_include)


Thank you so much for all your help already,

Justin

On Thursday, July 27, 2023 at 10:58:58 AM UTC-6 d.arnd...@gmail.com wrote:

> 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 <
> jul...@rams.colostate.edu> 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+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/34846fa5-7a9e-4417-80c9-af54792844a9n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/34846fa5-7a9e-4417-80c9-af54792844a9n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/9f992a9f-cd61-4768-a958-a26c0449588fn%40googlegroups.com.
[ 50%] Building CXX object CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o
/opt/llvm/bin/clang++   -openmp-simd -pthread -ffp-exception-behavior=strict 
-Og -ggdb -Wa,--compress-debug-sections -extended-lambda 
-Wext-lambda-captures-this -arch=sm_70 -DKOKKOS_DEPENDENCE -MD -MT 
CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o -MF 
CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o.d -o 
CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o -c 
/opt/dealii-9.5.

[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


Re: [deal.II] Step 79 - Topology Optimization

2021-08-05 Thread Justin O'Connor
Howdy!

The step-79 program uses simultaneous analysis and design (SAND) as well as
second derivative information to solve this 2d problem. Most people doing
large scale, 3d problems today use only first derivative information and
sensitivity analysis in a nested analysis and design (NAND) context. This
is because while SAND and second derivative information both allow a
topology optimization program to be more robust, they also rely on a much
larger system of equations.

As it is written now, the step-79 program would not work well for a 3d
case, especially for high resolution. The common way to solve such a
problem now would be with an "optimality criteria method" or similar.

On Thu, Aug 5, 2021 at 2:01 PM Sou Ren  wrote:

> Hey there,
>
> I looked at tutorial 79 dealing with topology optimization and the
> tutorial mentions that step 79 deals with elastic isotropic material and at
> the end presents a case study in 2D.
> Is 3D case already considered in this module? and also is it possible to
> deal with high  resolution large scale topology optimization cases?
> Or for above mentioned cases one should extend and develop step 79?
>
> Thanks a bunch.
>
> --
> 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/440b84ef-bf30-4cc3-afe1-cc4f3dc96afdn%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/CAEO9-OdJ_Npu6cynrFK_wNH%3DKr22-OYb4C9zwQWydkmaON7rcw%40mail.gmail.com.