-
Notifications
You must be signed in to change notification settings - Fork 187
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
Move clang-tidy, ASAN, UBSAN to clang-9 #3627
Comments
|
@fweik, I think it was in the (copy or move) constructor of Utils::List Some of the narrowing warnings should probably also be looked at. |
That would get rid of clang-tidy checking on CUDA code. NVCC basically has no warnings, so if we can patch thrust we should do that to keep clang. |
The |
The self-assignment is fixed in #3628, please do not remove the check. |
The narrowing thing is fixed in #3629. |
|
@fweik, I'll re-enable the checks corresponding to your fixes. Also, a lot of the GPU stuff will go away, once we are ready with Walberla. I'll check, if the workaround suggested in the issue mentioned can easily be integrated. If not... |
I'll also fix |
Sure, but sometimes that is not possible. Clang is a useful tool and helps find actual bugs before they become big problems. Complex tools like that require some maintenance effort; and as long as that only means patching a file, it‘s not worth forgoing correctness in favor of simplicity. |
The cmake .. -DWITH_CUDA=ON -DWITH_CUDA_COMPILER=clang \
-DCMAKE_BUILD_TYPE=RelWithAssert -DWITH_COVERAGE=OFF \
-DCMAKE_C_COMPILER=$(which clang-9) \
-DCMAKE_CXX_COMPILER=$(which clang++-9) \
-DCMAKE_CXX_FLAGS=--cuda-path=/work/jgrad/cuda-10.0-thrust195 \
-DCUDA_NVCC_FLAGS=--cuda-path=/work/jgrad/cuda-10.0-thrust195 |
I tried building with cuda 10.1 at ICP installed in /usr/local. The bug was in there, as well. I didn’t investigate further. Let’s see if the workaround has side effects or not.
|
That's odd, because |
@jngrad you can load a more recent cmake as a module on bee. |
I'm not very used to bee :) I just did |
@jngrad, you're right. Looks like I misread sth |
@RudolfWeeber I ran into issues with Clang++-9 in the Ubuntu 20.04 image with CUDA 10.1 installed. You might want to have a look at the compiler error, it's in #3650. |
I've addressed the majority of the Clang-Tidy 9 warnings. |
Results so far:
Build with Clang9 on the ICP machines:
Clang++ cannot be used for the Cuda code, unless we are prepared to patch thrust. The code makes use of
va_printf
which is not defined (Compilation with Clang fails, va_printf undeclared NVIDIA/thrust#1032). Alternatively, we could include the workaround discussed in the isseu in Espresso. Personally, I'd just use Nvcc.The following clang-tidy checks get triggered due to a more modern clang-tidy:
As per the discussion on the Espresso meeting, I'll disable them. If we want, we can address (part of) them separately.
The ASAN needs ASAN_OPTIONS="allocator_may_return_null=1" to avoid an error from an OpenMPI library
The text was updated successfully, but these errors were encountered: