From 90ebdd920f36da6bf41503663a80eb4e25cd3a7b Mon Sep 17 00:00:00 2001 From: Matthias Jurenz Date: Mon, 25 Nov 2013 12:58:43 +0000 Subject: [PATCH] =?UTF-8?q?Changes=20to=20VT:=20=09-=20added=20preprocesso?= =?UTF-8?q?r=20conditional=20for=20vt=5Fcupti=5Fevents=5Fenabled=20=09=20?= =?UTF-8?q?=20(fixes=20compile=20error=20when=20CUDA-RT=20wrapper=20are=20?= =?UTF-8?q?enabled=20and=20CUPTI=20is=20disabled=20(as=20reported=20at:=20?= =?UTF-8?q?https://svn.open-mpi.org/trac/ompi/changeset/29752=20by=20J?= =?UTF-8?q?=C3=B6rg=20Bornschein))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit was SVN r29754. --- ompi/contrib/vt/vt/ChangeLog | 2 ++ ompi/contrib/vt/vt/vtlib/vt_cudart.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ompi/contrib/vt/vt/ChangeLog b/ompi/contrib/vt/vt/ChangeLog index 86bce2e97d..21088943d5 100644 --- a/ompi/contrib/vt/vt/ChangeLog +++ b/ompi/contrib/vt/vt/ChangeLog @@ -3,6 +3,8 @@ - removed non-posix call to length(array) in AWK script for generating the C MPI wrapper functions - fixed potential buffer overflow when reading the filter file + - fixed build error when the CUDA runtime API wrapper are enabled and + CUPTI is disabled - enabled access to CUPTI counters for CUDA tracing via CUPTI - enabled GPU memory usage tracing independent of the CUDA API - enabled recording of CUDA synchronization and implicit synchronization in diff --git a/ompi/contrib/vt/vt/vtlib/vt_cudart.c b/ompi/contrib/vt/vt/vtlib/vt_cudart.c index a817b814ba..a556451723 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_cudart.c +++ b/ompi/contrib/vt/vt/vtlib/vt_cudart.c @@ -2722,7 +2722,10 @@ cudaError_t cudaLaunch(VT_CUDARTWRAP_COMPAT_PTR entry) /* get an already created unused event */ kernel->evt = vtDev->evtbuf_pos; - if(!vt_cupti_events_enabled){ +#if defined(VT_CUPTI_EVENTS) + if(!vt_cupti_events_enabled) +#endif + { /* increment buffers */ vtDev->evtbuf_pos++; vtDev->buf_pos += sizeof(VTCUDAKernel);