Enable compilation with clangcuda++ and enable kokkoscuda build tests [Related to 4C]#146
Conversation
…rapper Signed-off-by: Philip Oesterle-Pekrun <philipoesterlepekrun@gmail.com>
… fix visualization export for Kokkos device backend Signed-off-by: Philip Oesterle-Pekrun <philipoesterlepekrun@gmail.com>
|
Huh, the tests are not going off. That is odd. Looking into it. Edit: fixed by closing and reopening. |
Signed-off-by: Philip Oesterle-Pekrun <philipoesterlepekrun@gmail.com>
a6e5661 to
fa12129
Compare
|
@PhilipOesterlePekrun I am fine with the proposed changes. The increase in size of the docker image is natural and I do not see a big issue in that. A couple of thoughts though:
|
|
@mayrmt Thanks for looking at it. To answer your points,
|
2fed23f to
ee61726
Compare
|
@mayrmt I think only you can create the package in imcs-compsim. I would probably just pull my newest package and then push it to imcs-compsim like And then for this repository to be able to update it through the workflow, you might have to link MIRCO to the package under the Package Settings. |
|
@mayrmt Should we publish the docker container under the imcs-compsim organization? I think only you can do this. Once it is published once and the package is linked to this repository, PRs like this should be able to publish the docker automatically when the workflow file, DockerFile, or docker/dependencies/ are changed. Or rather, the docker is pushed after a PR that changes those is merged. |
ba260b1 to
9f5a26d
Compare
|
@PhilipOesterlePekrun I can look into it next week. |
|
@mayrmt No worries, not urgent! |
|
@PhilipOesterlePekrun I followed the steps, that you have sent me on slack. What's next? Can we somehow test, if this was successful? |
Signed-off-by: Philip Oesterle-Pekrun <philipoesterlepekrun@gmail.com>
9f5a26d to
55e0d3b
Compare
|
@mayrmt Yes, the tests succeed. We can only know for sure that the push to the package works after it is merged. |
|
@PhilipOesterlePekrun Feel free to merge this PR. |
@mayrmt
Description
This change allows one to use the
clangcuda++wrapper as theCXX_COMPILER, rather thannvcc_wrapper, when building with CUDA backend enabled. The primary motivation is that this allows upstream projects like 4C to fetch MIRCO using FetchContent and to compile it correctly with CUDA backend enabled. An additional benefit is that noMIRCO_HOST_COMPILERneeds to be specified in this case, becauseclangcuda++can compile things like ryml without issue. To achieve this split, theMIRCO_CLANGCUDAoption is introduced, and when it is true, the relevant targets are marked withCLANGCUDA_MODE_HOSTorCLANGCUDA_MODE_DEVICE.Build tests
Additionally, build tests were setup for Kokkos with CUDA backend, both with the
nvcc_wrapperandclangcuda++as the compiler. This required adding the relevant cuda-related apt-get items to the Dockerfile, which leads to a significantly larger Docker image (3,0GiB -> 7,8GiB)Making the build test for the variant using
clangcuda++required this wrapper to be available, so I have added it into MIRCO's source. This does of course pose the problem that MIRCO and 4C will both have this wrapper. I could remove it from 4C to prevent this redundancy, and then just clone the small MIRCO repository to makeclangcuda++available for the build tests in 4C.Visualization Export
I also discovered while working on this that the visualization export functionality was not working while using Kokkos CUDA. I thought I tested it, but a small change was required. A larger change was required to make it work with
clangcuda++, which is that I needed to split the visualization export into a TU that depends only on VTK and one that depends only on Kokkos. I decided to just make that conceptually simple change to make sure it always works.Related Issues and Pull Requests