enhance custom easyblock for LLVM to run tests in parallel#3875
enhance custom easyblock for LLVM to run tests in parallel#3875boegel merged 2 commits intoeasybuilders:developfrom
Conversation
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 4 out of 4 (4 easyconfigs in total) |
Thyre
left a comment
There was a problem hiding this comment.
Looks good to me, and this is well tested.
I was a bit confused by the regex substitution for LLVM <15, but this looks to be good as well. So just my knowledge is limited here 😅
if(POLICY CMP0114)
cmake_policy(SET CMP0114 NEW)
endif()
project(LLVM
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
LANGUAGES C CXX ASM)
Yes that's the intended result. I tried to come up with something that would always work so I needed something that is always there so a typo/mistake would be immediately obvious even without a recent enough CMake version used. |
|
Just saw this PR. easybuild-easyblocks/easybuild/easyblocks/l/llvm.py Lines 598 to 610 in 2e5a227 We already had parallelization in lit, are we not running |
|
Should be fine as they are using that upstream too: https://github.com/llvm/llvm-project/blob/100db538565c80164b05b1c3a5bebeaa0e772fc4/offload/cmake/caches/AMDGPUBot.cmake#L18 but can't tell for sure, it is possible that multiple Are you seeing that in practice? Maybe we should limit this to something low to be safe? I'm not sure why |
I think i've seen it used also to disable running tests in parallel and not only for proper MPI tests, but it is possible we might not want here. Does that upstream also run the tests with Atleast to my understanding every make target will run lit under the hood and lit will run tests in parallel with its own |
They use Ninja by default which IIRC defaults to running in max-parallel, so it likely does run the test targets, hence lit, in parallel unless there are some dependencies among the targets to avoid that. |
(created using
eb --new-pr)We were currently running the test step (
make check-all) sequentially (-j1) because there were concurrency issues caused by how LLVM uses CMake together with a particularity of CMake "fixed" in 3.19 guarded by a policy which defaults to OLD (non-fixed behavior)I added patches to the CMakeLists for all LLVM versions:
--> 15 & 16+ can be handled the same just with different paths
I intentionally set it for all LLVM versions to ease testing. With CMake < 3.19 it won't have any effect and tests will be run serially as before