Skip to content

Instantly share code, notes, and snippets.

@mharsch
Created December 11, 2012 16:53
Show Gist options
  • Save mharsch/4260240 to your computer and use it in GitHub Desktop.
Save mharsch/4260240 to your computer and use it in GitHub Desktop.
build PAPI 5.0.1 with cuda component on Ubuntu 12.04 with CUDA 5
mharsch@linbrook:~/tmp$ uname -a
Linux linbrook 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
mharsch@linbrook:~/tmp$ cd papi-5.0.1/
mharsch@linbrook:~/tmp/papi-5.0.1$ cd src/components/cuda
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ echo $LD_LIBRARY_PATH
/usr/local/cuda-5.0/lib64:/usr/local/cuda-5.0/extras/CUPTI/lib64:/lib:
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ echo $PATH
/home/mharsch/local/bin:/usr/local/cuda-5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ ./configure --help|grep with-cu
--with-cuda_incdir=<path> Specify path to CUDA includes
--with-cupti_incdir=<path> Specify path to CuPTI includes
--with-cupti_libdir=<path> Specify path to cupti library
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ ./configure --with-cuda_incdir=/usr/local/cuda-5.0/include --with-cupti_incdir=/usr/local/cuda-5.0/extras/CUPTI/include --with-cupti_libdir=/usr/local/cuda-5.0/extras/CUPTI/lib64
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for cuptiSubscribe in -lcupti... yes
CUDA 5.0 used
configure: creating ./config.status
config.status: creating Makefile.cuda
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ cd ../..
mharsch@linbrook:~/tmp/papi-5.0.1/src$ LDFLAGS="-L/usr/local/cuda-5.0/lib64 -L/usr/local/cuda-5.0/extras/CUPTI/lib64 -lcuda -lcudart -lcupti" ./configure --with-components=cuda
checking for architecture... x86_64
checking for OS... linux
checking for OS version... 3.2.0-29-generic
<snip>
mharsch@linbrook:~/tmp/papi-5.0.1/src$ make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment