From 7038db2f7d264c4d8f138f7afa0423344ff46971 Mon Sep 17 00:00:00 2001 From: Jeff Larkin Date: Thu, 5 Jul 2018 10:36:08 -0400 Subject: [PATCH] Added USE_NVTX_API to the manual. Backed out accidental change to GNUCompiler.cmake --- CMake/GNUCompilers.cmake | 4 ++-- manual/external_tools.tex | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMake/GNUCompilers.cmake b/CMake/GNUCompilers.cmake index c2d850f04..dd5ff6b6f 100755 --- a/CMake/GNUCompilers.cmake +++ b/CMake/GNUCompilers.cmake @@ -41,8 +41,8 @@ if(CMAKE_CXX_FLAGS MATCHES "-march=" OR CMAKE_C_FLAGS MATCHES "-march=") endif() #(CMAKE_CXX_FLAGS MATCHES "-march=" AND CMAKE_C_FLAGS MATCHES "-march=") else() #(CMAKE_CXX_FLAGS MATCHES "-march=" OR CMAKE_C_FLAGS MATCHES "-march=") # use -march=native - #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") - #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif() #(CMAKE_CXX_FLAGS MATCHES "-march=" OR CMAKE_C_FLAGS MATCHES "-march=") ENDIF(NOT $ENV{CRAYPE_VERSION} MATCHES ".") diff --git a/manual/external_tools.tex b/manual/external_tools.tex index 660b4ebff..cac57b94a 100644 --- a/manual/external_tools.tex +++ b/manual/external_tools.tex @@ -19,6 +19,16 @@ An example of options to be passed to CMake -DCMAKE_LIBRARY_PATH=/opt/intel/vtune_amplifier_xe/lib64 \end{shade} +\section{NVIDIA Tools Extensions (NVTX)} + +NVIDIA's Tools Extensions (NVTX) API enables programmers to annotate their source code when used with the NVIDIA profilers. + +\subsection{NVTX API} + +If the variable \texttt{USE\_NVTX\_API} is set, QMCPACK will add the library (\texttt{libnvToolsExt.so}) to the qmcpack target. To add NVTX annotations +to a function, it is necessary to include the \texttt{nvToolsExt.h} header file and then make the appropriate calls into the NVTX API. For more information +about the NVTX API, see \url{https://docs.nvidia.com/cuda/profiler-users-guide/index.html#nvtx}. Any additional calls to the NVTX API should be guarded by +the \texttt{USE\_NVTX\_API} compiler define. \subsection{Timers as Tasks} To aid in connecting the timers in the code to the profile data, the start/stop of