-
Notifications
You must be signed in to change notification settings - Fork 326
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
Add runner that builds with Clang to CI. #487
Conversation
It looks like a few tests fail with Clang that passed with GCC:
|
As the motivation why I think testing with LLVM Clang on Linux could be useful: |
The default log file is not very useful to try and understand what is happening in these failing tests. If I understand correctly, stderr and stdout are redirected to test-specific files. That makes it difficult to display the output in automated tests. Would it be ok to no longer redirect the output and let |
Looks great! It is nice to be able to test several builds at the same time. Previously we seem to have run the tests with: |
If I understand their documentation correctly,
To be honest, the output that is currently shown for the failing tests might be enough for someone more familiar with ElmerFEM to understand what is happening. It's just that I didn't understand what it means.
And the corresponding output in the test log is:
That doesn't give much to follow up on (at least for me). I was just thinking/hoping that something would output a bit more than that to somewhere. But admittedly, I don't know if that is actually the case. |
The link error with OpenMP using LLVM Clang on Ubuntu is fixed by configuring with |
The same set of tests fail when building with Clang independent on whether OpenMP is used. |
I am looking at these great CI builds (ubuntu-clang & windows-mingw) and wondering whether they might deserve their own .yaml file. For me it seems that the status of a build is either success or failure. So if we would like to show one status flag for each build they need to have different .yaml file? Like for build.yaml we have the status in "https://github.com/ElmerCSC/elmerfem/actions/workflows/build.yaml/badge.svg". Now build.yaml gets bloated if we add all platforms there. What is your take on this? So we could have build-ubuntu-clang.yaml, build-windows-mingw.yaml etc. Just my uninformed thoughts... |
The workflows for GCC vs. Clang on Ubuntu share almost all of the build instructions. So, separating them into two yaml files might lead to a lot of copy-paste and the potential for forgetting that changes might need to be applied in workflows for both. I'm not sure if I understood your motivation correctly: Are you hesitating to add workflows for configurations that (currently) fail because that would mean that the badge would indicate that? Splitting the workflows just because they fail only puts a blanket over a potentially underlying issue imho. The configuration still fails (whether the badge is green or red doesn't make a difference). Anyway: Since (more or less) recently, GitHub has reusable workflows. Maybe, it's possible to use those to keep duplication of the build rules in the yaml files to a minimum while still splitting (at least some) elements of a build matrix to different workflows... Splitting the workflows for different platforms into separate yaml files is probably ok. Build instructions tend to differ for different platforms anyway. |
Add configurations to the build matrix that build with LLVM Clang with and without OpenMP. Also add a runner that builds with GCC without OpenMP.
My idea was just to give some more information. If we have clang build with some persisting issues it is still nice to know with a quick inspection that a commit didn't break the gcc compilation. We could have then several badges. The same info can of course be retrieved by other means. I am just trying to hunt why the clang fails. For some reason it seems that it cannot obtain the meshes. |
I was able to get the std out of ElmerSolver out on failure. See e.g. test 55 here. |
I have a VM with Ubuntu 24.04 where I could try and reproduce the error locally. |
First failing test is "CurvedBoundaryP". Try with:
For some reason it seems that the mesh conversion from Gmsh to Elmer type fails and ElmerSolver reports that it cannot find the file. I cant see the output of ElmerGrid from the CI currently. |
The test is run by the runtest.cmake in the test directory: include(test_macros) Currently the output is redirected to stdout and stderr only in the RUN_ELMER_TEST() and these are visible in CI when setting CTEST_OUTPUT_ON_FAILURE=1. Unfortunately the problems seem to occur before this. |
It looks like that command segfaults:
A backtrace from that crash with gdb (in case that helps):
Maybe, |
Strange. It looks like the upper half of the address was lost somewhere (maybe overwritten on the stack???):
|
I added a breakpoint early in that function and then ran
|
The change in #506 avoids that segfault for me. |
Building with LLVM Clang and libomp currently fails (see #486).
Add configurations to the build matrix that build with LLVM Clang without OpenMP. Also add a runner that builds with GCC without OpenMP.