For the purposes of building the OpenMP runtime library on non-x86 platforms (especially when statically linking because ittnotify_static.c calls dlopen, etc.), ITT sometimes needs to be disabled. We currently have an option for this, but it is forced on. Making this an option allows turning this off without editing the CMake file.
Details
Diff Detail
Event Timeline
runtime/CMakeLists.txt | ||
---|---|---|
202–203 | "Right now, always." looks wrong with this change, and should probably be removed from the comment. |
Looks fine.
However I do wonder whether the itt_notify code is useful at all on non-X86 systems,
since it provides the interface to Vtune, and I doubt that Vtune would be available
or happy on non-x86 machines :-).
In which case it might be better to default this off on non-X86 machines anyway.
- Jim
James Cownie <james.h.cownie@intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438
runtime/CMakeLists.txt | ||
---|---|---|
202–203 | Good point. |
- Original Message -----
From: "Jim Cownie via Openmp-commits" <openmp-commits@lists.llvm.org>
To: "james h cownie" <james.h.cownie@intel.com>, openmp-commits@lists.llvm.org
Sent: Thursday, March 17, 2016 10:30:22 AM
Subject: Re: [Openmp-commits] [PATCH] D18244: Expose the option to disable building with ITTjcownie added a subscriber: jcownie.
jcownie added a comment.Looks fine.
However I do wonder whether the itt_notify code is useful at all on
non-X86 systems,
since it provides the interface to Vtune, and I doubt that Vtune
would be available
or happy on non-x86 machines :-).In which case it might be better to default this off on non-X86
machines anyway.
Do we have an easy way of doing this in the CMake file? It looks like I need to do something like:
if (IA32 OR INTEL64 OR MIC)
make the default on
else()
make the default off
endif()
- Jim
James Cownie <james.h.cownie@intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438http://reviews.llvm.org/D18244
Openmp-commits mailing list
Openmp-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-commits
Do we have an easy way of doing this in the CMake file? It looks like I need to do something like:
if (IA32 OR INTEL64 OR MIC)
make the default on
else()
make the default off
endif()
That's one way, the other way (the pattern I adapted when refactoring) is to put something like this in cmake/config-ix.cmake:
# Check if itt notify is available. Right now it is only verified to work on x86 based architectures if(IA32 OR INTEL64 OR MIC) set(LIBOMP_HAVE_ITT_NOTIFY TRUE) else() set(LIBOMP_HAVE_ITT_NOTIFY FALSE) endif()
and then in CMakeLists.txt:
set(LIBOMP_USE_ITT_NOTIFY "${LIBOMP_HAVE_ITT_NOTIFY}" CACHE BOOL "Should itt notify interface be built?")
This had been covered by the change http://reviews.llvm.org/D20517 (commit rL270884).
"Right now, always." looks wrong with this change, and should probably be removed from the comment.