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

Clang/clang++ support as the CXX/CUDAHOSTCXX compilers, including CI #623

Open
ptheywood opened this issue Aug 4, 2021 · 2 comments · May be fixed by #936
Open

Clang/clang++ support as the CXX/CUDAHOSTCXX compilers, including CI #623

ptheywood opened this issue Aug 4, 2021 · 2 comments · May be fixed by #936
Assignees

Comments

@ptheywood
Copy link
Member

For wider support / coverage, we could add clang as an additional CI target, to ensure it works.

I have tried it in the past and it does /did build fine, but emitted some warnings which were not emitted by MSVC/gcc, so may need some additional suppressions or fixes.

Clang >= 5 should be sufficient for C++17 support in the future.

@ptheywood ptheywood added the CI label Aug 4, 2021
@ptheywood
Copy link
Member Author

A few issues with this:

  • Swig 4.0.2 appears to fail to build when clang is set as the CC/CXX compilers via swig under linux. Needs more investigation
  • Linking executables fails, with std::experimental::filesystem::v1::* being undefined. need to pass -lc++experimental, and potentially -stdlib=libc++ but this caused issues in a quick test. Might be simpler to wait until we go c++17?
  • MessageBucketDevice.cuh has some sign comparisons between IntT and unsigned int which are incorrect. The methods / member variables that are unsigned int should be IntT in these cases
  • Need to suppress unused-private-field warnigns, as MessageArray(2D)Device has a private member variable which is only used in device code, but is visible to the host compiler when unusued.
  • Probably worth adjusting the release CI workflow

Partial progress in the clang-ci branch, but needs work before worth of a PR.

@ptheywood ptheywood changed the title Linux CI with Clang as the host compiler Clang/clang++ support as the CXX/CUDAHOSTCXX compilers, including CI Aug 11, 2021
@ptheywood
Copy link
Member Author

ptheywood commented Oct 19, 2022

Requiring clang >= 9 combined with being c++17 only resolves the <filesystem> issue, with no flag changes needed.

Messy rebase that needs tidying up, and may need some vis repo changes for suppressions, but the full c++ tes suite passes using CUDA 11.8 and clang 14.0 (the supported clang version for CUDA 11.8).

Unsure how many CI jobs to add for clang coverage. With vis or just without? Just one clang version or min/max?.

Need to check swig/vis behaviour still.

[----------] Global test environment tear-down
[==========] 1018 tests from 80 test suites ran. (169889 ms total)
[  PASSED  ] 1018 tests.

  YOU HAVE 40 DISABLED TESTS

Python tests all pass, using system-installed swig (not tested building swig with clang as of yet)

610 passed, 5 skipped in 317.95s (0:05:17) 

Vis requires soem suppressions (and / or warning fixes), as does the main repo with vis enabled. CI should start capturing these on the clang-ci branch, othwise vis runs fine.


Swig 4.0.2 builds successfully from source with clang/clang++14 as the hsot compilers as does clang 11.

Actually building anything with clang 11 on my recently formatted system is a little unhappy however.

Need to check clang 9 to see if that builds swig or not, and otherwise test this on other machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant