Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cicd(gcc): add job with gcc 12 and nvcc 12.2.0 #211

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

romintomasetti
Copy link
Contributor

@romintomasetti romintomasetti commented Oct 4, 2023

Summary

  • This PR adds a job using Cuda 12.2.0 with gcc 12.
  • It also fixes a missing pthread.h include in the nvtx connector (only from gcc 12 onwards).

Details

In order to make the missing pthread.h problem appear, I needed to compile with gcc 12, which is not the default compiler in Ubuntu 22.04 images.

Therefore, the actions strategy matrix now has a compiler component, that can be set to default or anything else.

  • default will install gcc and g++. For instance, in Ubuntu 22.04 images it is version 11.
  • Otherwise, use an array like {c : my_c_compiler, cpp : my_cpp_compiler}. It will install these compilers instead.

Then just set CC or CXX to instruct CMake which compilers to use.

Note that for the Cuda preset case, we also need to set NVCC_WRAPPER_DEFAULT_COMPILER because it will use Kokkos's nvcc_wrapper that by default uses g++ for the c++ compiler.

@romintomasetti
Copy link
Contributor Author

Hi @masterleinad @vlkale ! Would you have a moment to review this one? Thanks!

Copy link
Contributor

@vlkale vlkale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to test with both cuda-12.1.0 and cuda-12.2.0 and not some older version (e.g., the oldest one Kokkos supports)?

@romintomasetti
Copy link
Contributor Author

Why do you want to test with both cuda-12.1.0 and cuda-12.2.0 and not some older version (e.g., the oldest one Kokkos supports)?

Because that's our use case. We strive to be up-to-date with latest versions. In our experience, this helps detecting bugs.

If you want, I can make another PR that changes cuda-12.1.0 to an older version 😉

@crtrott
Copy link
Member

crtrott commented Oct 5, 2023

Yeah lets change the 12.1 to an old version. I am ok with having two CUDA builds in here: one the newest and one if possible the oldest Kokkos supports (right now 11.0)

@crtrott crtrott merged commit 1542afe into kokkos:develop Oct 5, 2023
7 checks passed
@romintomasetti romintomasetti deleted the gcc-12 branch October 5, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants