Open zbeekman opened 5 years ago
Does your building problem affect upstream master (llvm-mirror/openmp)? That is the preferred repository to use ompt. It also exposes the OpenMP 5.0 interface of ompt.
Which branch do you currently use?
You can always turn libomptarget off: OPENMP_ENABLE_LIBOMPTARGET=off
Sorry, but I'm not intimately familiar with the internals of OpenMP. What functionality does LIBOMPTARGET provide? I'm building this specifically to use the tools interface for profiling.
As for which branch I'm using, I'm not 100% sure. That TAU folks at U Oregon provide a tarball for TR6 OMPT support in TAU hosted on their servers. It appears to be a snapshot of master, but there's no git information included, so it's hard to tell which commit they took the snapshot at. I can inquire.
libomptarget is the LLVM specific way to perform offloading of target regions to accelerators. If you compile your OpenMP application with a current Intel compiler, this library will never be used, so there is no need to build this library.
@hahnjo would it make sense to turn off building libomptarget by default, when icc is used?
I guess it would be cleaner to add a CMake check if CMAKE_CXX_COMPILER
can really include cuda_runtime.h
(there's a function for that, I just don't recall the name). That would fail during config time for the Intel Compiler and should transparently disable the CUDA plugin.
Yes, intro-spection is your friend! You'll need to try compiling with it.
https://cmake.org/cmake/help/v3.9/module/CheckIncludeFile.html#module:CheckIncludeFile
Well, it's not that easy :) icc does not fail to compile when cuda_runtime.h is included.
The failing command in the build uses nvcc with some weird flags and I gave up in making a try-compile command out of that flags. Also just adding some defines for the compilation with icc is not sufficient.
There's no obvious way to configure LLVM-openmp (TR6 with tools support for TAU) WITHOUT CUDA support if
find_package(CUDA quiet)
succeeds inlibomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
. While it's possible that it is a quirk of the HPC system I'm on, when compiling, if CUDA is found, it includes/usr/local/cuda/include/cuda_runtime.h
which then proceeds to complain that my intel compiler is too new:After some frustration trying to build TAU with TR6 OMPT support, we discovered the CMake variable
CMAKE_DISABLE_FIND_PACKAGE_CUDA
. It would be nice if either:I'm happy to submit a PR if you let me know which proposed solution you prefer, which branch to submit the PR against, and any other relevant contributing guidelines.
Cheers!