Open dbabokin opened 1 month ago
Looks like gcc has trouble with these changes.
I can reproduce it. The problem is that with gcc it pulls in gcc's libgomp.so.1
instead of llvm's libomp.so.5
. 🤔
I see no way to specify for find_package(OpenMP)
that it needs llvm version. Not sure how to fix that properly.
The way we were doing it was not portable "for a reason": we don't want to use Gomp because the performance isn't good.
I'm not saying it was done in the right way, clearly not. But the reason is still important.
So, my tip for this PR is to find a way to make it portable, but still require LLVM's OpenMP library and not the compiler's own.
CMake find_package can be fiddled with HINTs and other flags, maybe this helps?
The way we were doing it was not portable "for a reason": we don't want to use Gomp because the performance isn't good.
Yeah, totally understand. Showing up of gomp
when gcc was used was absolutely unexpected. The definition of "portable" that seems acceptable in this case is that it works on macOS and Ubuntu 24.04 - all with llvm's omp
.
I'm not saying it was done in the right way, clearly not. But the reason is still important.
So, my tip for this PR is to find a way to make it portable, but still require LLVM's OpenMP library and not the compiler's own.
CMake find_package can be fiddled with HINTs and other flags, maybe this helps?
HINT
is a Windows thing, PATH
probably may help, I'll give it a try. I'll also file an issue for CMake to get it fixed in the long run.
I file CMake issue for that: https://gitlab.kitware.com/cmake/cmake/-/issues/26263
Closes #959
See the issue for detailed problem description.